Service processing method and device

By establishing data connections between IoT devices and servers, and using inter-process communication for service registration and message push, the problem of insufficient operating pressure and flexibility of IoT device service management is solved, and efficient utilization and flexibility of device resources is achieved. promote.

CN114553948BActive Publication Date: 2024-11-29ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210129652.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-11-29
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to effectively manage and optimize the service registration and message push of IoT devices, resulting in high pressure on equipment operation, insufficient flexibility and diversity.

Method used

By establishing data connections between IoT devices and servers, using service clients to communicate between processes, realizing service registration and message push of target service types, reducing device resource usage, and improving device operation efficiency and flexibility.

Benefits of technology

It realizes the interface call and data communication between the lightweight service client and the device client of IoT devices, reduces the operating pressure and resource usage of equipment, and improves the flexibility and diversity of equipment usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114553948B_ABST
    Figure CN114553948B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a service processing method and device, wherein a service processing method includes: obtaining a registration call message sent by a device client of an IoT device, wherein the registration call message carries a type identifier of a target service type; based on a data connection established with a server, sending a service registration request carrying the type identifier to the server to perform service registration of the target service type for the IoT device; if a service message of a service application of the target service type sent by the server through the data connection is received, calling the callback object of the registration call message to return the service message to the device client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data processing technology, and in particular to a service processing method and device. Background Art

[0002] With the development of Internet technology and the popularization of mobile terminals, more and more services have begun to extend to online scenarios, and application platform software that can carry multiple application sub-programs has emerged, avoiding users from installing different types of applications on mobile terminals. Instead, services are handled with the help of application sub-programs installed in the application platform software. At the same time, application sub-programs can also make full use of the abundant user traffic of the application platform software to provide support for the service improvement of application sub-programs. Summary of the invention

[0003] One or more embodiments of the present specification provide a service processing method, which is applied to a service client, and the method includes: obtaining a registration call message sent by a device client of an IoT device. The registration call message carries a type identifier of a target service type. Based on a data connection established with a server, a service registration request carrying the type identifier is sent to the server to register a service of the target service type for the IoT device. If a service message of a service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to transmit the service message back to the device client.

[0004] One or more embodiments of the present specification provide another service processing method, which is applied to a server, and the method includes: receiving a service registration request sent by a service client of an IoT device based on an established data connection. The service registration request carries a type identifier of a target service type. A service registration of the target service type is performed for the IoT device. If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type.

[0005] One or more embodiments of the present specification provide a service processing device, which runs on a service client, and the device includes: a registration call message acquisition device, which is configured to obtain a registration call message sent by a device client of an IoT device. The registration call message carries a type identifier of a target service type. A service registration request sending device is configured to send a service registration request carrying the type identifier to the server based on a data connection established with the server, so as to perform service registration of the target service type for the IoT device. A service message return device is configured to call the callback object of the registration call message to return the service message to the device client if a service message of a service application of the target service type sent by the server through the data connection is received.

[0006] One or more embodiments of the present specification provide another service processing device, which runs on the server side, and the device includes: a service registration request receiving device, which is configured to receive a service registration request sent by a service client of an IoT device based on an established data connection. The service registration request carries a type identifier of a target service type. A service registration device, which is configured to perform service registration of the target service type for the IoT device. A service message sending device, which is configured to determine the service type corresponding to the service message if a service message pushed by a service application is received, and send the service message to a service client installed on a registered device of the service type.

[0007] One or more embodiments of the present specification provide a service processing device, including: a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor: obtains a registration call message sent by a device client of an IoT device. The registration call message carries a type identifier of a target service type. Based on a data connection established with a server, a service registration request carrying the type identifier is sent to the server to register a service of the target service type for the IoT device. If a service message of a service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to transmit the service message back to the device client.

[0008] One or more embodiments of the present specification provide another service processing device, including: a processor; and a memory configured to store computer executable instructions, which, when executed, cause the processor to: receive a service registration request sent by a service client of an IoT device based on an established data connection. The service registration request carries a type identifier of a target service type. A service registration of the target service type is performed for the IoT device. If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type.

[0009] One or more embodiments of the present specification provide a storage medium for storing computer-executable instructions, which implement the following process when executed by a processor: obtain a registration call message sent by a device client of an IoT device. The registration call message carries a type identifier of a target service type. Based on a data connection established with a server, a service registration request carrying the type identifier is sent to the server to register a service of the target service type for the IoT device. If a service message of a service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to transmit the service message back to the device client.

