Method and device for preventing frame loss of instructions, vehicle and storage medium

By introducing an adapter middleware between the vehicle infotainment application and the body control domain, the problems of instruction loss and high coupling caused by frequent communication between the vehicle infotainment application and the vehicle control domain are solved. This improves the stability of the vehicle infotainment application and reduces the instability of the vehicle. It also supports OTA upgrades for vehicles that have already been sold, thus reducing the instability and coupling between the vehicle infotainment application and the body control domain.

CN118331763BActive Publication Date: 2025-11-18CHERY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410520855.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2025-11-18
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

When in-vehicle infotainment applications send commands to the vehicle control domain frequently and in an unordered manner, it can easily lead to command frame loss and execution failure. Furthermore, existing technologies make it difficult to upgrade the software in vehicles that have already been sold, resulting in a high degree of coupling between in-vehicle infotainment applications and the vehicle control domain.

Method used

An adapter middleware is introduced between the vehicle infotainment application and the body control domain. By receiving control commands, verifying execution results, and resending commands when preset conditions are not met, stability is increased and coupling is reduced.

Benefits of technology

It improves the stability of vehicle infotainment applications in executing the vehicle body control domain, reduces the coupling between vehicle infotainment applications and the system side, and supports OTA upgrades for vehicles already sold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118331763B_ABST
    Figure CN118331763B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of vehicles, in particular to a processing method and device for preventing frame loss of instructions, a vehicle and a storage medium, wherein the method comprises the following steps: receiving a control instruction of a vehicle in a message queue, obtaining an execution result when the control instruction is triggered; sending the execution result to a target middleware to check the execution result, obtaining a check result of the control instruction; judging whether the check result meets preset check conditions; if the check result does not meet the preset check conditions, the control instruction is re-sent to the message queue, and the control instruction is re-executed. Thus, the problems that instructions are easily lost when a vehicle machine application frequently communicates with a vehicle body control domain, and the coupling between the vehicle machine application and the vehicle body control domain is high are solved; an adapter middleware is added between the vehicle machine application and the vehicle body control domain, so that the stability of the vehicle machine application in executing the vehicle body control domain is improved, and the coupling between the vehicle machine application and the system side is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a method, apparatus, vehicle, and storage medium for preventing command frame loss. Background Technology

[0002] As smart cockpit technology matures, physical buttons in the cockpit are gradually decreasing. At the same time, vehicle infotainment applications are interacting more and more with the vehicle's control system. The diversity of software interactions in the cockpit also means that vehicle infotainment applications have increasingly higher requirements for the stability of vehicle control. This can lead to frequent and disordered sending of execution commands to the vehicle control domain by vehicle infotainment applications, resulting in frame drops and command execution failures when the vehicle control domain receives the commands.

[0003] In related technologies, time delays are applied when sending commands from the application end, or frame loss prevention is implemented on the vehicle control domain side.

[0004] However, neither of the above two solutions takes into account the concurrent situation of frequent and disordered calls and the failure of the vehicle control domain to execute commands. At the same time, there are difficulties in upgrading the CAN (Controller Area Network) software for vehicles that have already been sold, which urgently need to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, vehicle, and storage medium for preventing command frame loss, in order to solve the problems of command loss caused by frequent communication between vehicle infotainment applications and the vehicle control domain, as well as the high coupling between vehicle infotainment applications and the vehicle control domain.

[0006] The first aspect of this application provides a method for preventing command frame loss, comprising the following steps:

[0007] Receive vehicle control commands from the message queue, and obtain the execution result of the control commands when they are triggered;

[0008] The execution result is sent to the target middleware, and the target middleware is used to verify the execution result to obtain the verification result of the control instruction;

[0009] Determine whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, resend the control command to the message queue and re-execute the control command.

[0010] According to one embodiment of this application, before receiving control commands for the vehicle in the message queue, the method further includes:

[0011] Obtain the identification code of the control command;

[0012] The control command is sent to the message queue based on the identification code.

[0013] According to one embodiment of this application, receiving control commands for a vehicle in a message queue, and obtaining the execution result of the control commands when the control commands are triggered, includes:

[0014] Receive control commands for the vehicle from the message queue based on a first preset time interval;

[0015] When the control command is triggered, the control command is executed based on a second preset time interval, and the execution result of the control command is obtained.

[0016] According to one embodiment of this application, determining whether the verification result meets the preset verification conditions includes:

[0017] Determine whether the control command is in an executed state;

