Vehicle bus communication method, system and device and storage medium

By switching communication mode in the vehicle bus system and assigning communication permissions, the problem of excessive bus load in the open bus mode is solved, and the reliable execution of critical tasks and the reliability of data communication is improved.

CN120165995APending Publication Date: 2025-06-17LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510473960.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the electronic control unit (ECU) communication inside the vehicle, the open bus mode causes excessive bus load, delayed data transmission, and even causes critical operation failures.

Method used

The control module obtains the bus node task request, switches between open and control modes, and allocates communication permissions to the bus nodes based on task type, urgency, bus load rate, etc. to realize the management of bus communication.

Benefits of technology

It ensures the reliable execution of critical tasks, improves the reliability of data communication on the bus, and avoids bus conflicts and interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120165995A_ABST
    Figure CN120165995A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle bus communication method, system and device and a storage medium, and the method comprises the steps: obtaining a first task request of a first bus node when the communication mode of n bus nodes is an open mode; the first task request is used for requesting to communicate with the second bus node; in response to the first task request, broadcasting a first mode switching instruction to the n bus nodes through the communication control equipment; controlling the n bus nodes to respond to the first mode switching instruction to enter a control mode; distributing a first communication authority for communication on the bus to the first bus node and the second bus node through the communication control equipment; the first communication authority is used for allowing the first bus node and the second bus node to carry out data transmission on the bus. According to the invention, the reliability of data communication on the bus can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle communication technologies, and particularly to a communication method, system, device, and storage medium for a vehicle bus. Background Art

[0002] Electronic control units (ECUs) and diagnostic devices inside a vehicle need to communicate via a bus to achieve functions such as data sharing, function coordination, and fault diagnosis. Currently, ECU communication adopts an open bus mode, where all ECUs and diagnostic devices can freely send messages and share the same bus. Although this mode is simple and efficient, when performing critical operations (such as firmware upgrade, fault diagnosis), messages from other ECUs may preempt the bus bandwidth, resulting in a high bus load, data transmission delay, and even failure of critical operations. For example, during the firmware upgrade of the engine ECU, a large number of status messages sent by the transmission ECU may cause the upgrade data packet to be lost, ultimately leading to the failure of the upgrade.

[0003] Therefore, to solve the above problems, a method capable of adjusting bus communication is needed to improve the reliability of data communication on the bus. Summary of the Invention

[0004] Embodiments of this application provide a communication method, system, device, and storage medium for a vehicle bus. By obtaining a bus node task request through a control module, switching between open and regulated modes, and allocating communication permissions to bus nodes based on task type, urgency, bus load rate, etc., reliable execution of critical tasks is ensured.

[0005] In a first aspect, embodiments of this application provide a communication method for a vehicle bus, which is applied to a control module of a vehicle communication system. The vehicle communication system further includes: a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2. The communication control device is connected to the n bus nodes through the bus. The method includes:

[0006] When the communication mode of the n bus nodes is the open mode, obtain a first task request of a first bus node; the first bus node is any one of the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is one of the n bus nodes other than the first bus node;

[0007] In response to the first task request, broadcast a first mode switching instruction to the n bus nodes through the communication control device;

[0008] Control the n bus nodes to enter the control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when not authorized;

[0009] Allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus.

[0010] In a second aspect, an embodiment of the present application provides a communication system for a vehicle bus, which is applied to a control module of a vehicle communication system. The vehicle communication system further includes: a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2. The communication control device is connected to the n bus nodes through the bus; the communication system for the vehicle bus includes: a request acquisition unit, a request response unit, a mode switching unit, and a permission allocation unit, where,

[0011] The request acquisition unit is configured to obtain a first task request of a first bus node when the communication mode of the n bus nodes is the open mode; the first bus node is any one of the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is one of the n bus nodes other than the first bus node;

[0012] The request response unit is configured to broadcast a first mode switching instruction to the n bus nodes through the communication control device in response to the first task request;

[0013] The mode switching unit is configured to control the n bus nodes to enter the control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when not authorized;

[0014] The permission allocation unit is configured to allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for performing the steps in the first aspect of the embodiment of the present application.

[0016] Fourthly, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program for electronic data exchange. The computer program causes a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application.

[0017] Fifthly, an embodiment of the present application provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product can be a software installation package.

[0018] It can be seen that by adopting the embodiment of the present application, the following beneficial effects are achieved:

[0019] By implementing the embodiment of the present application, when the communication mode of the n bus nodes is the open mode, a first task request of a first bus node is obtained. The first task request is used to request communication with a second bus node. In response to the first task request, a first mode switching instruction is broadcast to the n bus nodes through the communication control device. The n bus nodes are controlled to enter the control mode in response to the first mode switching instruction. The communication control device allocates a first communication permission for the first bus node and the second bus node to communicate on the bus. The first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus. It can be seen that by controlling the switching of the bus nodes between the open mode and the control mode, the reliable execution of critical tasks can be ensured, and the reliability of data communication on the bus is improved. Description of the Drawings

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the drawings required for use in the embodiments of the present application or the background art will be described below.

[0021] Figure 1 It is a system architecture diagram of a vehicle communication system provided by an embodiment of the present application;

[0022] Figure 2 It is a flowchart of a communication method for a vehicle bus provided by an embodiment of the present application;

[0023] Figure 3 It is an application scenario diagram of a communication method for a vehicle bus provided by an embodiment of the present application;

[0024] Figure 4 It is a flowchart of a communication request for a bus node provided by an embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of the process of another communication request of a bus node provided by an embodiment of the present application;

[0026] Figure 6 It is a time variation diagram of a load rate provided by an embodiment of the present application;

[0027] Figure 7 It is a schematic structural diagram of a communication system of a vehicle bus provided by an embodiment of the present application;

[0028] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present application.

[0030] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0031] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0032] The relevant content, concepts, meanings, technical problems, technical solutions, beneficial effects, etc. involved in the embodiments of the present application are described below.

[0033] Please refer to Figure 1 , Figure 1It is a system architecture diagram of a vehicle communication system provided by an embodiment of the present application. The vehicle communication system includes a control module, a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2. The vehicle communication system is mainly responsible for coordinating data transmission among various bus nodes inside the vehicle on the bus to improve the reliability of data communication on the bus.

[0034] As Figure 1 shown, the control module mainly executes the communication method of the vehicle bus. It can be connected to other components in the vehicle communication system through the bus and send instructions to other components in the vehicle communication system to perform corresponding operations, etc. For example, the control module can decide whether to switch the communication mode of the n bus nodes according to the received task request, and when the communication mode of the n bus nodes is the open mode, instruct the communication control device to perform corresponding communication control operations, such as broadcasting a mode switching instruction, allocating communication permissions, etc.

