An OTA system, data processing method, device and storage medium
By introducing ZMQ communication middleware and MQTT protocol into the OTA system, optimizing the network layer design, and realizing parallel data processing, the problem of slow data flow in existing OTA software is solved, and data processing efficiency and response speed are improved.
Patent Information
- Application Number
- CN202311106542.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-08-30
AI Technical Summary
The existing network layer design of OTA software results in slow data flow and slow response speed for processing related commands, making it difficult to meet current data processing needs.
By employing ZMQ communication middleware and MQTT protocol, and combining OTA master control module, slave control module and intelligent components, a new network layer is constructed, including OTA-MASTER and OTA-SLAVE, to achieve parallel data processing and interface calls compatible with different intelligent components.
It improves data processing efficiency, shortens data flow time, reduces code maintenance difficulty, is compatible with the interface methods of different smart components, and ensures the timeliness and response speed of development.
Smart Images

Figure CN117240922B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to an OTA system, data processing method, device and storage medium. Background Technology
[0002] Over-the-Air (OTA) software for vehicles refers to software that can be updated wirelessly. OTA software connects to the vehicle's Electronic Control Unit (ECU) via the internet and transmits the latest software programs or firmware updates to the vehicle. This enables system enhancements, fault repairs, or security improvements. Through OTA software, vehicle manufacturers can remotely update the vehicle's software without requiring owners to take their vehicles to a service center or perform manual updates. This technology can improve vehicle reliability, safety, and user experience, while also reducing repair and recall costs.
[0003] OTA software was initially designed with three functional layers: OTA-MASTER, OTA-SLAVE, and OTA-SUBSLAVE. These layers were initially positioned as master controller, slave controller, and sub-slave controller, respectively. The master controller was responsible for: managing upgrades, downloads, version checks, vehicle-to-cloud protocol interaction, sending DoIP (Diagnostic Communication over Internet Protocol) messages, and managing the slave controllers of various intelligent components. Slave controllers were responsible for: forwarding messages from the master controller's proxy layer and sub-slave controllers, and handling time-consuming operations such as downloading, decompressing, and decrypting firmware packages for intelligent components. Sub-slave controllers were responsible for: data interaction between intelligent components, receiving control commands from the master controller, and responding to commands from the intelligent components. However, due to evolving and clearer requirements, the existing network layer design resulted in slow data flow, leading to slow response times for processing related commands and low data processing efficiency, making it difficult to meet current data processing needs.
[0004] Therefore, there is an urgent need to propose an OTA system, data processing method, equipment, and storage medium to improve data processing efficiency. Summary of the Invention
[0005] Therefore, it is necessary to provide an OTA system, data processing method, device, and storage medium that improves data processing efficiency to address the aforementioned technical problems.
[0006] On the one hand, an OTA system is provided, the system including a cloud, an OTA master control module, a ZMQ communication middleware, a slave control module, and intelligent components;
[0007] The cloud platform is used to issue invocation commands based on the MQTT protocol;
[0008] The OTA main control module is connected to the cloud and is used to receive the call command issued by the cloud and parse it to obtain a first parsing result;
[0009] The ZMQ communication middleware connects the OTA master control module and the slave control module, and is used to construct a ZMQ message packet based on the first parsing result, and send the packet to the slave control module;
[0010] The slave control module is used to parse the group packet to obtain a second parsing result, and to make an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0011] Optionally, the OTA master control module includes an OTA master control terminal and a master control agent layer;
[0012] The OTA master control terminal is used to parse the call command and obtain the first parsing result;
[0013] The master control agent layer is used to push the first parsing result to all slave control modules that are listening to the master control agent layer.
[0014] Optionally, the slave control module includes a slave control terminal and a smart device slave control agent layer;
[0015] The slave control terminal is used to parse the packet to obtain a second parsing result;
[0016] The intelligent component slave agent layer is used to push the second parsing result to the intelligent component so as to make interface calls to the intelligent component.
[0017] Optionally, the slave control terminal includes a first thread, a second thread, a third thread, and a fourth thread;
[0018] The first thread is used to listen for and receive ZMQ message packets constructed based on the first parsing result sent by the OTA main control module, so as to obtain the calling instructions issued by the cloud;
[0019] The second thread is used to send the reply message corresponding to the call instruction to the OTA master control module based on message-driven operation. The reply message includes at least one of the following: a response message and a timeout message.
[0020] The third thread is used to listen to and process messages from the target intelligent device slave control agent layer in the slave control module;
[0021] The fourth thread is used to process in parallel the multiple ZMQ message packets received by the first thread.
[0022] On the other hand, a data processing method is provided, the method comprising:
[0023] Utilize the cloud to issue invocation commands via the MQTT protocol;
[0024] Based on the OTA main control module, the call command is received and parsed to obtain the first parsing result;
[0025] Based on the ZMQ communication middleware and the first parsing result, a ZMQ message packet is constructed and the packet is sent to the slave control module;
[0026] The slave control module parses the packet to obtain a second parsing result, and then makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0027] Optionally, the OTA-based main control module receiving and parsing the call instruction to obtain the first parsing result includes:
[0028] Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format;
[0029] The call command stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result.
[0030] Optionally, the step of using the slave control module to parse the packet to obtain a second parsing result, and then using the second parsing result to make an interface call to the smart device to obtain the response message corresponding to the call instruction includes:
[0031] Retrieve ZMQ message packets;
[0032] Based on the first thread, the ZMQ message packet is parsed to determine the calling instruction issued by the cloud.
[0033] For each of the aforementioned call instructions, construct the corresponding fourth thread;
[0034] Based on the fourth thread, multiple call instructions are processed in parallel to determine the parsing parameters corresponding to each call instruction, i.e., the second parsing result;
[0035] Based on the parsed parameters, the smart device is invoked via an interface to obtain the response message corresponding to the invocation command.
[0036] Optionally, the method further includes:
[0037] A third thread is used to monitor messages from the target smart device's slave agent layer to determine whether the message is an active reply message;
[0038] In response to detecting that the message is an active reply message, the message is sent to the second thread;
[0039] Based on the second thread, the message is sent to the OTA master control module.
[0040] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0041] Utilize the cloud to issue invocation commands via the MQTT protocol;
[0042] Based on the OTA main control module, the call command is received and parsed to obtain the first parsing result;
[0043] Based on the ZMQ communication middleware and the first parsing result, a ZMQ message packet is constructed and the packet is sent to the slave control module;
[0044] The slave control module parses the packet to obtain a second parsing result, and then makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0045] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0046] Utilize the cloud to issue invocation commands via the MQTT protocol;
[0047] Based on the OTA main control module, the call command is received and parsed to obtain the first parsing result;
[0048] Based on the ZMQ communication middleware and the first parsing result, a ZMQ message packet is constructed and the packet is sent to the slave control module;
[0049] The slave control module parses the packet to obtain a second parsing result, and then makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0050] The aforementioned OTA system, data processing method, device, and storage medium include a cloud platform, an OTA master control module, a ZMQ communication middleware, a slave control module, and intelligent components. The cloud platform is used to issue call commands based on the MQTT protocol. The OTA master control module is connected to the cloud platform and is used to receive and parse the call commands issued by the cloud platform to obtain a first parsing result. The ZMQ communication middleware connects the OTA master control module and the slave control module, and is used to construct ZMQ message packets based on the first parsing result and send the packets to the slave control module. The slave control module... The block is used to parse the packet to obtain a second parsing result, and to make an interface call to the smart device based on the second parsing result to obtain the reply message corresponding to the call command. This application improves the original three-layer network topology, reducing the deployment of at least two slave control terminals for a smart device to one slave control terminal. Based on the parallel data processing method, it improves the response speed of the serial processing command of the slave control terminal, thereby improving data processing efficiency. It can also be compatible with the command reply interface methods of different smart devices. Based on the unified command reply link, it ensures the timeliness of development between different manufacturers and different smart devices, and completes rapid development. Attached Figure Description
[0051] Figure 1 Here is a block diagram of an OTA system in one embodiment;
[0052] Figure 2 Here is another structural block diagram of an OTA system in one embodiment;
[0053] Figure 3 Here is a block diagram of the slave control module structure of an OTA system in one embodiment;
[0054] Figure 4 This is a flowchart illustrating the data processing method in another embodiment;
[0055] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] It should be understood that, in the description of this application, unless the context explicitly requires it, words such as "including" or "comprising" throughout the specification should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0058] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0059] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0060] As can be seen from the background technology, existing OTA software is divided into three layers based on function: OTA-MASTER, OTA-SLAVE, and OTA-SUBSLAVE. The functions of these three layers were initially defined as master control, slave control, and sub-slave control, respectively. However, based on the progression and clarification of requirements, the existing network layer design results in a slow data flow speed, which in turn leads to a slow response speed for processing related commands and low data processing efficiency, making it difficult to meet current data processing needs.
[0061] To address the aforementioned technical issues, this application provides an OTA system, data processing method, device, and storage medium based on ZMQ communication middleware. It offers a new network layer comprising OTA-MASTER and OTA-SLAVE, which replaces the original three-layer network topology design. The new slave control software design reduces the division of network layers, accelerates data flow, eliminates a branch in function development, reduces code maintenance difficulty, and enables code reuse through a universal slave control software design compatible with different smart devices. This improves development efficiency, reduces the time required to adapt to various smart device interfaces, and increases data flow speed, thereby improving the response speed of related commands and improving data processing efficiency.
[0062] Example 1: In one example, as Figures 1-2 As shown, an OTA system is provided, which includes a cloud, an OTA master control module, a ZMQ communication middleware, a slave control module, and intelligent components;
[0063] The cloud platform is used to issue invocation commands based on the MQTT protocol.
[0064] It should be noted that "cloud" refers to OTA cloud, and "MQTT" refers to Message Queuing Telemetry Transport. The MQTT (Message Queuing Telemetry Transport) protocol is a message protocol based on the publish / subscribe paradigm under the ISO standard (ISO / IEC PRF 20922). It is designed to enable reliable communication between IoT devices in low-bandwidth and unstable network environments. The call command here refers to call message or subscribe message, including different types of messages such as control, query, and setting. For example, the command to query the vehicle version number is stored and sent in JSON data format.
[0065] The OTA main control module is connected to the cloud and is used to receive the call command issued by the cloud and parse it to obtain a first parsing result;
[0066] It should be noted that the OTA master control module includes an OTA master control terminal and a master control agent layer, wherein:
[0067] The OTA master control terminal is used to parse the call command and obtain the first parsing result;
[0068] The master control agent layer is used to push the first parsing result to all slave control modules that are listening to the master control agent layer.
[0069] Specifically, the master control proxy layer is set up on the OTA master control end. The proxy layer provides a flexible and scalable message transmission solution that can be applied to various scenarios, improving system performance, reliability, and maintainability, including:
[0070] (1) Load balancing: The proxy layer can distribute requests from the client evenly to multiple servers, thereby achieving load balancing. The client only needs to connect to the proxy layer and does not need to care about which specific server it is.
[0071] (2) Middleware: The proxy layer can act as a message middleware to transmit messages from one endpoint to another, achieving decoupling and asynchronous communication. Through the proxy layer, different message transmission modes and communication modes can be combined to meet different needs.
[0072] (3) Security: The proxy layer can be used to implement secure message transmission, such as by using encryption and authentication mechanisms to protect the confidentiality and integrity of messages;
[0073] (4) Network topology adjustment: The proxy layer can dynamically adjust message routing and forwarding rules when the network topology changes, thereby adapting to different network environments.
[0074] Furthermore, parsing the invocation instruction to obtain the first parsing result refers to:
[0075] Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format;
[0076] The call instruction stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result. The first parsing result is then pushed to all slave control modules listening to the master control agent layer for subsequent assembly of ZMQ message packets.
[0077] The ZMQ communication middleware connects the OTA master control module and the slave control module, and is used to construct a ZMQ message packet based on the first parsing result, and send the packet to the slave control module.
[0078] It should be noted that ZMQ (Zero Message Queuing Library) is a high-performance message passing library and communication middleware. It provides a simple and easy-to-use interface for asynchronous message passing between different applications. ZMQ is designed to provide fast, reliable, and scalable message communication, enabling developers to easily build distributed and concurrent applications.
[0079] Specifically, ZMQ employs a "sockets on steroids" model, using sockets to enable communication between different nodes. It supports various communication modes, including unicast, publish / subscribe, request / response, and push / pull. ZMQ is widely used in distributed systems, message queues, real-time data transmission, and network programming, and is an important tool for building reliable and efficient communication. Its features include:
[0080] (1) Simple and easy to use: It provides a concise and consistent API (Application Programming Interface) to enable developers to get started quickly;
[0081] (2) High performance: ZMQ uses efficient message queues and asynchronous I / O mechanisms to achieve low latency and high throughput message delivery;
[0082] (3) Scalability: It supports multiple communication modes and transmission protocols, and can adapt to applications of different sizes and complexities;
[0083] (4) Reliability: ZMQ provides a variety of mechanisms to ensure reliable message delivery, including message persistence, retries and flow control;
[0084] (5) Cross-platform: ZMQ supports multiple operating systems and programming languages, enabling cross-language communication on different platforms.
[0085] Because MQTT and ZMQ are used in different environments, data sent from MQTT cannot be used directly. Instead, the JSON data sent from MQTT needs to be parsed to extract the required values and then used to assemble ZMQ message packets. This completes the parsing and assembly of MQTT messages into ZMQ messages, thus completing the conversion process of sending a call command.
[0086] The slave control module is used to parse the group packet to obtain a second parsing result, and to make an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0087] It should be noted that in the software design of the OTA system's control end, compatibility with message responses from different smart components is a primary consideration. Different types of smart components, such as ADC, TBOX, and IVI, offer different methods from different vendors for the OTA system to call their interfaces (upgrade, query, settings, etc.). Taking ADC and TBOX as examples: the ADC vendor requires the OTA system to provide a dynamic library for registration via function calls; the TBOX vendor prefers to use ZMQ message subscription and publication. To accommodate these two different data processing methods, a message-driven, core-based compatible OTA control end was designed to address the slow message processing speed of the OTA system's control end. For example... Figure 3 As shown, the slave control module includes a slave control terminal and a smart device slave control proxy layer. The slave control terminal includes a first thread (thread 1), a second thread (thread 2), a third thread (thread 3), and a fourth thread (a message processing thread that is applied for as needed), used to parse the packet to obtain a second parsing result. The smart device slave control proxy layer is used to push the second parsing result to the smart device to make interface calls to the smart device. Specifically:
[0088] The first thread is used to listen for and receive ZMQ message packets constructed based on the first parsing result sent by the OTA main control module, and deconstruct the JSON message to obtain the call instructions issued by the cloud. For each subscribed message, a message thread named after the message name (i.e., the fourth thread) is created to process multiple ZMQ message packets received by the first thread in parallel. The message thread is created by the first thread after it listens for the published subscribed message to process each message. Since the time consumed by different commands varies, a thread is created for each subscribed message. When multiple subscribed messages are received, logically, all subscribed messages are processed in parallel to determine the parsing parameters corresponding to each subscribed message. The second parsing result is used to make interface calls to the smart device, thereby improving the processing efficiency of subscribed messages. In addition, the message thread can solve the problem of inconsistent responses from different smart device implementations for each interface. For example, to adapt to the current two methods: TBOX's ZMQ subscription and publish method and ADC's dynamic library interface self-call method, the ZMQ subscription and publish method is consistent with the ZMQ method used by OTA software, except that it subscribes to the TBOX internal proxy layer. Data interaction between the OTA slave control software and the TBOX smart device is carried out through the TBOX proxy layer. The ADC dynamic library interface self-call method requires the dynamic library to be provided to the ADC third party. The ADC third party will register functions during its initialization. When there is a message that needs to be replied to, the response data will be directly returned through the message response function registered during initialization.
[0089] Furthermore, when the fourth thread receives the reply data of the subscribed message, it will construct a message response message and send it to the second thread. When it does not receive the reply data of the subscribed message, it will construct a timeout message and send it to the second thread.
[0090] The second thread is used to send the reply message corresponding to the call instruction to the OTA master control module based on message-driven operation. The reply message includes at least one of the following: a response message and a timeout message.
[0091] The third thread is used to listen to and process messages from the target intelligent component slave control agent layer in the slave control module. Specifically, the target intelligent component slave control agent layer refers to the TBOX agent layer. The third thread is used to listen to and process actively reported messages (i.e., actively reported reply messages corresponding to actively reported instructions), such as the information published by the TBOX agent layer. After processing, the message is sent to the second thread via a message to be sent to the OTA master control module.
[0092] The OTA master control module sends the received reply message to the cloud via MQTT to complete the data flow of the entire call command. For example, taking the processing of three messages msg1, msg2, and msg3 as an example, msg1 is a setting command and will have a setting response message; msg2 is a query command and will have a query response message; msg3 is a setting command and will have a setting response message plus an active reporting result message. The specific data processing flow is as follows:
[0093] (1) The OTA master control module sequentially sends three call command messages msg1, msg2, and msg3;
[0094] (2) The first thread in the control module listens to the three instruction messages msg1, msg2, and msg3 sent to the TBOX through the proxy layer of the OTA main control module;
[0095] (3) The first thread parses the msg1, msg2, and msg3 command messages, creating three message threads: msg1_pthread, msg2_pthread, and msg3_pthread. Each of these three message threads will parse the parameters corresponding to the msg1, msg2, and msg3 command messages. After obtaining the parsed parameters, the thread will retrieve the response results through an interface call (using the command response function registered during initialization) and ZMQ publish / subscribe (sending command messages to the TBOX broker layer and receiving response messages). The response results will be packaged into a response message and sent to the second thread. If the query times out, a message indicating that the package has timed out will be sent to the second thread. At this point, msg1, msg2, and msg3 will be parsed into a response message. 2. msg3 has completed the entire process of sending commands and responding to results. However, the parameter settings of msg3 may cause TBOX to actively report commands after certain conditions are met. Therefore, msg3_unsolited will actively report the command results through a third thread. The third thread listens to the publication information of the TBOX proxy layer to compare whether it is an actively reported command. When it detects that it is a response command of msg3_unsolited, it assembles the response result into a packet and sends it to the second thread through a message. The second thread is a thread that continuously receives messages from the message queue. After receiving the message, it directly sends the response message carried by the message to the OTA master control module to complete a closed loop of sending to the response.
[0096] In the aforementioned OTA system, the system includes a cloud, an OTA master control module, a ZMQ communication middleware, a slave control module, and a smart device. The cloud is used to issue call commands based on the MQTT protocol. The OTA master control module is connected to the cloud and is used to receive the call commands issued by the cloud and parse them to obtain a first parsing result. The ZMQ communication middleware connects the OTA master control module and the slave control module, and is used to construct ZMQ message packets based on the first parsing result and send the packets to the slave control module. The slave control module is used to parse the packets to obtain a second parsing result, and make interface calls to the smart device based on the second parsing result to obtain the reply message corresponding to the call command. This application improves the original three-layer network topology, reducing the deployment of at least two slave control terminals for a smart device to one slave control terminal. Based on parallel data processing, it improves the response speed of serial slave control command processing, thereby improving data processing efficiency. It can also be compatible with the command reply interface methods of different smart devices. Based on a unified command reply link, it ensures the timeliness of development between different manufacturers and different smart devices, enabling rapid development.
[0097] The modules in the aforementioned OTA system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or they can be stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to these modules.
[0098] Example 2: In one example, as Figure 4 As shown, a data processing method is provided, the method comprising:
[0099] S1: Utilize the cloud to issue invocation commands via the MQTT protocol;
[0100] S2: Based on the OTA main control module, receive and parse the call instruction to obtain the first parsing result;
[0101] S3: Based on the ZMQ communication middleware and the first parsing result, construct a ZMQ message packet and send the packet to the slave control module;
[0102] S4: The slave control module parses the packet to obtain a second parsing result, and makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0103] In some specific implementations, the step of receiving and parsing the call instruction based on the OTA main control module to obtain the first parsing result includes:
[0104] Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format;
[0105] The call command stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result.
[0106] In some specific implementations, the step of using the slave control module to parse the packet to obtain a second parsing result, and then using the second parsing result to make an interface call to the smart device to obtain the response message corresponding to the call instruction includes:
[0107] Retrieve ZMQ message packets;
[0108] Based on the first thread, the ZMQ message packet is parsed to determine the calling instruction issued by the cloud.
[0109] For each of the aforementioned call instructions, construct the corresponding fourth thread;
[0110] Based on the fourth thread, multiple call instructions are processed in parallel to determine the parsing parameters corresponding to each call instruction, i.e., the second parsing result;
[0111] Based on the parsed parameters, the smart device is invoked via an interface to obtain the response message corresponding to the invocation command.
[0112] In some specific embodiments, the method further includes:
[0113] A third thread is used to monitor messages from the target smart device's slave agent layer to determine whether the message is an active reply message;
[0114] In response to detecting that the message is an active reply message, the message is sent to the second thread;
[0115] Based on the second thread, the message is sent to the OTA master control module.
[0116] Specific limitations on data processing methods can be found in the limitations for OTA systems mentioned above, and will not be repeated here. It should be understood that, although... Figure 4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 4At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0117] Example 3: In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a data processing method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0118] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0119] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0120] S1: Utilize the cloud to issue invocation commands via the MQTT protocol;
[0121] S2: Based on the OTA main control module, receive and parse the call instruction to obtain the first parsing result;
[0122] S3: Based on the ZMQ communication middleware and the first parsing result, construct a ZMQ message packet and send the packet to the slave control module;
[0123] S4: The slave control module parses the packet to obtain a second parsing result, and makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0124] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0125] Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format;
[0126] The call command stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result.
[0127] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0128] Retrieve ZMQ message packets;
[0129] Based on the first thread, the ZMQ message packet is parsed to determine the calling instruction issued by the cloud.
[0130] For each of the aforementioned call instructions, construct the corresponding fourth thread;
[0131] Based on the fourth thread, multiple call instructions are processed in parallel to determine the parsing parameters corresponding to each call instruction, i.e., the second parsing result;
[0132] Based on the parsed parameters, the smart device is invoked via an interface to obtain the response message corresponding to the invocation command.
[0133] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0134] A third thread is used to monitor messages from the target smart device's slave agent layer to determine whether the message is an active reply message;
[0135] In response to detecting that the message is an active reply message, the message is sent to the second thread;
[0136] Based on the second thread, the message is sent to the OTA master control module.
[0137] Example 4: In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, performs the following steps:
[0138] S1: Utilize the cloud to issue invocation commands via the MQTT protocol;
[0139] S2: Based on the OTA main control module, receive and parse the call instruction to obtain the first parsing result;
[0140] S3: Based on the ZMQ communication middleware and the first parsing result, construct a ZMQ message packet and send the packet to the slave control module;
[0141] S4: The slave control module parses the packet to obtain a second parsing result, and makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction.
[0142] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0143] Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format;
[0144] The call command stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result.
[0145] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0146] Retrieve ZMQ message packets;
[0147] Based on the first thread, the ZMQ message packet is parsed to determine the calling instruction issued by the cloud.
[0148] For each of the aforementioned call instructions, construct the corresponding fourth thread;
[0149] Based on the fourth thread, multiple call instructions are processed in parallel to determine the parsing parameters corresponding to each call instruction, i.e., the second parsing result;
[0150] Based on the parsed parameters, the smart device is invoked via an interface to obtain the response message corresponding to the invocation command.
[0151] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0152] A third thread is used to monitor messages from the target smart device's slave agent layer to determine whether the message is an active reply message;
[0153] In response to detecting that the message is an active reply message, the message is sent to the second thread;
[0154] Based on the second thread, the message is sent to the OTA master control module.
[0155] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0156] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The embodiments described above are merely examples of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. An OTA system, characterized by, The system includes a cloud platform, an OTA master control module, a ZMQ communication middleware, a slave control module, and intelligent components. The cloud platform is used to issue invocation commands based on the MQTT protocol; The OTA main control module is connected to the cloud and is used to receive the call command issued by the cloud and parse it to obtain a first parsing result; The ZMQ communication middleware connects the OTA master control module and the slave control module, and is used to construct a ZMQ message packet based on the first parsing result, and send the packet to the slave control module; The slave control module is used to parse the group packet to obtain a second parsing result, and to make an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction; The slave control module includes a slave control terminal and a smart device slave control agent layer; The slave control terminal is used to parse the packet to obtain a second parsing result; The intelligent component slave agent layer is used to push the second parsing result to the intelligent component so as to make interface calls to the intelligent component; The slave control terminal includes a first thread, a second thread, a third thread, and a fourth thread; The first thread is used to listen for and receive ZMQ message packets constructed based on the first parsing result sent by the OTA main control module, so as to obtain the calling instructions issued by the cloud; The second thread is used to send the reply message corresponding to the call instruction to the OTA master control module based on message-driven operation. The reply message includes at least one of the following: a response message and a timeout message. The third thread is used to listen to and process messages from the target intelligent device slave control agent layer in the slave control module; The fourth thread is used to process in parallel the multiple ZMQ message packets received by the first thread.
2. The OTA system according to claim 1, characterized in that, The OTA master control module includes an OTA master control terminal and a master control agent layer; The OTA master control terminal is used to parse the call command and obtain the first parsing result; The master control agent layer is used to push the first parsing result to all slave control modules that are listening to the master control agent layer.
3. A data processing method based on the OTA system as described in claim 1 or 2, characterized in that, The method includes: Utilize the cloud to issue invocation commands via the MQTT protocol; Based on the OTA main control module, the call command is received and parsed to obtain the first parsing result; Based on the ZMQ communication middleware and the first parsing result, a ZMQ message packet is constructed and the packet is sent to the slave control module; The slave control module parses the group packet to obtain a second parsing result, and makes an interface call to the smart device based on the second parsing result to obtain the response message corresponding to the call instruction; The step of using the slave control module to parse the group packet to obtain a second parsing result, and then using the second parsing result to make an interface call to the smart device to obtain the response message corresponding to the call instruction includes: Retrieve ZMQ message packets; Based on the first thread, the ZMQ message packet is parsed to determine the calling instruction issued by the cloud. For each of the aforementioned call instructions, construct the corresponding fourth thread; Based on the fourth thread, multiple call instructions are processed in parallel to determine the parsing parameters corresponding to each call instruction, i.e., the second parsing result; Based on the parsed parameters, the smart device is invoked via an interface to obtain the response message corresponding to the invocation command; The method further includes: A third thread is used to monitor messages from the target smart device's slave agent layer to determine whether the message is an active reply message; In response to detecting that the message is an active reply message, the message is sent to the second thread; Based on the second thread, the message is sent to the OTA master control module.
4. The data processing method according to claim 3, characterized in that, The OTA-based main control module receives and parses the call instruction to obtain the first parsing result, which includes: Receive at least one call instruction sent from the cloud, the call instruction being stored and sent in JSON data format; The call command stored in JSON data format is parsed to determine the corresponding value, which is the first parsing result.
5. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of claim 3 or 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of claim 3 or 4.
Citation Information
Patent Citations
Vehicle power management method and device in over-the-air upgrade process and vehicle
CN115923697A
Complete vehicle OTA parallel flash upgrading method, device and equipment and storage medium
CN116232891A
