Vehicle-cloud collaborative instruction execution method and vehicle-cloud system

By verifying message and instruction sequence number, instructions are executed in queues according to priority and category after ensuring no packet loss. This solves the problem of poor instruction execution reliability in vehicle-cloud collaborative control, and enables priority processing of important instructions and improved system stability.

CN122293704APending Publication Date: 2026-06-26WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WEICHAI POWER CO LTD
Filing Date
2026-05-07
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing vehicle-cloud collaborative control systems, the reliability of command execution is poor, especially when transmitting complex commands in multiple steps, where it cannot be executed effectively, posing a serious safety hazard.

Method used

After receiving instructions from the cloud, the system verifies whether the message sequence number and instruction sequence number are continuously increasing, confirms whether the instruction is complete and whether the preceding instructions have been executed, and ensures that there is no packet loss. Then, the instructions are queued according to their priority and category, including emergency queues and dedicated queues, and high-priority and low-priority instructions are processed in parallel.

Benefits of technology

It improves the reliability of instruction execution, ensures that important instructions are executed first, avoids security risks caused by packet loss or out-of-order execution, and enhances the stability and security of the vehicle-cloud collaborative system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122293704A_ABST
    Figure CN122293704A_ABST
Patent Text Reader

Abstract

This application provides a vehicle-cloud collaborative instruction execution method and a vehicle-cloud system. The method includes: receiving a message sent from the cloud, wherein the message includes at least one instruction; extracting the message sequence number to obtain a message sequence number, and extracting the instruction sequence number to obtain an instruction sequence number; determining that there is no packet loss when multiple message sequence numbers, multiple instruction sequence numbers, complete instructions, and the execution of the corresponding preceding instructions are all satisfied, wherein complete instructions mean that the instruction content is not missing, the preceding instructions and the corresponding instructions have a dependency relationship, and the instruction sequence number of the preceding instructions is less than the instruction sequence number of the corresponding instructions; and, given that there is no packet loss, executing the instructions sequentially according to their priority, wherein the instruction priority is positively correlated with the importance of the instructions. This solution solves the problem of poor reliability in the execution of vehicle-cloud collaborative control instructions in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle-cloud collaborative communication technology, and more specifically, to a vehicle-cloud collaborative instruction execution method and a vehicle-cloud system. Background Technology

[0002] With the development of intelligent connected vehicles, vehicle-cloud collaborative control has become a core technology for realizing key functions such as remote diagnostics, autonomous driving strategy distribution, and dynamic path planning. The cloud platform can issue various control commands to the vehicle terminal based on real-time road conditions, vehicle status, and user instructions, realizing a collaborative architecture of "cloud decision-making and vehicle execution."

[0003] Vehicle-to-cloud communication is generally based on standard TCP / IP protocols for command transmission. Vehicle terminals typically rely only on the packet sequence number at the network layer for simple packet loss detection. This makes it difficult to effectively execute multiple complex commands. For example, when the cloud issues complex commands involving multiple steps (such as "start adaptive cruise control → set vehicle speed → activate lane keeping"), the commands cannot be executed effectively, posing a serious safety hazard and resulting in poor reliability of command execution. Summary of the Invention

[0004] The main objective of this application is to provide a vehicle-cloud collaborative instruction execution method and a vehicle-cloud system, so as to at least solve the problem of poor reliability in the execution of vehicle-cloud collaborative control instructions in the prior art.

[0005] To achieve the above objectives, according to one aspect of this application, a vehicle-cloud collaborative instruction execution method is provided, comprising: receiving a message sent from the cloud, wherein the message includes at least one instruction; extracting the sequence number of the message to obtain a message sequence number, and extracting the sequence number of the instruction to obtain an instruction sequence number; determining that there is no packet loss when multiple message sequence numbers are continuously increasing, multiple instruction sequence numbers are continuously increasing, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed, wherein the completeness of the instruction means that the content of the instruction is not missing, the preceding instruction has a dependency relationship with the corresponding instruction, and the instruction sequence number of the preceding instruction is less than the instruction sequence number of the corresponding instruction; and, in the case of determining that there is no packet loss, executing the instructions sequentially according to the priority of the multiple instructions, wherein the priority of the instruction is positively correlated with the importance of the instruction.

[0006] Optionally, if no packet loss is confirmed, the instructions are executed sequentially according to their priority, including: obtaining the function category of the instructions to obtain an instruction category, wherein the instruction category includes a driving control category, a navigation planning category, an entertainment adjustment category, and a status monitoring category, wherein the instructions in the driving control category are more important than the instructions in the navigation planning category, the instructions in the driving control category are more important than the instructions in the entertainment adjustment category, and the instructions in the driving control category are more important than the instructions in the status monitoring category; storing the instructions in the driving control category in an emergency queue, and storing the instructions in the navigation planning category, the instructions in the entertainment adjustment category, and the instructions in the status monitoring category in a dedicated queue; executing the instructions in the emergency queue first, and then executing the instructions in the dedicated queue.

[0007] Optionally, storing the instructions of the navigation planning category, the entertainment adjustment category, and the status monitoring category into dedicated queues includes: storing the instructions of the navigation planning category into the dedicated queue of the navigation planning category; storing the instructions of the entertainment adjustment category into the dedicated queue of the entertainment adjustment category; storing the instructions of the status monitoring category into the dedicated queue of the status monitoring category; and executing the instructions in the dedicated queues includes: executing the instructions in the dedicated queues of the navigation planning category, the entertainment adjustment category, and the status monitoring category respectively, wherein the dedicated queues of the navigation planning category, the entertainment adjustment category, and the status monitoring category are executed in parallel.

[0008] Optionally, executing the instructions in the dedicated queue includes one of the following: executing the instructions in the dedicated queue of the same instruction category sequentially according to the instruction sequence number of the instructions in the same instruction category; executing the instructions in the dedicated queue of the same instruction category sequentially according to the dependency relationship of the instructions in the dedicated queue of the same instruction category; or executing the instructions in the dedicated queue of the same instruction category sequentially according to the priority of the instructions in the dedicated queue of the same instruction category.

[0009] Optionally, after extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: determining a desired message sequence number based on the message sequence number of the currently received message, wherein the desired message sequence number is the sequence number of the currently received message plus one; updating the desired message sequence number to the sequence number plus one if the message sequence number of the next received message is equal to the desired message sequence number; determining data transmission packet loss if the message sequence number of the next received message is greater than the desired message sequence number, generating packet loss range information, and sending the packet loss range information to the cloud, wherein the packet loss range information is the range information from the desired message sequence number to the desired message sequence number minus one; and determining data transmission duplication if the message sequence number of the next received message is less than the desired message sequence number, and deleting the message sequence number of the next received message.

[0010] Optionally, after extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: obtaining the length of the segmented instruction to obtain the instruction length; calculating the sum of the instruction lengths of the multiple segmented instructions to obtain the aggregated instruction length; obtaining the length of the instruction before segmentation to obtain the total instruction length; calculating the difference between the aggregated instruction length and the total instruction length to obtain the length difference; determining that the instruction is incomplete if the length difference is greater than a preset difference threshold; generating instruction loss information and sending the instruction loss information to the cloud if the sequence numbers of multiple instructions are not consecutively increasing and / or the instruction is incomplete.