[0018] If the control instruction is in the executed state, then the control instruction is removed, and the verification result is determined to meet the preset verification condition.

[0019] If the control command is not in the executed state, or if the control command loses frames, then the verification result is determined to not meet the preset verification conditions.

[0020] According to one embodiment of this application, if the control command is not in the executed state, or if the control command loses a frame, the method further includes:

[0021] The control command is cyclically detected based on a third preset time interval;

[0022] If the control command is not removed from the verification within the third preset time interval, the verification result is determined to not meet the preset verification conditions.

[0023] According to the method for preventing command frame loss in this application embodiment, control commands for the vehicle are received from the message queue, and when the control command is triggered, the execution result is obtained; the execution result is sent to the target middleware to verify the execution result, and the verification result of the control command is obtained; it is determined whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed. This solves the problems of command loss easily caused by frequent communication between the vehicle infotainment application and the vehicle control domain, as well as the high coupling between the vehicle infotainment application and the vehicle control domain. By adding an adapter middleware between the vehicle infotainment application and the vehicle control domain, the stability of the vehicle infotainment application's execution of the vehicle control domain is increased, and the coupling between the vehicle infotainment application and the system side is reduced.

[0024] A second aspect of this application provides a processing apparatus for preventing command frame loss, comprising:

[0025] The receiving module is used to receive vehicle control commands in the message queue, and obtain the execution result of the control commands when the control commands are triggered;

[0026] The acquisition module is used to send the execution result to the target middleware and use the target middleware to verify the execution result to obtain the verification result of the control instruction;

[0027] The processing module is used to determine whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed.

[0028] According to one embodiment of this application, before receiving control commands for a vehicle in the message queue, the receiving module is further configured to:

[0029] Obtain the identification code of the control command;

[0030] The control command is sent to the message queue based on the identification code.

[0031] According to one embodiment of this application, the receiving module is specifically used for:

[0032] Receive control commands for the vehicle from the message queue based on a first preset time interval;

[0033] When the control command is triggered, the control command is executed based on a second preset time interval, and the execution result of the control command is obtained.

[0034] According to one embodiment of this application, the processing module is specifically used for:

[0035] Determine whether the control command is in an executed state;

[0036] If the control instruction is in the executed state, then the control instruction is removed, and the verification result is determined to meet the preset verification condition.

[0037] If the control command is not in the executed state, or if the control command loses frames, then the verification result is determined to not meet the preset verification conditions.

[0038] According to one embodiment of this application, if the control command is not in the executed state, or if the control command loses a frame, the processing module is further configured to:

[0039] The control command is cyclically detected based on a third preset time interval;

[0040] If the control command is not removed from the verification within the third preset time interval, the verification result is determined to not meet the preset verification conditions.

[0041] The processing apparatus for preventing command frame loss according to an embodiment of this application receives vehicle control commands from a message queue and obtains the execution result when the control command is triggered; sends the execution result to a target middleware to verify the execution result and obtains the verification result of the control command; determines whether the verification result meets a preset verification condition; if the verification result does not meet the preset verification condition, the control command is resent to the message queue and the control command is re-executed. This solves the problems of command loss easily caused by frequent communication between the vehicle infotainment application and the vehicle control domain, as well as the high coupling between the vehicle infotainment application and the vehicle control domain. By adding an adapter middleware between the vehicle infotainment application and the vehicle control domain, the stability of the vehicle infotainment application's execution of the vehicle control domain is increased, and the coupling between the vehicle infotainment application and the system side is reduced.

[0042] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for preventing instruction frame loss as described in the above embodiments.

[0043] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the instruction frame dropping prevention processing method as described in the above embodiments.

[0044] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0045] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0046] Figure 1 This is a flowchart of a method for preventing command frame loss according to an embodiment of this application;

[0047] Figure 2 This is a schematic diagram illustrating middleware instruction loss prevention according to an embodiment of this application;

[0048] Figure 3 This is a schematic diagram illustrating the working principle of caching and verification instructions according to an embodiment of this application;

[0049] Figure 4 This is a logic diagram of a trigger instruction according to an embodiment of the present application;

[0050] Figure 5 This is a logic diagram of verification instructions according to an embodiment of this application;

[0051] Figure 6 This is an example diagram of a processing apparatus for preventing command frame loss according to an embodiment of this application;

[0052] Figure 7 This is a structural schematic diagram of a vehicle according to an embodiment of this application. Detailed Implementation

