A service processing method and apparatus, a storage medium, and a device
By configuring a lightweight IoT application package and message parsing module in the terminal device, communication is only performed when there is a business need, which solves the high power consumption problem caused by frequent client connections under the LWM2M protocol and realizes low-power business processing.
Patent Information
- Application Number
- CN202211423225.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-11-15
AI Technical Summary
The LWM2M protocol does not support the SMS protocol, which requires the client to frequently establish communication connections with the server, resulting in excessive power consumption.
By configuring a lightweight IoT application package in the terminal device, including a message receiving module and a message parsing module, the service processing request messages sent by the server can be obtained and parsed, and communication can be carried out only when there is a business need, thus avoiding frequent connections.
It reduces the power consumption of the communication client, thereby reducing the energy consumption of the terminal device and the load on the server, and achieving the effect of the communication client responding only when requested.
Smart Images

Figure CN115811778B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a service processing method and device, a storage medium and equipment. BACKGROUND
[0002] With the development of wireless communication technology, not only the communication between people can be realized, but also the communication between things and the communication between people and things can be realized. Considering the diversification of communication devices, in order to meet the application requirements of specific communication devices (such as low power consumption and small storage space), the LWM2M (Lightweight Machine to Machine) protocol is formulated to meet the foregoing requirements. The LWM2M is proposed by the Open Mobile Alliance (OMA) and is a lightweight and standard universal Internet of Things device management protocol, which can be used for rapid deployment of Internet of Things services in client / server mode. However, the LWM2M does not support the SMS protocol (a kind of short message communication protocol), and when the LWM2M does not support the SMS protocol, the client needs to establish a communication connection (such as establishing a communication connection through three handshakes) with the server every interval period. The server interacts with the client through the communication connection, which leads to high power consumption of the client, and further leads to the problem of excessive power consumption in the service processing between the client and the server. SUMMARY
[0003] The technical problem to be solved by the embodiments of the present application is to provide a service processing method, device, storage medium and equipment, which can reduce the power consumption caused by the service processing between the client and the server.
[0004] The embodiments of the present application provide a service processing method, which comprises:
[0005] Obtaining a lightweight Internet of Things package based on a lightweight Internet of Things, configuring the lightweight Internet of Things package in a terminal device, and obtaining a communication client of the terminal device; the communication client comprises a message receiving module and a message analysis module; the lightweight Internet of Things package is a program package used for communication between the terminal device and a server;
[0006] Obtaining a service processing request message issued by the server from a broadcast listening system of the terminal device through the message receiving module in the communication client, analyzing the service processing request message through the message analysis module, and obtaining a service indication identifier in the service processing request message; the communication client has a message acquisition authority to obtain messages from the broadcast listening system;
[0007] Determining a target service associated with the service processing request message according to the service indication identifier, and executing the target service.
[0008] The method comprises the following steps:
[0009] The initial lightweight Internet of Things program package corresponding to the lightweight Internet of Things is obtained by compiling the lightweight Internet of Things database based on the lightweight Internet of Things, wherein the lightweight Internet of Things database is a framework for communication between the terminal device and the server.
[0010] The message receiving module and the message analysis module are configured in the initial lightweight Internet of Things program package to obtain the lightweight Internet of Things program package corresponding to the lightweight Internet of Things.
[0011] The lightweight Internet of Things program package is run in the terminal device, and the message receiving module is configured to have a message acquisition authority for the broadcast listening system of the terminal device, thereby obtaining the communication client of the terminal device.
[0012] The business processing request message is analyzed by the message analysis module to obtain the business indication identifier in the business processing request message, and the method comprises the following steps:
[0013] The message type of the business processing request message is determined according to the content type field in the request header of the business processing request message by the message analysis module.
[0014] It is detected whether the identification information about the communication client exists in the business processing request message.
[0015] If the message type is the notification message type and the identification information about the communication client exists in the business processing request message, it is determined that the business processing request message is a message sent by the server to the communication client.
[0016] The message request body of the business processing request message is analyzed, and the field value corresponding to the business indication field in the message request body is taken as the business indication identifier in the business processing request message.
[0017] The target business associated with the business processing request message is determined according to the business indication identifier, and the target business is executed, and the method comprises the following steps:
[0018] The business identifier set is obtained, and the business corresponding to the business indication identifier is determined from the business identifier set as the target business, wherein the business identifier set comprises M business indication identifiers and the business corresponding to each business indication identifier, and M is a positive integer.
[0019] The target business is executed.
[0020] The target business is executed, and the method comprises the following steps:
[0021] If the target service is a wake-up service, device information of the server stored in the communication client is acquired;
[0022] By registering an update interface, a communication connection is established with the server according to the device information of the server; the communication connection is used to indicate that the server and the communication client interact through a message queue.
[0023] The target service is executed, including:
[0024] If the target service is a restart service, a device restart instruction is generated;
[0025] The device restart interface in the terminal device is called through the communication client, and the device restart instruction is executed to control the terminal device to restart.
[0026] The method further includes:
[0027] The communication client and the server are bound through a target communication mode; the target communication mode is used to indicate that the server processes a service request message broadcast to the terminal device when the communication client is in an offline state; the target communication mode is also used to indicate that the communication client enters an offline state when the duration of continuous communication between the client and the server is greater than a duration threshold, and detects the service request message about the server from the terminal device through the message receiving module from a broadcast listening system.
[0028] The application embodiment provides a service processing device, including:
[0029] The configuration module is configured to acquire a lightweight Internet of Things program package based on a lightweight Internet of Things, configure the lightweight Internet of Things program package in the terminal device, and obtain a communication client of the terminal device; the communication client includes a message receiving module and a message analysis module; the lightweight Internet of Things program package is a program package used for communication between the terminal device and the server;
[0030] The message analysis module is configured to acquire a service request message processed by the server from a broadcast listening system of the terminal device through the message receiving module in the communication client, analyze the service request message through the message analysis module, and obtain a service indication identifier in the service request message; the communication client has a message acquisition permission to acquire messages from the broadcast listening system;
[0031] The service execution module is configured to determine a target service associated with the service request message according to the service indication identifier, and execute the target service.
[0032] The configuration module includes:
[0033] The compiling unit is configured to compile a lightweight Internet of Things (IoT) database based on lightweight IoT to obtain an initial lightweight IoT program package corresponding to the lightweight IoT; the lightweight IoT database is a framework for communication between a terminal device and a server;
[0034] The first configuration unit is configured to configure a message receiving module and a message parsing module in the initial lightweight IoT program package to obtain a lightweight IoT program package corresponding to the lightweight IoT;
[0035] The second configuration unit is configured to run the lightweight IoT program package in the terminal device, and configure the message receiving module to have a message acquisition authority for a broadcast listening system of the terminal device to obtain a communication client of the terminal device.
[0036] The message parsing module includes:
[0037] The first determination unit is configured to determine, by the message parsing module, a message type of the business processing request message according to a content type field in a request header of the business processing request message;
[0038] The detection unit is configured to detect whether the business processing request message contains identification information about the communication client;
[0039] The second determination unit is configured to determine that the business processing request message is a message sent by the server to the communication client if the message type is a notification message type and the business processing request message contains the identification information about the communication client.
[0040] The parsing unit is configured to parse a message request body of the business processing request message, and take a field value corresponding to a business indication field in the message request body as a business indication identifier in the business processing request message.
[0041] The business execution module includes:
[0042] The third determination unit is configured to obtain a business identifier set, determine a business corresponding to the business indication identifier from the business identifier set as a target business, and the business identifier set includes M business indication identifiers and a business corresponding to each business indication identifier, and M is a positive integer.
[0043] The execution unit is configured to execute the target business.
[0044] The execution unit is specifically configured to:
[0045] If the target business is a wake-up business, the execution unit is configured to obtain device information of the server stored in the communication client.
[0046] The registration update interface is used to establish a communication connection with the server according to device information of the server; the communication connection is used to indicate that the server and the communication client interact with each other through a message queue.
[0047] The execution unit is specifically configured to:
[0048] If the target service is a restart service, a device restart instruction is generated.
[0049] The communication client calls a device restart interface in the terminal device to execute the device restart instruction, so as to control the terminal device to restart.
[0050] The service processing device further includes:
[0051] The communication client is bound to the server through a target communication mode; the target communication mode is used to indicate that the server broadcasts a service processing request message to the terminal device when the communication client is in an offline state; the target communication mode is also used to indicate that the communication client enters the offline state when a duration of continuous communication between the client and the server is greater than a duration threshold, and detects the service processing request message about the server from the terminal device through a message receiving module from a broadcast listening system of the terminal device.
[0052] An embodiment of the present application provides a computer device, including a processor and a memory.
[0053] The processor is connected with the memory, and the memory is used to store a computer program; the computer program is executed by the processor, so that the computer device executes the method provided in the embodiments of the present application.
[0054] An embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device with the processor executes the method provided in the embodiments of the present application.
[0055] An embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the embodiments of the present application.
[0056] In the embodiment of the present application, a lightweight Internet of Things package based on lightweight Internet of Things is acquired, the lightweight Internet of Things package is configured in a terminal device, and a communication client of the terminal device is obtained. The lightweight Internet of Things can be LWM2M protocol, the lightweight Internet of Things package based on the LWM2M protocol is configured in the terminal device, and the communication client of the terminal device is obtained. The terminal device can communicate with a server through the communication client. A message receiving module in the communication client acquires a service processing request message issued by the server from a broadcast listening system of the terminal device. A message analysis module analyzes the service processing request message, and obtains a service indication identifier in the service processing request message. The target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed. As can be seen, when the server needs to process a service, the server can issue a service processing request message to the communication client. The communication client acquires the service processing request message issued by the server through the broadcast listening system of the terminal device, and does not need to establish a communication connection with the server every time interval. That is, the server notifies the communication client to process a service when the server has a service processing demand. In this way, the communication client can process a service only when needed, and does not need to establish a communication connection with the server every time interval, which can avoid the problem that the terminal device has high power consumption and the server has high load. The present application can reduce the power consumption of the communication client, and further reduce the power consumption caused by the service interaction between the client and the server. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0058] Figure 1 is an architecture schematic diagram of a service processing system provided by an embodiment of the present application;
[0059] Figure 2 is a flow schematic diagram of a service processing method provided by an embodiment of the present application;
[0060] Figure 3 is a schematic diagram of service processing between a client and a server provided by an embodiment of the present application;
[0061] Figure 4 is a flow schematic diagram of service processing between a client and a server provided by an embodiment of the present application;
[0062] Figure 5is a structural schematic diagram of a service processing device provided by an embodiment of the present application.
[0063] Figure 6 is a structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0065] See Figure 1 , Figure 1 is a structural schematic diagram of a service processing system provided by an embodiment of the present application. As shown in Figure 1 , the service processing system can include a server 10 and a terminal device cluster. The terminal device cluster can include one or more terminal devices, and the number of terminal devices will not be limited here. As shown in Figure 1 , it can specifically include a terminal device 100a, a terminal device 100b, a terminal device 100c, …, and a terminal device 100n. As shown in Figure 1 , the terminal device 100a, the terminal device 100b, the terminal device 100c, …, and the terminal device 100n can be respectively connected in communication with the above-mentioned server 10, so that each terminal device can interact with the server 10 through the communication connection. Among them, each terminal device establishes a communication connection with the server 10; when each two terminal devices need to interact information, a terminal device (such as a sending terminal device) needs to send information to the server 10, and the server 10 forwards the information to another terminal device (such as a receiving terminal device). That is, the server 10 can be used as an intermediate device for communication between each terminal device, and the server 10 can specifically refer to a background server for processing service data. The server 10 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms, etc. Basic cloud computing services. Alternatively, the terminal device 100a, the terminal device 100b, the terminal device 100c, …, and the terminal device 100n can be directly connected through a network to communicate, that is, each terminal device can realize point-to-point communication. That is, when each two terminal devices need to interact information, the sending terminal device can directly send information to the receiving terminal device.
[0066] Each terminal device in this terminal device cluster can include: smartphones, tablets, laptops, desktop computers, wearable devices, smart home devices, head-mounted devices, in-vehicle terminals, and other intelligent terminals with business processing functions. It should be understood that, for example... Figure 1 Each terminal device in the terminal device cluster shown can have a client installed. When the client runs on each terminal device, it can communicate with the aforementioned... Figure 1 Data interaction occurs between the servers 10 shown. The client here may include a communication client or other applications capable of performing business processing.
[0067] Among them, such as Figure 1 As shown, the server 10 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0068] For ease of understanding, the embodiments of this application may be described in detail below. Figure 1 Among the multiple terminal devices shown, one terminal device is selected as the target terminal device. For example, for ease of understanding, the embodiments of this application can... Figure 1The terminal device 100a shown is the target terminal device. The terminal device 100a can obtain a lightweight Internet of Things package based on a lightweight Internet of Things. The lightweight Internet of Things can refer to a Leshan framework, which refers to LwM2M implemented in Java code. LwM2M is a lightweight, standard universal Internet of Things device management protocol proposed by the Open Mobile Alliance (OMA), which can be used for rapid deployment of client / server mode Internet of Things services. It can be understood that the terminal device 100a can compile the Leshan framework into a lightweight Internet of Things package suitable for running in the terminal device, and configure the lightweight Internet of Things package in the terminal device 100a as a communication client of the terminal device 100a. The communication client includes a message receiving module and a message parsing module, and the lightweight Internet of Things package is a program package for communication between the terminal device and the server. Further, when the server 10 needs to process a service with the communication client, a service processing request message can be issued to the terminal device 100a. The service processing request message can be a WAP PUSH message (i.e., a short message) in the SMS protocol, which is a special short message. The terminal device 100a can obtain the service processing request message issued by the server 10 from the broadcast listening system of the terminal device through the message receiving module in the communication client. At the same time, the service processing request message is parsed through the message parsing module to obtain the service indication identifier in the service processing request message, and the communication client has the message acquisition authority from the broadcast listening system.
[0069] Further, the target service associated with the service processing request message can be determined by the communication client according to the service indication identifier, and the target service is executed. It can be seen that the communication client does not need to actively establish a communication connection (such as establishing a communication connection through three-way handshake) with the server 10 every interval. When the server 10 has a service processing demand, it issues a service processing request message (i.e., a WAP PUSH message in the SMS protocol), and the communication client can obtain the service processing request message issued by the server 10 from the broadcast listening system of the terminal device, and process the service according to the service processing request message. In this way, the communication client can be sought only when necessary, and not when unnecessary, avoiding the problem that the communication client needs to establish a communication connection with the server every interval whether there is a service or not, resulting in high power consumption of the terminal device and high load of the server. The present application can reduce the power consumption caused by the service processing between the communication client and the server.
[0070] Please refer to Figure 2 , Figure 2 is a flowchart of a service processing method provided by an embodiment of the present application. The service processing method can be performed byFigure 1 It can be executed by any terminal device in the system, or by... Figure 1 The server in the middle can be used to execute it, or it can be executed by... Figure 1 The method is executed jointly by any terminal device and server in this application. The devices used to execute this business processing method in this application can be collectively referred to as computer devices. For example... Figure 2 As shown, this business processing method may include, but is not limited to, the following steps:
[0071] S101, Obtain a lightweight IoT application package based on lightweight IoT, configure the lightweight IoT application package in the terminal device, and obtain the communication client of the terminal device.
[0072] Specifically, computer devices can acquire lightweight IoT packages, which can refer to the Leshan framework. The Leshan framework specifically refers to LwM2M, implemented in Java. LwM2M, proposed by the Mobile Development Alliance (OMA), is a lightweight, standard, and universal IoT device management protocol used for rapid deployment of client / server-mode IoT services. Computer devices can compile the lightweight IoT package into a executable (APK) application for the terminal device's system. This APK application is then configured on the terminal device to create a communication client. In essence, a lightweight IoT package can be a modified Leshan framework that runs on the terminal device (e.g., an Android application), which can be installed on the terminal device for communication with the server. The communication client can refer to an LwM2M client.
[0073] Optionally, the computer device obtains the lightweight IoT application package corresponding to the lightweight IoT, and configures the lightweight IoT application package in the terminal device to obtain the communication client of the terminal device. Specific methods may include: compiling a lightweight IoT database based on lightweight IoT to obtain an initial lightweight IoT application package corresponding to lightweight IoT; the lightweight IoT database is a framework used for communication between the terminal device and the server. A message receiving module and a message parsing module are configured in the initial lightweight IoT application package to obtain the lightweight IoT application package corresponding to lightweight IoT. The lightweight IoT application package is run in the terminal device, and the message receiving module is configured to have message acquisition permissions for the terminal device's broadcast listening system to obtain the communication client of the terminal device.
[0074] Specifically, the computer device can compile a lightweight Internet of Things database of the lightweight Internet of Things to obtain an initial lightweight Internet of Things program package corresponding to the lightweight Internet of Things. The lightweight Internet of Things database can be a lightweight open source library of LwM2M, implemented using Java code, and is a framework database for communication between a terminal device and a server. The initial lightweight Internet of Things program package can run in the system of the terminal device. Further, the computer device can configure a message receiving module and a message parsing module in the initial lightweight Internet of Things program package to obtain a lightweight Internet of Things program package corresponding to the lightweight Internet of Things. The computer device can set the message receiving module to receive a service processing request message issued by the server from the broadcast listening system of the terminal device, and set the message parsing module to parse the service processing request message issued by the server to determine the target service indicated by the server.
[0075] Further, the lightweight Internet of Things program package is run in the terminal device, and the message receiving module is configured to have message acquisition authority for the broadcast listening system of the terminal device to obtain a communication client of the terminal device. It can be understood that the computer device can control the communication client to register a WAP PUSH broadcast to receive the service processing request message issued by the server, that is, the message receiving module is configured in the communication client to receive the service processing request message issued by the server, and the computer device needs to add the message acquisition authority of the message receiving module in the communication client for the broadcast listening system of the terminal device in the terminal device. For example, the computer device can add the message acquisition authority of the communication client for the broadcast listening system of the terminal device in the AndroidManifest.xml (application file of the terminal device) of the terminal device, that is, <uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" / >.
[0076] S102, through the message receiving module in the communication client, the service processing request message issued by the server is acquired from the broadcast listening system of the terminal device, and the message processing request message is parsed through the message parsing module to obtain the service indication identifier in the service processing request message.
[0077] Specifically, when the server needs to process a service with the communication client, the server can send a service processing request message to the communication client through a WAP PUSH message (i.e., a short message) in an SMS protocol. The SMS protocol is a short message protocol for storing and forwarding services. That is, a short message is not directly sent from a sender to a receiver, but is forwarded through an SMS center. If the receiver is in an unconnected state, the short message will be sent when the receiver is connected again. The WAP PUSH message is a special short message, also called service information or push information, and is a short message with a link, which can guide you to the website of the server. The broadcast listening system of the terminal device can listen to the short message sent by the server to the specific application (i.e., android.provider.Telephony.WAP_PUSH_DELIVER), and of course, can also listen to the short message sent by the server to all applications (i.e., android.provider.Telephony.WAP_PUSH_RECEIVED). The computer device can obtain the service processing request message sent by the server through the message receiving module in the communication client from the broadcast listening system of the terminal device. Further, the computer device can analyze the service processing request message through the message analysis module to obtain the service indication identifier in the service processing request message, and the communication client has the message acquisition permission of the broadcast listening system. The service indication identifier is used to indicate the service to be processed.
[0078] Optionally, the specific manner of the computer device analyzing the service processing request message can include: determining the message type of the service processing request message according to the content type field in the request header of the service processing request message through the message analysis module. Detecting whether the identification information about the communication client exists in the service processing request message. If the message type is a notification message type, and the identification information about the communication client exists in the service processing request message, it is determined that the service processing request message is the message sent by the server to the communication client. The message request body of the service processing request message is analyzed, and the field value corresponding to the service indication field in the message request body is taken as the service indication identifier in the service processing request message.
[0079] Specifically, since the service processing request message issued by the server can be sent to other devices, after the computer device receives the service processing request message issued by the server through the message receiving module, the computer device can detect whether the service processing request message issued by the server is sent to the communication client through the message analysis module. Specifically, the computer device can determine the message type of the service processing request message according to the content type field in the request header of the service processing request message through the message analysis module. Specifically, the computer device can obtain the content type field (i.e. Content Type) in the request header of the service processing request message, and obtain the field value of the content type field, and determine the field value of the content type field as the message type of the service processing request message. At the same time, the computer device can detect whether there is identification information about the communication client in the service processing request message. If the computer device detects that the message type is a notification message type, i.e. the Content Type (content type field) is application / vnd.syncml.notification, and there is identification information about the communication client in the service processing request message, i.e. the Header name is x-wap-application-Id and x-wap-application is lwm2m.dm, it is determined that the service processing request message is the message sent by the server to the communication client.
[0080] Further, the computer device can analyze the message request body of the service processing request message through the message analysis module, and take the field value corresponding to the business indication field in the message request body as the business indication identifier in the service processing request message. Specifically, the computer device can obtain the business indication field (i.e. resource id) in the DATA field of the service processing request message, and take the field value corresponding to the resource id field as the business indication identifier in the service processing request message. For example, when the field value of the resource id field is / 1 / * / 8, the business indication identifier is / 1 / * / 8. The business indication identifier can be a wake-up indication identifier (such as / 1 / * / 8), a restart indication identifier, or a factory reset indication identifier, etc. The wake-up indication identifier corresponds to the wake-up business of the communication client (i.e. instructing the communication client to establish a communication connection with the server), the restart indication identifier is used to instruct to restart the terminal device, and the factory reset indication identifier is used to instruct to restore the terminal device to factory settings.
[0081] Optionally, the communication client is bound with the server through a target communication mode; the target communication mode is used to indicate that the server processes a service request message broadcasted by a terminal device when the communication client is in an offline state; the target communication mode is also used to indicate that the communication client enters the offline state when a duration of continuous communication between the client and the server is greater than a duration threshold, and detects the service request message about the server from a broadcast listening system of the terminal device through a message receiving module.
[0082] Specifically, if the duration of continuous communication between the communication client and the server through a communication connection is greater than a duration threshold, the communication client can be controlled to enter an offline state. Wherein, the client entering the offline state means that the server considers that the client is not online and is out of contact. In this way, the communication client can not actively establish a communication connection with the server (such as establishing a communication connection through three-way handshake) after the duration of continuous communication is greater than the duration threshold, which can avoid that the communication client still establishes a communication connection with the server when the server has no service processing, can reduce the power consumption of the communication client, and can reduce the high load of the server caused by the communication client re-establishing a communication connection with the server every time the duration of continuous communication is greater than the duration threshold. Wherein, the duration threshold can refer to the maximum session effective duration between the communication client and the server. In related technologies, the server has a maximum session effective duration (such as 60s), and the communication client needs to actively register with the server every interval less than the maximum session effective duration, otherwise, the server will consider that the communication client is offline (i.e. out of contact), and will not interact with the communication client.
[0083] Therefore, it will cause the communication client to need to establish a communication connection with the server regardless of whether there is a service, which leads to high power consumption of the communication client and high load of the server. The application binds the communication client with the server through a target communication mode, in which, when the duration of continuous communication between the communication client and the server is greater than the duration threshold, the communication client enters the offline state, so that the communication client does not need to register with the server to establish a communication connection, which can reduce the power consumption of the communication client. Meanwhile, in the target communication mode, the communication client can listen to a service request message broadcasted by the server through a message receiving module in the communication client when the communication client is in the offline state, and interact with the server through the service request message broadcasted by the server. In the target communication mode, the server can send a service request message (i.e. SMS WAP PUSH) to the communication client to inform the communication client that it needs to interact with the server, and the server can send the service request message through the network.
[0084] The target communication mode can be a UQS mode, U represents a UDP protocol, Q represents a Queue mode (i.e., a queuing mode), and S represents an SMS. If the communication client is bound to the server by the UQS mode, the server can broadcast a service processing request message to the communication client when the communication client is in an offline state, to notify the communication client to interact with it for business. The UDP protocol (User Datagram Protocol) is a user datagram protocol. The UDP provides a method for an application program to send encapsulated data packets without establishing a connection. The communication client can register a WAPPUSH broadcast to receive a service processing message issued by the server, and determine whether the message in the broadcast is a service processing request message issued by the server to the communication client. It can be understood that the communication client registers the WAP PUSH broadcast, which means that the communication client can configure a message receiving module and a message parsing module, and configure the message receiving module to have a message acquisition authority for a broadcast listening system of a terminal device, to receive an SMS WAP PUSH issued by the server, and of course, to receive an SMS WAP PUSH (i.e., a service processing request message) issued by the server in other ways.
[0085] In S103, the target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed.
[0086] Specifically, after the computer device obtains the service indication identifier, the target service associated with the service processing request message can be determined according to the service indication identifier, and the target service is executed. The service indication identifier can be a wake-up indication identifier (such as / 1 / * / 8), a restart indication identifier, or a factory reset indication identifier, etc. The wake-up indication identifier corresponds to a wake-up service of the communication client (i.e., notifying the communication client to establish a communication connection with the server), the restart indication identifier is used to instruct to restart the terminal device, and the factory reset indication identifier is used to instruct to restore the terminal device to the factory settings. The target service can be to wake up the communication client, or to instruct the communication client to restart the terminal device, or to instruct the communication client to perform a factory reset operation on the terminal device, or to instruct the communication client to obtain the version number of the terminal device, or to instruct the communication client to obtain the location information of the terminal device, or to instruct the communication client to obtain the device information of the terminal device, etc. In this way, the server can directly issue an SMS WAP PUSH message (i.e., a service processing message) to the communication client, to implement business processing with the communication client, and to reduce the business processing power consumption between the server and the communication client.
[0087] Optionally, the computer device determines the target service associated with the service processing request message according to the service indication identifier, and the specific manner of executing the target service can comprise: obtaining a service identifier set, determining the service corresponding to the service indication identifier in the service identifier set as the target service; the service identifier set comprises M service indication identifiers, and each service indication identifier corresponds to a service, and M is a positive integer. The target service is executed
[0088] Specifically, the computer device can parse the request body in the service processing request message to obtain the service indication identifier in the service processing request message, and then obtain a service identifier set, which comprises M service indication identifiers and a candidate service type corresponding to each service indication identifier, and M is a positive integer, such as 1, 2, 3, …. The service indication identifier can be a wake-up indication identifier (such as / 1 / * / 8), a restart indication identifier, or a factory reset indication identifier, etc. The wake-up indication identifier corresponds to the wake-up service of the communication client (i.e. instructing the communication client to establish a communication connection with the server), the restart indication identifier is used to instruct the terminal device to restart, and the factory reset indication identifier is used to instruct the terminal device to restore factory settings. The service identifier set can be common in LwM2M authentication, or it can be set according to specific circumstances, which is not limited in the embodiments of the present application.
[0089] Optionally, when the server issues the service processing request message to the communication client, the agreed key between the server and the communication client can be obtained. The server can generate an initial service processing request message, which is used to instruct the communication client to execute the target service. The server can encrypt the request body in the initial service processing request message according to the agreed key to obtain the service processing request message, and then broadcast the service processing request message. The server does not need to encrypt the request header in the service processing request message, so that all receiving objects can check whether the service processing request message is sent to themselves. In this way, after the message receiving module receives the service processing request message and determines that the service processing request message is a message sent to the communication client through the message parsing module, the request body in the decrypted service processing request message can be obtained by decrypting the request body in the service processing request message according to the agreed key. In this way, only the communication client can view the request body in the service processing request message, and other objects cannot view the request body in the service processing request message, which can avoid the situation that the request body in the service processing request message is leaked, and further improve the security of the server issuing the service processing request message.
[0090] In this way, when the server needs to interact with the communication client, the communication client is woken up (i.e., the communication client is instructed to establish a communication connection with the server) or other business interactions are performed with the communication client through the SMS short message push mode, so that the communication client only responds when requested and does not respond when not requested, thereby reducing the power consumption of the terminal device corresponding to the communication client and reducing the power consumption caused by the business interaction between the communication client and the server. It can be understood that, by modifying the Leshan framework LWM2M to support the SMS protocol, the communication client enters an offline state when the communication duration is greater than the duration threshold, the function of the communication client is reduced, the server interacts with the communication client by issuing a business processing request message when the communication client is in an offline state, and the demand of related operator authentication can be met, and the TAU (Tracking Area Uptate, tracking area update) problem and LWM2M authentication problem in authentication are solved.
[0091] Optionally, the specific manner in which the computer device executes the target business can include: if the target business is a wake-up business, obtaining device information of the server stored in the communication client. A communication connection is established with the server according to the device information of the server through a registration update interface, and the communication client is controlled to switch from an offline state to an online state; the communication connection is used to indicate that the server and the communication client interact with each other through a message queue.
[0092] Specifically, if the computer device determines that the target business is a wake-up business, the communication client can obtain the device information of the server stored when the communication client is bound (i.e., registered) to the server, which can be a device identifier, a device address, a device IP, etc. Further, the computer device can trigger a registration update interface (i.e., Registration Update) through a Leshan framework (i.e., a broadcast listener application). A communication connection is established with the server according to the device information of the server through the registration update interface, and the communication client is controlled to switch from an offline state to an online state, and the communication connection is used to indicate that the server and the communication client interact with each other through a message queue. The communication client can send a registration update request to the server through a three-way handshake to establish a communication connection with the server.
[0093] Optionally, the device information of the server includes device address information, and the specific manner in which the computer device establishes a communication connection with the server according to the device information of the server can include: obtaining historical communication records of the communication client and the server, determining a communication credit degree of the communication client according to the historical communication records. According to the device address information of the server and the communication credit degree of the communication client, a communication request message is generated. The communication request message is sent to the server through a registration update interface; the communication request message is used to instruct the server to establish a communication connection between the server and the communication client according to the communication credit degree of the communication client and the device address information.
[0094] Specifically, the computer device can obtain historical communication records of the communication client and the server, and determine a communication credit degree of the communication client according to the historical communication records. Specifically, the computer device can determine the communication credit degree of the communication client in the following manner.
[0095] Manner one: the computer device can determine the number of communication connections between the communication client and the server according to the historical communication records, and determine the communication credit degree of the communication client according to the number of communication connections between the communication client and the server. Specifically, the more the number of communication connections between the communication client and the server, the higher the communication credit degree of the communication client can be determined to be; the less the number of communication connections between the communication client and the server, the lower the communication credit degree of the communication client can be determined to be.
[0096] Manner two: the computer device can determine the number of communication connection failures between the communication client and the server according to the historical communication records, and determine the communication credit degree of the communication client according to the number of communication connection failures between the communication client and the server. Specifically, the more the number of communication connection failures between the communication client and the server, the lower the communication credit degree of the communication client can be determined to be; the less the number of communication connection failures between the communication client and the server, the higher the communication credit degree of the communication client can be determined to be.
[0097] Manner three: the computer device determines a communication connection failure rate between the communication client and the server according to the historical communication records, and determines the communication credit degree of the communication client according to the communication connection failure rate between the communication client and the server. Specifically, the higher the communication connection failure rate between the communication client and the server, the lower the communication credit degree of the communication client can be determined to be; the lower the communication connection failure rate between the communication client and the server, the higher the communication credit degree of the communication client can be determined to be.
[0098] The fourth mode is: according to the historical communication record, the number of times of disconnection of the communication client in the communication process is determined, and the communication credit of the communication client is determined according to the number of times of disconnection of the communication client in the communication process. Specifically, the more the number of times of disconnection of the communication client in the communication process, the lower the communication credit of the communication client; the less the number of times of disconnection of the communication client in the communication process, the higher the communication credit of the communication client.
[0099] Further, the computer device can generate communication request information sent to the server according to the device address information of the server and the communication credit of the communication client. Through the registration update interface, the communication request message (i.e. the communication client and the server perform registration update) is sent to the server, and the communication request message is used to instruct the server to establish a communication connection between the server and the communication client according to the communication credit of the communication client and the device address information. Specifically, after the server receives the communication request information sent by the communication client, whether the communication client is a communication client bound to the server can be monitored according to the device address information, if it is a communication client bound to the server, the business corresponding to the communication request information is processed; if it is not a communication client bound to the server, the business corresponding to the communication request information is not processed. Further, if the server determines that the communication client is a bound object of the server, a communication connection between the server and the communication client is established according to the communication credit of the communication client.
[0100] Specifically, if the server determines that the communication credit of the communication client is high, a simple handshake process is performed to establish a session with the client; if the server determines that the communication credit of the communication client is low, a complete handshake process is performed to establish a session with the client. For example, if the server determines that the communication credit of the communication client is high, two or one handshake is performed, and after the handshake is completed, a session is established with the client; if the server determines that the communication credit of the communication client is low, n times of handshake is performed, and after the handshake is completed, a session is established with the client, n is a positive integer greater than or equal to 3. In this way, when the communication credit of the communication client is high, the simple handshake process can be reduced to establish a communication connection with the communication client, and the energy consumption can be reduced; when the communication credit of the communication client is low, the complete handshake process can be used to establish a communication connection with the communication client, and the communication connection between the server and the communication client can be accurately established to ensure that the business data is sent to the receiving end, avoid data packet loss, and improve the security of data transmission.
[0101] Optionally, the specific mode of the computer device executing the target business can include: if the target business is a restart business, generating a device restart instruction. The device restart interface in the terminal device is called through the communication client, and the device restart instruction is executed to control the communication client to restart.
[0102] Specifically, if the computer device determines that the service type is the restart service type, a device restart instruction is generated, a device restart interface in the terminal device is called through the communication client, the device restart instruction is executed to control the communication client to restart. It can be seen that the application can wake up the communication client, and can also execute other resource id supported functions supported by LWM2M carried in the service processing request message, such as restart, factory reset, etc., that is, it can also execute the restart and factory reset service.
[0103] As shown in Figure 3 , the Figure 3 is a schematic diagram of a communication client and a server for service processing provided by an embodiment of the application, as shown in Figure 3 , when the communication client is started in the terminal device, the communication client can send a binding request to the server to bind with the server in a target communication mode, and the communication client can register a WAP PUSH broadcast (i.e. a short message push broadcast). Wherein, the communication client registering the WAP PUSH broadcast refers to configuring a message receiving module and a message parsing module in the communication client, and configuring the message receiving module to have a message acquisition authority for the broadcast listening system of the terminal device, so that the communication client can receive the service processing request message issued by the server. After the server receives the binding request sent by the communication client, the server can bind with the communication client in the target communication mode, which can be a UQS mode, and the server can return a binding result to the communication client. That is, when the binding is successful, a result of successful binding is returned to the communication client; when the binding fails, a result of failed binding is returned to the communication client. After the server and the communication client are successfully bound in the target communication mode, the communication client can enter an offline state when the duration of the continuous communication between the communication client and the server is greater than a duration threshold, without sending a registration update request to the server to establish a communication connection between the communication client and the server, which can reduce the energy consumption of the communication client. At the same time, after the communication client enters the offline state, if the server needs to interact with the communication client, the server can interact with the communication client through the broadcast service processing request message.
[0104] As shown in Figure 3As shown, the continuous communication duration can include a maximum waiting response time, and the communication client enters an offline state without actively establishing a communication connection (such as a three-way handshake communication connection) with the server if no message is received within the maximum waiting response time. When the communication client is in the offline state, the communication client can receive an SMS message (i.e., a short message) sent by the server from the broadcast listening system of the terminal device through the message receiving module. When the communication client is in the offline state, the server can broadcast a business processing request message (i.e., an SMS WAP PUSH) to the communication client to wake up the communication client or to interact with the communication client. If the server sends a wake-up service to the communication client, the communication client can establish a communication connection with the server and change from the offline state to the online state after receiving the business processing request message broadcasted by the server, and the communication client can send an update success message to the server. Further, the communication client can send a communication request message (such as a three-way handshake) to the server through a UDP mode to establish a communication connection between the server and the communication client. After receiving the communication request message sent by the communication client, the server can establish a communication connection with the communication client according to the communication request message and return a connection result to the communication client. Further, after the communication connection between the communication client and the server is established, the communication client and the server can normally interact with each other, and specifically, the server can send a message to the communication client through a Queue message queue for business interaction. When the server needs to interact with the communication client, the communication client is woken up or other business interactions are performed with the communication client through an SMS short message push mode, so that the effect of “no request, no response” is achieved, the power consumption of the terminal device corresponding to the communication client can be reduced, and the power consumption caused by the business interaction between the communication client and the server can be reduced.
[0105] As shown in FIG. 1, Figure 4 Figure 4 is a flow diagram of a business interaction process between a communication client and a server provided by an embodiment of the present application, as shown in FIG. 2, Figure 4 As shown, the computer device can modify the Leshan (Leshan is an OMA Lightweight M2M (LWM2M) implementation in Java) framework LWM2M into an application package (such as a broadcast listening application) of the Android system, and install the LWM2M corresponding application package in the terminal device corresponding to the communication client. The computer device can perform step 40a to start the LWM2M (i.e., the LWM2M corresponding application package). At the same time, the communication client can perform step 40b to register the short message push broadcast (i.e., SMS WAP PUSH) to have the function of receiving the service processing request message issued by the server and processing the service processing request message. Further, the computer device can perform step 40c to update the registration of the server and the communication client to establish the communication connection between the server and the communication client. The update registration refers to the handshake between the communication client and the server in the LWM2M of the Leshan framework. After the communication connection is established between the server and the communication client, the server can interact with the communication client, and at the same time, the computer device can perform step 40d to detect whether the communication duration between the communication client and the server is greater than the duration threshold. If the computer device determines that the communication duration between the communication client and the server is less than or equal to the duration threshold, it can perform step 40e to control the communication client to be in an online state, and at the same time, perform step 40f to control the communication client to normally interact with the server, i.e., the server can issue messages to the communication client through the Queue message queue for business interaction.
[0106] If the communication duration between the communication client and the server is greater than the duration threshold, the computer device can perform step 40g to control the communication client to enter an offline state without sending an update registration request to the server, which can reduce the power consumption of the communication client and the load of the server, thereby reducing the function brought by the business interaction between the server and the communication client. If the server needs to interact with the communication client when the communication client is in the offline state, the server can broadcast a business processing request message to the communication client. The computer device can perform step 40h to control the communication client to receive the business processing request message broadcasted by the server through the message receiving module from the broadcast system of the terminal device. Further, the computer device can perform step 40i to control the communication client to parse the business processing request message through the message parsing module. Further, the computer device can perform step 40j to detect whether the target business associated with the business processing request message broadcasted by the server is a wake-up business. If the business processing request message broadcasted by the server is not a wake-up business, the computer device can perform step 40k to control the communication client to execute the target business according to the business type, which can be a terminal device restart business, a terminal device factory reset business, a terminal device version number acquisition business, a terminal device location information acquisition business, a terminal device device information acquisition business, etc. If the business processing request message broadcasted by the server is a wake-up business, the computer device can perform step 40l to trigger the communication client to perform registration update with the server, to control the communication client to update from the offline state to the online state, and to establish a communication connection between the server and the communication client, which can interact through the Queue message queue.
[0107] Further, the computer device can perform step 40m to control the communication client to normally interact with the server. Through the present application, the communication client can enter an offline state when the continuous communication duration is greater than the duration threshold without sending an update registration request to the server, which can reduce the power consumption of the communication client and the load of the server. When the server needs to interact with the communication client, the communication client can be awakened or other business interactions can be performed through the SMS short message push mode, so as to achieve the effect of “no need, no response”. This can reduce the power consumption of the corresponding terminal device of the communication client and the power consumption brought by the business interaction between the communication client and the server.
[0108] In the embodiment of the present application, a lightweight Internet of Things package based on lightweight Internet of Things is acquired, the lightweight Internet of Things package is configured in a terminal device, and a communication client of the terminal device is obtained. The lightweight Internet of Things can be LWM2M protocol, the lightweight Internet of Things package based on the LWM2M protocol is configured in the terminal device, and the communication client of the terminal device is obtained. The terminal device can communicate with a server through the communication client. A message receiving module in the communication client acquires a service processing request message issued by the server from a broadcast listening system of the terminal device. A message analysis module analyzes the service processing request message, and obtains a service indication identifier in the service processing request message. The target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed. As can be seen, when the server needs to process a service, the server can issue a service processing request message to the terminal device. The communication client acquires the service processing request message issued by the server through the broadcast listening system of the terminal device, instead of establishing a communication connection with the server every time interval. When the server has a service processing demand, the communication client is notified to process the service. In this way, the communication client can be responsive only when there is a demand, and unresponsive when there is no demand. The problem that the terminal device has high power consumption and the server has high load due to the communication client needing to establish a communication connection with the server every time interval regardless of whether there is a service can be avoided. The power consumption of the communication client can be reduced, and the power consumption caused by the service interaction between the client and the server can be reduced. It can be understood that the present application modifies the Leshan framework LWM2M to support the SMS protocol, so that the communication client enters an offline state when the communication duration is greater than a duration threshold. The function of the communication client can be reduced, the server can interact with the communication client through the service processing request message when the communication client is in the offline state, and the demand of related operator authentication can be met, and the TAU (Tracking Area Uptate, tracking area update) problem and the LWM2M authentication problem in authentication can be solved.
[0109] See Figure 5 , Figure 5 is a structural schematic diagram of a service processing device provided by an embodiment of the present application. The service processing device can be a computer program (including program code) running in a computer device, for example, the service processing device is an application software. The service processing device can be used to execute corresponding steps in the service processing method provided by the embodiment of the present application. As shown in Figure 5 , the service processing device can include a configuration module 11, a message analysis module 12, and a service execution module 13.
[0110] The configuration module 11 is configured to obtain a lightweight Internet of Things package based on a lightweight Internet of Things, configure the lightweight Internet of Things package in a terminal device, and obtain a communication client of the terminal device; the communication client includes a message receiving module and a message analysis module; the lightweight Internet of Things package is a package used for communication between the terminal device and a server;
[0111] The message analysis module 12 is configured to obtain a service processing request message sent by the server from a broadcast monitoring system of the terminal device through the message receiving module in the communication client, analyze the service processing request message through the message analysis module, and obtain a service indication identifier in the service processing request message; the communication client has a message obtaining authority to obtain the message from the broadcast monitoring system;
[0112] The service execution module 13 is configured to determine a target service associated with the service processing request message according to the service indication identifier, and execute the target service.
[0113] The configuration module 11 includes:
[0114] The compiling unit 1101 is configured to compile a lightweight Internet of Things database based on a lightweight Internet of Things to obtain an initial lightweight Internet of Things package corresponding to the lightweight Internet of Things; the lightweight Internet of Things database is a framework used for communication between the terminal device and the server;
[0115] The first configuration unit 1102 is configured to configure the message receiving module and the message analysis module in the initial lightweight Internet of Things package to obtain the lightweight Internet of Things package corresponding to the lightweight Internet of Things;
[0116] The second configuration unit 1103 is configured to run the lightweight Internet of Things package in the terminal device, configure the message receiving module to have a message obtaining authority for a broadcast monitoring system of the terminal device, and obtain the communication client of the terminal device.
[0117] The message analysis module 12 includes:
[0118] The first determination unit 1201 is configured to determine a message type of the service processing request message according to a content type field in a request header of the service processing request message through the message analysis module;
[0119] The detection unit 1202 is configured to detect whether the service processing request message includes identification information about the communication client;
[0120] The second determination unit 1203 is configured to determine that the service processing request message is a message sent by the server to the communication client if the message type is a notification message type and the service processing request message includes the identification information about the communication client;
[0121] The analysis unit 1204 is configured to analyze the message request body of the service processing request message, and take the field value corresponding to the service indication field in the message request body as the service indication identifier in the service processing request message.
[0122] The service execution module 13 comprises:
[0123] The third determination unit 1301 is configured to obtain a service identifier set, determine the service corresponding to the service indication identifier in the service identifier set as the target service, wherein the service identifier set comprises M service indication identifiers, and each service indication identifier corresponds to a service, and M is a positive integer.
[0124] The execution unit 1302 is configured to execute the target service.
[0125] The execution unit is specifically configured to:
[0126] If the target service is the wake-up service, the device information of the server stored in the communication client is obtained.
[0127] The communication connection between the server and the communication client is established according to the device information of the server through the registration update interface, and the communication connection is used to indicate that the server and the communication client interact with each other through the message queue.
[0128] The execution unit is specifically configured to:
[0129] If the target service is the restart service, a device restart instruction is generated.
[0130] The device restart interface in the terminal device is called through the communication client, the device restart instruction is executed, and the terminal device is restarted to control the terminal device.
[0131] The service processing device further comprises:
[0132] The communication client and the server are bound through the target communication mode, the target communication mode is used to indicate that the server broadcasts the service processing request message to the terminal device when the communication client is in an offline state, and the target communication mode is also used to indicate that the communication client enters the offline state when the duration of the continuous communication between the client and the server is greater than a duration threshold, and the service processing request message about the server is detected from the broadcast listening system of the terminal device through the message receiving module.
[0133] According to an embodiment of the present application, Figure 5The various modules in the service processing apparatus shown can be combined into one or several units respectively or entirely, or some of the units can be further split into a plurality of sub-units with smaller functions, and the same operations can be implemented without affecting the implementation of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions, and in actual applications, the functions of one module can also be implemented by a plurality of units, or the functions of a plurality of modules can be implemented by one unit. In other embodiments of the present application, the test apparatus can also include other units, and in actual applications, these functions can also be assisted by other units, and can be implemented by a plurality of units in cooperation.
[0134] In the embodiments of the present application, a lightweight Internet of Things package based on lightweight Internet of Things is obtained, and the lightweight Internet of Things package is configured in a terminal device to obtain a communication client of the terminal device. The lightweight Internet of Things can be LWM2M protocol, and the lightweight Internet of Things package based on the LWM2M protocol is configured in the terminal device to obtain the communication client of the terminal device, and the terminal device can communicate with a server through the communication client. A message receiving module in the communication client obtains a service processing request message issued by the server from a broadcast listening system of the terminal device, and a message analysis module analyzes the service processing request message to obtain a service indication identifier in the service processing request message. The target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed. As can be seen, when the server needs to process a service, the server can issue a service processing request message to the terminal device, and the communication client obtains the service processing request message issued by the server through the broadcast listening system of the terminal device, without the communication client establishing a communication connection with the server every interval. Instead, the communication client is notified to process the service when the server has a service processing demand. In this way, the communication client can be responsive only when there is a demand, and unresponsive when there is no demand, which can avoid the problem of high power consumption of the terminal device and high load of the server caused by the communication client establishing a communication connection with the server every interval regardless of whether there is a service. The present application can reduce the power consumption of the communication client, and further reduce the power consumption caused by the service interaction between the client and the server. It can be understood that the present application modifies the Leshan framework LWM2M to support the SMS protocol, so that the communication client enters an offline state when the communication duration is greater than a duration threshold, which can reduce the function of the communication client. When the communication client is in the offline state, the server can interact with the communication client through the service processing request message, and can also meet the demand of related operator authentication, and solve the TAU (Tracking Area Uptate, tracking area update) problem and the LWM2M authentication problem.
[0135] Please refer to Figure 6 , Figure 6 is a structural schematic diagram of a computer device provided by an embodiment of the present application. As shown in Figure 6 , the computer device 1000 can include a processor 1001, a network interface 1004 and a memory 1005, and in addition, the computer device 1000 can further include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, a keyboard, and optionally the user interface 1003 can further include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. The memory 1005 can optionally be at least one storage device located away from the aforementioned processor 1001. As shown in Figure 6 , the memory 1005 as a computer readable storage medium can include an operating system, a network communication module, a user interface module and a device control application program.
[0136] In the computer device 1000 shown in Figure 6 , the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application program stored in the memory 1005 to realize:
[0137] obtaining a lightweight Internet of Things program package based on the lightweight Internet of Things, configuring the lightweight Internet of Things program package in a terminal device, and obtaining a communication client of the terminal device; the communication client includes a message receiving module and a message analysis module; the lightweight Internet of Things program package is a program package used for communication between the terminal device and a server;
[0138] obtaining, by the message receiving module in the communication client, a service processing request message issued by the server from a broadcast listening system of the terminal device, analyzing the service processing request message by the message analysis module, and obtaining a service indication identifier in the service processing request message; the communication client has a message acquisition authority to acquire messages from the broadcast listening system;
[0139] determining a target service associated with the service processing request message according to the service indication identifier, and executing the target service.
[0140] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the foregoing Figure 2The description of the service processing method in the corresponding embodiment can also execute the foregoing Figure 5 The description of the service processing device in the corresponding embodiment will not be repeated here.
[0141] In the embodiment of the present application, a lightweight Internet of Things package based on lightweight Internet of Things is obtained, and the lightweight Internet of Things package is configured in a terminal device to obtain a communication client of the terminal device. The lightweight Internet of Things can be LWM2M protocol, and the lightweight Internet of Things package based on the LWM2M protocol is configured in the terminal device to obtain the communication client of the terminal device, and the terminal device can communicate with a server through the communication client. The message receiving module in the communication client obtains a service processing request message issued by the server from a broadcast listening system of the terminal device, and the message parsing module parses the service processing request message to obtain a service indication identifier in the service processing request message. The target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed. As can be seen, when the server needs to process a service, the server can issue a service processing request message to the terminal device, and the communication client obtains the service processing request message issued by the server through the broadcast listening system of the terminal device, without the communication client establishing a communication connection with the server every interval. Instead, the communication client is notified to process the service when the server has a service processing demand. In this way, the communication client can be responsive only when needed, avoiding the problem of high power consumption of the terminal device and high load of the server caused by the communication client establishing a communication connection with the server every interval regardless of whether there is a service. The present application can reduce the power consumption of the communication client, and further reduce the power consumption caused by the service interaction between the client and the server. It can be understood that the present application modifies the Leshan framework LWM2M to support the SMS protocol, so that the communication client enters an offline state when the communication duration is greater than a duration threshold. This can reduce the functionality of the communication client, so that the server can interact with the communication client through the service processing request message when the communication client is in an offline state, while also meeting the needs of related operator authentication and solving the TAU (Tracking Area Uptate, tracking area update) problem and LWM2M authentication problem.
[0142] In addition, it should be noted that the present application also provides a computer readable storage medium, and the computer readable storage medium stores the computer program executed by the service processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, the foregoing Figure 2 The description of the service processing method in the corresponding embodiment, therefore, will not be repeated here.
[0143] In addition, the beneficial effects of using the same method are not described again. For technical details not disclosed in the computer-readable storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application. As an example, program instructions can be deployed on one computing device for execution, or on multiple computing devices located in one place, or on multiple computing devices distributed in multiple places and interconnected through a communication network, which can constitute a blockchain system.
[0144] In addition, it should be noted that the embodiments of the present application also provide a computer program product or computer program, which can include computer instructions that can be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor can execute the computer instructions to make the computer device execute the foregoing Figure 2 The description of the business processing method in the corresponding embodiments, therefore, will not be described again here. In addition, the beneficial effects of using the same method are not described again. For technical details not disclosed in the computer program product or computer program embodiments involved in the present application, please refer to the description of the method embodiments of the present application.
[0145] It should be noted that for the foregoing various method embodiments, in order to simply describe, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, some steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0146] The steps in the method embodiments of the present application can be adjusted, combined and deleted according to actual needs.
[0147] The modules in the device embodiments of the present application can be combined, divided and deleted according to actual needs.
[0148] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the above-mentioned embodiments of the method. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0149] The above merely provides the preferred embodiment of the application, and cannot allude the scope of the application. Therefore, any equivalent changes made according to the claims of the application shall be within the scope of the application.
Claims
1. A service processing method characterized by, Comprise: Obtain a lightweight Internet of Things package based on lightweight Internet of Things, configure the lightweight Internet of Things package in terminal equipment, obtain the communication client of the terminal equipment; The communication client comprises a message receiving module and a message analysis module; the lightweight Internet of Things package is a package for communication between the terminal equipment and the server; Through the message receiving module in the communication client, obtain the service processing request message issued by the server from the broadcast listening system of the terminal equipment, analyze the service processing request message through the message analysis module, and obtain the service indication identifier in the service processing request message; the communication client has the message acquisition authority of acquiring messages from the broadcast listening system; Determine the target service associated with the service processing request message according to the service indication identifier, and execute the target service; The communication client and the server are bound through a target communication mode; The target communication mode is used to indicate that the server issues a service processing request message by broadcasting to the terminal equipment when the communication client is in an offline state; the target communication mode is also used to indicate that the communication client enters an offline state when the duration of continuous communication between the client and the server is greater than a duration threshold, and detects the service processing request message about the server from the broadcast listening system of the terminal equipment through the message receiving module.
2. The method of claim 1, wherein, The method comprises: Compiling a lightweight Internet of Things database based on the lightweight Internet of Things, obtaining an initial lightweight Internet of Things package corresponding to the lightweight Internet of Things; the lightweight Internet of Things database is a framework database for communication between the terminal equipment and the server; Configure the message receiving module and the message analysis module in the initial lightweight Internet of Things package, obtain the lightweight Internet of Things package corresponding to the lightweight Internet of Things; Run the lightweight Internet of Things package in the terminal equipment, configure the message receiving module to have message acquisition authority for the broadcast listening system of the terminal equipment, and obtain the communication client of the terminal equipment.
3. The method of claim 1, wherein, The method comprises: Through the message analysis module, determine the message type of the service processing request message according to the content type field in the request header of the service processing request message; Detect whether there is identification information about the communication client in the service processing request message; If the message type is a notification message type, and there is identification information about the communication client in the service processing request message, determine that the service processing request message is a message sent by the server to the communication client; The message request body of the service processing request message is parsed, and a field value corresponding to a service indication field in the message request body is taken as a service indication identifier in the service processing request message.
4. The method of claim 1, wherein, The target service associated with the service processing request message is determined according to the service indication identifier, and the target service is executed. A service identifier set is acquired, and a service corresponding to the service indication identifier in the service identifier set is determined as the target service; the service identifier set includes M service indication identifiers, and each service indication identifier corresponds to a service, where M is a positive integer. The target service is executed.
5. The method of claim 4, wherein, The target service is executed. If the target service is a wake-up service, device information of the server stored in the communication client is acquired. A communication connection between the server and the communication client is established through a registration update interface according to the device information of the server, and the communication connection is used to indicate that the server and the communication client interact with each other through a message queue.
6. The method of claim 4, wherein, The target service is executed. If the target service is a restart service, a device restart instruction is generated. A device restart interface in the terminal device is called through the communication client, and the device restart instruction is executed to control the terminal device to restart.
7. A service processing apparatus characterized by comprising: The configuration module is configured to acquire a lightweight Internet of Things package based on the lightweight Internet of Things, configure the lightweight Internet of Things package in the terminal device to obtain a communication client of the terminal device. The communication client includes a message receiving module and a message parsing module; the lightweight Internet of Things package is a package used for communication between the terminal device and the server. The message parsing module is configured to acquire a service processing request message issued by the server from a broadcast listening system of the terminal device through the message receiving module in the communication client, parse the service processing request message through the message parsing module, and obtain a service indication identifier in the service processing request message; the communication client has a message acquisition permission to acquire messages from the broadcast listening system. The service execution module is configured to determine a target service associated with the service processing request message according to the service indication identifier, and execute the target service. The communication client is bound to the server through a target communication mode. The target communication mode is used to indicate that the server broadcasts a service processing request message to the terminal device when the communication client is in an offline state; and the target communication mode is also used to indicate that the communication client enters an offline state when a continuous communication duration between the client and the server is greater than a duration threshold, and detects a service processing request message about the server from a broadcast listening system of the terminal device through the message receiving module. The processor and the memory are included.
8. A computer device, comprising: The memory is connected to the processor, and is configured to store a computer program; the processor is configured to call the computer program, so that the computer device executes the method in any one of claims 1-6. 9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, which is adapted to be loaded and executed by the processor, so that the computer device with the processor executes the method of any one of claims 1-6.
Citation Information
Patent Citations
Managing sleep cycles in a wireless communications system
CN109792688A
Remote SIM provisioning
US20220141644A1