[0011] Optionally, after extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: obtaining a dependency table, wherein the dependency table includes pre-defined dependencies between the execution of multiple instructions; querying the dependency table according to the instruction to obtain the preceding instruction corresponding to the instruction; and generating instruction loss information if the preceding instruction corresponding to the instruction is not executed.

[0012] Optionally, determining that there is no packet loss when multiple message sequence numbers are continuously increasing, multiple instruction sequence numbers are continuously increasing, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed all satisfy the conditions includes: determining that there is no packet loss when the message sequence number of the next received message is equal to the expected message sequence number, multiple instruction sequence numbers are continuously increasing, the length difference is less than or equal to a preset difference threshold, and the preceding instruction corresponding to the instruction has been executed all satisfy the conditions.

[0013] Optionally, the instructions are executed sequentially according to their priorities, including: determining data reception congestion when the arrival rate of the messages is greater than a preset rate threshold, wherein the arrival rate is the number of messages sent by the cloud received per unit time; storing the messages in a buffer when data reception congestion is determined; importing the messages in the buffer into an execution queue according to the priorities of the instructions, wherein the execution queue includes instructions to be executed, wherein the import rate is negatively correlated with the load; and executing the instructions in the execution queue according to their priorities.

[0014] According to another aspect of this application, a vehicle-cloud system is provided, comprising: a cloud platform; and a vehicle terminal, wherein the vehicle terminal communicates with the cloud platform, and the vehicle terminal is used to execute any of the vehicle-cloud collaborative instruction execution methods described above.

[0015] By applying the technical solution of this application, after receiving the instruction, the system checks whether the message sequence number is continuously increasing, whether the instruction sequence number is continuously increasing, whether the instruction is complete, and whether the pre-instructions that the instruction depends on have been executed. Only when all four conditions are met is it confirmed that there is no packet loss in the data transmission, thus blocking abnormal instructions from entering the execution process at the source. Then, the instructions that pass the verification are executed effectively according to their priority, ensuring that important instructions can be executed first and unimportant instructions are executed later, thereby improving the reliability of instruction execution. Attached Figure Description

[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 A hardware structure block diagram of a mobile terminal for executing a vehicle-cloud collaborative instruction execution method according to an embodiment of this application is shown.

[0018] Figure 2 A flowchart illustrating a vehicle-cloud collaborative instruction execution method according to an embodiment of this application is shown.

[0019] Figure 3 Another flowchart illustrating a vehicle-cloud collaborative instruction execution method is shown.

[0020] Figure 4 A schematic diagram illustrating the execution logic between instructions is shown;

[0021] Figure 5 A flowchart illustrating the instruction execution process is shown;

[0022] Figure 6 A structural block diagram of a vehicle end provided according to an embodiment of this application is shown.

[0023] The above figures include the following reference numerals:

[0024] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] As described in the background section, the reliability of vehicle-cloud collaborative control command execution in the prior art is poor. To solve the above problems, embodiments of this application provide a vehicle-cloud collaborative command execution method and a vehicle-cloud system.

[0029] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0030] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a vehicle-cloud collaborative instruction execution method according to an embodiment of the present invention. Figure 1As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0031] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the instruction execution method of vehicle-cloud collaboration in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one instance, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] This embodiment provides a vehicle-cloud collaboration instruction execution method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.

[0033] Figure 2 This is a flowchart illustrating the instruction execution method for vehicle-cloud collaboration according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:

[0034] Step S201: Receive a message sent from the cloud, wherein the message includes at least one instruction;

[0035] Specifically, the implementing entity of this application can be a vehicle-mounted terminal. The vehicle-mounted terminal receives instruction messages sent from the cloud through a wireless communication interface. Each message encapsulates at least one control instruction, and the instruction content includes operation commands and parameters, such as "emergency braking" and "adjust vehicle speed". The message structure follows a fixed format and includes message sequence number, instruction sequence number, instruction category, and priority fields.

[0036] Step S202: Extract the sequence number of the above message to obtain the message sequence number; extract the sequence number of the above instruction to obtain the instruction sequence number.

[0037] Specifically, the message sequence number (SN) is parsed from each received message for network layer transmission continuity determination; at the same time, the instruction sequence number (IN) is extracted from each instruction for identifying the instruction's logic and segmentation. SN is a continuously increasing integer, and IN remains consistent across multiple segments of the same instruction, while different instructions are assigned incrementally according to their execution order.

[0038] Step S203: If the following conditions are met: multiple message sequence numbers are continuously increasing, multiple instruction sequence numbers are continuously increasing, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed, it is determined that there is no packet loss. Here, the instruction being complete means that the content of the instruction is not missing, the preceding instruction has a dependency relationship with the corresponding instruction, and the instruction sequence number of the preceding instruction is less than the instruction sequence number of the corresponding instruction.

[0039] Specifically, the system maintains the "Expected Received SN" status and the "Instruction Packet Status Table". When the continuously received SN values ​​increase sequentially without jumps or repetitions, it is determined that there is no packet loss at the network layer. At the same time, the integrity of the IN for each instruction is checked. If all segmented messages corresponding to the IN have been received and the parameters are complete, it is determined that the application layer packet is correctly assembled. Then, the system queries the "Instruction Dependency Table" to confirm whether the preceding instructions (with smaller IN values, the same category, and logical dependencies) of the current instruction have been received and executed. Only when all four conditions are met is the instruction determined to have no transmission abnormalities and be eligible for execution.

[0040] Step S204: If it is determined that there is no packet loss, execute the above instructions in sequence according to their priority, wherein the priority of the above instructions is positively correlated with the importance of the above instructions.

[0041] Specifically, only instructions that pass the above verification are sent to the scheduling execution queue and executed according to the priority (PR) field in the instruction: P0 level (such as emergency braking) is the highest, P3 level (such as entertainment adjustment) is the lowest, and the higher the priority, the earlier it is executed; under the same priority, they are executed in the order of instruction number IN to ensure that dependent instructions are not out of order. For example, in the driving control class, IN=5 (P0) "emergency braking" takes precedence over IN=7 (P1) "decelerate to 60km / h", and IN=7 takes precedence over IN=8 (P2) "turn on the air conditioner".

[0042] In this embodiment, after receiving an instruction, the system checks whether the message sequence number is continuously increasing, whether the instruction sequence number is sequentially increasing, whether the instruction is complete, and whether the prerequisite instructions that the instruction depends on have been executed. Only when all four conditions are met is it confirmed that there is no packet loss in the data transmission, thus blocking abnormal instructions from entering the execution process at the source. Then, the instructions that pass the checks are executed effectively according to their priority, ensuring that important instructions are executed first and less important instructions are executed later, thereby improving the reliability of instruction execution.

[0043] Specifically, such as Figure 3 As shown, the structured design of the vehicle-cloud collaborative instruction involves the cloud generating a message and sending the message to the vehicle. The vehicle can be the executor of this application.

[0044] When generating vehicle-cloud collaborative instructions, the cloud platform uses a structured format to encapsulate the instruction messages. In addition to the traditional instruction content and parameter information, it also embeds four types of core identifier fields to form a complete instruction structure of "basic information + extended identifiers", as shown in Table 1.