[0035] In the embodiment of the present application, the communication control device can be a gateway or a vehicle control unit (VCU). As a bridge between different bus networks inside the vehicle, the gateway can realize the conversion between different protocols, so that the bus nodes connected to different buses can communicate with each other. At the same time, the gateway can also filter, store, and forward data, and reasonably schedule data transmission according to the priority and target address of the data to improve the utilization rate of the bus. The VCU is mainly responsible for controlling and managing the overall operation of the vehicle. In the vehicle communication system, as a communication control device, the VCU can coordinate the information interaction among various bus nodes. Specifically, the gateway is connected to the n bus nodes through the bus. It receives data from a certain bus node and forwards the data to the corresponding bus node as needed. It can also respond to the task request of a certain bus node and broadcast a mode switching instruction to switch the communication mode of the n bus nodes. It can also allocate permissions to a pair of bus nodes to allow this pair of bus nodes to perform data transmission on the bus in the control mode.

[0036] The bus node can be an ECU or a diagnostic device externally connected to the bus. Among them, the ECU can communicate with other ECUs via the bus, receive control signals and status information from other bus nodes, etc., and feedback its own operating status and control results to the corresponding nodes. The diagnostic device is mainly used for fault diagnosis and performance detection of the vehicle's electronic system. It can access the vehicle's bus network through a diagnostic interface, communicate with each ECU, read information such as fault codes and real-time data stored in the ECU, and it can also send test instructions and setting instructions to the ECU. The diagnostic device is connected to each ECU via the bus, which can help maintenance personnel quickly and accurately locate the fault points of the vehicle. It should be noted that the vehicle's bus network usually reserves a dedicated diagnostic interface, which is usually based on a specified bus protocol and is used to connect the diagnostic device to the vehicle's bus and perform data transmission.

[0037] The bus is a physical channel for data transmission inside the vehicle, which can provide a communication channel for each bus node for data transmission. In the embodiments of the present application, the bus can be a CAN (Controller Area Network) bus, a LIN (Local Interconnect Network) bus, a MOST (Media Oriented System Transport) bus, etc., which is not limited herein. The bus connects the communication control device and each bus node. The communication control device sends instructions and data to the bus node via the bus, and the bus node also sends its own status information and task requests to the communication control device and other bus nodes via the bus.

[0038] The bus node is connected to the communication control device via the bus for sending and receiving data. When the bus node is a device externally connected to the bus, such as a diagnostic device, it can also be connected to the communication control device via the bus and then communicate with other bus nodes. The control module is connected to the communication control device. The control module can send instructions to the communication control device to control the communication control device to operate on the bus and the bus node, and can also receive the status information of the bus and the node fed back from the communication control device. As a basic connection medium, the bus can tightly connect the communication control device, the control module, and n bus nodes to form a complete communication network.

[0039] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a communication method for a vehicle bus provided by an embodiment of the present application. This method is applied to the control module of a vehicle communication system. The vehicle communication system further includes: a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2. The communication control device is connected to the n bus nodes via the bus. The method includes but is not limited to the following steps:

[0040] S201. When the communication mode of the n bus nodes is the open mode, obtain a first task request of a first bus node; the first task request is used to request to communicate with a second bus node.

[0041] In the embodiments of the present application, the bus nodes include an electronic control unit (ECU), an externally connected diagnostic device, etc., which are not limited herein. The bus nodes can be connected to the bus to communicate with each other. It should be noted that the externally connected diagnostic device can be connected to the bus through a pre-stored diagnostic interface to communicate with other ECUs on the bus.

[0042] In the embodiments of the present application, the communication control device includes a gateway, a vehicle control unit (VCU), etc., which are not limited herein. The communication control device can control the communication between the bus nodes on the bus, and can also convert the signals from one bus into a format recognizable by another bus in the scenario of different buses, so that the bus nodes connected to different buses can communicate with each other. The communication control device has the functions of data filtering, storage and forwarding, and reasonably schedules data transmission according to the priority and target address of the data, improving the utilization rate of the bus.

[0043] Among them, the first bus node is any one of the n bus nodes, and the second bus node is one of the n bus nodes except the first bus node.

[0044] In the embodiments of the present application, the open mode means that the n bus nodes on the bus can freely use the bus to transmit data, that is, each bus node can directly send a data packet to the bus without applying to the communication control device. For example, when the vehicle is running daily, the engine ECU and the dashboard ECU transmit information such as vehicle speed and engine speed in real time. In the open mode, the efficiency and timeliness of communication between bus nodes can be guaranteed to maintain the normal operation of each system of the vehicle.

[0045] The control mode means that the communication between the n bus nodes on the bus is controlled by the communication control device. If a certain bus node needs to use the bus for data transmission, it needs to apply to the communication control device, and can only transmit data after the application is approved. For example, when the diagnostic device upgrades the firmware of the engine, the gateway sends a mode switch command to all ECUs to enter the control mode. At this time, except for the authorized diagnostic device and the engine ECU, other ECUs cannot send data packets to the vehicle bus anymore.

[0046] The open mode ensures the freedom of bus usage and communication efficiency during daily vehicle operation, allowing data to be exchanged quickly and conveniently among various ECUs. When performing special or important tasks, such as firmware upgrades, safety diagnostics, and emergency control instructions, to ensure the success rate of these tasks and avoid interference from messages of other ECUs, the communication mode can be switched to the control mode. In the control mode, through strict management of bus communication, the stability and reliability of critical task data transmission are guaranteed, enhancing the safety and stability of the vehicle during critical operations.

[0047] In a specific embodiment, when the communication mode of n bus nodes is the open mode and the first bus node needs to perform a critical task, the first bus node generates a first task request and sends it to the control module of the vehicle communication system. Here, the first task request is used to request communication with the second bus node to perform the critical task. The control module can obtain the first task request of the first bus node and perform corresponding operations.

[0048] Optionally, the first task request may include the identifier of the target bus node, task type, task parameter information, etc., which are not limited here. The target bus node refers to the bus node requested for communication.

[0049] In a possible embodiment, the diagnostic device needs to upgrade the firmware of the engine. If the upgrade fails, the engine may not work properly. Therefore, it is necessary to ensure the success rate of the task execution. In this embodiment, the first bus node is an externally connected diagnostic device, and the second bus node is the engine ECU. Specifically, when certain firmware-related faults occur in the vehicle's engine or there is a new firmware version that can improve the performance and stability of the engine, the externally connected diagnostic device can transmit the upgrade data to the engine ECU for engine firmware upgrade. The diagnostic device can generate a first task request, which is used to request communication with the engine ECU. The first task request may include the engine ECU identifier, the task type of firmware upgrade, and the firmware parameter information required for the upgrade, etc.

[0050] Then, the diagnostic device sends the generated first task request to the bus. The control device obtains the first task request through the bus and determines that it belongs to a critical task according to the task type of the first task request, that is, firmware upgrade. Since the current communication mode of the bus nodes is the open mode, data messages sent by other ECUs may preempt the bus bandwidth, resulting in the loss or transmission delay of upgrade data packets. Therefore, the control module can control all bus nodes on the bus to switch the communication mode to the control mode and authorize the diagnostic device and the engine ECU to ensure stable and reliable communication between the diagnostic device and the engine ECU.