[0010] One or more embodiments of the present specification provide another storage medium for storing computer executable instructions, which implement the following process when executed by a processor: Receive a service registration request sent by a service client of an IoT device based on an established data connection. The service registration request carries a type identifier of a target service type. Perform service registration for the target service type for the IoT device. If a service message pushed by a service application is received, determine the service type corresponding to the service message, and send the service message to a service client installed on a registered device of the service type. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0012] Figure 1 A process flow chart of a service processing method provided for one or more embodiments of this specification;

[0013] Figure 2 A timing diagram of a service processing method applied to a vehicle terminal device scenario provided by one or more embodiments of this specification;

[0014] Figure 3 A processing flow chart of another service processing method provided for one or more embodiments of this specification;

[0015] Figure 4 A schematic diagram of a service processing device provided for one or more embodiments of this specification;

[0016] Figure 5 A schematic diagram of another service processing device provided for one or more embodiments of this specification;

[0017] Figure 6 A schematic diagram of the structure of a service processing device provided for one or more embodiments of this specification;

[0018] Figure 7 A schematic diagram of the structure of another service processing device provided in one or more embodiments of this specification. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0020] This specification provides a service processing method embodiment:

[0021] Reference Figure 1 The service processing method provided in this embodiment is applied to a service client, and the method specifically includes steps S102 to S106.

[0022] Step S102: Obtain a registration call message sent by a device client of the IoT device.

[0023] The service processing method provided in the present application starts from a registration call initiated by a device client installed on an IoT device to a service client installed on the IoT device, and sends a service registration request to the server through a pre-established data connection between the service client and the server, so as to perform corresponding service registration for the IoT device through the server, and on the basis of device registration for the IoT device, push the service message issued by the service application under the service type registered by the IoT device to the device client through the server and the service client, thereby realizing lightweight message push for the IoT device, reducing the operating pressure of the IoT device, and improving the flexibility and diversity of the use of the IoT device.

[0024] The IoT (Internet of Things) device described in this embodiment includes but is not limited to at least one of the following: a vehicle terminal installed in the vehicle, a terminal device external to the vehicle, a smart speaker, an unmanned vending machine, an autonomous radio, an interactive advertising screen, a POS device, and smart home appliances such as smart TVs and smart refrigerators.

[0025] The device client refers to the system program that the IoT device itself relies on for operation. The service client refers to the client installed by the IoT device for data communication with the server. As a lightweight client for data communication with the device client and the server, the service client reduces the occupation of the operating resources of the IoT device, thereby reducing the occupation of the operating resources of the IoT device when the operating resources of the IoT device are limited. At the same time, the IoT device reduces the occupation of the operating resources of the IoT device, which also helps to improve the operating efficiency of the IoT device itself.

[0026] In actual applications, the service client is installed and configured by the device provider of the IoT device. After the installation and configuration is completed, the device client can communicate data with the service client through interface calls after the IoT device is started. Specifically, when the IoT device is started, the device client calls the service client to establish a data connection with the server. After the service client establishes a data connection with the server in response to the call of the device client, the device client calls the service client to register the service for the IoT device. The device provider includes the manufacturer, seller and / or service operator of the IoT device.

[0027] In specific implementation, during the process of the device client calling the service client to register the service, the registration call message is sent to the service client through an interface call. Correspondingly, the service client receives the registration call message sent by the device client, and the registration call message carries the type identifier of the target service type. The target service type refers to the service type for which the IoT device is registered. In this embodiment, when registering a service for an IoT device, the service registration is performed using the service type as the registration unit, such as registering a vehicle-mounted service type or a merchant discount service type for an IoT device; the type identifier refers to the identifier of the service type currently being registered for the IoT device.

[0028] In an optional implementation manner provided by this embodiment, the device client calls the service client to perform initialization processing after detecting that the IoT device is started. The initialization processing includes establishing a data connection between the book search service client and the server. Accordingly, the service client performs the following initialization processing operations in response to the call of the device client:

[0029] Obtaining an initialization instruction sent by the device client after detecting that the IoT device is started; the initialization instruction carries a device identification and a service token of the IoT device;

[0030] A data connection with the server is established based on the device identification and the service token.

[0031] Optionally, the IoT device runs the device client at startup, and the service client remains in operation after receiving the initialization instruction sent during the operation of the device client; the data connection includes an HTTP long connection established based on the HTTP protocol; the service client can respond to the call of the device client in a timely manner while remaining in operation, and at the same time, by establishing the HTTP long connection between the service client and the server, the server can realize data communication with the server more timely, thereby improving the processing timeliness of the IoT device during operation.