[0053] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0054] The following description, with reference to the accompanying drawings, describes a method, apparatus, vehicle, and storage medium for preventing command frame loss according to embodiments of this application. Addressing the issues mentioned in the background art, such as command loss due to frequent communication between vehicle-mounted applications and the vehicle control domain, and the high coupling between the vehicle-mounted applications and the vehicle control domain, this application provides a method for preventing command frame loss. In this method, control commands for the vehicle are received from a message queue, and when a control command is triggered, an execution result is obtained. The execution result is sent to a target middleware for verification, obtaining a verification result for the control command. It is then determined whether the verification result meets preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and re-executed. This solves the problems of command loss due to frequent communication between vehicle-mounted applications and the vehicle control domain, as well as the high coupling between the vehicle-mounted applications and the vehicle control domain. By adding an adapter middleware between the vehicle-mounted applications and the vehicle control domain, the stability of the vehicle-mounted applications' execution of the vehicle control domain is increased, and the coupling between the vehicle-mounted applications and the system side is reduced.

[0055] Specifically, Figure 1 This is a flowchart illustrating a method for preventing command frame loss provided in an embodiment of this application.

[0056] like Figure 1 As shown, the method for preventing command frame loss includes the following steps:

[0057] In step S101, the control command of the vehicle in the message queue is received, and the execution result of the control command is obtained when the control command is triggered.

[0058] According to one embodiment of this application, before receiving the vehicle control command in the message queue, the method further includes: obtaining the identification code of the control command; and sending the control command to the message queue based on the identification code.

[0059] According to one embodiment of this application, receiving a vehicle control command in a message queue and obtaining the execution result of the control command when the control command is triggered includes: receiving a vehicle control command in a message queue based on a first preset time interval; executing the control command based on a second preset time interval when the control command is triggered, and obtaining the execution result of the control command.

[0060] The first preset time interval and the second preset time interval can both be set by those skilled in the art based on the actual operating conditions, or they can be determined for a limited number of computer simulations, and no specific limitation is made here.

[0061] Specifically, in order to address the issues of lost instructions when the vehicle infotainment application communicates frequently with the vehicle control domain and the high coupling between the vehicle infotainment application and the vehicle control domain, this application embodiment performs relevant verification on the instruction interoperability between the vehicle infotainment application and the vehicle control domain, thereby increasing the stability of the vehicle infotainment application's execution of the vehicle control domain.

[0062] Specifically, in this embodiment, an identification code is first added to the control command issued by the vehicle-mounted application. The current timestamp can be used as the identification code of the control command, that is, the identification code is unique. Secondly, the control command with the identification code is sent to a first-in-first-out message queue. This message queue can solve the problem of multiple vehicle-mounted applications sending control commands at the same time, so as to avoid communication disorder and concurrency problems.

[0063] It should be noted that the control command can be one or more control commands issued by the vehicle's infotainment system, and no specific limitation is made here.

[0064] Furthermore, such as Figures 2 to 4 As shown, after receiving the control command issued by the vehicle application, the message queue reads the control command from the message queue based on a first preset time interval (e.g., 100ms) and sends it to the verification array in the vehicle control domain and the target middleware. After receiving the control command, if the control command is triggered, the vehicle control domain executes the control command based on a second preset time interval (e.g., 100ms) and obtains the execution result of the control command.

[0065] The target middleware includes an instruction cache queue, trigger instructions, instruction verification queue, and instructions for execution. It enables fault tolerance between the application layer and the vehicle control domain based on the target middleware, thereby preventing the loss of control instructions.

[0066] For example, such as Figure 2 and Figure 3As shown, if vehicle infotainment application A and vehicle infotainment application B each issue a control command, then an identification code is added to the control commands issued by vehicle infotainment application A and vehicle infotainment application B, and the control commands issued by vehicle infotainment application A and vehicle infotainment application B are sent to a first-in-first-out message queue. Every 100ms, the control command is read from the message queue and sent to the body control domain and the verification array. After receiving the control command, the body control domain executes the control command every 100ms when the control command is triggered, and obtains the execution result corresponding to the control command.

[0067] It should be noted that, since the vehicle control domain may only execute one control command when it receives two control commands simultaneously within 100ms, the first preset time interval and the second preset time interval in this application embodiment can preferably be set to 100ms.

[0068] In step S102, the execution result is sent to the target middleware, and the target middleware is used to verify the execution result to obtain the verification result of the control command.