[0051] Please refer to Figure 3 ,Figure 3 This is an application scenario diagram of a vehicle bus communication method provided by an embodiment of the present application, such as Figure 3 As shown, the engine ECU, instrument panel ECU, control module and diagnostic equipment are all connected to the gateway through a bus so that data can be sent and received between these components.

[0052] The engine ECU and the instrument panel ECU are connected to the gateway through the bus. Of course, the engine ECU and the instrument panel ECU can also be connected to a bus, which is not limited here. The engine ECU and the instrument panel ECU can exchange information through the gateway. At the same time, they can also communicate with other components connected to the bus. For example, the engine ECU can send the engine's operating parameters to the instrument panel ECU for display on the instrument panel. The control module is connected to the gateway through the bus. The control module can send instructions to the gateway. The control gateway can operate the bus and bus nodes, and can also receive bus and node status information fed back from the gateway. The diagnostic device is connected to the gateway through the bus. It can communicate with each ECU inside the vehicle to realize the detection and diagnosis of the vehicle's electronic system.

[0053] When the diagnostic device detects that the engine's firmware needs to be upgraded, it can send a task request containing the firmware upgrade to the control module. After receiving the request, the control module will broadcast a mode switching instruction to all bus nodes through the gateway, switching the communication mode of all bus nodes from open mode to control mode. In control mode, except for the diagnostic device and the engine ECU, which are authorized to communicate, other bus nodes (such as the instrument panel ECU) are prohibited from communicating with each other. Then, the diagnostic device transmits data with the engine ECU through the gateway, sends the new firmware data to the engine ECU, and the engine ECU receives and installs the firmware.

[0054] In this application scenario, by switching to the control mode, data messages from other bus nodes are prevented from occupying the bus bandwidth, reducing the risk of data transmission delays and data packet loss, thereby improving the success rate of engine ECU firmware upgrades and ensuring the stability and reliability of the upgrade process.

[0055] Optionally, after obtaining the first task request of the first bus node, the method may further include the following steps:

[0056] A101, obtaining a data transmission task of the first bus node and a target task type corresponding to the data transmission task;

[0057] A102, determining whether the target task type is a critical task type; the critical task types include: firmware upgrade, safety diagnosis, emergency control instructions;

[0058] A103. If the target task type belongs to the critical task type, determine that the n bus nodes meet the conditions for entering the control mode;

[0059] A104. Otherwise, keep the communication mode of the n bus nodes as the open mode.

[0060] In a specific embodiment, after the first bus node sends a first task request for communicating with the second bus node to the control module, it can further determine whether the data transmission task corresponding to the first task request meets the requirement for switching the communication mode, and then obtain the data transmission task of the first bus node and the target task type corresponding to the data transmission task.

[0061] Next, determine whether the target task type belongs to the critical task type. The critical task type includes firmware upgrade, safety diagnosis, emergency control instructions, etc., which are not limited here. The critical task type usually has relatively high requirements for the reliability and stability of data transmission. In the open mode, the free communication of other bus nodes may interfere with the execution of these critical tasks. Therefore, it is necessary to determine whether the target task type corresponding to the first bus node belongs to the critical task type, and then decide whether to switch the communication mode.

[0062] When it is determined that the target task type belongs to the critical task type, to ensure the smooth execution of critical tasks and avoid data packets of other bus nodes preempting the bus bandwidth, resulting in data transmission delay or failure of critical operations, it can be determined that the n bus nodes meet the conditions for entering the control mode, and then perform communication operations in the control mode. Otherwise, keep the communication mode of the n bus nodes as the open mode, that is, the data transmission task corresponding to the first bus node has relatively low requirements for the reliability and stability of bus communication and can be normally executed in the open mode without being seriously affected by the free communication of other bus nodes. To ensure the efficiency and flexibility of bus communication, the communication mode of the n bus nodes continues to be kept as the open mode.

[0063] In a possible embodiment, please refer to Figure 4 , Figure 4 which is a schematic flowchart of a communication request of a bus node provided by an embodiment of the present application. As Figure 4 shown, when the communication mode of the n bus nodes in the vehicle communication system is the open mode, obtain a first task request for the first bus node to request communication with the second bus node, then in response to the first task request, obtain the data transmission task of the first bus node and its corresponding target task type, and then determine whether the target task type belongs to the critical task type. The critical task type may include tasks crucial to vehicle operation such as firmware upgrade, safety diagnosis, and emergency control instructions.

[0064] If the target task type belongs to the critical task type, broadcast a first mode switching instruction to n bus nodes, notifying all bus nodes to respond to the first mode switching instruction and enter the control mode. In the control mode, the communication of the bus nodes is strictly controlled. Except for the authorized nodes, other nodes are prohibited from communicating with each other. Finally, communication permissions are allocated to the first bus node and the second bus node, so that only the first bus node and the second bus node can perform data transmission in the control mode, ensuring the smooth progress of critical tasks.

[0065] If the target task type does not belong to the critical task type, keep the communication mode of the n bus nodes as the open mode. In the open mode, each bus node can freely send and receive messages on the bus to meet the communication requirements of the daily operation of the vehicle.

[0066] S202. In response to the first task request, broadcast a first mode switching instruction to the n bus nodes through the communication control device.

[0067] In a specific embodiment, in response to the first task request, a first mode switching instruction can be broadcast to the n bus nodes through the communication control device, so that each bus node receives this mode switching instruction. Among them, the first mode switching instruction is an instruction indicating that the bus node changes from the open mode to the control mode, and it can include the switched mode, the time of mode switching, the communication rules in the control mode, etc. The broadcast method ensures that each of the n bus nodes can receive the instruction, so as to synchronously switch the communication mode.

[0068] S203. Control the n bus nodes to respond to the first mode switching instruction and enter the control mode.

[0069] In the embodiment of the present application, the control mode means that all bus nodes on the bus are prohibited from communicating with each other without authorization, which means that any two bus nodes cannot perform data transmission at will unless permitted by the communication control device. For example, in the scenario of vehicle engine ECU firmware upgrade, except for the authorized diagnostic device and the engine ECU, other ECUs, such as the dashboard ECU, the transmission ECU, etc., even if they have data to send, cannot transmit on the bus and must remain silent, waiting for authorization or switching back to the open mode.

[0070] In a specific embodiment, when n bus nodes receive the first mode switching instruction, they can respond to and execute the first mode switching instruction to enter the control mode. Specifically, when a certain ECU receives the first mode switching instruction, the control logic inside it can judge the current working state, then pause the data transmission task currently in progress, and enter the control mode. By switching to the control mode when the vehicle is performing critical tasks, such as firmware upgrade, safety diagnosis, emergency control instructions, etc., it can avoid data packets sent by other bus nodes from preempting the bus bandwidth, thus ensuring the stable and accurate transmission of data for critical tasks.

[0071] S204. Allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus.