[0032] In this embodiment, in order to reduce the occupancy of the IoT device's operating resources (such as memory) by the service client, optionally, the device client and the service client use inter-process communication (IPC) to communicate messages. The use of inter-process communication can realize the sharing of memory resources of the IoT device in a shared memory manner, which helps to improve the utilization of the memory resources of the IoT device. At the same time, the use of inter-process communication also helps to improve the communication efficiency between the device client and the service client.

[0033] Based on this, in the case where the device client and the service client use inter-process communication to communicate messages, optionally, the registration call message is sent by the device client to the service client through the messenger object used by the service client for inter-process communication; the callback object points to the messenger object used by the device client for inter-process communication.

[0034] For example, during the process of registering a service for an IoT device, the device client sends a message to the service client through the service client's messenger object. The message is a registration call message for registering a service for the IoT device. At the same time, the message sent by the device client to the service client also carries a callback object (replyTo), which points to the device client's messenger object. Through the callback object, the service client can send messages to the device client.

[0035] As described above, the device client calls the service client to perform initialization processing by means of interface calls. Optionally, the device client is configured with an interface file, and the interface file includes an initialization interface for sending the initialization instruction to the service client in response to the call of the device client; at the same time, based on the above-mentioned message communication between the device client and the service client using inter-process communication, the interface file also includes: an inter-process communication interface for sending the registration call message to the service client in the form of inter-process communication in response to the call of the device client. The above-mentioned device client implements the call to the service client through a pre-configured interface file. The implementation method of interface call reduces the difficulty of the device provider to develop the service client. At the same time, compared with adding the implementation code for initialization processing and service registration in the implementation code of the device client, the interface call method also reduces the code volume of the device client, thereby reducing the operating pressure of the IoT device.

[0036] Furthermore, the interface file configured by the client may also be an interface file corresponding to the service client. For example, the service client installed on the IoT device is a client application in APK format. The device client integrates the SDK corresponding to the client application and implements interface calls with the client application through the API (Application Programming Interface) provided by the SDK (Software Development Kit).

[0037] Step S104: Based on the data connection established with the server, a service registration request carrying the type identifier is sent to the server to register the service of the target service type for the IoT device.

[0038] After receiving the registration call message sent by the device client, the service client sends a service registration request carrying the target service type to the server based on the type identifier of the target service type carried in the registration call information, so as to register the service of the target service type for the IoT device on the server; when the service client sends the service registration request to the server, it sends it to the server through a data connection established in advance with the server. The data connection mentioned here refers to the data connection established between the above-mentioned service client and the server after receiving the initialization instruction.

[0039] The service registration described in this embodiment includes registering service permissions for the corresponding service type for the IoT device. After the service permissions are registered, the message push permissions for the service application of the corresponding service type for the IoT device are activated, that is, after the service registration is performed for the IoT device, the service application under the target service type can push messages to the IoT device.

[0040] Optionally, after performing service registration for the target service type for the IoT device, the IoT device is registered as a registered device of the target service type, and the registered device of the target service type is enabled with message permission to receive message push from a service application of the target service type; wherein the service application includes a third-party application, a sub-application of the third-party application, and a sub-application in a sub-application pool of a preset platform; the preset platform is a sub-application platform for which the device provider of the IoT device performs device registration for the IoT device.

[0041] In addition, the target service type can also be replaced with a service domain. In this regard, in the process of performing service registration for the service domain for the IoT device, performing service registration for the service domain for the IoT device includes: registering the domain access rights of the IoT device for the service domain, and based on the domain access rights, opening the message push rights for the service messages whose message types of the sub-applications within the service domain match the service domain.

[0042] Step S106: If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to return the service message to the device client.

[0043] After the service registration request is sent to the server, the server registers the service for the IoT device according to the type identifier carried in the service registration request. After completing the service registration, the service application of the target service type has the message push permission to push messages to the IoT device. On this basis, the server receives the service message synchronized by the service application, and sends the service message synchronized by the service application to the service client through the data connection. In this step, if the service client receives the service message of the service application of the target service type sent by the server, the callback object of the registration call message is called to return the service message to the device client, so as to display or play the service message through the device client.

[0044] In specific implementation, based on the data connection established between the service client and the server, in addition to the above-mentioned implementation method of the service client receiving the service message pushed by the service application of the target service type, in order to improve the comprehensiveness of the service push provided to the IoT device, targeted service push can also be performed based on the device data of the IoT device. In an optional implementation provided by this embodiment, the service push based on the device data of the IoT device specifically includes: the service client obtains the device data of the IoT device collected by the device client, and uploads the device data to the server through the data connection; after receiving the device data, the server determines the target service application corresponding to the device data in the target service type, and sends a service request carrying the device data to the target service application, so that the target service application performs service response processing on the device data, receives the service response sent by the target service application after performing the service response processing, and sends it to the service client through the data connection; thereafter, the service client receives the service response sent by the server for the device data, and calls the callback object to return the service response to the device client.

