# US 12,192,031 B2 · Invoking device services in preset software frameworks

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,192,031 B2
- Document ID: US12192031B2
- Status: Granted
- Kind: B2
- Application number: 17/903,986
- Filed: 2022-09-06
- Published: 2023-10-12
- Granted: 2025-01-07
- Earliest claimed: 2022-04-06
- Assignees: Beijing Xiaomi Mobile Software Co., Ltd.
- Applicants: Beijing Xiaomi Mobile Software Co., Ltd.
- Inventors: Sichang Fu; Guoliang Li
- Web page: https://patentgrep.com/patent/US12192031B2

## CPC

- H04L 12/40032: {Details regarding a bus interface enhancer}
- H04L 65/1026: {at the edge}
- H04L 12/1859: {adapted to provide push services, e.g. data channels}
- H04L 12/66: Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
- H04L 41/082: the condition being updates or upgrades of network functionality
- H04L 43/04: Processing captured monitoring data, e.g. for logfile generation
- H04L 65/1069: Session establishment or de-establishment
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L 67/34: {involving the movement of software or configuration parameters (network booting or remote initial program loading [RIPL] G06F9/4416)}
- H04L 67/51: Discovery or management thereof, e.g. service location protocol [SLP] or web services
- H04L 51/214: using selective forwarding
- H04L 63/0823: {using certificates (cryptographic mechanisms or cryptographic arrangements for entity authentication involving certificates H04L9/3263)}
- H04L 69/24: Negotiation of communication capabilities
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method for operating a software framework is provided. The method may be applied to a software framework applicable to a gateway device, the software framework includes an application service layer and a basic service layer, the application service layer includes at least one device service registered in advance, and the basic service layer includes a data bus built in advance. The method includes: realizing a capability of a device associated with the gateway device based on the device service; and realizing communication between the device service and an external service based on the data bus, where the external service includes a device service belonging to a same gateway device as the device service or a different gateway device than the device service.

## Claims

### Claim 1

A method for invoking a service, comprising:
generating, by a first device service in a preset software framework, service invocation request information in response to detecting that current environment meets a condition of invoking a second device service in the preset software framework, wherein the preset software framework is applicable to a gateway device, the preset software framework comprises a plurality of device services registered in advance, and each of the plurality of device services corresponds to a capability of a device associated with the gateway device in the current environment;
sending, by the first device service, the service invocation request information to the second device service based on a data bus preset in the preset software framework; and
receiving, by the first device service, service invocation response information sent by a second gateway service based on the data bus, wherein the service invocation response information comprises information generated based on an obtained processing result after the second device service performs processing on the service invocation request information that is received;
wherein generating the service invocation request information in response to detecting that the current environment meets the condition of invoking the second device service in the preset software framework comprises:
generating the service invocation request information based on a service query result obtained in advance, in response to detecting that the current environment meets the condition of invoking the second device service in the preset software framework, wherein the service query result comprises a result obtained by querying a service in the preset software framework in advance.

### Claim 2 (depends on 1)

The method according to claim 1, wherein sending the service invocation request information to the second device service based on the data bus preset in the preset software framework comprises:
publishing the service invocation request information to the data bus based on a first preset topic, causing the second device service to receive the service invocation request information sent by the data bus based on the first preset topic subscribed in advance, wherein the first preset topic comprises at least one of followings: a transmission range of the service invocation request information, receiver identification information of the service invocation request information or a message type of the service invocation request information.

### Claim 3 (depends on 1)

The method according to claim 1, wherein receiving service invocation response information sent by the second gateway service based on the data bus comprises:
receiving the service invocation response information sent by the data bus based on a second preset topic subscribed in advance, wherein the service invocation response information comprises information generated based on an obtained processing result and published to the data bus based on the second preset topic, after the second device service performs processing on the received service invocation request information; and the second preset topic comprises at least one of followings: a transmission range of the service invocation response information, receiver identification information of the service invocation response information, or a message type of the service invocation response information.

### Claim 4 (depends on 1)

The method according to claim 1, wherein, the first device service comprises a hub service configured in advance;
the method further comprises:
acting as an agent for a third device service to provide external service, in response to accepting entrustment of the third device service in the preset software framework, wherein the third device service comprises a non-hub service configured in advance.

### Claim 5 (depends on 1)

The method according to claim 1, wherein, the first device service comprises a hub service configured in advance;
the method further comprises:
scheduling, in response to detecting that the preset software framework comprises two or more non-hub services capable of providing a same service, the non-hub services based on a preset service scheduling rule.

### Claim 6

A gateway device, comprising:
a processor and a memory for storing computer programs;
wherein the processor is configured to implement acts comprising:
generating service invocation request information in response to detecting that current environment meets a condition of invoking a second device service in a preset software framework, wherein the preset software framework is applicable to the gateway device, the preset software framework comprises a plurality of device services registered in advance, and each of the device services corresponds to a capability of a device associated with the gateway device in the current environment;
sending the service invocation request information to the second device service based on a data bus preset in the preset software framework; and
receiving service invocation response information sent by a second gateway service based on the data bus, wherein the service invocation response information comprises information generated based on an obtained processing result after the second device service performs processing on the service invocation request information that is received;
wherein generating the service invocation request information in response to detecting that the current environment meets the condition of invoking the second device service in the preset software framework comprises:
generating the service invocation request information based on a service query result obtained in advance, in response to detecting that the current environment meets the condition of invoking the second device service in the preset software framework, wherein the service query result comprises a result obtained by querying a service in the preset software framework in advance.

### Claim 7 (depends on 6)

The gateway device according to claim 6, wherein sending the service invocation request information to the second device service based on the data bus preset in the preset software framework comprises:
publishing the service invocation request information to the data bus based on a first preset topic, causing the second device service to receive the service invocation request information sent by the data bus based on the first preset topic subscribed in advance, wherein the first preset topic comprises at least one of followings: a transmission range of the service invocation request information, receiver identification information of the service invocation request information or a message type of the service invocation request information.

### Claim 8 (depends on 6)

The gateway device according to claim 6, wherein receiving service invocation response information sent by the second gateway service based on the data bus comprises:
receiving the service invocation response information sent by the data bus based on a second preset topic subscribed in advance, wherein the service invocation response information comprises information generated based on an obtained processing result and published to the data bus based on the second preset topic, after the second device service performs processing on the received service invocation request information; and the second preset topic comprises at least one of followings: a transmission range of the service invocation response information, receiver identification information of the service invocation response information, or a message type of the service invocation response information.

### Claim 9 (depends on 6)

The gateway device according to claim 6, wherein the first device service comprises a hub service configured in advance;
the method further comprises:
acting as an agent for a third device service to provide external service, in response to accepting entrustment of the third device service in the preset software framework, wherein the third device service comprises a non-hub service configured in advance.

### Claim 10 (depends on 6)

The gateway device according to claim 6, wherein, the first device service comprises a hub service configured in advance;
the method further comprises:
scheduling, in response to detecting that the preset software framework comprises two or more non-hub services capable of providing a same service, the non-hub services based on a preset service scheduling rule.