[0072] In a specific embodiment, a first communication permission for the first bus node and the second bus node to communicate on the bus can be allocated through a communication control device, that is, a legal identity for the first bus node and the second bus node to communicate in the control mode is given. By allocating the first communication permission to the first bus node and the second bus node, the first bus node and the second bus node are allowed to perform data transmission on the bus. During data transmission, the communication control device can verify the communication permissions of the two bus nodes currently performing the data transmission task. If the verification fails, it means that these two bus nodes are unauthorized bus nodes, and their communication can be refused. Through this precise permission allocation, it is ensured that only authorized bus nodes can communicate with each other in the control mode, thus avoiding bus conflicts and interference and ensuring the stability and reliability of data transmission for critical tasks.

[0073] Optionally, the above step S204, allocating a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device, specifically includes the following steps:

[0074] A401. Obtain the address identifier of the first bus node in the bus to obtain a first address identifier;

[0075] A402. Obtain the address identifier of the second bus node in the bus to obtain a second address identifier;

[0076] A403. Generate a unique authorization code based on the first address identifier and the second address identifier;

[0077] A404. Generate an authentication message according to the first address identifier, the second address identifier, and the unique authorization code;

[0078] A405. Send the authentication message to the first bus node and the second bus node to determine that the first bus node and the second bus node have the first communication permission.

[0079] In a specific embodiment, in a vehicle communication system, each bus node has a unique address identifier in the bus. The communication control device can query the pre-stored node information table to obtain the first address identifier of the first bus node in the bus and the second address identifier of the second bus node in the bus.

[0080] Next, generate a unique authorization code based on the first address identifier and the second address identifier. An encryption algorithm such as a hash algorithm can be used in combination with a generated random number to generate the unique authorization code to improve its security. In the control mode, the communication of bus nodes is strictly controlled, and only authorized nodes can communicate. The unique authorization code ensures that only authorized bus nodes can obtain communication permission with this authorization code, preventing other unauthorized nodes from accessing the communication randomly and ensuring the security of communication. When the bus transmits data, the data transmitted by the bus node needs to carry this unique authorization code so that the communication control device can quickly identify legal bus nodes according to the authorization code, avoiding data transmission errors and bus conflicts.

[0081] Generate an authentication message according to the first address identifier, the second address identifier, and the unique authorization code. The authentication message records which bus nodes are allowed to communicate and the corresponding authorization information, and is issued to the corresponding bus nodes as a voucher for communication permission.

[0082] Send the authentication message to the first bus node and the second bus node. After receiving the authentication message, the first bus node and the second bus node will decode and verify it, that is, verify whether the authorization information in the authentication message matches their own attribute information, such as matching according to the bus address identifier in the authentication message. If the verification passes, it can be determined that the first bus node and the second bus node have the first communication permission, and they can perform legal data transmission on the bus. By allocating the first communication permission to the first bus node and the second bus node, it can ensure that the communication between specific nodes in the control mode can be carried out safely and orderly, guaranteeing the smooth completion of key tasks.

[0083] Optionally, the following steps may further be included:

[0084] B401. Obtain the first data generated by the first bus node based on the first communication permission; the first data includes: a data message, a target node identifier, and an identity token;

[0085] B402. Receive the first data through the communication control device and verify the identity token;

[0086] B403. If the verification is successful, matching the target node identifier with the identifier of the second bus node through the communication control device;

[0087] B404. If the match is successful, forward the data message to the second bus node via the communication control device.

[0088] In a specific embodiment, after the first bus node and the second bus node obtain the first communication authority, the first bus node can perform communication operations according to the first communication authority. Of course, the second bus node can also perform communication operations according to the first communication authority, and the first bus node and the second bus node can communicate with each other.

[0089] When the first bus node needs to transmit data to the second bus node, the first bus node first generates the first data according to the first communication authority, wherein the first data includes: data message, target node identifier, identity token, etc., wherein the data message is the data information that the first bus node wants to transmit to the second bus node. For example, in the scenario where the diagnostic device performs a firmware upgrade on the engine ECU, the data message can be a new firmware data packet, which includes specific content for implementing functional updates or repairs. The target node identifier refers to the recipient of the data message. For example, the target node identifier can be the bus address identifier of the engine ECU. The identity token is the identity authentication information of the first bus node, which is used to prove the legitimacy of the data sent by the bus node and prevent illegal nodes from impersonating communication authority to transmit data.

[0090] The communication control device receives the first data sent by the first bus node on the bus and verifies the identity token therein. The verification process usually compares the received identity token with a pre-stored legal token generated based on the first communication authority. If the identity token is not legal, it means that the data may be sent by an unauthorized bus node, and the communication control device will refuse to process the data, thereby ensuring the security of bus communication.

[0091] When the identity token verification is passed, it means that the first bus node is a legitimate sender. Then, the communication control device will match the target node identifier in the first data with the identifier of the second bus node to ensure that the data message can be accurately sent to the predetermined receiving node. The communication control device will search for the second bus node that matches the target node identifier in its stored node identification information. If the match is unsuccessful, it means that there may be a data transmission error or the target node is incorrectly specified, and the communication control device will not perform the data forwarding operation.

[0092] After the target node identifier successfully matches the identifier of the second bus node, the communication control device confirms the legitimate sender and the correct recipient of the data packet. At this time, the communication control device forwards the data packet from the first bus node to the second bus node. The communication control device sends the data packet to the bus in a suitable format and manner according to the communication protocol and rules of the bus, ensuring that the second bus node can correctly receive the data packet, thereby completing the effective communication between the first bus node and the second bus node, ensuring communication security, and improving the reliability of the implementation of critical tasks of the vehicle.

[0093] Optionally, the following steps may further be included:

[0094] C401. When data is transmitted between the first bus node and the second bus node, obtain a second task request of a third bus node; the third bus node is one of the n bus nodes other than the first bus node and the second bus node; the second task request is used to request communication with a fourth bus node; the fourth bus node is one of the n bus nodes other than the third bus node;

[0095] C402. Determine the data transmission task between the first bus node and the second bus node to obtain a first task;

[0096] C403. Determine the urgency level corresponding to the first task according to the task type corresponding to the first task to obtain a first urgency level;

[0097] C404. Obtain the data transmission task of the third bus node to obtain a second task;

[0098] C405. Determine the urgency level corresponding to the second task to obtain a second urgency level;

[0099] C406. When the second urgency level is less than or equal to the first urgency level, reject the second task request and control the third bus node to remain in a silent state;

[0100] C407. When the second urgency level is greater than the first urgency level, pause the first task and record the task interruption status of the first task;

[0101] C408. Allocate a second communication permission for the third bus node and the fourth bus node to communicate on the bus through the communication control device; the second communication permission is used to allow the third bus node and the fourth bus node to perform data transmission on the bus;

[0102] After the data transfer between the third bus node and the fourth bus node is completed, modify the task status of the first task according to the task interruption status to resume the execution of the first task.