[0045] As described above, in the case where the target service type is replaced with the service domain, the service push based on the device data of the IoT device specifically includes uploading the device data of the IoT device collected by the device client to the server through the data connection; after receiving the device data, the server determines the service domain corresponding to the device data, and sends a service request carrying the device data to the service application in the service domain to perform service response processing on the device data, receives the service response sent by the service application in the service domain, and sends it to the service client through the data connection; accordingly, the service client receives the service response sent by the server for the device data, and calls the callback object to return the service response to the device client.

[0046] This embodiment implements interface calls and data communications between a lightweight service client installed on an IoT device and an installed device client through an inter-process communication method, thereby implementing data communications between the device client and the server with the help of a lightweight service client installed on the IoT device, reducing the operating pressure of the IoT device, and reducing the occupation of the operating resources of the IoT device by the data communication process. It should be noted that, in the process of the service application of the target service type implemented in the above manner pushing service messages to the device client through the server and the service client, the service message pushed by the service application to the IoT device is a general service message, that is, a service message that does not have a specific corresponding relationship or data relationship with the IoT device or the user to which the IoT device belongs, such as an advertising-type service message, or a POI (Point of Interest) within a preset distance range when the vehicle is in a certain geographical location.

[0047] The following uses the application of a service processing method provided by this embodiment in a vehicle terminal device scenario as an example to further illustrate the service processing method provided by this embodiment. Figure 2 , a service processing method applied to a service client, specifically includes the following steps.

[0048] Step S202: obtaining an initialization instruction sent by the device client installed in the vehicle terminal device by calling the initialization interface after detecting that the vehicle terminal device is started. The initialization instruction carries the device identification and service token of the vehicle terminal device.

[0049] Step S204: establishing a data connection with the server based on the device identifier and the service token.

[0050] Step S208, obtaining a registration call message sent by the device client by calling the inter-process communication interface. The registration call message carries a type identifier of the target service type.

[0051] Step S210: Send a service registration request carrying a type identifier to a server based on a data connection. The service registration request carries a type identifier of a target service type.

[0052] Step S220: receiving a service message of a service application of a target service type sent by the server through a data connection.

[0053] Step S222: calling the callback object of the registration call message to return a service message to the device client.

[0054] Another service processing method embodiment provided in this specification:

[0055] The service processing method applied to the server provided in this embodiment cooperates with the service processing method applied to the service client provided in the above embodiment during execution. Therefore, please refer to the corresponding contents of the above embodiment when reading this embodiment.

[0056] Reference Figure 3 The service processing method provided in this embodiment is applied to the server, and the method specifically includes steps S302 to S306.

[0057] Step S302: receiving a service registration request sent by a service client of the IoT device based on the established data connection.

[0058] The IoT (Internet of Things) device described in this embodiment includes but is not limited to at least one of the following: a vehicle terminal installed in the vehicle, a terminal device external to the vehicle, a smart speaker, an unmanned vending machine, an autonomous radio, an interactive advertising screen, a POS device, and smart home appliances such as smart TVs and smart refrigerators.

[0059] The service client refers to the client installed by the IoT device for data communication with the server. As a lightweight client that communicates data with the device client installed by the IoT device and the server, the service client reduces the occupation of the operating resources of the IoT device, thereby reducing the occupation of the operating resources of the IoT device when the operating resources of the IoT device are limited. At the same time, the IoT device reduces the occupation of the operating resources of the IoT device, which also helps to improve the operating efficiency of the IoT device itself. The device client refers to the system program that the IoT device itself relies on for operation.

[0060] In actual applications, the service client is installed and configured by the device provider of the IoT device. After the installation and configuration is completed, the device client can communicate data with the service client through interface calls after the IoT device is started. Specifically, when the IoT device is started, the device client calls the service client to establish a data connection with the server. After the service client establishes a data connection with the server in response to the call of the device client, the device client calls the service client to register the service for the IoT device. The device provider includes the manufacturer, seller and / or service operator of the IoT device.

[0061] In specific implementation, in the process of registering services for IoT devices, the device client sends the registration call message to the service client through an interface call. After receiving the registration call message sent by the device client, the service client sends a service registration request to the server. Here, the server receives the service registration request sent by the service client, and the service registration request carries a type identifier of the target service type. The target service type refers to the service type for which the IoT device is registered. In this embodiment, when registering services for IoT devices, service registration is performed using the service type as the registration unit, such as registering a vehicle-mounted service type or a merchant discount service type for IoT devices; the type identifier refers to the identifier of the service type currently being registered for the IoT device.