[0045] Table 1

[0046]

[0047] Specifically, the structured command message format is as follows: [SN: 5; IN: 3; CT: 01; PR: P0; Command content: Emergency braking warning, parameter: braking intensity 30%]. The four key fields are as follows:

[0048] Sequence Number (SN): Used for network layer packet loss detection, it is a continuously increasing integer (e.g., 1, 2, 3...), assigned by the cloud platform according to the order of instruction transmission, and unique within the same transmission session. It is used by the vehicle terminal to detect whether packets are lost or out of order during transmission. If the vehicle terminal detects that the received SN is discontinuous, it determines that packet loss has occurred at the network layer and can trigger a retransmission mechanism to ensure the reliability of the transmission link.

[0049] Instruction Sequence Number (IN): Used for application layer packet assembly error detection. It is assigned according to the logical execution order of the instructions. For complex instructions requiring segmented transmission (such as long path planning instructions), different segments of the same instruction are assigned the same IN, while different instructions are assigned consecutively increasing INs. The vehicle terminal matches segmented messages using INs. Only when all segments corresponding to a certain IN are completely received is the instruction's logical integrity confirmed, thus avoiding semantic errors caused by missing, misaligned, or duplicate segments.

[0050] Command Categories (CTs): Commands are categorized based on their functional attributes and execution dependencies, using coded identifiers (e.g., 01-Driving Control, 02-Navigation Planning, 03-Entertainment Adjustment, 04-Status Monitoring) to define the execution constraints between commands. Commands within the same category have execution order or dependencies (e.g., "Activate Adaptive Cruise Control" must be executed after "Set Target Speed"). Commands in different categories are independent, have no execution dependencies, and can be processed in parallel.

[0051] Priority (PR): This field categorizes commands based on their urgency and importance (e.g., P0 - highest priority, P1 - high priority, P2 - medium priority, P3 - low priority). The priority level is determined by the cloud based on the command's function (e.g., driving control commands default to P0 / P1, entertainment adjustment commands default to P3). This field is used to implement priority preemption during command scheduling, ensuring that highly important commands (such as emergency braking) are executed first even when resources are limited, thus guaranteeing driving safety.

[0052] Specifically, some existing solutions lack instruction execution order and priority scheduling, often employing a simple "first-come, first-served" scheduling strategy for vehicle-to-cloud collaborative instructions without categorizing or prioritizing them. For related instructions that need to be executed sequentially, network latency can cause disordered arrival order, leading to logical execution errors. Furthermore, the lack of priority distinction for concurrently arriving instructions may result in core control instructions (such as emergency braking alerts) being blocked by non-core instructions (such as entertainment system adjustments), impacting driving safety.

[0053] In the specific implementation process, assuming no packet loss, the instructions are executed sequentially according to their priority. This can be achieved through the following steps: Obtain the function category of each instruction to obtain the instruction category, which includes driving control, navigation planning, entertainment adjustment, and status monitoring. The instructions in the driving control category are of higher importance than those in the navigation planning category, which in turn are of higher importance than those in the entertainment adjustment category, and vice versa. Store the instructions in the driving control category in an emergency queue, and store the instructions in the navigation planning, entertainment adjustment, and status monitoring categories in a dedicated queue. Execute the instructions in the emergency queue first, then execute the instructions in the dedicated queue.

[0054] This scheme achieves logical layering of control instructions by classifying them according to their functional importance. By physically isolating the highest priority instructions from ordinary instructions, it achieves a "zero-wait" scheduling path for critical control instructions, preventing them from being blocked by a large number of non-critical instructions. Through the scheduling rule of "emergency queue priority and dedicated queue postponement," it enforces the absolute execution right of high-security-level instructions, solving the defect of high-priority instructions being blocked by low-priority instructions in the traditional "first-come, first-served" scheduling, and ensuring good reliability of instruction execution.

[0055] Specifically, after receiving an instruction that has passed integrity verification, the terminal first reads its instruction category field (CT) and classifies it into the corresponding category according to preset classification rules: CT=01 for driving control, CT=02 for navigation planning, CT=03 for entertainment adjustment, and CT=04 for status monitoring. Based on functional safety levels, driving control instructions are directly related to vehicle motion control, and their failure can lead to safety accidents, therefore they are of the highest importance; navigation planning instructions affect route selection, and are of the next highest importance; entertainment adjustment and status monitoring instructions do not directly affect driving safety, and are of lower importance.

[0056] Specifically, the terminal is configured with a "priority emergency queue" and a "category-specific queue" structure: all driving control commands with PR=P0 (such as emergency braking and collision warning) are stored in the priority emergency queue; other commands are stored in the navigation-specific queue (CT=02), entertainment-specific queue (CT=03), and monitoring-specific queue (CT=04) according to their categories. The emergency queue is a single queue that only accepts P0 level commands; the specific queues are multiple queues, with each category queuing independently and without interference.

[0057] Priority is always given to reading the emergency queue. If any P0-level instruction exists, it is immediately retrieved from the queue and executed until the queue is empty. Only then are instructions from the navigation, entertainment, and monitoring queues processed in sequence. For example, if the three instructions "Emergency Braking (P0)," "Replan Route (P1)," and "Play Music (P3)" arrive simultaneously, only "Emergency Braking" is executed, and the other types of instructions are processed after it is completed.

[0058] In some embodiments, the instructions for navigation planning, entertainment adjustment, and status monitoring are stored in dedicated queues. This can be achieved through the following steps: storing the instructions for navigation planning in a dedicated queue for navigation planning; storing the instructions for entertainment adjustment in a dedicated queue for entertainment adjustment; storing the instructions for status monitoring in a dedicated queue for status monitoring; and executing the instructions in the dedicated queues. This can be achieved through the following steps: executing the instructions in the dedicated queues for navigation planning, entertainment adjustment, and status monitoring respectively, wherein the dedicated queues for navigation planning, entertainment adjustment, and status monitoring are executed in parallel.

[0059] This solution addresses the shortcomings of traditional "serial scheduling" mode, which suffers from system response delays due to single-task blocking, by establishing independent dedicated queues for different functional categories and supporting cross-category parallel execution. This ensures better reliability of instruction execution.

[0060] Specifically, the vehicle terminal sets up a "multi-level instruction scheduling queue" based on instruction category and priority for hierarchical scheduling, which implements hierarchical scheduling according to instruction category (CT) and priority (PR) to ensure the orderliness and real-time performance of instruction execution. The specific strategy is as follows:

[0061] Queue division: Set up "Category-specific queues" and "Priority emergency queues". The category-specific queues are set according to the CT code (e.g., queue 01 corresponds to driving control category, queue 02 corresponds to navigation planning category) and are used to store instructions of the same category; the priority emergency queues only store the highest priority instructions of P0 level and are used to respond to emergency instructions first.

[0062] Entry rules: If the verified instruction is of P0 priority, it will be directly entered into the priority emergency queue; otherwise, it will be entered into the corresponding category's dedicated queue.

[0063] Specifically, the terminal sets up a separate dedicated queue for navigation planning commands (CT=02). All navigation commands that have passed verification, such as "replan route", "adjust target point", and "switch map scale", are queued in order of command number (IN) to form a dedicated queue for navigation commands.