[0103] In a specific embodiment, when the first bus node and the second bus node are performing data transfer, the communication system can also monitor the status of other bus nodes on the bus in real time. For example, the third bus node may initiate a second task request to communicate with the fourth bus node, where the third bus node is one of the n bus nodes other than the first bus and the second bus node, and the fourth bus node is one of the n bus nodes other than the third bus node.

[0104] Determine the data transfer task between the first bus node and the second bus node to obtain the first task. Different types of tasks have different urgencies. Therefore, the urgency level corresponding to the first task can be determined according to the task type corresponding to the first task to obtain the first urgency level. Obtain the data transfer task of the third bus node to obtain the second task, and then determine the urgency level corresponding to the second task to obtain the second urgency level. For example, a safety diagnosis task may have a higher urgency level because it involves vehicle safety, while some regular data monitoring tasks have a relatively lower urgency level.

[0105] When the second urgency level is less than or equal to the first urgency level, it means that the first task is more critical or at least as important as the second task. Then the communication control device rejects the second task request of the third bus node and controls the third bus node to remain silent and prohibits it from performing data transfer on the bus to ensure that the first task is not interfered with.

[0106] If the second urgency level is greater than the first urgency level, it means that the second task has a higher priority and needs to be processed first. Then the communication control device will suspend the first task and record the task interruption status of the first task, including information such as the progress of task execution and the current data status, for subsequent task resumption.

[0107] When the second task is processed first, the communication control device allocates a second communication permission for the third bus node and the fourth bus node to communicate on the bus. The second communication permission is used to allow the third bus node and the fourth bus node to perform data transfer on the bus. After the third bus node and the fourth bus node obtain the second communication permission, they can perform data transfer on the bus to complete the second task.

[0108] After the data transmission between the third bus node and the fourth bus node is completed, the task status of the first task can be modified according to the task interruption status to resume the execution of the first task. In this way, it is possible to ensure that critical tasks are executed first and the reliability of data communication on the bus. The vehicle communication system can dynamically adjust the allocation of bus resources according to the urgency of tasks, improving the flexibility and reliability of the system and ensuring the normal operation of various vehicle functions.

[0109] In a possible embodiment, please refer to Figure 5 , Figure 5 which is a schematic flowchart of another communication request of a bus node provided by an embodiment of the present application. As Figure 5 shown, the communication mode of n bus nodes in the vehicle communication system is the control mode, and a data transmission task is ongoing between the first bus node and the second bus node. At this time, the third bus node requests the communication control device to perform data transmission. Obtain the second task request of the third bus node, where the second task request is that the third bus node requests to communicate with the fourth bus node. Determine the data transmission task ongoing between the first bus node and the second bus node to obtain the first task. Determine the data transmission task that needs to be performed between the third bus node and the fourth bus node to obtain the second task. According to the task types corresponding to the first task and the second task, determine their corresponding urgency levels to obtain the first urgency level and the second urgency level respectively.

[0110] If the second urgency level is not greater than the first urgency level, reject the second task request of the third bus node and control the third bus node to remain in a silent state to ensure that the first task is not interfered with.

[0111] If the second urgency level is greater than the first urgency level, suspend the first task and record the task interruption status of the first task. Then, the communication control device allocates a second communication permission to the third bus node and the fourth bus node to allow them to perform data transmission on the bus. The third bus node and the fourth bus node start data transmission after obtaining the communication permission. Continuously determine whether the second task is completed. When the data transmission between the third bus node and the fourth bus node is completed, modify the task status of the first task according to the previously recorded task interruption status of the first task and resume the execution of the first task.

[0112] Optionally, the following steps may further be included:

[0113] D401. After the data transmission task between the first bus node and the second bus node is completed, broadcast a second mode switching instruction to the n bus nodes through the communication control device;

[0114] D402. Control the n bus nodes to respond to the second mode switching instruction and enter the open mode;

[0115] D403. Obtain the load rates of the bus within a preset time period to obtain m load rates; m is an integer greater than or equal to 1.

[0116] D404. If the average value of the m load rates is greater than the preset load rate threshold, then obtain k bus nodes among the n bus nodes that perform data transmission tasks at the current moment; k is a positive integer less than or equal to n.

[0117] D405. Obtain the task information corresponding to the k bus nodes to obtain k pieces of task information; the task information includes data sending frequency and data packet length.

[0118] D406. Determine the load weights corresponding to the k pieces of task information to obtain k load weights.

[0119] D407. Determine the maximum load weight among the k load weights to obtain the maximum load weight.

[0120] D408. Determine the bus node corresponding to the maximum load weight to obtain the fifth bus node.

[0121] D409. Obtain the bus node with the largest data throughput when the fifth bus node performs data transmission to obtain the sixth bus node.

[0122] D410. Control the n bus nodes to enter the regulation mode.

[0123] D411. Allocate communication permissions for the fifth bus node and the sixth bus node to communicate on the bus through the communication control device.

[0124] Among them, the preset time period refers to a time interval preset for monitoring the bus load rate. For example, if the preset time period is set to 1 minute, then the bus load rate in the previous 1 minute of the current moment can be obtained. The preset load rate threshold refers to a critical value preset for measuring the bus load situation, which can be comprehensively determined according to factors such as the hardware performance of the bus and the communication requirements during normal vehicle operation. When the load rate of the bus exceeds this threshold, it means that the bus is in a high-load state, which may affect the efficiency and stability of data transmission, and further affect the coordinated operation of various vehicle systems.

[0125] After the data transfer task between the first bus node and the second bus node is completed, that is, the total number of data packets sent by the first bus node reaches the pre-planned number of data packets, or a specific end identifier is predefined in the communication protocol. When the first bus node finishes sending all data packets, it will additionally send an end identifier to indicate the completion of data transfer, etc., to determine the completion of the data transfer task between the first bus node and the second bus node. Then, the communication control device will broadcast a second mode switching instruction to n bus nodes. Among them, the second mode switching instruction is an instruction to inform the bus nodes to change from the control mode to the open mode. After receiving the second mode switching instruction, the n bus nodes enter the open mode in response to the second mode switching instruction. In the open mode, each bus node can freely send and receive packets on the bus to improve the efficiency of daily communication.

[0126] Next, the load rate of the bus within a preset time period can be obtained, and m load rates are obtained. Among them, the load rate reflects the degree to which the bus is occupied within a period of time, and it can be calculated by the ratio of the actual data volume transmitted by the bus per unit time to the theoretical maximum data transmission volume of the bus.

[0127] Calculate the average value of the m load rates and compare it with the preset load rate threshold to determine whether the bus is in a high-load state. It is also possible to check whether there is a situation where the load rates within a preset duration all exceed the preset load rate threshold to determine whether the bus is in a high-load state. For example, the load rate of the bus exceeds the preset load rate threshold within 5 seconds. If the average load rate is greater than the preset load rate threshold, it means that the current load of the bus is too high, and the bus nodes in the bus can be managed to improve the efficiency and stability of data transmission.