[0062] In this embodiment, after detecting that the IoT device is started, the device client calls the service client to perform initialization processing. The initialization processing includes establishing a data connection between the book search service client and the server. Accordingly, the service client establishes a data connection with the server in response to the call of the device client. During this process, the server cooperates with the service client to establish the data connection, and the data connection includes an HTTP long connection established based on the HTTP protocol.

[0063] Step S304: register the target service type for the IoT device.

[0064] The service registration described in this embodiment includes registering service permissions for the corresponding service type for the IoT device. After the service permission is registered, the message push permission for the service application of the corresponding service type for the IoT device is opened, that is, after the service registration is performed for the IoT device, the service application under the target service type can push messages to the IoT device. Optionally, after the service registration of the target service type is performed for the IoT device, the IoT device is registered as a registered device of the target service type, and the registered device of the target service type is opened to receive message push messages from the service application of the target service type; wherein the service application includes a third-party application, a sub-application of the third-party application, and a sub-application in the sub-application pool of a preset platform; the preset platform is a sub-application platform for the device provider of the IoT device to register the IoT device.

[0065] In addition, the target service type can also be replaced with a service domain. In this regard, in the process of performing service registration for the service domain for the IoT device, performing service registration for the service domain for the IoT device includes: registering the domain access rights of the IoT device for the service domain, and based on the domain access rights, opening the message push rights for the service messages whose message types of the sub-applications within the service domain match the service domain.

[0066] Step S306: If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type.

[0067] After the above-mentioned service registration of the target service type for the IoT device is completed, the service application of the target service type has the message push permission to push messages to the IoT device. On this basis, the server receives the service message synchronized by the service application, and sends the service message synchronized by the service application to the corresponding service client through the data connection; specifically, in the process of sending the service message to the corresponding service client, first determine the service type corresponding to the service message, and then send the service message to the service client installed on the registered device of the service type.

[0068] In an optional implementation manner provided by this embodiment, determining the service type corresponding to the service message includes: determining the service type corresponding to the service message based on service data contained in the service message, or determining the service type corresponding to the service message according to the application type of the service application.

[0069] On this basis, the service message is sent to the service client installed in the registered device of the service type, and the following optional implementation method is adopted: if the service type is the target service type, the service message is sent to the service client installed in the IoT device.

[0070] In specific implementation, based on the data connection established between the service client and the server, in addition to the above-mentioned implementation method of the service client receiving the service message pushed by the service application of the target service type, in order to improve the comprehensiveness of the service push provided to the IoT device, targeted service push can also be performed based on the device data of the IoT device. In an optional implementation provided by this embodiment, the service push based on the device data of the IoT device specifically includes: the service client obtains the device data of the IoT device collected by the device client, and uploads the device data to the server through the data connection; after receiving the device data, the server determines the target service application corresponding to the device data in the target service type, and sends a service request carrying the device data to the target service application, so that the target service application performs service response processing on the device data, receives the service response sent by the target service application after performing the service response processing, and sends it to the service client through the data connection; thereafter, the service client receives the service response sent by the server for the device data, and calls the callback object to return the service response to the device client.

[0071] As described above, in the case where the target service type is replaced with the service domain, the service push based on the device data of the IoT device is specifically performed by the service client uploading the device data of the IoT device collected by the device client to the server through the data connection; after receiving the device data, the server determines the service domain corresponding to the device data, and sends a service request carrying the device data to the service application within the service domain to perform service response processing on the device data, receives the service response sent by the service application within the service domain, and sends it to the service client through the data connection; thereafter, the service client receives the service response sent by the server for the device data, and calls the callback object to return the service response to the device client.

[0072] This embodiment implements interface calls and data communications between a lightweight service client installed on an IoT device and an installed device client through an inter-process communication method, thereby implementing data communications between the device client and the server with the help of a lightweight service client installed on the IoT device, reducing the operating pressure of the IoT device, and reducing the occupation of the operating resources of the IoT device by the data communication process. It should be noted that, in the process of the service application of the target service type implemented in the above manner pushing service messages to the device client through the server and the service client, the service message pushed by the service application to the IoT device is a general service message, that is, a service message that does not have a specific corresponding relationship or data relationship with the IoT device or the user to which the IoT device belongs, such as an advertising-type service message, or a POI (Point of Interest) within a preset distance range when the vehicle is in a certain geographical location.