[0064] Specifically, the terminal sets up a separate dedicated queue for entertainment adjustment commands (CT=03). All verified entertainment commands, such as "play music", "adjust volume", and "switch songs", are queued in order of command number (IN) to form a dedicated queue for entertainment commands.

[0065] Specifically, the terminal sets up a separate dedicated queue for status monitoring commands (CT=04). All verified status commands, such as "report battery temperature", "send tire pressure data", and "report remaining range", are queued in order of command number (IN) to form a dedicated queue for monitoring commands.

[0066] A multi-threaded or task concurrency mechanism is employed to simultaneously schedule three dedicated queues: navigation, entertainment, and monitoring. In the navigation queue, path update instructions are executed in IN order; in the entertainment queue, audio control instructions are processed in parallel; and in the monitoring queue, status data is uploaded in parallel. These three queues operate independently without blocking each other. Instruction processing in other queues can begin without waiting for any one queue to complete.

[0067] In the specific implementation process, the above instructions in the dedicated queue can be executed through the following steps: according to the instruction sequence number of the above instructions in the same instruction category, the above instructions in the dedicated queue of the same instruction category are executed sequentially; according to the dependency relationship of the above instructions in the dedicated queue of the same instruction category, the above instructions in the dedicated queue of the same instruction category are executed sequentially; according to the priority of the above instructions in the dedicated queue of the same instruction category, the above instructions in the dedicated queue of the same instruction category are executed sequentially.

[0068] This scheme optimizes the execution of instructions by establishing three execution schemes within a dedicated queue: execution by instruction number, execution by dependency constraints, and execution by priority. This ensures good reliability of instruction execution.

[0069] Specifically, such as Figure 4 As shown, the scheduling execution order adopts the strategy of "priority emergency queues are executed first, and category-specific queues are executed in parallel according to rules":

[0070] ① Prioritize the execution of instructions in the priority emergency queue, and then process the category-specific queues after their execution is complete. The priority emergency queue is dedicated to storing the highest priority (P0) instructions, such as emergency braking, collision warning, and other core instructions related to driving safety. This queue is independent of other queues, and any instruction entering this queue immediately preempts the current execution resources and is scheduled for execution with priority. Only after this queue is empty will the processing of instructions in the category-specific queue begin. This ensures that, under any network or system load conditions, the highest-risk instructions can be responded to with the shortest possible latency, meeting functional safety requirements.

[0071] ② Commands within the same category's dedicated queue are executed sequentially according to the logical execution order corresponding to IN (ensuring related commands are ordered). Category-specific queues are divided according to command categories, such as driving control (CT=01), navigation planning (CT=02), etc., with each category corresponding to an independent queue. Commands within the same queue can be executed sequentially in ascending order of command number (IN), ensuring that commands with logical dependencies are triggered in the correct order. For example: command IN=5 is "Activate adaptive cruise control", IN=6 is "Set vehicle speed to 80km / h", and IN=7 is "Activate lane keeping assist". If all three belong to the driving control category, they can be executed in the order of IN=5→6→7. Skipping IN=5 and directly executing IN=7 is prohibited to prevent inconsistent states from causing malfunctions.

[0072] ③ Instructions within different category-specific queues can be executed in parallel across different sequences (without waiting for other category instructions to complete), improving instruction execution efficiency; parallel execution is also allowed between different category-specific queues without waiting for other category instructions to complete. For example, while the instruction IN=8 "reduce speed" in the driving control queue is being executed, the instruction IN=10 "replan route" in the navigation planning queue can be started simultaneously without blocking each other. This improves overall instruction throughput efficiency and avoids response delays caused by blocking of a single category.

[0073] ④ Within the same category, instructions are sorted by PR priority, with higher priority instructions executed first (e.g., in the same driving control category, the P1-level "adjust vehicle speed" instruction takes precedence over the P2-level "adjust air conditioning" instruction). Within the same category's dedicated queue, if multiple instructions have the same IN order but different priorities, they are executed according to their priority (PR). For example, in the driving control category, IN=12 is "turn on air conditioning" (PR=P2), and IN=13 is "adjust seat heating" (PR=P1). While there is no sequential dependency between the two, because PR=P1 is higher than P2, the seat heating instruction is executed first, followed by the air conditioning turn-on instruction. This ensures that when similar instructions are executed concurrently, more important functions respond first, optimizing user experience and safety priorities.

[0074] Of course, commands of the same category can also be executed according to their dependencies. For example, turning on the air conditioner requires execution before the air conditioner temperature is set to 20°C.

[0075] The scheme design in this application is based on a hierarchical scheduling strategy of category and priority. It achieves the orderly execution of related instructions by dividing the instructions into categories and ensures the real-time response of core instructions by dividing the instructions into priorities. It proposes a scheduling logic of "parallel execution of different categories across sequences and sequential + priority execution of the same category", which takes into account both execution efficiency and logical correctness.

[0076] Specifically, some existing solutions lack comprehensive packet loss and packet reassembly error detection. They often only detect packet loss through network layer sequence numbers, failing to design verification mechanisms for application layer instruction packet reassembly (such as instruction fragment splicing and instruction parameter integrity). This results in application layer packet reassembly errors (such as missing instruction fragments and misaligned parameters) going undetected, leading to erroneous execution or execution failure. For example, in cloud-delivered "multi-step autonomous driving path planning instructions," if a certain segment is incorrectly reassembled, some existing solutions, lacking application layer verification, will directly execute the erroneous instruction, posing a driving safety risk.

[0077] In some embodiments, after extracting the sequence number of the aforementioned message to obtain the message sequence number and extracting the sequence number of the aforementioned instruction to obtain the instruction sequence number, the method further includes the following steps: determining the expected message sequence number based on the message sequence number of the currently received message, wherein the expected message sequence number is the sequence number of the currently received message plus one; if the message sequence number of the next received message is equal to the expected message sequence number, updating the expected message sequence number to the expected message sequence number plus one; if the message sequence number of the next received message is greater than the expected message sequence number, determining that data transmission has been lost, generating packet loss range information, and sending the packet loss range information to the cloud, wherein the packet loss range information is the range information from the expected message sequence number to the expected message sequence number minus one; if the message sequence number of the next received message is less than the expected message sequence number, determining that data transmission is duplicated, and deleting the message sequence number of the next received message.

[0078] In this scheme, an expected value tracking mechanism based on SN is constructed to realize closed-loop monitoring of message transmission integrity. This embodiment does not rely on the confirmation scheme of the upper layer protocol, but judges whether the message is lost based on the continuity of the message sequence number, so as to accurately and directly determine whether packet loss has occurred.

[0079] After receiving the first message, the "Expected Receive SN" is initialized to the message's SN value plus one, which will serve as the sequence number of the next expected message. For example, after receiving a message with SN=15, the expected message sequence number is immediately set to 16.

[0080] Maintain a state machine for the "expected receive SN queue". Only when the SN value of a newly received message is exactly the same as the current expected value is the transmission considered continuous, and the expected SN is then updated to the current SN+1. For example, if the current expected SN is 16 and the received SN is 16, then the expected SN is updated to 17.