[0128] k bus nodes that perform data transfer tasks among the n bus nodes at the current moment can be obtained, where k is a positive integer less than or equal to n. And obtain the task information corresponding to the k bus nodes to get k pieces of task information. Among them, the task information includes the data sending frequency, the data packet length, etc. The higher the data sending frequency, the more times the bus node occupies the bus per unit time. The longer the data packet length, the longer the time for the bus node to occupy the bus to transmit data each time.

[0129] Based on the task information of k bus nodes, the load weight corresponding to each task information can be determined, obtaining k load weights. The load weight is a quantitative representation of the contribution degree of each bus node to the bus load after comprehensively considering factors such as data sending frequency and data message length. By calculating the load weight, the impact of each node on the bus load can be evaluated. Determine the maximum load weight among the k load weights to obtain the maximum load weight, and determine the bus node corresponding to the maximum load weight to obtain the fifth bus node, which has the greatest impact on the bus load.

[0130] Next, obtain the bus node with the largest data throughput when the fifth bus node performs data transmission, obtaining the sixth bus node. That is, it is determined that the communication between these two bus nodes has the greatest impact on the bus pressure through the fifth bus node and the sixth bus node. To relieve the high load state of the bus and ensure the stability of data transmission, n bus nodes can be controlled to enter the control mode, and communication permissions for the fifth bus node and the sixth bus node to communicate on the bus can be allocated through the communication control device. By separately allocating communication permissions to these two nodes with the greatest impact on the bus load to prioritize the processing of this task, the load of the bus can be reduced, and the usage efficiency of the bus and the reliability of data transmission can be improved.

[0131] In a possible embodiment, please refer to Figure 6 , Figure 6 is a time-varying graph of the load rate provided by an embodiment of the present application. As Figure 6 shown, the horizontal dotted line represents the preset load rate threshold, which is a fixed reference value used to determine whether the bus is in a high load state. When the load rate is higher than this threshold, it indicates that the bus load is high, and measures may need to be taken for management to ensure the efficiency and stability of data transmission. When the load rate line is below the preset load rate threshold, it indicates that the bus load is within the normal range at this time, and the data transmission of the bus is relatively smooth. When the load rate line exceeds the preset load rate threshold, it means that the bus is in a high load state, which may affect the efficiency and stability of data transmission. It is necessary to manage the bus nodes, such as adjusting the communication priority of the bus nodes, restricting the data transmission of some non-critical nodes, etc., to relieve the load pressure of the bus.

[0132] Optionally, the above step D406, determining the load weights corresponding to the k task information to obtain k load weights, specifically includes the following steps:

[0133] E401. Determine the first load weight according to the data sending frequency and data message length corresponding to the target task information; the target task information is any one of the k task information;

[0134] E402. Determine the functional safety factor and historical load factor corresponding to the target task information. The functional safety factor represents the importance of the task in terms of vehicle safety. The historical load factor represents the average contribution of the task to the bus load per unit time.

[0135] E403. Determine the target correction factor according to the functional safety factor and the historical load factor.

[0136] E404. Correct the first load weight according to the target correction factor to obtain the target load weight. The target load weight is the load weight corresponding to the target task information among the k load weights.

[0137] In a specific embodiment, any one of the k task information can be selected for analysis, that is, the target task information. The first load weight can be determined according to the data sending frequency and data message length corresponding to the target task information. For example, the first load weight can be calculated by multiplying the data sending frequency by the data message length.

[0138] Determine the functional safety factor and historical load factor corresponding to the target task information. Among them, the functional safety factor represents the importance of the task in terms of vehicle safety. Different tasks have different impacts on vehicle safety. For example, tasks of the engine control system, braking system, etc. These tasks are directly related to the driving safety of the vehicle, and their functional safety factors will be relatively high. While some auxiliary functions, such as tasks of in-vehicle lighting control, have less impact on vehicle safety, and the functional safety factors are relatively low. The functional safety factor is usually preset by the vehicle system designer according to the nature and importance of the task, and is generally a value between 0 and 1. The larger the value, the more important the task is in terms of vehicle safety. The historical load factor represents the average contribution of the task to the bus load per unit time, which reflects the past load situation of the task in bus usage. It can be obtained through statistical analysis of historical data. The historical load factor is generally a value between 0 and 1. The larger the value, the greater the contribution degree, and more attention needs to be paid.

[0139] Determine the target correction factor according to the functional safety factor and the historical load factor. For example, the functional safety factor and the historical load factor can be weighted and summed to determine the target correction factor. The weights corresponding to the functional safety factor and the historical load factor can be preset. The setting of these weights represents the degree of attention to different influencing factors when calculating the load weight.

[0140] The first load weight is corrected according to the target correction factor to obtain the target load weight. The first load weight is the result of a preliminary estimate based on the data sending frequency and the data packet length, while the target correction factor takes into account the security importance of the task and the historical load situation. By correcting the first load weight with the target correction factor, a more accurate load weight that comprehensively considers various factors, namely the target load weight, can be obtained. Through the above steps, for each of the k task information, its corresponding load weight can be determined in the same way, so as to obtain k load weights to find out the task and the bus node that have the greatest impact on the bus load.

[0141] In summary, by implementing the embodiments of the present application, when the communication mode of the n bus nodes is the open mode, a first task request of the first bus node is obtained; the first task request is used to request communication with the second bus node; in response to the first task request, a first mode switching instruction is broadcast to the n bus nodes through the communication control device; the n bus nodes are controlled to enter the control mode in response to the first mode switching instruction; the communication control device allocates a first communication permission for the first bus node and the second bus node to communicate on the bus; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus. It can be seen that by controlling the switching of the bus nodes between the open mode and the control mode, the reliable execution of critical tasks can be guaranteed, and the reliability of data communication on the bus is improved.

[0142] Please refer to Figure 7 , Figure 7 FIG. is a schematic structural diagram of a communication system of a vehicle bus provided by an embodiment of the present application. The communication system 700 of the vehicle bus is applied to a control module of a vehicle communication system. The vehicle communication system further includes: a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2. The communication control device is connected to the n bus nodes through the bus; the communication system 700 of the vehicle bus includes: a request acquisition unit 701, a request response unit 702, a mode switching unit 703, and a permission allocation unit 704, where

[0143] The request acquisition unit 701 is configured to obtain a first task request of a first bus node when the communication mode of the n bus nodes is the open mode; the first bus node is any one of the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is one of the n bus nodes other than the first bus node;

[0144] The request response unit 702 is configured to broadcast a first mode switching instruction to the n bus nodes through the communication control device in response to the first task request;

[0145] The mode switching unit 703 is configured to control the n bus nodes to enter the control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when not authorized;

[0146] The permission allocation unit 704 is configured to allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus.

[0147] Optionally, after obtaining the first task request of the first bus node, the communication system 700 of the vehicle bus is further specifically configured to:

[0148] Obtain the data transmission task of the first bus node and the target task type corresponding to the data transmission task;

[0149] Determine whether the target task type belongs to a critical task type; the critical task types include: firmware upgrade, safety diagnosis, and emergency control instruction;

[0150] If the target task type belongs to the critical task type, determine that the n bus nodes meet the conditions for entering the control mode;