[0069] Specifically, in this embodiment of the application, after executing the control command, the vehicle body control domain sends the execution result corresponding to the control command to the verification array of the target middleware, and verifies the execution result through the verification array to obtain the verification result of the control command.

[0070] In step S103, it is determined whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed.

[0071] According to one embodiment of this application, determining whether the verification result meets the preset verification conditions includes: determining whether the control instruction is in an executed state; if the control instruction is in an executed state, removing the control instruction and determining that the verification result meets the preset verification conditions; if the control instruction is not in an executed state, or if the control instruction loses frames, determining that the verification result does not meet the preset verification conditions.

[0072] According to one embodiment of this application, if the control command is not in an executed state, or after the control command loses a frame, the method further includes: performing cyclic detection on the control command based on a third preset time interval; if the control command is not removed from the verification within the third preset time interval, it is determined that the verification result does not meet the preset verification conditions.

[0073] The third preset time interval can be set by those skilled in the art based on the actual operating conditions, or it can be determined for a limited number of computer simulations, and is not specifically limited here.

[0074] Specifically, such as Figure 3 and Figure 5As shown, if the verification array of this application verifies the execution result of the control instruction (message instruction) and finds that the control instruction is in an executed state, it indicates that the control instruction has been executed. At this time, it is determined that the verification result meets the preset verification conditions, and the control instruction is removed from the verification queue. If the verification result is that the control instruction is not in an executed state, that is, the control instruction has not been executed, or the control instruction has dropped frames, the verification array is used to recursively detect the control instruction based on a third preset time interval (e.g., 5s) to detect control instructions that have not been removed from the verification array after being added to the verification array for more than 5s. That is, the control instruction has not been executed within 5s. At this time, it is considered that the control instruction has not been executed or the control instruction has dropped frames. Thus, it is determined that the verification result does not meet the preset verification conditions. At this time, the control instruction is retrieved again and put into the message queue to wait for the command to be re-executed.

[0075] In summary, by deploying the application software at the software layer of the vehicle infotainment system, the application software and the body control domain do not require any modifications after implementation and can be decoupled. This allows for easy OTA (Over-The-Air) upgrades for existing sold vehicles, and also enables direct software deployment for vehicles awaiting mass production. Furthermore, it increases the stability of the vehicle infotainment application's execution in the body control domain, reduces software coupling, and addresses concurrency issues in the body control domain.

[0076] According to the method for preventing command frame loss in this application embodiment, control commands for the vehicle are received from the message queue, and when the control command is triggered, the execution result is obtained; the execution result is sent to the target middleware to verify the execution result, and the verification result of the control command is obtained; it is determined whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed. This solves the problems of command loss easily caused by frequent communication between the vehicle infotainment application and the vehicle control domain, as well as the high coupling between the vehicle infotainment application and the vehicle control domain. By adding an adapter middleware between the vehicle infotainment application and the vehicle control domain, the stability of the vehicle infotainment application's execution of the vehicle control domain is increased, and the coupling between the vehicle infotainment application and the system side is reduced.

[0077] Next, with reference to the accompanying drawings, a processing apparatus for preventing command frame loss according to an embodiment of this application is described.

[0078] Figure 6 This is a block diagram of a processing device for preventing command frame loss according to an embodiment of this application.

[0079] like Figure 6 As shown, the processing device 10 for preventing command frame loss includes: a receiving module 100, an acquisition module 200, and a processing module 300.

[0080] The receiving module 100 is used to receive vehicle control commands in the message queue and obtain the execution result of the control commands when they are triggered.

[0081] The acquisition module 200 is used to send the execution result to the target middleware and use the target middleware to verify the execution result to obtain the verification result of the control command;

[0082] The processing module 300 is used to determine whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed.

[0083] According to one embodiment of this application, before receiving control commands for a vehicle in the message queue, the receiving module 100 is further configured to:

[0084] Obtain the identification code of the control command;

[0085] Control commands are sent to the message queue based on the identifier code.

[0086] According to one embodiment of this application, the receiving module 100 is specifically used for:

[0087] Receive vehicle control commands from the message queue based on a first preset time interval;

[0088] When a control command is triggered, the control command is executed based on a second preset time interval, and the execution result of the control command is obtained.

[0089] According to one embodiment of this application, the processing module 300 is specifically used for:

[0090] Determine whether the control command is in an executed state;

[0091] If the control command is already executed, remove the control command and determine that the verification result meets the preset verification conditions.

