Distributed capability sharing method and system and electronic equipment
By establishing a capability management service on the device and registering the target capability call permission information, the problem of complex business processing between devices is solved, and the sharing of business processing capabilities and secure data transmission between devices are realized.
Patent Information
- Application Number
- CN202511102318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies cannot effectively handle complex scenarios across different devices, and single-capability devices cannot meet the needs of various complex scenarios.
By establishing capability management services on the current device and remote device, registering the target capability call permission information, and realizing the call of the target capability and data return through the capability management service, the business processing capability sharing between devices can be achieved.
It enables the sharing of business processing capabilities among different devices, improving the security of data transmission and the collaborative working ability between devices.
Smart Images

Figure CN120956727A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a distributed capability sharing method, system, and electronic device. Background Technology
[0002] With the continuous development of internet technology, various devices and applications with different business processing capabilities have emerged. These devices and applications with varying processing capabilities enable the handling of different business scenarios.
[0003] However, with the development of the industry, various complex business scenarios have emerged, and devices and applications with single capabilities are no longer able to effectively handle these complex scenarios. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a distributed capability sharing method and apparatus to realize the sharing of business processing capabilities among different devices.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A distributed capability sharing method includes: Establish capability management services on the current equipment; Register the target capability access permission information on the remote device to the capability management service; The receiving capability subscription application invokes a target capability in the capability management service; Find the target capability invocation permission information corresponding to the remote device that matches the target capability, execute the target capability on the remote device, and return the result to the current device.
[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A distributed capability sharing system includes at least two connected terminal devices, which execute the distributed capability sharing method described above.
[0007] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the distributed capability sharing method described above.
[0008] The beneficial effects of this invention are as follows: by registering the target capability call permission information on the remote device to the capability management service of the current device, when a third-party application such as a capability subscription application needs to call the target capability on the remote device, it can obtain the target capability call permission information on the remote device through the capability management service, and after executing the target capability on the remote device, return the data to the current device, thereby realizing the sharing of business processing capabilities between the current device and the remote device. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating the steps of a distributed capability sharing method in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a distributed capability sharing system according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a connection method for a distributed capability sharing system according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a method for invoking a distributed capability sharing system according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0010] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0012] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0013] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0014] The distributed capability sharing method, system, and electronic device provided by this invention can be applied to distributed business collaboration scenarios involving multiple devices, enabling devices to cooperate in completing various complex business scenarios. For example, in a multi-terminal payment scenario, after ordering food through a smart POS device's ordering application and generating an order, the relevant order information needs to be sent to the smart POS machine's payment application to complete the QR code payment. Similarly, after filling in invoice information through a mobile phone's invoice entry application, the invoice information needs to be sent to a computer terminal's invoicing application to complete the invoice printing. The following detailed implementation methods illustrate this.
[0015] Table 1. Glossary
[0016] To address the aforementioned problems, this application provides a distributed capability sharing method. The following section details one such method; please refer to [link / reference]. Figure 1 This includes S1-S4.
[0017] S1. Establish a capability management service on the current device; simultaneously, establish a capability management service on the remote device as well, referred to as the local capability management service and the remote capability management service, respectively; the current device and the remote device establish a connection through the local capability management service and the remote capability management service. The capability management service on the current device can connect to the capability management services of other devices (remote devices) on the local area network. During connection, the current device and the remote device establish a secure channel after authentication. Establishing a secure channel mainly involves encrypting the transmitted data through key negotiation, ensuring that the sending and receiving of data between the capability management services on the current device and the remote device is transmitted through the secure channel, thereby improving the security of data transmission.
[0018] S2. Register the target capability invocation permission information on the remote device to the capability management service. The target capability invocation permission information is obtained by the capability publishing application; registering the target capability invocation permission information to the capability management service means registering the capability publishing application's capabilities to the device's capability management service. Specifically, this includes registering capabilities such as printing, payment, and scanning to the capability management service.
[0019] S3. Receive a call from a capability subscription application to a target capability in the capability management service. For example, if the capability subscription application needs to call the printing capability, it will receive the corresponding call request.
[0020] S4. Locate the target capability invocation permission information corresponding to the remote device that matches the target capability, execute the target capability on the remote device, and return the result to the current device. For example, if the target capability that the current device needs to invoke is printing capability, then on the local capability management service, query the printing capability invocation permission information and the remote device corresponding to the printing capability, then access the remote device through the printing capability invocation permission information, execute the printing capability on the remote device, and return the printed data to the current device.
[0021] In a specific application scenario, let's take the example of the ordering application (capability subscription application) of a smart cash register (the current device) calling the payment application (capability publishing application) of a smart POS (the remote device) to illustrate this: S1. Establish capability management services on the smart cash register; at the same time, establish capability management services on the smart POS as well, and establish a connection between the smart cash register and the smart POS.
[0022] S2. Register the payment capability access permission information of the payment application on the smart POS to the capability management service of the smart cash register.
[0023] S3. When the ordering application needs to call the payment capability, the smart cash register receives the ordering application's request to call the payment capability.
[0024] S4. The smart POS uses its capability management service to find the payment capability call permission information that matches the payment capability, as well as the remote device (i.e., smart POS) to which the payment capability call permission information belongs. Then, the smart POS executes the payment capability and returns the payment information to the smart POS.
[0025] By registering the target capability invocation permission information on the remote device to the capability management service of the current device, when a third-party application such as a capability subscription application needs to invoke the target capability on the remote device, it can obtain the target capability invocation permission information on the remote device through the capability management service, execute the target capability on the remote device, and return the data to the current device, thereby realizing the sharing of business processing capabilities between the current device and the remote device.
[0026] In one embodiment of this application, the method further includes the steps of: registering the target capability invocation permission information on the current device to the capability management service; then finding the target capability invocation permission information corresponding to the current device that matches the target capability, executing the target capability on the current device, and returning the result to the current device.
[0027] For example, if the target capability that the current device needs to call is printing, the local capability management service will query the printing capability call permission information corresponding to the printing capability, and then execute the printing capability on the current device. That is, if the capability subscription application on the current device needs to call the target capability of printing, the local capability management service may query the current device or the remote device, and either the current device or the remote device can execute the printing capability.
[0028] By setting the capabilities on both the local and remote devices on the capability management service, when third-party applications such as capability subscription applications need to call the capabilities of capability publishing applications, they can obtain the capabilities of capability publishing applications on the local device or the remote device through the capability management service, thereby achieving the sharing of business processing capabilities between different devices.
[0029] In one embodiment of this application, the method further includes the steps of: sending the target capability invocation permission information of the current device to at least one of the remote devices, and instructing at least one of the remote devices to save the target capability invocation permission information of the current device to the capability management service corresponding to the at least one remote device. That is, the current device can establish connections with multiple remote devices, enabling each remote device to invoke the target capability on the current device, and enabling the current device to invoke the target capability on any remote device.
[0030] In one embodiment of this application, the method further includes the steps of: the current device obtaining the target capability invocation permission information sent by the remote device; executing the target capability on the current device and returning the result to the remote device. That is, if the capability subscription application is on the remote device, the capability management service corresponding to the remote device searches for the target capability invocation permission information corresponding to the current device that matches the target capability, executes the target capability on the current device, and returns the result to the remote device. This enables the sharing of business processing capabilities between the current device and the remote device when the capability subscription application on the remote device invokes the target capability on the current device.
[0031] In one embodiment of this application, the method further includes the step of: obtaining all the target capabilities of the capability publishing application, and generating target capability invocation permission information for each of the target capabilities. That is, a capability publishing application may include multiple target capabilities, and by generating corresponding target capability invocation permission information for each target capability, the invocation of different target capabilities in the capability publishing application can be realized.
[0032] In one embodiment of this application, before S2, registering the target capability invocation permission information on the remote device to the capability management service, the following steps are included: S02. Verify the signature of the target capability call permission information. If the verification is successful, save the target capability call permission information to the database corresponding to the capability management service. That is, the target capability call permission information is only registered with the capability management service after successful verification, thereby ensuring the security of the registered capability.
[0033] During the registration process, the system scans the installation packages of all installed applications on the current device, reads the authorization information from all packages, verifies the signature of the authorization information, and if the verification is successful, parses and saves the authorization information. That is, when the current device initializes the capability management service, it scans the installation packages of installed applications, and after verification and parsing, saves the authorization information to the database. Subsequent steps can then use the authorization information in the database for capability registration, querying, and permission verification. The authorization information for capability publishers and subscribers is shown in Tables 1 and 2, respectively. Table 2. Authorization Document Information for Capability Publisher Applications
[0034] Table 3. License File Information for Capability Subscriber Applications
[0035] In practical applications, the capability publishing application registers its various capabilities with the capability management service of its respective device by calling the interface on the capability management service. The callback interface is used to receive messages from the capability management service. When registering a capability, the capability management service checks whether the application's authorization information exists, whether the application's appID matches the appID in the authorization information, and whether the registered capability is declared in the published capability list of the authorization information. After the checks are passed, the mapping table between the capability ID and the callback interface is saved. The capability ID is composed of the application package name and the capability name.
[0036] In one embodiment of this application, S3, after receiving a call from a capability subscription application to a target capability in the capability management service, includes: S31. Determine whether the target capability call permission information records the capability subscription application. If so, execute the call to the target capability. That is, it is necessary to confirm that the capability subscriber application has the corresponding permissions before the call operation can be performed.
[0037] Another embodiment of the present invention provides a distributed capability sharing system, please refer to... Figure 2 The system includes at least two connected terminal devices, which execute the distributed capability sharing method described above as the current device. This embodiment uses a call between two terminal devices as an example. The first terminal is defined as the local device, which includes a local capability management service, a local capability publishing application, and a local capability subscription application. The other terminal is defined as the remote device, which includes a remote capability management service, a remote capability publishing application, and a remote capability subscription application.
[0038] There are two main ways to communicate between local and remote devices: (1) A call from a capability subscription application on a remote device to a capability publishing application on the current device; defined as: a call from a remote capability subscription application to a local capability publishing application. After receiving the call request, the current device will randomly generate a connection ID and record the mapping relationship between the connection ID and the remote capability publishing application (i.e., the second connection relationship). Then, it will generate response data and send it to the remote capability management service. Subsequently, the remote capability management service will record the mapping relationship between the connection ID and the current device (i.e., the first connection relationship) and forward the response data to the remote capability subscription application. At this point, the capability call session connection between the remote capability subscription application and the local capability publishing application is completed. By establishing the connection between the local capability management service and the remote capability management service, and the connection between the remote capability subscription application and the local capability publishing application in sequence, the call of the capabilities of the local capability publishing application by the remote capability subscription application can be realized.
[0039] (2) The ability subscription application on the current device calls the ability publishing application on the remote device; the connection is established in the same way as described above.
[0040] The device itself calls its own functions, taking the current device as an example: (3) Calls made by the capability subscription application on the current device to the capability publishing application on the current device; defined as: calls made by the local capability subscription application to the local capability publishing application. When the local capability subscription application calls the local capability management service to connect to and call the capability, the capability management service will check whether the authorization information of the local capability subscription application exists, whether the application's appID is consistent with the appID of the authorization information, and whether the capability and interface permissions to be used are declared in the subscription capability list of the authorization information. If the check fails, the local capability subscription application is not allowed to connect to or call the capability; the capability subscription application is judged to have the corresponding permissions through the authorization information before the call is made to ensure the security of the call process.
[0041] Both the local and remote devices have multiple capability publishing applications and capability subscription applications. Taking the ordering application (capability subscriber) of the smart cash register (local device) calling the payment application (capability publisher) of the smart POS (remote device) as an example, the specific process of the local capability subscription application calling the remote capability publishing application is as follows: I. For the ability of local application to subscribe to remote application capabilities and publish applications, please refer to [link / reference]. Figure 3 The specific steps are as follows: 1. The local capability subscription application registers a callback interface with the local capability management service and receives messages from the local capability management service through the callback interface; the ordering application registers a callback interface with the capability management service on the smart POS machine and receives messages from the capability management service on the smart POS machine through the callback interface.
[0042] 2. The local capability management service sends the connection request to the remote capability management service. Before sending, the local capability management service checks the authorization information of the local capability subscription application. After the check is passed, the local capability management service sends the connection request to the remote capability management service. The capability management service on the smart cash register sends the connection request to the capability management service on the smart POS.
[0043] 3. The remote capability management service forwards the connection request to the remote capability publishing application of the associated remote device. When the remote capability publishing application allows the local capability subscription application to connect, the remote capability management service will randomly generate a connection ID, record the mapping relationship between the connection ID and the remote capability publishing application, and then generate response data and send it to the local capability management service. The capability management service on the smart POS forwards the connection request to the payment application. After the payment application allows the ordering application to connect, it records the mapping relationship between the connection ID and the payment application, generates response data, and sends it to the capability management service on the smart cash register.
[0044] 4. The local capability management service records the mapping relationship between the connection ID and the remote capability management service, and forwards the response data to the local capability subscription application. At this point, the capability call session connection between the local capability subscription application and the remote capability publishing application is complete. The capability management service on the smart POS records the mapping relationship between the connection ID and the capability management service on the smart POS, and sends it to the ordering application. After establishing a distributed connection between the smart POS and smart POS devices, the smart POS synchronizes the payment capabilities of the payment application to the capability management service of the smart POS.
[0045] II. For the ability of a local application to subscribe to and call a remote application's published capabilities, please refer to [link / reference]. Figure 4 The specific steps are as follows: 1. The local capability subscription application sends request data to the local capability management service. The request data includes the connection ID, method name, method parameters and other content that needs to be called. When the ordering application on the smart POS machine generates an order and needs to make payment, the ordering application sends request data containing the payment method to the smart POS machine.
[0046] 2. The local service checks the authorization information of the local capability subscription application. If the check is successful, the local capability management service queries the mapping relationship between the connection ID and the remote capability management based on the connection ID, thereby obtaining the corresponding remote capability management service. If the check fails, the call is rejected. After the smart POS machine capability management service finds an application with payment capabilities on the smart POS machine, the smart POS machine capability management service connects with the smart POS machine capability management service after the authorization information of the ordering application is verified.
[0047] 3. The local capability management service forwards request data to the remote capability management service; the smart cash register capability management service forwards request data to the smart POS machine capability management service.
[0048] 4. The remote capability management service queries the mapping relationship between the connection ID and the remote capability publishing application based on the connection ID, thereby obtaining the corresponding remote capability publishing application; the capability management service of the smart POS machine obtains the relevant information of the payment application.
[0049] 5. The remote capability management service forwards request data to the remote capability publishing application; the smart POS machine's capability management service forwards request data to the payment application.
[0050] 6. The remote capability publishing application receives and processes the request data, and then sends response data to the remote capability management service. The response data includes connection ID, method name, method response, and other data corresponding to the call content. After completing the QR code payment, the payment application sends response data to the smart POS capability management service.
[0051] 7. The remote capability management service sends response data to the local capability management service, which then forwards it to the local capability subscription application. At this point, the local capability subscription application has completed its call to the capabilities of the remote capability publishing application. The smart POS capability management service sends response data to the smart POS terminal capability management service, which then returns the payment result to the ordering application.
[0052] Please refer to Figure 5 Another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the various steps of the distributed capability sharing method described above.
[0053] In summary, the distributed capability sharing method, system, and electronic device provided by this invention, by setting the capabilities on both the current device and the remote device on a capability management service, enables third-party applications such as capability subscription applications to obtain the capabilities of the capability publishing application on the current device or the capability publishing application on the remote device when they need to call the capabilities of the capability publishing application, and establish a connection to complete data transmission, thereby realizing the sharing of business processing capabilities between different devices.
[0054] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A distributed capability sharing method, characterized in that, include: Establish capability management services on the current equipment; Register the target capability access permission information on the remote device to the capability management service; The receiving capability subscription application invokes a target capability in the capability management service; Find the target capability invocation permission information corresponding to the remote device that matches the target capability, execute the target capability on the remote device, and return the result to the current device.
2. The distributed capability sharing method according to claim 1, characterized in that, Also includes: Register the target capability invocation permission information on the current device to the capability management service; Find the target capability invocation permission information corresponding to the current device that matches the target capability, execute the target capability on the current device, and return the result to the current device.
3. The distributed capability sharing method according to claim 2, characterized in that: The target capability call permission information of the current device is sent to at least one of the remote devices, and at least one of the remote devices is instructed to save the target capability call permission information of the current device to the capability management service corresponding to the at least one remote device.
4. The distributed capability sharing method according to claim 3, characterized in that, Also includes: The current device obtains the target capability invocation permission information sent by the remote device; The target capability is executed on the current device and returned to the remote device.
5. The distributed capability sharing method according to claim 1, characterized in that, Also includes: Obtain all the target capabilities of the capability publishing application, and generate target capability call permission information for each target capability.
6. The distributed capability sharing method according to claim 1, characterized in that, Before registering the target capability invocation permission information on the current device to the capability management service, the following steps are included: Verify the signature of the target capability call permission information. If the verification is successful, save the target capability call permission information to the database corresponding to the capability management service.
7. The distributed capability sharing method according to claim 1, characterized in that, The following is included after the receiving capability subscription application invokes a target capability in the capability management service: Determine whether the target capability call permission information records the application that subscribes to the capability. If so, execute the call to the target capability.
8. The distributed capability sharing method according to claim 1, characterized in that, The current device and the remote device transmit data using a preset key.
9. A distributed capability sharing system, characterized in that, It includes at least two connected terminal devices, which, as the current device, execute the distributed capability sharing method as described in any one of claims 1-8.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the distributed capability sharing method as described in any one of claims 1-8.
Citation Information
Patent Citations
Intelligent service sharing method and device, equipment and storage medium
CN112702306A
Data sharing system and method
CN115242879A
Capability sharing method and device based on intelligent POS device, and medium
CN117593831A
Remote calling system and method for device capability, storage medium and electronic device
CN118264701A
Discovery of device capabilities
US10181978B1