[0151] Otherwise, keep the communication mode of the n bus nodes as the open mode.

[0152] Optionally, in terms of allocating the first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device, the permission allocation unit 704 is further specifically configured to:

[0153] Obtain the address identifier of the first bus node in the bus to obtain a first address identifier;

[0154] Obtain the address identifier of the second bus node in the bus to obtain a second address identifier;

[0155] Generate a unique authorization code based on the first address identifier and the second address identifier;

[0156] Generate an authentication message according to the first address identifier, the second address identifier, and the unique authorization code;

[0157] Send the authentication message to the first bus node and the second bus node to determine that the first bus node and the second bus node have the first communication permission.

[0158] Optionally, the communication system 700 of the vehicle bus is further specifically configured to:

[0159] Obtain first data generated by the first bus node based on the first communication permission; the first data includes: a data message, a target node identifier, and an identity token;

[0160] Receive the first data through the communication control device and verify the identity token;

[0161] If the verification passes, match the target node identifier with the identifier of the second bus node through the communication control device;

[0162] If the match is successful, forward the data message to the second bus node through the communication control device.

[0163] Optionally, the communication system 700 of the vehicle bus is further specifically configured to:

[0164] When data is transmitted between the first bus node and the second bus node, obtain a second task request of a third bus node; the third bus node is one of the n bus nodes other than the first bus node and the second bus node; the second task request is used to request communication with a fourth bus node; the fourth bus node is one of the n bus nodes other than the third bus node;

[0165] Determine the data transmission task between the first bus node and the second bus node to obtain a first task;

[0166] Determine the urgency level corresponding to the first task according to the task type corresponding to the first task to obtain a first urgency level;

[0167] Obtain the data transmission task of the third bus node to obtain a second task;

[0168] Determine the urgency level corresponding to the second task to obtain a second urgency level;

[0169] When the second urgency level is less than or equal to the first urgency level, reject the second task request and control the third bus node to remain in a silent state;

[0170] When the second urgency level is greater than the first urgency level, suspend the first task and record the task interruption state of the first task;

[0171] The communication control device allocates a second communication privilege for the third bus node and the fourth bus node to communicate on the bus; the second communication privilege is used to allow the third bus node and the fourth bus node to perform data transmission on the bus;

[0172] After the data transmission between the third bus node and the fourth bus node is completed, modify the task status of the first task according to the task interruption status to resume the execution of the first task.

[0173] Optionally, the communication system 700 of the vehicle bus is further specifically configured to:

[0174] After the data transmission task between the first bus node and the second bus node is completed, broadcast a second mode switching instruction to the n bus nodes through the communication control device;

[0175] Control the n bus nodes to enter the open mode in response to the second mode switching instruction;

[0176] Obtain the load rates within a preset time period of the bus to obtain m load rates; m is an integer greater than or equal to 1;

[0177] If the average value of the m load rates is greater than a preset load rate threshold, obtain k bus nodes that perform data transmission tasks among the n bus nodes at the current moment; k is a positive integer less than or equal to n;

[0178] Obtain the task information corresponding to the k bus nodes to obtain k pieces of task information; the task information includes data sending frequency and data message length;

[0179] Determine the load weights corresponding to the k pieces of task information to obtain k load weights;

[0180] Determine the maximum load weight among the k load weights to obtain the maximum load weight;

[0181] Determine the bus node corresponding to the maximum load weight to obtain the fifth bus node;

[0182] Obtain the bus node with the largest data throughput among the fifth bus nodes that perform data transmission to obtain the sixth bus node;

[0183] Control the n bus nodes to enter the regulation mode;

[0184] The communication control device allocates communication privileges for the fifth bus node and the sixth bus node to communicate on the bus.

[0185] Optionally, the communication system 700 of the vehicle bus is further specifically configured to:

[0186] Determine a first load weight according to the data sending frequency and the data message length corresponding to the target task information; the target task information is any one of the k task information;

[0187] Determine the functional safety factor and the historical load factor corresponding to the target task information; the functional safety factor characterizes the importance of the task in terms of vehicle safety; the historical load factor characterizes the average contribution of the task to the bus load per unit time;

[0188] Determine a target correction factor according to the functional safety factor and the historical load factor;

[0189] Correct the first load weight according to the target correction factor to obtain a target load weight; the target load weight is the load weight corresponding to the target task information among the k load weights.

[0190] The communication system 700 of the vehicle bus described in this application can obtain a first task request of a first bus node when the communication mode of the n bus nodes is the open mode; the first task request is used to request communication with a second bus node; in response to the first task request, broadcast a first mode switching instruction to the n bus nodes through the communication control device; control the n bus nodes to enter the control mode in response to the first mode switching instruction; allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus. It can be seen that by controlling the switching of the bus node between the open mode and the control mode, the reliable execution of critical tasks can be guaranteed, and the reliability of data communication on the bus is improved.

[0191] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include a processor, a memory, a communication interface, and one or more programs. The processor, the memory, and the communication interface may be connected to each other through a bus; the above one or more programs are stored in the above memory and are configured to be executed by the above processor; in the embodiment of the present application, the above program includes instructions for performing the following steps:

[0192] When the communication mode of n bus nodes is the open mode, obtain a first task request of a first bus node; the first bus node is any one of the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is one of the n bus nodes other than the first bus node.

[0193] In response to the first task request, broadcast a first mode switching instruction to the n bus nodes through a communication control device.

[0194] Control the n bus nodes to enter a control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when not authorized.

[0195] Allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus.

[0196] The electronic device described in this application can obtain a first task request of a first bus node when the communication mode of the n bus nodes is the open mode; the first task request is used to request communication with a second bus node; in response to the first task request, broadcast a first mode switching instruction to the n bus nodes through the communication control device; control the n bus nodes to enter a control mode in response to the first mode switching instruction; allocate a first communication permission for the first bus node and the second bus node to communicate on the bus through the communication control device; the first communication permission is used to allow the first bus node and the second bus node to perform data transmission on the bus. It can be seen that by controlling the switching of the bus nodes between the open mode and the control mode, the reliable execution of critical tasks can be ensured, and the reliability of data communication on the bus is improved.

[0197] This application embodiment also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiment. The above computer includes an electronic device.

[0198] This application embodiment also provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute part or all of the steps of any method described in the above method embodiment. The computer program product can be a software installation package, and the above computer includes an electronic device.

[0199] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by relevant hardware instructed by a computer program. This program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes: various media that can store program codes such as ROM or random access memory (RAM), magnetic disks, or optical discs.

[0200] The steps of the methods or algorithms described in the embodiments of this application can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules. The software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable hard disks, compact disc read-only memory (CD-ROM), or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also exist as discrete components in the terminal device or the management device.