[0081] When the received SN=19, and the current expectation is 16, the terminal determines that three frames of packets with SN=16, 17, and 18 are missing in the middle. It immediately generates the packet loss range information as "[16, 18]" and sends a retransmission request to the cloud through the reverse channel.

[0082] If the terminal receives SN=105, while the current expectation is 107, it determines that the message is a duplicate frame (because SN=105 has already been processed) and discards it directly.

[0083] In the specific implementation process, after extracting the sequence number of the above message and obtaining the message sequence number, and extracting the sequence number of the above instruction and obtaining the instruction sequence number, the above method further includes the following steps: obtaining the length of the above instruction sent in segments and obtaining the instruction length; calculating the sum of the instruction lengths of multiple above instructions sent in segments and obtaining the aggregated instruction length; obtaining the length of the above instruction before segmentation and obtaining the total instruction length; calculating the difference between the aggregated instruction length and the total instruction length and obtaining the length difference; determining that the above instruction is incomplete if the length difference is greater than a preset difference threshold; generating instruction loss information if multiple above instruction sequence numbers are not consecutively increasing, and / or if the above instruction is incomplete, and sending the instruction loss information to the above cloud.

[0084] In this scheme, by verifying the instruction length, in addition to relying solely on the instruction sequence number (IN) to determine integrity, a quantitative verification based on the data volume is added to achieve dual verification of the integrity of the instruction content, thereby more accurately determining whether data packets have been lost.

[0085] Specifically, for complex instructions that require segmented transmission (such as long path planning instructions), the cloud splits the instructions and sends them to the vehicle terminal in segments. When the terminal receives each message, it extracts the length of the instruction in the message as the instruction length of that segment. For example, a path planning instruction with a total length of 2048 bytes is split into 4 segments, each with a length of 512 bytes.

[0086] Each time a message belonging to a given IN is received, its instruction length is added to the summed instruction length of the corresponding IN. After receiving all segmented messages with IN=301, the difference between the summed instruction length and the total instruction length is calculated. If the difference is 0, it indicates that all segments are complete; if the difference is not 0, it indicates that data is missing or truncated. For example, if only three 512B segments are received, the summed length is 1536B, and the difference is 2048-1536=512B. The preset difference threshold can be 1 byte. If the instruction length difference corresponding to the same IN is detected to be greater than 1 byte, or if there is a jump in the IN sequence (e.g., IN=303 is received directly after IN=301), it is determined that the instruction is lost or corrupted, and an "instruction loss message" is immediately generated.

[0087] Specifically, this solution uses a dual-sequence number collaborative verification mechanism to detect packet loss and packet assembly errors. After receiving the command message, the vehicle terminal starts the dual-sequence number collaborative verification process, and simultaneously completes network layer packet loss detection and application layer packet assembly error detection. The specific steps are described below.

[0088] Network layer packet loss detection (based on packet sequence number SN): The vehicle terminal maintains an "expected receive SN queue" and compares the SN of the currently received packet with the expected SN. If the received SN and the expected SN are consecutive, it is determined that there is no packet loss, and the expected SN is updated to the current SN+1; if the received SN is greater than the expected SN, it is determined that there is packet loss (the missing SN range is from the expected SN to the received SN-1), and the packet loss information (including the missing SN range) is immediately reported to the cloud, and a retransmission is requested; if the received SN is less than the expected SN, it is determined to be a duplicate packet and is directly discarded.

[0089] Application Layer Packet Assembly Error Detection (Based on Instruction Sequence Number IN): The vehicle terminal maintains an "Instruction Packet Assembly Status Table" to record the reception status of instruction segments corresponding to each IN. For complex instructions that require segmented transmission (multiple messages corresponding to the same IN), it checks whether the currently received message is a complete segment of that IN; if a segment is missing, it is determined to be a packet assembly error, and packet assembly error information (including the IN and the missing segment identifier) ​​is sent back to the cloud; if all segments corresponding to the same IN are received completely, the packet assembly is determined to be correct; for simple instructions that do not require segmentation (a single message corresponding to the same IN), the packet assembly is directly determined to be correct.

[0090] Dual verification result processing: The instruction message will only enter the subsequent scheduling and execution stage if there is no packet loss at the network layer and the application layer packet is correctly assembled; if either verification fails, the instruction will be rejected and the specific error type (packet loss / packet assembly error) will be reported to the cloud to ensure that erroneous instructions do not enter the execution process.

[0091] This application proposes a dual-sequence-number collaborative verification mechanism, which designs dual verification logic for message sequence number (network layer) and instruction sequence number (application layer), and simultaneously detects network layer packet loss and application layer packet assembly errors. This solves the defect of existing single-sequence-number verification that cannot cover application layer errors, and significantly improves the packet assembly error detection rate.

[0092] Specifically, in some existing solutions, the fault tolerance mechanism after packet loss of associated instructions is imperfect. After a packet loss of an instruction, it can only simply report the packet loss information without considering the correlation logic between instructions. For instructions of the same category that have execution dependencies, if the instruction to be executed first is lost, it will still try to execute subsequent instructions, resulting in invalid or erroneous execution, and it is impossible to accurately locate the impact of the lost instruction on subsequent instructions.

[0093] In some embodiments, after extracting the sequence number of the aforementioned message and obtaining the sequence number of the aforementioned instruction, the method further includes the following steps: obtaining a dependency table, wherein the dependency table includes pre-defined dependencies between the execution of multiple aforementioned instructions; querying the dependency table according to the aforementioned instruction to obtain the aforementioned pre-instruction corresponding to the aforementioned instruction; and generating the aforementioned instruction loss information if the aforementioned pre-instruction corresponding to the aforementioned instruction is not executed.

[0094] In this scheme, pre-execution verification based on instruction dependencies can proactively verify the logical integrity of control instructions. This mechanism does not rely on instruction sequence number or timestamp, but rather on preset dependencies to ensure that each instruction is allowed to execute only after all its preconditions are met. This avoids instruction order errors caused by network out-of-order delivery, retransmission delays, or scheduling misalignments, thus enabling more accurate determination of whether data packets have been lost.

[0095] Specifically, the error handling for lost instructions of the same category is designed for instructions of the same category that have execution dependencies. This logic prevents subsequent instructions from being executed invalidally due to the loss of preceding instructions. The specific process is as follows:

[0096] Dependency relationship preset: When the cloud issues the same type of command, it clearly marks the dependency relationship between commands through command parameters (such as "command IN:4 depends on IN:3 to complete execution"), and the vehicle terminal stores the dependency relationship table.

[0097] Pre-command packet loss detection: When the vehicle terminal receives a command (denoted as target command IN: X), it queries the dependency table to confirm its pre-command dependent commands (denoted as IN: Y). If IN: Y has a packet loss record (not received or not executed), then the target command IN: X is determined to be unexecuted.

[0098] Error handling and feedback: The vehicle terminal refuses to execute the target instruction IN:X and reports an error message to the cloud, clearly stating "The target instruction IN:X cannot be executed due to packet loss of the preceding instruction IN:Y", and requests the cloud to resend IN:Y and subsequent related instructions to ensure the integrity of the execution logic of the related instructions.