[0073] The following uses the application of a service processing method provided by this embodiment in a vehicle terminal device scenario as an example to further illustrate the service processing method provided by this embodiment. Figure 2 , a service processing method applied to the server side specifically includes the following steps.

[0074] Step S210: establishing a data connection with the service client installed in cooperation with the vehicle-mounted terminal device.

[0075] Step S212: receiving a service registration request sent by the service client based on the data connection. The service registration request carries a type identifier of the target service type.

[0076] Step S214: register the target service type for the vehicle-mounted terminal device.

[0077] Step S216: If a service message pushed by a service application is received, determine the service type corresponding to the service message based on the service data included in the service message.

[0078] Step S218: If the determined service type is the target service type, a service message is sent to the vehicle-mounted terminal device.

[0079] An embodiment of a service processing device provided in this specification is as follows:

[0080] In the above-mentioned embodiment, a service processing method applied to a service client is provided, and correspondingly, a service processing device running on the service client is also provided, which will be described below with reference to the accompanying drawings.

[0081] Reference Figure 4 , which shows a schematic diagram of a service processing device provided in this embodiment.

[0082] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.

[0083] This embodiment provides a service processing device, which runs on a service client, and includes:

[0084] The registration call message obtaining means 402 is configured to obtain a registration call message sent by a device client of the IoT device, wherein the registration call message carries a type identifier of a target service type;

[0085] The service registration request sending means 404 is configured to send a service registration request carrying the type identifier to the server based on the data connection established with the server, so as to perform service registration of the target service type for the IoT device;

[0086] The service message returning means 406 is configured to, upon receiving a service message of the service application of the target service type sent by the server through the data connection, call the callback object of the registration calling message to return the service message to the device client.

[0087] Another embodiment of a service processing device provided in this specification is as follows:

[0088] In the above-mentioned embodiment, a service processing method applied to a server is provided, and correspondingly, a service processing device running on the server is also provided, which will be described below with reference to the accompanying drawings.

[0089] Reference Figure 5 , which shows a schematic diagram of a service processing device provided in this embodiment.

[0090] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.

[0091] This embodiment provides a service processing device, which runs on a server, and includes:

[0092] The service registration request receiving means 502 is configured to receive a service registration request sent by a service client of an IoT device based on an established data connection; the service registration request carries a type identifier of a target service type;

[0093] A service registration device 504 is configured to perform service registration of the target service type for the IoT device;

[0094] The service message sending device 506 is configured to, upon receiving a service message pushed by a service application, determine the service type corresponding to the service message, and send the service message to a service client installed in a registered device of the service type.

[0095] An embodiment of a service processing device provided in this specification is as follows:

[0096] Corresponding to the service processing method applied to the service client described above, based on the same technical concept, one or more embodiments of this specification also provide a service processing device, which is used to execute the service processing method provided above. Figure 6 A schematic diagram of the structure of a service processing device provided in one or more embodiments of this specification.

[0097] This embodiment provides a service processing device, including:

[0098] like Figure 6 As shown, the service processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 can be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the service processing device. Furthermore, the processor 601 can be configured to communicate with the memory 602 and execute a series of computer executable instructions in the memory 602 on the service processing device. The service processing device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input / output interfaces 605, one or more keyboards 606, etc.

[0099] In a specific embodiment, the service processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the service processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0100] Obtain a registration call message sent by a device client of the IoT device, where the registration call message carries a type identifier of a target service type;

[0101] Based on the data connection established with the server, send a service registration request carrying the type identifier to the server to register the service of the target service type for the IoT device;

[0102] If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to return the service message to the device client.

[0103] Another service processing device embodiment provided in this specification is as follows:

[0104] Corresponding to the service processing method applied to the server described above, based on the same technical concept, one or more embodiments of this specification also provide a service processing device, which is used to execute the service processing method provided above. Figure 7 A schematic diagram of the structure of a service processing device provided in one or more embodiments of this specification.

[0105] This embodiment provides a service processing device, including:

[0106] like Figure 7 As shown, the service processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 may be a temporary storage or a permanent storage. The application stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the service processing device. Furthermore, the processor 701 may be configured to communicate with the memory 702 and execute a series of computer executable instructions in the memory 702 on the service processing device. The service processing device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input / output interfaces 705, one or more keyboards 706, etc.

[0107] In a specific embodiment, the service processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the service processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0108] Receive a service registration request sent by a service client of the IoT device based on the established data connection; the service registration request carries a type identifier of a target service type;

[0109] Performing service registration of the target service type for the IoT device;

[0110] If a service message pushed by a service application is received, a service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type.

[0111] An embodiment of a storage medium provided in this specification is as follows:

[0112] Corresponding to the above-described service processing method applied to a service client, based on the same technical concept, one or more embodiments of this specification further provide a storage medium.

[0113] The storage medium provided in this embodiment is used to store computer executable instructions, and the computer executable instructions implement the following process when executed by a processor:

[0114] Obtain a registration call message sent by a device client of the IoT device, where the registration call message carries a type identifier of a target service type;

[0115] Based on the data connection established with the server, send a service registration request carrying the type identifier to the server to register the service of the target service type for the IoT device;

[0116] If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object of the registration call message is called to return the service message to the device client.

[0117] It should be noted that the embodiments of the storage medium in this specification and the embodiments of the service processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding method mentioned above, and the repeated parts will not be repeated.

[0118] Another storage medium embodiment provided in this specification is as follows:

[0119] Corresponding to the service processing method applied to the server described above, based on the same technical concept, one or more embodiments of this specification also provide a storage medium.

[0120] The storage medium provided in this embodiment is used to store computer executable instructions, and the computer executable instructions implement the following process when executed by a processor:

[0121] Receive a service registration request sent by a service client of the IoT device based on the established data connection; the service registration request carries a type identifier of a target service type;

[0122] Performing service registration of the target service type for the IoT device;

[0123] If a service message pushed by a service application is received, a service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type.

[0124] It should be noted that the embodiments of the storage medium in this specification and the embodiments of the service processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding method mentioned above, and the repeated parts will not be repeated.

[0125] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0126] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0127] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0128] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0129] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0130] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0131] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0134] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0135] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0136] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0138] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0140] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A service processing method, applied to a lightweight service client installed in an IoT device, wherein the service client communicates data with a server and a device client on which the IoT device depends. include: Acquire a registration call message sent by the device client through a messenger object for inter-process communication of the service client, wherein the registration call message carries a type identifier of a target service type; Based on the data connection established with the server, send a service registration request carrying the type identifier to the server to register the service of the target service type for the IoT device; If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object pointing to the messenger object of the registration call message is called to return the service message to the device client.

2. The service processing method according to claim 1, before the step of obtaining the registration call message sent by the device client through the messenger object for inter-process communication of the service client is executed, include: Obtaining an initialization instruction sent by the device client after detecting that the IoT device is started; The initialization instruction carries the device identification and service token of the IoT device; A data connection with the server is established based on the device identification and the service token. 3 . The service processing method according to claim 1 , wherein the device client and the service client perform message communication in an inter-process communication manner.

4. According to the service processing method of claim 3, the device client is configured with an interface file, and the interface file includes: an initialization interface for sending an initialization instruction to the service client in response to a call from the device client, and an inter-process communication interface for sending the registration call message to the service client in an inter-process communication manner in response to a call from the device client.

5. The service processing method according to claim 1, further comprising: include: Acquire device data of the IoT device collected by the device client, and upload the device data to the server through the data connection; A service response is received from the server for the device data, and the callback object is called to transmit the service response back to the device client.

6. The service processing method according to claim 2, wherein the IoT device runs the device client at startup, and the service client remains in operation after receiving the initialization instruction sent during the operation of the device client; The data connection includes an HTTP long connection established based on the HTTP protocol.

7. According to the service processing method of claim 1, after the service registration of the target service type is performed for the IoT device, the IoT device is registered as a registered device of the target service type, and the registered device of the target service type is enabled with a message permission to receive message pushes of the service application of the target service type; in, The service application includes a sub-application in a sub-application pool, a third-party application and / or a sub-application of a third-party application.

8. A service processing method, applied to a server, the method include: Receiving a service registration request sent by a lightweight service client installed on the IoT device based on an established data connection; The service registration request carries a type identifier of the target service type; The service registration request is sent after the service client receives a registration call message carrying the type identifier sent by a device client on which the IoT device depends through a messenger object of the service client for inter-process communication; The service client performs data communication with the server and the device client; Performing service registration of the target service type for the IoT device; If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type, so that the service client calls the callback object of the registration call message pointing to the messenger object to return the service message to the device client.

9. The service processing method according to claim 8, before the step of receiving the service registration request sent by the service client of the IoT device based on the established data connection is performed, include: Cooperating with the service client to establish the data connection; The data connection includes an HTTP long connection established based on the HTTP protocol.

10. The service processing method according to claim 8, wherein the determining the service type corresponding to the service message comprises: include: The service type corresponding to the service message is determined based on the service data included in the service message, or the service type corresponding to the service message is determined according to the application type of the service application.

11. The service processing method according to claim 10, wherein the service message is sent to a service client installed in a registered device of the service type. include: If the service type is the target service type, the service message is sent to the service client installed on the IoT device.