[0201] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0202] Each device and product described in the above embodiments, and each module / unit included therein, can be a software module / unit, a hardware module / unit, or can be partly a software module / unit and partly a hardware module / unit. For example, for each device and product applied to or integrated into a chip, each module / unit included therein can be implemented in the form of hardware such as circuits, or at least part of the modules / units can be implemented in the form of software programs that run on the processor integrated inside the chip, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits; for each device and product applied to or integrated into a chip module, each module / unit included therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components of the chip module, or at least part of the modules / units can be implemented in the form of software programs that run on the processor integrated inside the chip module, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits; for each device and product applied to or integrated into a terminal device, each module / unit included therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (such as a chip, a circuit module, etc.) or different components within the terminal device, or at least part of the modules / units can be implemented in the form of software programs that run on the processor integrated inside the terminal device, and the remaining (if any) part of the modules / units can be implemented in the form of hardware such as circuits.

[0203] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above are only the specific embodiments of the embodiments of the present application and are not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included within the protection scope of the embodiments of the present application.

Claims

1. A vehicle bus communication method, characterized in that: A control module applied to a vehicle communication system, the vehicle communication system further comprising: a communication control device, a bus, and n bus nodes, where n is an integer greater than or equal to 2, and the communication control device is connected to the n bus nodes via the bus; the method comprising: When the communication mode of the n bus nodes is an open mode, obtaining a first task request of a first bus node; the first bus node is any bus node among the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is a bus node among the n bus nodes except the first bus node; In response to the first task request, broadcasting a first mode switching instruction to the n bus nodes through the communication control device; Controlling the n bus nodes to enter a control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when they are not authorized; The communication control device allocates a first communication right for communicating on the bus to the first bus node and the second bus node; the first communication right is used to allow the first bus node and the second bus node to transmit data on the bus.

2. The method according to claim 1, characterized in that After obtaining the first task request of the first bus node, the method further includes: Acquire a data transmission task of the first bus node and a target task type corresponding to the data transmission task; Determine whether the target task type belongs to a critical task type; the critical task types include: firmware upgrade, safety diagnosis, emergency control instructions; If the target task type belongs to the critical task type, determining that the n bus nodes have the conditions to enter the control mode; Otherwise, the communication mode of the n bus nodes is maintained in the open mode.

3. The method according to claim 1, characterized in that The step of allocating a first communication right for communicating on the bus to the first bus node and the second bus node by the communication control device includes: Acquire the address identifier of the first bus node in the bus to obtain a first address identifier; Acquire the address identifier of the second bus node in the bus to obtain a second address identifier; generating a unique authorization code based on the first address identifier and the second address identifier; Generate an authentication message according to the first address identifier, the second address identifier and the unique authorization code; The authentication message is sent to the first bus node and the second bus node to determine whether the first bus node and the second bus node have the first communication authority.

4. The method according to claim 3, characterized in that The method further comprises: Acquire first data generated by the first bus node based on the first communication authority; the first data includes: a data message, a target node identifier, and an identity token; receiving the first data through the communication control device and verifying the identity token; If the verification passes, matching the target node identifier with the identifier of the second bus node through the communication control device; If the match is successful, the data message is forwarded to the second bus node via the communication control device.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the first bus node and the second bus node are performing data transmission, a second task request of a third bus node is obtained; the third bus node is a bus node among the n bus nodes except the first bus node and the second bus node; the second task request is used to request communication with a fourth bus node; the fourth bus node is a bus node among the n bus nodes except the third bus node; determining a data transmission task between the first bus node and the second bus node to obtain a first task; determining the urgency level corresponding to the first task according to the task type corresponding to the first task, to obtain a first urgency level; Acquire the data transmission task of the third bus node to obtain a second task; Determining the urgency level corresponding to the second task to obtain a second urgency level; When the second urgency level is less than or equal to the first urgency level, rejecting the second task request and controlling the third bus node to maintain a silent state; When the second urgency level is greater than the first urgency level, pausing the first task and recording the task interruption status of the first task; Allocating a second communication right for communicating on the bus to the third bus node and the fourth bus node by the communication control device; the second communication right is used to allow the third bus node and the fourth bus node to perform data transmission on the bus; After the data transmission between the third bus node and the fourth bus node is completed, the task state of the first task is modified according to the task interruption state to resume execution of the first task.

6. The method according to claim 1, characterized in that The method further comprises: After the data transmission task between the first bus node and the second bus node is completed, broadcasting a second mode switching instruction to the n bus nodes through the communication control device; Controlling the n bus nodes to enter an open mode in response to the second mode switching instruction; Obtaining the load rate of the bus within a preset time period to obtain m load rates; m is an integer greater than or equal to 1; If the average value of the m load rates is greater than the preset load rate threshold, then obtaining k bus nodes performing data transmission tasks among the n bus nodes at the current moment; k is a positive integer less than or equal to n; Acquire task information corresponding to the k bus nodes to obtain k task information; the task information includes data transmission frequency and data message length; Determine the load weights corresponding to the k task information to obtain k load weights; Determine the largest load weight among the k load weights to obtain the maximum load weight; Determine the bus node corresponding to the maximum load weight to obtain a fifth bus node; Acquire a bus node with the largest data throughput and for which the fifth bus node performs data transmission, to obtain a sixth bus node; Controlling the n bus nodes to enter a control mode; The fifth bus node and the sixth bus node are assigned communication rights for communicating on the bus by the communication control device.

7. The method according to claim 6, characterized in that The determining the load weights corresponding to the k task information to obtain the k load weights includes: Determine a first load weight according to a data transmission frequency and a data message length corresponding to target task information; the target task information is any task information among the k task information; Determine a functional safety factor and a historical load factor corresponding to the target task information; the functional safety factor represents the importance of the task in terms of vehicle safety; the historical load factor represents the average contribution of the task to the bus load per unit time; determining a target correction factor according to the functional safety factor and the historical load factor; The first load weight is corrected according to the target correction factor to obtain a target load weight; the target load weight is the load weight corresponding to the target task information among the k load weights.

8. A vehicle bus communication system, characterized in that: A control module applied to a vehicle communication system, the vehicle communication system further comprising: a communication control device, a bus, n bus nodes, n being an integer greater than or equal to 2, the communication control device being connected to the n bus nodes via the bus; the vehicle bus communication system comprising: a request acquisition unit, a request response unit, a mode switching unit, and a permission allocation unit, wherein: The request acquisition unit is used to acquire a first task request of a first bus node when the communication mode of the n bus nodes is an open mode; the first bus node is any bus node among the n bus nodes; the first task request is used to request communication with a second bus node; the second bus node is a bus node among the n bus nodes except the first bus node; The request response unit is used to broadcast a first mode switching instruction to the n bus nodes through the communication control device in response to the first task request; The mode switching unit is used to control the n bus nodes to enter a control mode in response to the first mode switching instruction; the control mode indicates that all bus nodes on the bus are prohibited from communicating with each other when they are not authorized; The authority allocation unit is used to allocate a first communication authority for communicating on the bus to the first bus node and the second bus node through the communication control device; the first communication authority is used to allow the first bus node and the second bus node to transmit data on the bus.

9. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for executing the steps in the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.