[0099] The solution proposed in this application constructs a packet loss tolerance mechanism for related instructions of the same category. For related instructions with execution dependencies, it designs a pre-instruction packet loss judgment and error reporting logic to avoid invalid execution of subsequent instructions, clarify the source of errors, and solve the defect of existing technologies that only provide feedback on packet loss tolerance without control.

[0100] In the specific implementation process, such as Figure 5 As shown, determining that there is no packet loss can be achieved by the following steps when the sequence numbers of multiple aforementioned messages increase consecutively, the sequence numbers of multiple aforementioned instructions increase consecutively, the aforementioned instructions are complete, and the preceding instructions corresponding to the aforementioned instructions have all been executed: If the sequence number of the next received message is equal to the expected sequence number, the sequence numbers of multiple aforementioned instructions increase consecutively, the length difference is less than or equal to a preset difference threshold, and the preceding instructions corresponding to the aforementioned instructions have all been executed, then it is determined that there is no packet loss.

[0101] In this scheme, four checks are used to determine whether packet loss has occurred. Only when all four checks pass can it be determined that no packet loss has occurred, thus further ensuring that packet loss can be determined more accurately.

[0102] Specifically, some existing solutions lack the capacity to handle concurrent messages after congestion. When network congestion is relieved, a large number of delayed command messages will arrive at the vehicle terminal at the same time. The lack of a targeted concurrent processing mechanism can easily lead to overload of the vehicle control unit, resulting in command response delays, system lag, or even crashes, further reducing the reliability of vehicle-cloud collaborative control.

[0103] In some embodiments, the instructions are executed sequentially according to their priority, which can be achieved through the following steps: if the arrival rate of the messages is greater than a preset rate threshold, data reception congestion is determined, wherein the arrival rate is the number of messages sent by the cloud received per unit time; if data reception congestion is determined, the messages are stored in a buffer; the messages in the buffer are imported into an execution queue according to the priority of the instructions, wherein the execution queue includes the instructions to be executed, and the import rate is negatively correlated with the load; the instructions in the execution queue are executed according to their priority.

[0104] This solution employs a combination of flow control, queue caching, and dynamic batch processing strategies to avoid system overload caused by concurrent packets after congestion, thus ensuring good stability of vehicle-cloud collaborative control.

[0105] Specifically, the management and handling of concurrent packets after congestion: When network congestion eases and a large number of delayed command packets arrive simultaneously, the vehicle terminal uses a strategy of "flow control + queue caching + batch processing" to avoid system overload, as follows:

[0106] Flow control: Set the maximum concurrent reception threshold for the vehicle terminal (e.g., 10 instructions per second). When the concurrent arrival rate exceeds the threshold, flow control is activated, and packets exceeding the threshold are temporarily buffered in a temporary buffer to prevent them from directly flooding the scheduling queue and causing system lag.

[0107] Batch processing: Packets in the temporary buffer are imported into the scheduled execution queue in batches according to the order of "priority from high to low, and category from high priority category to low priority category". The number of packets imported in each batch does not exceed the maximum concurrent processing threshold (e.g., 5 packets per batch). The batch interval is dynamically adjusted according to the system load (e.g., 50ms interval when the load is high, and 20ms interval when the load is low).

[0108] Status monitoring: Real-time monitoring of the vehicle terminal's CPU utilization, memory load, and instruction execution latency. If the load is too high (e.g., CPU utilization > 80%), the batch import rate will be automatically reduced; if the load returns to normal, the import rate will be increased to ensure stable system operation.

[0109] The proposed solution optimizes the concurrent message management strategy after congestion. By combining flow control, queue caching, and dynamic batch processing, it avoids system overload caused by concurrent messages after congestion, ensures the stability of vehicle-cloud collaborative control, and fills the gap in existing technologies that lack targeted management after congestion.

[0110] Specifically, the solution proposed in this application first designs the vehicle-cloud collaborative instructions in a structured manner on the cloud platform, embedding key identifiers such as message sequence number, instruction sequence number, instruction category, and priority. During instruction transmission, the vehicle terminal detects network layer packet loss and application layer packet assembly errors through a dual-sequence number collaborative verification mechanism. The receiving end implements hierarchical scheduling and execution based on instruction category and priority, designs loss tolerance and error handling logic for related instructions of the same category, and designs queue management strategies for concurrently arriving instructions after congestion, to ensure the accuracy, orderliness, and real-time nature of instruction execution.

[0111] In summary, this proposal aims to address the shortcomings of existing vehicle-cloud collaborative control command interaction technologies, such as incomplete detection of packet loss and reassembly errors, lack of order and priority in command scheduling, imperfect error tolerance mechanisms for associated command loss, and insufficient concurrent processing capabilities after congestion. It provides a new command execution method for vehicle-cloud collaboration. This method achieves dual error detection at both the network and application layers through a dual-sequence number collaborative verification mechanism, achieves precise scheduling through command category and priority classification, and optimizes the error tolerance logic for associated command loss and the concurrent processing strategy after congestion, thereby improving the reliability, real-time performance, and security of vehicle-cloud collaborative control.

[0112] Specifically, by using a message monitoring tool, the messages of the vehicle terminal are monitored, the vehicle-cloud collaborative control command messages are parsed, and it is determined whether there are fields for double sequence number verification, command type and priority. If such fields exist, they all fall within the protection scope of this application.

[0113] This application also provides a vehicle-mounted terminal. It should be noted that the vehicle-mounted terminal of this application can be used to execute the instruction execution method for vehicle-cloud collaboration provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0114] The following describes the vehicle-side device provided in the embodiments of this application.

[0115] Figure 6 This is a structural block diagram of the vehicle end according to an embodiment of this application. For example... Figure 6 As shown, the vehicle end includes:

[0116] The receiving unit 10 receives a message sent from the cloud, wherein the message includes at least one instruction;

[0117] Extraction unit 20 extracts the sequence number of the above message to obtain the message sequence number, and extracts the sequence number of the above instruction to obtain the instruction sequence number;

[0118] The first determining unit 30 determines that there is no packet loss when the following conditions are met: multiple message sequence numbers are continuously increasing, multiple instruction sequence numbers are continuously increasing, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed. Here, the complete instruction means that the content of the instruction is not missing, the preceding instruction has a dependency relationship with the corresponding instruction, and the instruction sequence number of the preceding instruction is less than the instruction sequence number of the corresponding instruction.

[0119] Execution unit 40, in the absence of packet loss, executes the above instructions sequentially according to their priority, wherein the priority of the above instructions is positively correlated with the importance of the above instructions.

[0120] In the specific implementation process, the execution unit includes an acquisition module, a storage module, and a first execution module. The acquisition module is used to acquire the functional category of the above-mentioned instructions to obtain the instruction category. The instruction category includes driving control category, navigation planning category, entertainment adjustment category, and status monitoring category. The importance of the above-mentioned instructions in the driving control category is higher than that of the above-mentioned instructions in the navigation planning category, higher than that of the above-mentioned instructions in the entertainment adjustment category, and higher than that of the above-mentioned instructions in the status monitoring category. The storage module is used to store the above-mentioned instructions in the driving control category in an emergency queue, and store the above-mentioned instructions in the navigation planning category, the above-mentioned instructions in the entertainment adjustment category, and the above-mentioned instructions in the status monitoring category in a dedicated queue. The first execution module is used to execute the above-mentioned instructions in the emergency queue first, and then execute the above-mentioned instructions in the dedicated queue.