12. The service processing method according to claim 8, further comprising: include: Receiving device data of the IoT device uploaded by the service client, and determining a target service application corresponding to the device data within the target service type; Sending a service request carrying the device data to the target service application, so that the target service application performs service response processing on the device data; A service response is received from the target service application after service response processing, and is sent to the service client through the data connection.

13. The service processing method according to claim 8, after the service registration of the target service type is performed for the IoT device, the IoT device is registered as a registered device of the target service type, and the registered device of the target service type is enabled with a message permission to receive message pushes of the service application of the target service type; in, The service application includes a sub-application in a sub-application pool, a third-party application and / or a sub-application of a third-party application.

14. A service processing device, which runs on a lightweight service client installed on an IoT device, wherein the service client communicates data with a server and a device client on which the IoT device depends. include: A registration call message acquisition device is configured to acquire a registration call message sent by the device client through a messenger object for inter-process communication of the service client, wherein the registration call message carries a type identifier of a target service type; A service registration request sending device, configured to send a service registration request carrying the type identifier to the server based on a data connection established with the server, so as to perform service registration of the target service type for the IoT device; The service message return device is configured to call the callback object pointing to the messenger object of the registration call message to return the service message to the device client if a service message of the service application of the target service type is received from the server through the data connection.

15. A service processing device, running on a server, the device include: A service registration request receiving device, configured to receive a service registration request sent by a lightweight service client installed on the IoT device based on an established data connection; The service registration request carries a type identifier of a target service type; the service registration request is sent after the service client receives a registration call message carrying the type identifier sent by a messenger object on which the IoT device depends for operation through the service client for inter-process communication; The service client performs data communication with the server and the device client; A service registration device, configured to perform service registration of the target service type for the IoT device; The service message sending device is configured to determine the service type corresponding to the service message if a service message pushed by a service application is received, and send the service message to a service client installed in a registered device of the service type, so that the service client calls the callback object pointing to the messenger object of the registration call message to return the service message to the device client.

16. A service processing device, which runs on a lightweight service client installed on an IoT device, wherein the service client communicates data with a server and a device client on which the IoT device depends. include: processor; and a memory configured to store computer executable instructions that, when executed, cause the processor to: Acquire a registration call message sent by the device client through a messenger object for inter-process communication of the service client, wherein the registration call message carries a type identifier of a target service type; Based on the data connection established with the server, send a service registration request carrying the type identifier to the server to register the service of the target service type for the IoT device; If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object pointing to the messenger object of the registration call message is called to return the service message to the device client.

17. A service processing device, running on a server, the device include: processor; and a memory configured to store computer executable instructions that, when executed, cause the processor to: Receive a service registration request sent by a lightweight service client installed by an IoT device based on an established data connection; the service registration request carries a type identifier of a target service type; the service registration request is sent after the service client receives a registration call message carrying the type identifier sent by a messenger object that the IoT device depends on for operation through the service client for inter-process communication; The service client performs data communication with the server and the device client; Performing service registration of the target service type for the IoT device; If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type, so that the service client calls the callback object of the registration call message pointing to the messenger object to return the service message to the device client.

18. A storage medium, running on a lightweight service client installed on an IoT device, the service client communicating data with a server and a device client on which the IoT device depends, the storage medium storing computer executable instructions, the computer executable instructions implementing the following process when executed by a processor: Acquire a registration call message sent by the device client through a messenger object for inter-process communication of the service client, wherein the registration call message carries a type identifier of a target service type; Based on the data connection established with the server, send a service registration request carrying the type identifier to the server to register the service of the target service type for the IoT device; If a service message of the service application of the target service type sent by the server through the data connection is received, the callback object pointing to the messenger object of the registration call message is called to return the service message to the device client.

19. A storage medium, running on a server, for storing computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the following process: Receive a service registration request sent by a lightweight service client installed by an IoT device based on an established data connection; the service registration request carries a type identifier of a target service type; the service registration request is sent after the service client receives a registration call message carrying the type identifier sent by a messenger object that the IoT device depends on for operation through the service client for inter-process communication ; The service client performs data communication with the server and the device client; Performing service registration of the target service type for the IoT device; If a service message pushed by a service application is received, the service type corresponding to the service message is determined, and the service message is sent to a service client installed on a registered device of the service type, so that the service client calls the callback object of the registration call message pointing to the messenger object to return the service message to the device client.

Citation Information

Patent Citations

  • Method of joint registration and de-registration for proximity services and internet of things services

    CN105659634A

  • Basic service configuration method, client and server

    CN107453922A