Hardware buffer configuration method and apparatus, and vehicle
By configuring the hardware buffer binding relationship based on message priority and transmission period, the communication jitter problem caused by insufficient hardware buffers of the on-board domain controller is solved, and the reliability and security of vehicle functions are improved.
Patent Information
- Application Number
- PCT/CN2025/073924
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-01
- Filing Date
- 2025-01-22
- Publication Date
- 2025-08-07
AI Technical Summary
The number of hardware buffers of the on-board domain controller is limited, resulting in communication jitter when packets are unavailable, affecting vehicle functional safety.
According to the priority and transmission period of the packet, determine the binding relationship of the hardware buffer, reasonably allocate limited hardware buffer resources, and optimize message processing through configuration files.
It improves the reliability and flexibility of message processing, reduces communication jitter phenomenon, and ensures the stability and security of vehicle functions.
Smart Images

Figure CN2025073924_07082025_PF_FP_ABST
Abstract
Description
Hardware buffer configuration method, device and vehicle
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on February 1, 2024, with application number 202410146602.1 and application name “Hardware Buffer Configuration Method, Device and Vehicle”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of vehicle-mounted communications, and more specifically, to a hardware buffer configuration method, device, and vehicle. Background Art
[0003] Currently, with the increasing functionality and intelligence requirements of in-vehicle products, the number of messages sent and received by in-vehicle domain controllers is also increasing.
[0004] Currently, during transmission, messages can be temporarily stored in a hardware buffer awaiting further processing or forwarding. However, due to hardware resource constraints on the vehicle domain controller, the number of hardware buffers available is very limited. When the number of messages received by the vehicle domain controller exceeds the number of hardware buffers, a certain number of messages will inevitably be unable to use the hardware buffers. These messages may experience communication jitter, causing damage to vehicle-related functions and potentially threatening vehicle safety. Summary of the Invention
[0005] The present application provides a hardware buffer configuration method, device, and vehicle, which can improve the reliability and flexibility of message processing, thereby helping to reduce the occurrence of communication jitter.
[0006] In a first aspect, a hardware buffer configuration method is provided, the method comprising: obtaining M messages, the message types of the M messages being different from each other; determining a first configuration file based on the priorities and / or transmission cycles of the M messages, the first configuration file indicating a binding relationship between the M messages and N first-class hardware buffers, N being less than M, and each of the M messages corresponding to at most one first-class hardware buffer.
[0007] Wherein, N and M can both be positive integers.
[0008] In a possible implementation, the M messages having different message types may be understood as: the M messages using different structures and formats, respectively; or, the M messages using the same structure and format, but the M messages convey different information.
[0009] In a possible implementation, the binding relationship between the M messages and the N first-type hardware buffers may be that N messages among the M messages are bound to the N first-type hardware buffers respectively.
[0010] In a possible implementation, after obtaining the first configuration file, the vehicle domain controller may transmit or process the message based on the binding relationship between the message and the hardware buffer indicated by the first configuration file.
[0011] In a possible implementation, N messages with higher priorities and / or shorter transmission periods among the M messages may be bound to the N first-category hardware buffers respectively.
[0012] In this application, a first configuration file can be obtained based on the message priority and transmission period, so that the vehicle domain controller can transmit or process the message based on the first configuration file. In this way, the reliability and flexibility of message processing can be improved, which is conducive to reducing the occurrence of communication jitter.
[0013] In combination with the first aspect, in certain implementations of the first aspect, the M messages include a first message, the first configuration file indicates that the first message is bound to a first hardware buffer, and the first hardware buffer is one of the N first-class hardware buffers. The method also includes: obtaining a second message, the second message is a message added by the first component after the communication matrix is changed, the communication matrix indicates the communication rules between multiple nodes in the vehicle, and the first component is applied to the vehicle; when the priority of the second message is greater than the priority of the first message, and / or the transmission period of the second message is less than the transmission period of the first message, the first message is unbound from the first hardware buffer and the second message is bound to the first hardware buffer to obtain a second configuration file.
[0014] In a possible implementation, the first message may be a message with the lowest priority and / or the longest transmission period among the messages bound to the N first-type hardware buffers.
[0015] In this application, when the second message is a message added after the communication matrix is changed, the first message with a lower priority or a longer transmission period can be unbound from the first hardware buffer, and the second message can be bound to the first hardware buffer to obtain a second configuration file. This facilitates the vehicle domain controller to transmit or process the message based on the binding relationship between the message and the hardware buffer indicated by the second configuration file. In this way, limited hardware buffer resources can be reasonably allocated in the scenario of a communication matrix change, which is conducive to further reducing communication jitter.
[0016] In combination with the first aspect, in some implementations of the first aspect, the method further includes: controlling the prompting device to prompt that the second message is bound to the first hardware buffer.
[0017] In a possible implementation, a specific color may be used in the second configuration file to mark the second message.
[0018] In a possible implementation, the prompting device is a display screen.
[0019] In this application, after the communication matrix is changed, the developer can be prompted to bind the second message to the first hardware buffer, so as to ensure the developer's right to know about the second message processing method in a timely manner.
[0020] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: obtaining a third message, the third message being a message added by the first component after the communication matrix is changed, and the transmission period of the third message being equal to the transmission period of the second message; before unbinding the first message from the first hardware buffer and binding the second message to the first hardware buffer to obtain the second configuration file, the method further includes: determining that the priority of the second message is greater than the priority of the third message.
[0021] In this application, when both the second and third messages are added after the communication matrix is changed, and the second and third messages have the same transmission period, the second message with a higher priority can be bound to the first hardware buffer. In this way, the message with a higher priority can be given priority to be bound to the hardware buffer, further improving the reliability and flexibility of message processing.
[0022] In combination with the first aspect, in certain implementations of the first aspect, the M messages include a fourth message and a fifth message, the first configuration file indicates that the fourth message is bound to the second hardware buffer among the N first-type hardware buffers, and there is no bound first-type hardware buffer for the fifth message, and the method further includes: when the fourth message is a message reduced by the first component after the communication matrix is changed, unbinding the fourth message from the second hardware buffer and binding the fifth message to the second hardware buffer to obtain a third configuration file, wherein the communication matrix indicates communication rules between multiple nodes in a vehicle, and the first component is applied to the vehicle.
[0023] In this application, when the fourth message is a message that is reduced after the communication matrix is changed, the fourth message can be unbound from the second hardware buffer, and the fifth message that was not originally bound to the first type of hardware buffer can be bound to the second hardware buffer. In this way, limited hardware buffer resources can be reasonably allocated in the scenario of communication matrix changes, which is conducive to further reducing the occurrence of communication jitter.
[0024] In combination with the first aspect, in certain implementations of the first aspect, the M messages also include a sixth message, and the first configuration file indicates that there is no bound first-class hardware buffer to the sixth message; before unbinding the fourth message from the second hardware buffer and binding the fifth message to the second hardware buffer to obtain the third configuration file, the method also includes: determining that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message.
[0025] In the present application, when the fifth message and the sixth message are both messages that are not bound to the first type of hardware buffer before the communication matrix is changed, and only one message can be bound to the second hardware buffer, the fifth message with a higher priority and / or a smaller transmission period can be bound to the second hardware buffer. In this way, the reliability and flexibility of message processing can be further improved, which is conducive to further reducing the occurrence of communication jitter.
[0026] In combination with the first aspect, in certain implementations of the first aspect, before determining the first configuration file based on the priorities and / or transmission periods of the M messages, the method further includes: determining the priorities of the M messages based on the message identifiers of the M messages.
[0027] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: obtaining a seventh message; binding the seventh message to a third hardware buffer according to the priority and / or transmission period of the seventh message to obtain a fourth configuration file, wherein the fourth configuration file indicates a binding relationship between P messages and Q second-class hardware buffers, and the third hardware buffer is one of the Q second-class hardware buffers, wherein the N first-class hardware buffers correspond to a first controller area network CAN channel, and the Q second-class hardware buffers correspond to a second CAN channel.
[0028] In this application, the vehicle-mounted domain controller can bind the seventh message to the third hardware buffer in the second type of hardware buffer based on the priority and / or transmission cycle of the seventh message. In this way, the allocation method of the hardware buffers between multiple CANs can be dynamically adjusted, which is conducive to reducing communication jitter and avoiding waste of hardware buffer resources.
[0029] In combination with the first aspect, in certain implementations of the first aspect, determining the first configuration file based on the priority and / or transmission period of the M messages includes: determining L messages from the M messages based on the transmission period of the M messages, where L is an integer less than M and greater than or equal to N; and selecting N messages from the L messages and binding them to the N first-class hardware buffers respectively based on the priority of the L messages to obtain the first configuration file.
[0030] In this application, L messages can be selected based on the transmission period of M messages, and then N messages can be selected based on the priority of the L messages and bound to N first-class hardware buffers respectively. In this way, limited hardware buffer resources can be reasonably allocated, which is conducive to further reducing communication jitter.
[0031] In a second aspect, a hardware buffer configuration device is provided, the device comprising: an acquisition unit and a processing unit;
[0032] The acquisition unit is used to acquire M messages, where the message types of the M messages are different from each other; the processing unit is used to determine a first configuration file based on the priority and / or transmission period of the M messages, where the first configuration file indicates a binding relationship between the M messages and N first-class hardware buffers, where N is less than M, and each of the M messages corresponds to at most one first-class hardware buffer.
[0033] In combination with the second aspect, in certain implementations of the second aspect, the M messages include a first message, the first configuration file indicates that the first message is bound to a first hardware buffer, and the first hardware buffer is one of the N first-class hardware buffers; the acquisition unit is also used to obtain a second message, and the second message is a message added by the first component after the communication matrix is changed, the communication matrix indicates the communication rules between multiple nodes in the vehicle, and the first component is applied to the vehicle; the processing unit is also used to unbind the first message from the first hardware buffer and bind the second message to the first hardware buffer when the priority of the second message is greater than the priority of the first message, and / or the transmission period of the second message is less than the transmission period of the first message, so as to obtain a second configuration file.
[0034] In combination with the second aspect, in some implementations of the second aspect, the processing unit is further used to control the prompting device to prompt that the second message is bound to the first hardware buffer.
[0035] In combination with the second aspect, in certain implementations of the second aspect, the acquisition unit is further used to acquire a third message, wherein the third message is a message added by the first component after the communication matrix is changed, and the transmission period of the third message is equal to the transmission period of the second message; the processing unit is further used to determine that the priority of the second message is greater than the priority of the third message.
[0036] In combination with the second aspect, in certain implementations of the second aspect, the M messages include a fourth message and a fifth message, the first configuration file indicates that the fourth message is bound to the second hardware buffer among the N first-type hardware buffers, and there is no bound first-type hardware buffer for the fifth message; the processing unit is further used to, when the fourth message is a message reduced by the first component after the communication matrix is changed, unbind the fourth message from the second hardware buffer and bind the fifth message to the second hardware buffer to obtain a third configuration file, wherein the communication matrix indicates communication rules between multiple nodes in a vehicle, and the first component is applied to the vehicle.
[0037] In combination with the second aspect, in certain implementations of the second aspect, the M messages also include a sixth message, and the first configuration file indicates that there is no bound first-class hardware buffer to the sixth message; the processing unit is also used to determine that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message.
[0038] In combination with the second aspect, in some implementations of the second aspect, the processing unit is further used to determine the priorities of the M messages based on the message identifiers of the M messages.
[0039] In combination with the second aspect, in certain implementations of the second aspect, the acquisition unit is further used to acquire the seventh message; the processing unit is further used to bind the seventh message to the third hardware buffer based on the priority and / or transmission cycle of the seventh message to obtain a fourth configuration file, wherein the fourth configuration file indicates the binding relationship between P messages and Q second-class hardware buffers, and the third hardware buffer is one of the Q second-class hardware buffers, wherein the N first-class hardware buffers correspond to the first controller area network CAN channel, and the Q second-class hardware buffers correspond to the second CAN channel.
[0040] In combination with the second aspect, in certain implementations of the second aspect, the processing unit is used to: determine L messages from the M messages based on the transmission period of the M messages, where L is an integer less than M and greater than or equal to N; and select N messages from the L messages and bind them to the N first-class hardware buffers respectively according to the priority of the L messages to obtain the first configuration file.
[0041] In a third aspect, a hardware buffer configuration device is provided, comprising: at least one processor and a memory, wherein the at least one processor is coupled to the memory and is used to read and execute instructions in the memory, so that the device implements the method in any one of the implementation methods of the above-mentioned first aspect.
[0042] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program code, and when the computer program code is run on a computer, the computer executes the method in any one of the implementation modes of the above-mentioned first aspect.
[0043] In a fifth aspect, a chip is provided, which includes a circuit for executing the method in any one of the implementations of the first aspect.
[0044] In a sixth aspect, a computer program product is provided, which includes a computer program. When the computer program is run, the computer executes the method in any one of the implementation modes of the first aspect.
[0045] In a seventh aspect, a vehicle is provided, comprising any one of the implementations in the second aspect or the hardware buffer configuration device in the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a functional schematic diagram of a vehicle provided in an embodiment of the present application;
[0047] FIG2 is a system architecture applicable to the hardware buffer configuration method provided in an embodiment of the present application;
[0048] FIG3 is a schematic flow chart of a hardware buffer configuration method provided in an embodiment of the present application;
[0049] FIG4 is a schematic flow chart of another hardware buffer configuration method provided in an embodiment of the present application;
[0050] FIG5 is a schematic flowchart of the steps of performing DBC file comparison according to an embodiment of the present application;
[0051] FIG6 is a schematic flowchart of adjusting the binding relationship between a message and a hardware buffer using a configuration tool according to an embodiment of the present application;
[0052] FIG7 is a hardware buffer configuration device provided by an embodiment of the present application;
[0053] FIG8 is another hardware buffer configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solution in this application will be described below with reference to the accompanying drawings.
[0055] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In this application, "at least one" refers to one or more, and "more than one" refers to two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0056] In the embodiments of this application, prefixes such as "first" and "second" are used only to distinguish different description objects and have no limiting effect on the position, order, priority, quantity, or content of the described objects. The use of prefixes such as ordinal numbers in the embodiments of this application to distinguish description objects does not constitute a limitation on the described objects. For a statement of the described objects, please refer to the description in the context of the claims or embodiments, and the use of such prefixes should not constitute an unnecessary limitation.
[0057] Current vehicle-mounted domain controllers (e.g., mobile data centers (MDCs) and microcontroller units (MCUs)) primarily communicate over the CAN bus. As the functionality and intelligence demands of vehicle-mounted products continue to increase, the number of CAN messages sent and received by vehicle-mounted domain controllers is also increasing. During transmission, these messages can be temporarily stored in a hardware buffer awaiting further processing or forwarding. If there is no hardware buffer, messages need to be forwarded through software. However, software-based message forwarding requires obtaining time slice resources and performing priority arbitration, which increases message communication jitter.
[0058] The current controller area network database file (DBC) needs to be manually configured when it is refreshed, that is, the number of hardware buffers supported by each CAN channel and the messages bound to the hardware buffers need to be manually configured. As the number of messages increases, manual configuration becomes very difficult, and it is difficult to identify which messages should be configured with hardware buffers and which messages should not be configured with hardware buffers. In addition, due to the limitations of hardware resources on the vehicle domain controller, the number of hardware buffers it can use is limited. When the number of messages received by the vehicle domain controller exceeds the number of hardware buffers, it is inevitable that a certain number of messages cannot use the hardware buffers. These messages may experience communication jitter, resulting in damage to vehicle-related functions, which may threaten the safety of the vehicle.
[0059] Communication jitter can be understood as the instability or irregularity that occurs when data transmission is not configured with a buffer. When there are insufficient buffers to process data, the large size of packets or the large number of messages may lead to insufficient hardware buffer allocation. This may cause some messages to be sent reliant on software transmission mechanisms. Software transmission mechanisms require time slice resources and priority arbitration, which can cause jitter in the transmitted data. This means that the data transmission interval exceeds a certain threshold, causing the data transmission to not meet enterprise standards.
[0060] The present application provides a hardware buffer configuration method, device, and vehicle, which can improve the reliability and flexibility of message processing, thereby helping to reduce the occurrence of communication jitter.
[0061] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0062] FIG1 is a functional schematic diagram of a vehicle 100 provided in an embodiment of the present application.
[0063] The vehicle 100 may include various subsystems, such as a perception system 120 and a computing platform 130. Alternatively, the vehicle 100 may include more or fewer subsystems, and each subsystem may include one or more components. Furthermore, each subsystem and component of the vehicle 100 may be interconnected via wired or wireless means.
[0064] The perception system 120 may include several sensors for sensing information about the environment surrounding the vehicle 100. For example, the perception system 120 may include a positioning system, which may be a global positioning system (GPS), a Beidou system, or other positioning systems. The perception system 120 may include one or more of an inertial measurement unit (IMU), a laser radar, a millimeter-wave radar, an ultrasonic radar, and a camera.
[0065] Some or all functions of the vehicle 100 may be controlled by a computing platform 130. The computing platform 130 may include processors 131 to 13n (n is a positive integer). A processor is a circuit capable of processing signals. In one implementation, the processor may be a circuit capable of reading and executing instructions, such as a central processing unit (CPU), a microprocessor, a graphics processing unit (GPU) (which can be understood as a microprocessor), or a digital signal processor (DSP). In another implementation, the processor may implement certain functions through the logical relationships of a hardware circuit. The logical relationships of the hardware circuit may be fixed or reconfigurable. For example, the processor may be a hardware circuit implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration file to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, the processor may also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc. In addition, the computing platform 130 may also include a memory for storing instructions, and some or all of the processors 131 to 13n may call the instructions in the memory to implement corresponding functions.
[0066] The computing platform 130 may control functions of the vehicle 100 based on input received from various subsystems, such as the perception system 120. In some embodiments, the computing platform 130 may be used to provide control over many aspects of the vehicle 100 and its subsystems.
[0067] Optionally, the above components are just an example. In actual applications, the components in the above modules may be added or deleted according to actual needs.
[0068] The vehicle 100 in this application may include: road vehicles, water vehicles, air vehicles, industrial equipment, agricultural equipment, or entertainment equipment, etc. For example, the vehicle 100 may be a vehicle (such as a commercial vehicle, a passenger car, a motorcycle, a flying car, a train, etc.), an industrial vehicle (such as a forklift, a trailer, a tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), agricultural equipment (such as a lawn mower, a harvester, etc.), amusement equipment, a toy vehicle, etc. The embodiments of this application do not specifically limit the type of vehicle.
[0069] FIG2 is a system architecture applicable to the hardware buffer configuration method provided in an embodiment of the present application, which can be applied to a vehicle 100 .
[0070] As shown in Figure 2, the system architecture may include: MDC, radar, intelligent fire controller (IFC), telematics-box (T-Box), vehicle control unit (VCU), and cockpit domain controller (CDC).
[0071] Among them, MDC can be connected to bus CAN0 and bus CAN1, and allocate multiple first-class hardware buffers to CAN0 and multiple second-class hardware buffers to CAN1 to realize the vehicle's intelligent driving function; radar and IFC can be located in the perception system 120 of Figure 1 to sense information about the environment around the vehicle to assist MDC in realizing intelligent driving functions; T-Box can be used to communicate with other electronic devices inside the vehicle to realize remote control functions; VCU can be responsible for integrating and coordinating various electronic subsystems of the vehicle, such as powertrain, body control, chassis control, etc., to ensure the overall performance and safety of the vehicle; CDC can be used to realize entertainment, multi-terminal interconnection and other functions to enhance the user's driving experience; among them, T-Box, VCU and CDC can be connected to CAN1, and MDC can be connected to CAN1 and CAN2.
[0072] FIG3 is a schematic flow chart of a hardware buffer configuration method provided in an embodiment of the present application. Method 300 can be executed by a vehicle or an on-board domain controller. When method 300 is executed by vehicle 100, it can be executed by the computing platform 130 in vehicle 100, or it can also be executed by the system-on-chip (SoC) in the computing platform 130, or it can also be executed by the processor in the computing platform 130. The following describes method 300 with the on-board domain controller as the execution subject. Method 300 may include steps S301 to S302. The on-board domain controller can be each domain controller of the vehicle, for example, an intelligent driving domain controller, a vehicle controller, a cockpit domain controller, etc.
[0073] S301: Obtain M messages, where the message types of the M messages are different from each other.
[0074] Optionally, the M messages having different message types may be understood as: the M messages respectively using different structures and formats, or the M messages using the same structure and format, but the M messages convey different information.
[0075] S302: Determine a first configuration file according to the priorities and / or transmission periods of the M messages.
[0076] The first configuration file indicates a binding relationship between M messages and N first-class hardware buffers, where N is less than M, and each of the M messages corresponds to at most one first-class hardware buffer, and both N and M can be positive integers.
[0077] Optionally, the binding relationship between the M messages and the N first-class hardware buffers can be that N messages among the M messages are respectively bound to the N first-class hardware buffers. Further optionally, N messages with high priority and / or short transmission period among the M messages can be respectively bound to the above-mentioned N first-class hardware buffers.
[0078] Optionally, after obtaining the first configuration file, the vehicle-mounted domain controller may transmit or process the message based on the binding relationship between the message and the hardware buffer indicated by the first configuration file.
[0079] Optionally, before step S302 , the method 300 further includes: determining priorities of the M messages according to the message identifiers of the M messages.
[0080] In one possible implementation, in step S302, L messages can be determined from the M messages based on the transmission period of the M messages, where L is an integer less than M and greater than or equal to N; then, based on the priority of the L messages, N messages are selected from the L messages and bound to N first-class hardware buffers respectively to obtain a first configuration file.
[0081] In this application, a first configuration file can be obtained based on the message priority and transmission period, so that the vehicle domain controller can transmit or process the message based on the first configuration file. In this way, the reliability and flexibility of message processing can be improved, which is conducive to reducing the occurrence of communication jitter.
[0082] After the first configuration file is determined, when the communication matrix changes, the first configuration file may be updated based on the increased or decreased priority and / or transmission period of the message.
[0083] In one possible implementation, in step S301, when the M messages obtained include a first message and the first configuration file indicates that the first message is bound to the first hardware buffer among the N first-class hardware buffers, after step S302, method 300 further includes: obtaining a second message, which is a message added by the first component after the communication matrix is changed. When the priority of the second message is greater than the priority of the first message, and / or the transmission period of the second message is less than the transmission period of the first message, the first message is unbound from the first hardware buffer and the second message is bound to the first hardware buffer to obtain a second configuration file, so that the vehicle domain controller transmits or processes the message based on the binding relationship between the message and the hardware buffer indicated by the second configuration file. In this way, limited hardware buffer resources can be reasonably allocated in the scenario of communication matrix changes, which is conducive to further reducing the occurrence of communication jitter.
[0084] The communication matrix may indicate communication rules between multiple nodes in a vehicle, and the first component is applied to the vehicle.
[0085] Optionally, the first message may be a message with the lowest priority and / or the longest transmission period among the messages bound to the N first-type hardware buffers.
[0086] Optionally, after step S302, method 300 further includes controlling a prompting device to prompt that the second message is bound to the first hardware buffer. Furthermore, optionally, the second message can be marked with a specific color in the second configuration file, and the prompting device can be a display screen. This ensures that developers are promptly informed of how the second message is processed.
[0087] In one possible implementation, after step S302, method 300 further includes: obtaining a third message, where the third message is added by the first component after the communication matrix is changed, and the transmission period of the third message is equal to the transmission period of the second message; and before unbinding the first message from the first hardware buffer and binding the second message to the first hardware buffer to obtain the second configuration file, method 300 further includes: determining that the priority of the second message is greater than the priority of the third message. In this way, if the transmission periods of the second and third messages are the same, the second message with the higher priority is given priority in obtaining the opportunity to be bound to the hardware buffer.
[0088] In one possible implementation, the M messages include a fourth message and a fifth message, and the first configuration file indicates that the fourth message is bound to a second hardware buffer among the N first-type hardware buffers, and that no first-type hardware buffer is bound to the fifth message. After step S302, method 300 further includes: if the fourth message is a message that is reduced by the first component after a communication matrix change, unbinding the fourth message from the second hardware buffer and binding the fifth message to the second hardware buffer, thereby obtaining a third configuration file. This allows for the rational allocation of limited hardware buffer resources in scenarios where the communication matrix is changed, further reducing communication jitter.
[0089] In one possible implementation, the M messages also include a sixth message, and the first configuration file indicates that no first-class hardware buffer exists for the sixth message. Before unbinding the fourth message from the second hardware buffer and binding the fifth message to the second hardware buffer to obtain the third configuration file, method 300 further includes: determining that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message. In this way, if both the fifth and sixth messages were not bound to the first-class hardware buffer before the communication matrix was changed, and only one message can be bound to the second hardware buffer, the fifth message with the higher priority and / or the shorter transmission period can be bound to the second hardware buffer.
[0090] When the communication matrix is changed and new messages are added, the new messages can also be bound to another type of hardware buffer.
[0091] In one possible implementation, after step S302, method 300 further includes: obtaining a seventh message; and binding the seventh message to a third hardware buffer based on the priority and / or transmission period of the seventh message to obtain a fourth configuration file, wherein the fourth configuration file indicates a binding relationship between P messages and Q second-type hardware buffers, the third hardware buffer being one of the Q second-type hardware buffers, wherein the N first-type hardware buffers correspond to the first CAN channel, and the Q second-type hardware buffers correspond to the second CAN channel. In this way, the allocation of hardware buffers between multiple CANs can be dynamically adjusted, which is beneficial for reducing communication jitter and avoiding waste of hardware buffer resources.
[0092] It should be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0093] FIG4 is a schematic flowchart of another hardware buffer configuration method provided in an embodiment of the present application. Method 400 may be a specific introduction to steps S301 and S302 in method 300 . Method 400 may include steps S410 to S460 .
[0094] S410, performing DBC file transformation.
[0095] Exemplarily, in this step, the DBC file corresponding to the entire vehicle can be first obtained, and then the DBC file corresponding to the entire vehicle can be converted into a DBC file that can be implemented by the electronic control unit (ECU), wherein the DBC file can be understood as a descriptive file in the communication protocol, which is used to define the meaning, fields, layout and parameters of messages and signals; the DBC file corresponding to the entire vehicle usually contains the communication protocol and information of the entire vehicle, while a specific ECU may only need to use a part of the signals or messages for communication. The above-mentioned DBC file transformation step can streamline and optimize the vehicle communication specifications to make it more suitable for the communication needs of a specific ECU.
[0096] S420: Perform DBC file comparison to identify the changed message, and generate a new sorting configuration table according to the changed message.
[0097] For example, as shown in FIG5 , step S420 may include the following sub-steps:
[0098] S421: Identify the change message.
[0099] The current DBC file is compared with a previously obtained DBC file to identify changed messages. For example, this step can identify messages that have been added or subtracted after the communication matrix has been modified. When an increase or decrease in messages is detected, the binding information between the hardware buffer and the message carried in the sorting configuration table can be updated. Otherwise, the binding information between the hardware buffer and the message carried in the sorting configuration table may not be updated. The first configuration file in method 300 may include the sorting configuration table.
[0100] The communication matrix can be used to indicate the communication rules between multiple nodes within a vehicle. A change in the communication matrix can be understood as a change in the communication relationship between the ECUs within the vehicle. For example, ECU1 and ECU2 originally had no communication relationship, but after the communication matrix change, ECU1 and ECU2 established a communication relationship. Another example is ECU1 and ECU2 originally had a communication relationship, but ECU1 and ECU3 did not. After the communication matrix change, ECU1 and ECU3 established a communication relationship, but ECU1 and ECU2 no longer had a communication relationship.
[0101] S422: Detect the message ID and message frequency of the change message.
[0102] Optionally, the smaller the ID of the message, the greater the priority of the message may be. For example, the priority of a message with an ID of 0x12F is greater than that of a message with an ID of 0x13F.
[0103] Optionally, the higher the message transmission frequency and the shorter the transmission period, the higher the message priority can be. For example, a message with a transmission period of 10 milliseconds has a higher priority than a message with a transmission period of 50 milliseconds. The reason for this setting is that the shorter the message transmission period, the more sensitive it is to latency, and the greater the need for hardware buffers to assist in message transmission and reception. Otherwise, latency jitter is likely to occur, which in turn fails to meet enterprise standards.
[0104] For example, if the enterprise standard requires that the sent messages meet a message jitter requirement of less than 10%, then for a message with a sending period of 100 milliseconds, as long as the receiving period of two frames of messages is between 90 milliseconds and 110 milliseconds, it meets the requirements of the enterprise standard. However, for a message with a sending period of 10 milliseconds, the receiving period of two frames of messages must be between 9 and 10 milliseconds to meet the requirements of the enterprise standard.
[0105] S423: Obtain a sorting configuration table of the message binding hardware buffer.
[0106] Optionally, if the change involves the first communication matrix, since the original project file does not include a sorting configuration table, before step S423, a type of hardware buffer can be allocated to each CAN (for example, CAN0 and CAN1 in Figure 2), and then the messages can be sorted according to preset rules to obtain the sorting configuration table of the first hardware buffer under the project file.
[0107] S424: Determine a new sorting configuration table for the message binding hardware buffer.
[0108] Exemplarily, a new sorting configuration table can be determined based on the message ID and / or message period of the change message in step S422 and the sorting configuration table obtained in step S423, wherein the second configuration file, the third configuration file or the fourth configuration file in method 300 can include the new sorting configuration table.
[0109] In one possible implementation, after the communication matrix is changed, when the number of messages decreases, the reduced messages in the sorting configuration table can be deleted. When the number of remaining messages after deleting the reduced messages in the sorting configuration table is less than the number of hardware buffers, there is no need to adjust the binding relationship between the hardware buffer and the message, thereby determining a new sorting configuration table.
[0110] For example, as shown in Table 1, the number of the first type of hardware buffers (which can be understood as the hardware buffer corresponding to a certain CAN channel) is 5. After the communication matrix is changed, the message ADAS_0x14F is a reduced message. At this time, ADAS_0x14F can be deleted. Since the number of remaining messages (4) is less than the number of the first type of hardware buffers (5), there is no need to adjust the binding relationship between the hardware buffer and the message, thereby obtaining a new sorting configuration table.
[0111] Table 1
[0112] In one possible implementation, after the communication matrix is changed, when the number of messages decreases, the reduced messages in the sorting configuration table can be deleted. When the number of remaining messages after the reduced messages are deleted from the sorting configuration table is greater than or equal to the number of hardware buffers, a new sorting configuration table can be determined based on the message ID and / or message period.
[0113] For example, as shown in Table 2, the number of first-class hardware buffers is 5. After the communication matrix is changed, message ADAS_0x14F is a reduced message. At this time, it can be deleted first. After deleting message ADAS_0x14F, since the number of remaining messages (5) is equal to the number of first-class hardware buffers (5), message ADAS_0x17F can be bound to a first-class hardware buffer, thereby determining a new sorting configuration table.
[0114] Table 2
[0115] In one possible implementation, after the communication matrix is changed, when the number of messages increases, when the sum of the number of new messages and the original number of messages is still less than or equal to the number of hardware buffers, the new messages can be directly bound to the hardware buffer to determine the new sorting configuration table.
[0116] For example, as shown in Table 3, the number of first-class hardware buffers is 6. After the communication matrix is changed, message ADAS_0x17F is a newly added message. At this time, the total number of messages (6) is equal to the number of first-class hardware buffers (6). Message ADAS_0x17F can be directly bound to a first-class hardware buffer, thereby determining a new sorting configuration table.
[0117] Table 3
[0118] In one possible implementation, after the communication matrix is changed, when the number of messages increases, when the sum of the number of new messages and the original number of messages is greater than the number of hardware buffers, the binding relationship between the messages in the sorting configuration table and the hardware buffer can be changed based on the ID and / or sending cycle of the new messages to determine the new sorting configuration table.
[0119] Optionally, the binding relationship between the message and the hardware buffer in the sorting configuration table may be changed only according to the ID of the newly added message.
[0120] For example, as shown in Table 4, the number of first-class hardware buffers is 5. When the newly added message is ADAS_0x16F, since the message ID of the message is greater than ADAS_0x17F, ADAS_0x17F with the largest message ID can be unbound from the fifth hardware buffer in the first-class hardware buffer, and the message ADAS_0x16F can be bound to the fifth hardware buffer in the first-class hardware buffer.
[0121] Table 4
[0122] Optionally, the binding relationship between the messages and the hardware buffer in the sorting configuration table may be changed only according to the sending period of the newly added messages.
[0123] For example, as shown in Table 5, the number of first-class hardware buffers is 2. When the newly added message is ADAS_0x14F, since the sending period of this message is shorter than that of messages ADAS_0x12F and ADAS_0x13F, the message ADAS_0x14F can be bound to the first hardware buffer of the first-class hardware buffer and arranged in front of the messages ADAS_0x12F and ADAS_0x13F. The message ADAS_0x13F with the largest sending period can be unbound from the second hardware buffer in the first-class hardware buffer.
[0124] Table 5
[0125] Optionally, the binding relationship between the message and the hardware buffer in the sorting configuration table may be changed first according to the sending period of the newly added message, and then the binding relationship between the message and the hardware buffer in the sorting configuration table may be changed according to the message ID.
[0126] For example, as shown in Table 6, the number of the first type of hardware buffers is 5. When the newly added messages are ADAS_0x12F to ADAS_0x14F, since the sending period of these messages is smaller than that of messages ADAS_0x15F and ADAS_0x16F, messages ADAS_0x12F to ADAS_0x14F can be bound to the first three hardware buffers in the first type of hardware buffer. Moreover, since the sending periods of ADAS_0x12F to ADAS_0x14F are the same, these messages can be sorted according to the message ID. That is, the smaller the message ID, the closer it is to the front of Table 6.
[0127] Table 6
[0128] Alternatively, the binding relationship between the message in the sorting configuration table and the hardware buffer can be changed according to the ID of the newly added message, and then the binding relationship between the message in the sorting configuration table and the hardware buffer can be changed according to the sending cycle of the message. This will not be repeated here.
[0129] Optionally, when a conflict occurs between the message priority indicated based on the message ID and the message priority indicated based on the message sending cycle, a prompt may be given to the developer to confirm whether the imported message information meets expectations.
[0130] Optionally, for some special messages, it is also possible to specify that the message is not bound to a hardware buffer, or to specify that the message is bound to a specific hardware buffer in a certain type of hardware buffer.
[0131] In a possible implementation, if no change message is identified in step S421, then in step S424, there is no need to update the sorting configuration table, and subsequent steps do not need to be performed.
[0132] S425, marking the message indicating the hardware buffer change.
[0133] Exemplarily, after obtaining the new sorting configuration table based on step S424, the changed messages (increased or reduced messages) can be marked, and the developer is prompted to adjust the hardware buffer for the changed messages. In addition, for some special changed messages, the marking process may not be performed.
[0134] S426, exporting a new sorting configuration table of the hardware buffer.
[0135] Exemplarily, this step may export a file corresponding to the new sorting configuration table of the hardware buffer (eg, the second configuration file, the third configuration file, or the fourth configuration file in method 300 ) to facilitate subsequent adjustment of the relationship between the change message and the hardware buffer based on the file.
[0136] S430: Import the new sorting configuration table into the connection tool to adjust the communication relationship between components.
[0137] For example, the wiring tool can adjust the communication paths between components (e.g., ECUs), modify the content of message transmission, adjust the method of data transmission, etc. based on the imported new sorting configuration table to achieve a specific communication sequence or requirement.
[0138] S440: Use the configuration tool to adjust the binding relationship between the message and the hardware buffer.
[0139] For example, as shown in FIG6 , step S440 may include the following sub-steps:
[0140] S441, importing a new sorting configuration table into the hardware buffer.
[0141] S442: Adjust the binding relationship between the message and the hardware buffer according to the new sorting configuration table.
[0142] Optionally, after adjusting the binding relationship between the message and the hardware buffer, the new sorting configuration table and marking information can be recorded in the project file as input for the next communication matrix change.
[0143] S450: Generate executable code corresponding to the new sorting configuration table.
[0144] Exemplarily, this step can generate executable code corresponding to the new sorting configuration table for deployment and execution by the corresponding ECU.
[0145] S460: Verify the executability of the executable code.
[0146] Exemplarily, the executable code in step S450 may be run to detect whether the running result of the executable code meets expectations, for example, whether the communication jitter during message transmission is reduced.
[0147] In this application, after the communication matrix changes, the hardware buffer's sorting configuration table can be updated based on the priority of the newly added or removed messages, and the messages can be transmitted according to the updated sorting configuration table. In this way, the reliability and flexibility of message processing can be improved, thereby reducing the occurrence of communication jitter.
[0148] Method 400 describes how to configure a hardware buffer for messages transmitted in a CAN channel. When a vehicle-mounted domain controller establishes connections with multiple CAN channels, hardware buffers can also be configured for messages transmitted by multiple CAN channels according to the steps in method 400.
[0149] For example, as shown in Figure 2, the vehicle domain controller includes two CAN channels: CAN0 and CAN1, where CAN0 includes 25 first-class hardware buffers and CAN1 includes 20 second-class hardware buffers. When CAN0 transmits 30 messages and CAN1 transmits 15 messages, the five messages with the largest message IDs in CAN0 can be bound to the five second-class hardware buffers respectively. At this time, the vehicle domain controller can transmit messages based on the latest message binding results of the first-class hardware buffer and the second-class hardware buffer.
[0150] For another example, as shown in Figure 2, the vehicle domain controller includes two CAN channels: CAN0 and CAN1, where CAN0 includes 25 first-class hardware buffers and CAN1 includes 20 second-class hardware buffers. When CAN0 transmits 20 messages and CAN1 transmits 15 messages, and the sending period of the last 5 messages in the CAN0 sorting configuration table is less than the first 5 messages in the CAN1 sorting configuration table, the last 5 messages in the CAN0 sorting configuration table can be bound to the first five hardware buffers in the second-class hardware buffer respectively. At this time, the vehicle domain controller can transmit messages based on the latest message binding results of the first-class hardware buffer and the second-class hardware buffer.
[0151] The present application also provides a hardware buffer configuration device to implement the above-mentioned hardware buffer configuration method. Figure 7 is a schematic diagram of a hardware buffer configuration device 700 provided in an embodiment of the present application. The device 700 may include an acquisition unit 710, a storage unit 720, and a processing unit 730. The acquisition unit 710 is used to acquire instructions and / or data, the storage unit 720 is used to implement the corresponding storage function and store the corresponding instructions and / or data; the processing unit 730 is used to perform data processing so that the device 700 implements the above-mentioned hardware buffer configuration method.
[0152] The device 700 includes: an acquisition unit 710 and a processing unit 730; the acquisition unit 710 is used to acquire M messages, and the message types of the M messages are different from each other; the processing unit 730 is used to determine a first configuration file based on the priority and / or transmission period of the M messages, and the first configuration file indicates the binding relationship between the M messages and N first-class hardware buffers, N is less than M, and each of the M messages corresponds to at most one first-class hardware buffer.
[0153] In one possible implementation, the M messages include a first message, the first configuration file indicates that the first message is bound to a first hardware buffer, and the first hardware buffer is one of N first-type hardware buffers; the acquisition unit 710 is also used to obtain a second message, the second message is a message added by the first component after the communication matrix is changed, the communication matrix indicates the communication rules between multiple nodes in the vehicle, and the first component is applied to the vehicle; the processing unit 730 is also used to unbind the first message from the first hardware buffer and bind the second message to the first hardware buffer when the priority of the second message is greater than the priority of the first message and / or the transmission period of the second message is less than the transmission period of the first message, so as to obtain a second configuration file.
[0154] In a possible implementation, the processing unit 730 is further configured to control the prompting device to prompt that the second message is bound to the first hardware buffer.
[0155] In one possible implementation, the acquisition unit 710 is also used to obtain a third message, which is a message added by the first component after the communication matrix is changed, and the transmission period of the third message is equal to the transmission period of the second message; the processing unit 730 is also used to determine that the priority of the second message is greater than the priority of the third message.
[0156] In one possible implementation, the M messages include a fourth message and a fifth message, the first configuration file indicates that the fourth message is bound to the second hardware buffer among the N first-type hardware buffers, and there is no first-type hardware buffer bound to the fifth message; the processing unit 730 is further used to, when the fourth message is a message reduced by the first component after the communication matrix is changed, unbind the fourth message from the second hardware buffer and bind the fifth message to the second hardware buffer to obtain a third configuration file, wherein the communication matrix indicates communication rules between multiple nodes in the vehicle, and the first component is applied to the vehicle.
[0157] In one possible implementation, the M messages also include a sixth message, and the first configuration file indicates that there is no first-class hardware buffer bound to the sixth message; the processing unit 730 is also used to determine that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message.
[0158] In a possible implementation, the processing unit 730 is further configured to determine priorities of the M messages according to the message identifiers of the M messages.
[0159] In one possible implementation, the acquisition unit 710 is also used to obtain the seventh message; the processing unit 730 is also used to bind the seventh message to the third hardware buffer based on the priority and / or transmission period of the seventh message to obtain a fourth configuration file, and the fourth configuration file indicates the binding relationship between P messages and Q second-class hardware buffers, and the third hardware buffer is one of the Q second-class hardware buffers, wherein the N first-class hardware buffers correspond to the first CAN channel, and the Q second-class hardware buffers correspond to the second CAN channel.
[0160] In one possible implementation, the processing unit 730 is used to: determine L messages from the M messages based on the transmission period of the M messages, where L is an integer less than M and greater than or equal to N; and select N messages from the L messages and bind them to N first-class hardware buffers respectively according to the priority of the L messages to obtain a first configuration file.
[0161] Alternatively, if the device 700 is located in the vehicle 100 , the processing unit 730 may be one of the processors 131 to 13 n shown in FIG. 1 .
[0162] FIG8 is a schematic diagram of another hardware buffer configuration device 800 provided in an embodiment of the present application.
[0163] The device 800 includes a memory 810, a processor 820, and a communication interface 830. The memory 810, processor 820, and communication interface 830 are connected via an internal connection path. The memory 810 is used to store instructions, and the processor 820 is used to execute the instructions stored in the memory 810 to control the communication interface 830 to obtain information, so that the device 800 implements the aforementioned hardware buffer configuration method. Optionally, the memory 810 can be coupled to the processor 820 via an interface or integrated with the processor 820.
[0164] It should be noted that the communication interface 830 may be a transceiver such as, but not limited to, a transceiver. The communication interface 830 may also include an input / output interface.
[0165] The processor 820 stores one or more computer programs, which include instructions. When the instructions are executed by the processor 820, the hardware buffer configuration device 800 executes the hardware buffer configuration method in the above embodiments.
[0166] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 820 or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 810, and the processor 820 reads the information in the memory 810 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0167] Optionally, the communication interface 830 in FIG. 8 may implement the acquisition unit 710 in FIG. 7 , the memory 810 in FIG. 8 may implement the storage unit 720 in FIG. 7 , and the processor 820 in FIG. 8 may implement the processing unit 730 in FIG. 7 .
[0168] Alternatively, the device 700 or the device 800 may be located in the vehicle 100 in FIG. 1 .
[0169] Optionally, the device 700 or the device 800 may be the computing platform 130 in the vehicle of FIG. 1 .
[0170] The present application also provides a computer-readable storage medium storing program code. When the computer program code is executed on a computer, the computer executes any one of the methods described in Figures 3 to 6. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0171] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes any one of the methods in Figures 3 to 6 above.
[0172] An embodiment of the present application further provides a chip, comprising: a circuit, wherein the circuit is used to execute any one of the methods in FIG. 3 to FIG. 6 above.
[0173] An embodiment of the present application also provides a vehicle, comprising any one of the hardware buffer configuration devices shown in FIG. 7 or FIG. 8 .
[0174] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0175] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0176] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0177] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0178] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0179] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A hardware buffer configuration method, characterized in that: The method comprises: Obtain M messages, where the message types of the M messages are different from each other; A first configuration file is determined based on the priority and / or transmission period of the M messages, wherein the first configuration file indicates a binding relationship between the M messages and N first-class hardware buffers, where N is less than M, and each of the M messages corresponds to at most one first-class hardware buffer.
2. The method according to claim 1, wherein The M messages include a first message, the first configuration file indicates that the first message is bound to a first hardware buffer, the first hardware buffer is one of the N first-type hardware buffers, and the method further includes: Obtaining a second message, where the second message is a message added by the first component after a communication matrix is changed, the communication matrix indicating communication rules between multiple nodes in a vehicle, and the first component is applied to the vehicle; When the priority of the second message is greater than the priority of the first message, and / or the transmission period of the second message is less than the transmission period of the first message, the first message is unbound from the first hardware buffer and the second message is bound to the first hardware buffer to obtain a second configuration file.
3. The method according to claim 2, wherein The method further comprises: The control prompting device prompts that the second message is bound to the first hardware buffer.
4. The method according to claim 2 or 3, wherein: The method further comprises: Acquire a third message, where the third message is a message added by the first component after the communication matrix is changed, and a transmission period of the third message is equal to a transmission period of the second message; Before unbinding the first message from the first hardware buffer and binding the second message to the first hardware buffer to obtain the second configuration file, the method further includes: Determine that the priority of the second message is greater than the priority of the third message.
5. The method according to claim 1, wherein The M messages include a fourth message and a fifth message, the first configuration file indicates that the fourth message is bound to a second hardware buffer among the N first-type hardware buffers, and there is no first-type hardware buffer bound to the fifth message, and the method further includes: When the fourth message is a message reduced by the first component after the communication matrix is changed, the fourth message is unbound from the second hardware buffer, and the fifth message is bound to the second hardware buffer to obtain a third configuration file, wherein the communication matrix indicates communication rules between multiple nodes in a vehicle, and the first component is applied to the vehicle.
6. The method according to claim 5, wherein The M messages further include a sixth message, and the first configuration file indicates that there is no first-type hardware buffer bound to the sixth message; Before unbinding the fourth message from the second hardware buffer and binding the fifth message to the second hardware buffer to obtain the third configuration file, the method further includes: It is determined that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message.
7. The method according to any one of claims 1 to 6, wherein: Before determining the first configuration file according to the priorities and / or transmission periods of the M messages, the method further includes: Determine the priorities of the M messages according to the message identifiers of the M messages.
8. The method according to any one of claims 1 to 7, wherein: The method further comprises: Get the seventh message; According to the priority and / or transmission cycle of the seventh message, the seventh message is bound to the third hardware buffer to obtain a fourth configuration file, wherein the fourth configuration file indicates the binding relationship between P messages and Q second-class hardware buffers, and the third hardware buffer is one of the Q second-class hardware buffers, wherein the N first-class hardware buffers correspond to the first controller area network (CAN) channel, and the Q second-class hardware buffers correspond to the second CAN channel.
9. The method according to any one of claims 1 to 8, wherein The determining of the first configuration file according to the priorities and / or transmission periods of the M messages includes: Determine L messages from the M messages according to the transmission periods of the M messages, where L is an integer less than M and greater than or equal to N; According to the priorities of the L messages, N messages are selected from the L messages and are respectively bound to the N first-type hardware buffers to obtain the first configuration file.
10. A hardware buffer configuration device, characterized in that: The device comprises: an acquisition unit and a processing unit; The acquiring unit is configured to acquire M messages, where the message types of the M messages are different from each other; The processing unit is used to determine a first configuration file based on the priority and / or transmission period of the M messages, wherein the first configuration file indicates a binding relationship between the M messages and N first-class hardware buffers, N is less than M, and each of the M messages corresponds to at most one first-class hardware buffer.
11. The device according to claim 10, wherein The M messages include a first message, the first configuration file indicates that the first message is bound to a first hardware buffer, and the first hardware buffer is one of the N first-type hardware buffers; The acquiring unit is further configured to acquire a second message, the second message being a message added by the first component after a communication matrix is changed, the communication matrix indicating communication rules between multiple nodes in a vehicle, and the first component being applied to the vehicle; The processing unit is also used to unbind the first message from the first hardware buffer and bind the second message to the first hardware buffer when the priority of the second message is greater than the priority of the first message and / or the transmission period of the second message is less than the transmission period of the first message, so as to obtain a second configuration file.
12. The device according to claim 11, wherein The processing unit is further configured to control the prompting device to prompt that the second message is bound to the first hardware buffer.
13. The device according to claim 11 or 12, characterized in that The acquiring unit is further configured to acquire a third message, where the third message is a message added by the first component after the communication matrix is changed, and a transmission period of the third message is equal to a transmission period of the second message; The processing unit is further configured to determine that the priority of the second message is greater than the priority of the third message.
14. The device according to claim 10, wherein The M messages include a fourth message and a fifth message, the first configuration file indicates that the fourth message is bound to a second hardware buffer among the N first-type hardware buffers, and the fifth message does not have a bound first-type hardware buffer; The processing unit is further configured to, when the fourth message is a message reduced by the first component after the communication matrix is changed, unbind the fourth message from the second hardware buffer and bind the fifth message to the second hardware buffer to obtain a third configuration file, wherein the communication matrix indicates communication rules between multiple nodes in a vehicle and the first component is applied to the vehicle.
15. The device according to claim 14, wherein The M messages further include a sixth message, and the first configuration file indicates that there is no first-type hardware buffer bound to the sixth message; The processing unit is further configured to determine that the priority of the fifth message is greater than the priority of the sixth message, and / or that the transmission period of the fifth message is less than the transmission period of the sixth message.
16. The device according to any one of claims 10 to 15, characterized in that The processing unit is further configured to determine the priorities of the M messages according to the message identifiers of the M messages.
17. The device according to any one of claims 10 to 16, characterized in that The acquiring unit is further configured to acquire a seventh message; The processing unit is further used to bind the seventh message to the third hardware buffer according to the priority and / or transmission cycle of the seventh message to obtain a fourth configuration file, wherein the fourth configuration file indicates the binding relationship between P messages and Q second-type hardware buffers, and the third hardware buffer is one of the Q second-type hardware buffers, wherein the N first-type hardware buffers correspond to the first controller area network (CAN) channel, and the Q second-type hardware buffers correspond to the second CAN channel.
18. The device according to any one of claims 10 to 17, characterized in that The processing unit is configured to: Determine L messages from the M messages according to the transmission periods of the M messages, where L is an integer less than M and greater than or equal to N; According to the priorities of the L messages, N messages are selected from the L messages and are respectively bound to the N first-type hardware buffers to obtain the first configuration file.
19. A hardware buffer configuration device, characterized in that: The method comprises a processor and a memory, wherein the processor is coupled to the memory, the memory is used to store computer programs or instructions, and the processor is used to execute the computer program or instructions in the memory, so that the method according to any one of claims 1 to 9 is executed.
20. A chip comprising a circuit for executing the method according to any one of claims 1 to 9. 21 . A computer-readable storage medium storing a program code, wherein when the computer program code is executed on a computer, the computer is caused to execute the method according to claim 1 .
22. A vehicle, characterized in that: Comprising the device according to any one of claims 10 to 19.
Citation Information
Patent Citations
Method and device for realizing message buffer resource sharing
CN102447610A
A method to allocate packet buffers in a packet transferring system
CN104509047A
Hardware buffer configuration method and device and vehicle
CN117997946A
Cache management method and device, and computer storage medium
WO2017000657A1
Message buffering method and apparatus, electronic device and storage medium
WO2024001414A1