[0121] This scheme achieves logical layering of control instructions by classifying them according to their functional importance. By physically isolating the highest priority instructions from ordinary instructions, it achieves a "zero-wait" scheduling path for critical control instructions, preventing them from being blocked by a large number of non-critical instructions. Through the scheduling rule of "emergency queue priority and dedicated queue postponement," it enforces the absolute execution right of high-security-level instructions, solving the defect of high-priority instructions being blocked by low-priority instructions in the traditional "first-come, first-served" scheduling, and ensuring good reliability of instruction execution.

[0122] In some embodiments, the storage module includes a first storage submodule, a second storage submodule, and a third storage submodule. The first storage submodule is used to store the instructions of the navigation planning category into the dedicated queue of the navigation planning category; the second storage submodule is used to store the instructions of the entertainment adjustment category into the dedicated queue of the entertainment adjustment category; and the third storage submodule is used to store the instructions of the status monitoring category into the dedicated queue of the status monitoring category. The first execution module includes a first execution submodule, which is used to execute the instructions in the dedicated queue of the navigation planning category, the dedicated queue of the entertainment adjustment category, and the dedicated queue of the status monitoring category, respectively, wherein the dedicated queue of the navigation planning category, the dedicated queue of the entertainment adjustment category, and the dedicated queue of the status monitoring category are executed in parallel.

[0123] This solution addresses the shortcomings of traditional "serial scheduling" mode, which suffers from system response delays due to single-task blocking, by establishing independent dedicated queues for different functional categories and supporting cross-category parallel execution. This ensures better reliability of instruction execution.

[0124] In the specific implementation process, the first execution module includes a second execution submodule, a third execution submodule, and a fourth execution submodule. The second execution submodule is used to execute the instructions in the dedicated queue of the same instruction category sequentially according to the instruction sequence number of the instructions in the dedicated queue of the same instruction category. The third execution submodule is used to execute the instructions in the dedicated queue of the same instruction category sequentially according to the dependency relationship of the instructions in the dedicated queue of the same instruction category. The fourth execution submodule is used to execute the instructions in the dedicated queue of the same instruction category sequentially according to the priority of the instructions in the dedicated queue of the same instruction category.

[0125] This scheme optimizes the execution of instructions by establishing three execution schemes within a dedicated queue: execution by instruction number, execution by dependency constraints, and execution by priority. This ensures good reliability of instruction execution.

[0126] In some embodiments, the vehicle terminal further includes a second determining unit, an updating unit, a first processing unit, and a second processing unit. The second determining unit is used to, after extracting the sequence number of the message to obtain a message sequence number and extracting the sequence number of the instruction to obtain an instruction sequence number, determine a desired message sequence number based on the message sequence number of the currently received message, wherein the desired message sequence number is the message sequence number of the currently received message plus one. The updating unit is used to update the desired message sequence number to the desired message sequence number if the message sequence number of the next received message is equal to the desired message sequence number. The expected message sequence number is incremented by one; the first processing unit is used to determine data transmission packet loss, generate packet loss range information, and send the packet loss range information to the cloud when the message sequence number of the next received message is greater than the expected message sequence number; the second processing unit is used to determine data transmission duplication and delete the message sequence number of the next received message when the message sequence number of the next received message is less than the expected message sequence number.

[0127] In this scheme, an expected value tracking mechanism based on SN is constructed to realize closed-loop monitoring of message transmission integrity. This embodiment does not rely on the confirmation scheme of the upper layer protocol, but judges whether the message is lost based on the continuity of the message sequence number, so as to accurately and directly determine whether packet loss has occurred.

[0128] In the specific implementation process, the vehicle terminal also includes a first acquisition unit, a first calculation unit, a second acquisition unit, a second calculation unit, a third determination unit, and a third processing unit. The first acquisition unit is used to extract the sequence number of the message to obtain the message sequence number, extract the sequence number of the instruction to obtain the instruction sequence number, and then obtain the length of the instruction sent in segments to obtain the instruction length. The first calculation unit is used to calculate the sum of the instruction lengths of the multiple instructions sent in segments to obtain the summed instruction length. The second acquisition unit is used to obtain the length of the instruction before segmentation to obtain the total instruction length. The second calculation unit is used to calculate the difference between the summed instruction length and the total instruction length to obtain the length difference. The third determination unit is used to determine that the instruction is incomplete if the length difference is greater than a preset difference threshold. The third processing unit is used to generate instruction loss information and send the instruction loss information to the cloud if the sequence numbers of multiple instructions are not consecutively increasing and / or the instruction is incomplete.

[0129] In this scheme, by verifying the instruction length, in addition to relying solely on the instruction sequence number (IN) to determine integrity, a quantitative verification based on the data volume is added to achieve dual verification of the integrity of the instruction content, thereby more accurately determining whether data packets have been lost.

[0130] In some embodiments, the vehicle terminal further includes a third acquisition unit, a query unit, and a generation unit. The third acquisition unit is used to extract the sequence number of the message to obtain the message sequence number, extract the sequence number of the instruction to obtain the instruction sequence number, and then acquire a dependency table, wherein the dependency table includes pre-defined dependencies between the execution of multiple instructions. The query unit is used to query the dependency table according to the instruction to obtain the preceding instruction corresponding to the instruction. The generation unit is used to generate instruction loss information if the preceding instruction corresponding to the instruction is not executed.

[0131] In this scheme, pre-execution verification based on instruction dependencies can proactively verify the logical integrity of control instructions. This mechanism does not rely on instruction sequence number or timestamp, but rather on preset dependencies to ensure that each instruction is allowed to execute only after all its preconditions are met. This avoids instruction order errors caused by network out-of-order delivery, retransmission delays, or scheduling misalignments, thus enabling more accurate determination of whether data packets have been lost.

[0132] In the specific implementation process, the first determining unit includes a first determining module, which is used to determine that there is no packet loss when the following conditions are met: the sequence number of the next received message is equal to the expected message sequence number, the sequence numbers of multiple instructions are continuously increasing, the length difference is less than or equal to a preset difference threshold, and the preceding instructions corresponding to the instructions have been executed.

[0133] In this scheme, four checks are used to determine whether packet loss has occurred. Only when all four checks pass can it be determined that no packet loss has occurred, thus further ensuring that packet loss can be determined more accurately.

[0134] In some embodiments, the execution unit includes a second determining module, a first processing module, a second processing module, and a second execution module. The second determining module is used to determine data reception congestion when the arrival rate of the aforementioned messages is greater than a preset rate threshold, wherein the arrival rate is the number of messages sent by the cloud received per unit time. The first processing module is used to store the aforementioned messages in a buffer when data reception congestion is determined. The second processing module is used to import the aforementioned messages in the buffer into an execution queue according to the priority of the aforementioned instructions, wherein the execution queue includes the aforementioned instructions to be executed, and wherein the import rate is negatively correlated with the load. The second execution module is used to execute the aforementioned instructions in the execution queue according to the priority of the aforementioned instructions in the execution queue.