[0092] If the control command is not in the executed state, or if the control command loses frames, the verification result is determined to not meet the preset verification conditions.

[0093] According to one embodiment of this application, if the control command is not in an executed state, or if the control command frame is lost, the processing module 300 is further configured to:

[0094] The control commands are cyclically detected based on a third preset time interval.

[0095] If the control command is not removed from the verification within the third preset time interval, the verification result is determined to not meet the preset verification conditions.

[0096] The processing apparatus for preventing command frame loss according to an embodiment of this application receives vehicle control commands from a message queue and obtains the execution result when the control command is triggered; sends the execution result to a target middleware to verify the execution result and obtains the verification result of the control command; determines whether the verification result meets a preset verification condition; if the verification result does not meet the preset verification condition, the control command is resent to the message queue and the control command is re-executed. This solves the problems of command loss easily caused by frequent communication between the vehicle infotainment application and the vehicle control domain, as well as the high coupling between the vehicle infotainment application and the vehicle control domain. By adding an adapter middleware between the vehicle infotainment application and the vehicle control domain, the stability of the vehicle infotainment application's execution of the vehicle control domain is increased, and the coupling between the vehicle infotainment application and the system side is reduced.

[0097] Figure 7 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include:

[0098] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.

[0099] When the processor 702 executes the program, it implements the method for preventing instruction frame loss provided in the above embodiments.

[0100] Furthermore, the vehicle also includes:

[0101] Communication interface 703 is used for communication between memory 701 and processor 702.

[0102] The memory 701 is used to store computer programs that can run on the processor 702.

[0103] The memory 701 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0104] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0105] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.

[0106] The processor 702 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0107] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for preventing instruction frame loss.

[0108] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0109] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0110] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0111] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0112] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0113] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.

[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0115] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for preventing command frame loss, characterized in that, Includes the following steps: Receive vehicle control commands from the message queue, and obtain the execution result of the control commands when they are triggered; The execution result is sent to the target middleware, and the target middleware is used to verify the execution result to obtain the verification result of the control instruction; Determine whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, resend the control command to the message queue and re-execute the control command.

2. The method according to claim 1, characterized in that, Before receiving vehicle control commands from the message queue, the process also includes: Obtain the identification code of the control command; The control command is sent to the message queue based on the identification code.

3. The method according to claim 1, characterized in that, The process of receiving vehicle control commands in the message queue, and obtaining the execution result of the control commands when they are triggered, includes: Receive control commands for the vehicle from the message queue based on a first preset time interval; When the control command is triggered, the control command is executed based on a second preset time interval, and the execution result of the control command is obtained.

4. The method according to claim 1, characterized in that, The step of determining whether the verification result meets the preset verification conditions includes: Determine whether the control command is in an executed state; If the control instruction is in the executed state, then the control instruction is removed, and the verification result is determined to meet the preset verification condition. If the control command is not in the executed state, or if the control command loses frames, then the verification result is determined to not meet the preset verification conditions.

5. The method according to claim 4, characterized in that, If the control command is not in the executed state, or if the control command loses a frame, the method further includes: The control command is cyclically detected based on a third preset time interval; If the control command is not removed from the verification within the third preset time interval, the verification result is determined to not meet the preset verification conditions.

6. A processing device for preventing command frame loss, characterized in that, include: The receiving module is used to receive vehicle control commands in the message queue, and obtain the execution result of the control commands when the control commands are triggered; The acquisition module is used to send the execution result to the target middleware and use the target middleware to verify the execution result to obtain the verification result of the control instruction; The processing module is used to determine whether the verification result meets the preset verification conditions. If the verification result does not meet the preset verification conditions, the control command is resent to the message queue and the control command is re-executed.

7. The apparatus according to claim 6, characterized in that, Before receiving control commands for the vehicle from the message queue, the receiving module is further configured to: Obtain the identification code of the control command; The control command is sent to the message queue based on the identification code.

8. The apparatus according to claim 6, characterized in that, The receiving module is specifically used for: Receive control commands for the vehicle from the message queue based on a first preset time interval; When the control command is triggered, the control command is executed based on a second preset time interval, and the execution result of the control command is obtained.

9. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method for preventing instruction frame loss as described in any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method for preventing instruction frame loss as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Control method and device for automatic driving, storage medium and vehicle

    CN110733513A

  • Health management method and device for robot for nuclear power plant and robot

    CN111482973A