[0135] This solution employs a combination of flow control, queue caching, and dynamic batch processing strategies to avoid system overload caused by concurrent packets after congestion, thus ensuring good stability of vehicle-cloud collaborative control.

[0136] The aforementioned vehicle-mounted unit includes a processor and a memory. The receiving unit, extraction unit, first determining unit, and execution unit are all stored as program units in the memory, and the processor executes the program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the various modules may be located in different processors in any combination.

[0137] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the poor reliability of vehicle-to-cloud collaborative control instruction execution in existing technologies.

[0138] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0139] This invention provides a computer-readable storage medium that includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to execute the vehicle-cloud collaboration instruction execution method.

[0140] This invention provides a processor for running a program, wherein the program executes the vehicle-cloud collaboration instruction execution method during runtime.

[0141] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements instruction execution method steps for vehicle-to-cloud collaboration. The device described herein can be a server, PC, tablet, mobile phone, etc.

[0142] This application also provides a computer program product that, when executed on a data processing device, is suitable for executing a program that initializes instructions with at least vehicle-cloud collaboration steps.

[0143] This application also provides a vehicle-cloud system, including: a cloud and a vehicle, wherein the vehicle communicates with the cloud and the vehicle is used to execute any of the above-mentioned vehicle-cloud collaborative instruction execution methods.

[0144] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0145] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0147] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

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

[0150] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0151] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0152] 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.

[0153] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0154] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for executing instructions in vehicle-cloud collaboration, characterized in that, include: Receive a message sent from the cloud, wherein the message includes at least one instruction; Extract the sequence number of the message to obtain the message sequence number; extract the sequence number of the instruction to obtain the instruction sequence number. If the following conditions are met: multiple message sequence numbers are continuously increasing, multiple instruction sequence numbers are continuously increasing, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed, it is determined that there is no packet loss. Here, the instruction being complete means that the content of the instruction is not missing, the preceding instruction has a dependency relationship with the corresponding instruction, and the instruction sequence number of the preceding instruction is less than the instruction sequence number of the corresponding instruction. If no packet loss is confirmed, the instructions are executed sequentially according to their priority, wherein the priority of the instructions is positively correlated with the importance of the instructions.

2. The method according to claim 1, characterized in that, If no packet loss is confirmed, the instructions are executed sequentially according to their priority, including: The function category of the instruction is obtained to obtain the instruction category, wherein the instruction category includes driving control category, navigation planning category, entertainment adjustment category and status monitoring category, wherein the importance of the instruction in the driving control category is higher than the importance of the instruction in the navigation planning category, the importance of the instruction in the driving control category is higher than the importance of the instruction in the entertainment adjustment category, and the importance of the instruction in the driving control category is higher than the importance of the instruction in the status monitoring category; The instructions for the driving control category are stored in the emergency queue, and the instructions for the navigation planning category, the entertainment adjustment category, and the status monitoring category are stored in the dedicated queue. First execute the instructions in the emergency queue, then execute the instructions in the dedicated queue.

3. The method according to claim 2, characterized in that, The instructions for the navigation planning category, the instructions for the entertainment adjustment category, and the instructions for the status monitoring category are stored in a dedicated queue, including: The instructions for the navigation planning category are stored in the dedicated queue for the navigation planning category; The instructions for the entertainment adjustment category are stored in the dedicated queue for the entertainment adjustment category; The instructions of the status monitoring category are stored in the dedicated queue of the status monitoring category; Executing the instructions in the dedicated queue includes: The instructions in the dedicated queue of the navigation planning category, the dedicated queue of the entertainment adjustment category, and the dedicated queue of the status monitoring category are executed respectively, wherein the dedicated queues of the navigation planning category, the entertainment adjustment category, and the status monitoring category are executed in parallel.

4. The method according to claim 2, characterized in that, Executing the instructions in the dedicated queue includes one of the following: The instructions in the dedicated queue of the same instruction category are executed sequentially according to the instruction sequence number of the instructions of the same instruction category; According to the dependency relationship of the instructions in the dedicated queue of the same instruction category, the instructions in the dedicated queue of the same instruction category are executed sequentially; Instructions in the dedicated queue of the same instruction category are executed sequentially according to their priority.

5. The method according to claim 1, characterized in that, After extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: Based on the sequence number of the currently received message, determine the expected message sequence number, wherein the expected message sequence number is the sequence number of the currently received message plus one. If the sequence number of the next received message is equal to the expected message sequence number, the expected message sequence number will be updated to the expected message sequence number plus one. If the sequence number of the next received message is greater than the expected sequence number, data transmission packet loss is determined, packet loss range information is generated, and the packet loss range information is sent to the cloud. The packet loss range information is the range from the expected sequence number to the expected sequence number minus one. If the sequence number of the next received message is less than the expected sequence number, it is determined that the data transmission is duplicated, and the sequence number of the next received message is deleted.

6. The method according to claim 5, characterized in that, After extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: Obtain the length of the segmented instruction to get the instruction length; Calculate the sum of the instruction lengths of the multiple instructions sent in segments to obtain the total instruction length; Obtain the length of the instruction before segmentation to get the total instruction length; Calculate the difference between the summarized instruction length and the total instruction length to obtain the length difference; If the length difference is greater than a preset difference threshold, the instruction is determined to be incomplete. If multiple instruction sequence numbers are not consecutively increasing, and / or the instruction is incomplete, instruction loss information is generated and sent to the cloud.

7. The method according to claim 6, characterized in that, After extracting the sequence number of the message to obtain the message sequence number and extracting the sequence number of the instruction to obtain the instruction sequence number, the method further includes: Obtain a dependency table, wherein the dependency table includes pre-defined dependencies on the execution of multiple instructions; The dependency table is queried according to the instruction to obtain the preceding instruction corresponding to the instruction; If the preceding instruction corresponding to the instruction is not executed, instruction loss information is generated.

8. The method according to claim 7, characterized in that, Determining that there is no packet loss when multiple message sequence numbers increase consecutively, multiple instruction sequence numbers increase consecutively, the instruction is complete, and the preceding instruction corresponding to the instruction has been executed, includes: If the following conditions are met: the sequence number of the next received message is equal to the expected sequence number, multiple instruction sequence numbers are consecutively increasing, the length difference is less than or equal to a preset difference threshold, and the preceding instruction corresponding to the instruction has been executed, then it is determined that there is no packet loss.

9. The method according to any one of claims 1 to 8, characterized in that, The instructions are executed sequentially according to their priority, including: If the arrival rate of the message is greater than a preset rate threshold, data reception congestion is determined, wherein the arrival rate is the number of messages sent by the cloud received per unit time. If data reception is congested, the message is stored in a buffer. The messages in the buffer are imported into the execution queue according to the priority of the instructions, wherein the execution queue includes the instructions to be executed, and the import rate is negatively correlated with the load; The instructions in the execution queue are executed according to their priority.

10. A vehicle-to-cloud system, characterized in that, include: Cloud; The vehicle-side device communicates with the cloud, and is used to execute the instruction execution method for vehicle-cloud collaboration as described in any one of claims 1 to 9.