Communication control method and device of vehicle, equipment and medium
By updating global link state data and adjusting port states in the vehicle-mounted Ethernet ring network, the problem of inconsistency between the port states of communication nodes and the actual link states is solved, thereby improving the stability and robustness of data transmission.
Patent Information
- Application Number
- CN202511061266.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-04
AI Technical Summary
In vehicular Ethernet ring networks, the port status of communication nodes is inconsistent with the actual link status, leading to problems such as data storms, data packet loss, and network communication anomalies.
By responding to changes in the state of the target communication link, the global link state data of each communication node is updated. Using a state machine and a forwarding database table, the port state is adjusted to maintain consistency, thereby synchronizing the port state with the actual link state.
It improves the stability of data transmission and the robustness of the vehicle communication system, avoiding problems such as data storms caused by port status errors.
Smart Images

Figure CN120896814A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Vehicles, and in particular to a communication control method and device for vehicles, equipment and a medium. BACKGROUND
[0002] With the rapid development of intelligent electric vehicles, the requirements for the transmission speed and stability of the vehicle-mounted network are also increasing.
[0003] The vehicle-mounted Ethernet ring network is a vehicle-mounted network communication architecture with a ring topology, which has the advantages of low latency, high throughput and strong determinacy. In the vehicle-mounted Ethernet ring network, each communication node (such as a controller) communicates through a ring-shaped communication link, and is configured with a redundant link for switching when a communication link between the controllers fails.
[0004] In the related art, the vehicle-mounted Ethernet ring network switches the redundant link through the ERPS (Ethernet Ring Protection Switching) protocol, and each communication node only adjusts the corresponding port by receiving and transmitting messages. However, due to hardware performance, communication delay and other factors, the port state of a certain communication node may not be consistent with the actual link state, which may cause serious problems such as data storm, data packet loss, network communication exception, etc. SUMMARY
[0005] In view of the above problems, a communication control method and device for vehicles, equipment and a medium are provided to overcome the above problems or at least partially solve the above problems, comprising:
[0006] A communication control method for vehicles, the vehicle comprising a plurality of communication nodes, each communication node being connected through a communication link and forming a ring network communication structure, and the ring network communication structure being configured with a redundant link, each communication node storing global link state data, the global link state data being used to represent the state of all communication links, the method comprising:
[0007] In response to a change in the state of a target communication link, updating the global link state data of a first communication node corresponding to a first port to obtain first state data; wherein the first port is a port at both ends of the target communication link;
[0008] According to the first state data, updating the global link state data of a second communication node at both ends of the redundant link to obtain second state data, and adjusting the state of a second port at both ends of the redundant link based on the second state data;
[0009] adjusting the state of the first port according to the state change of the target communication link, before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second port at the two ends of the redundant link.
[0010] Optionally, each communication node is configured with a state machine and a forwarding database table, a state value of the state machine being used to represent an update authority of the forwarding database table, after obtaining the first state data by updating the global link state data of the first communication node corresponding to the first port, the method further comprises:
[0011] updating the state value of the state machine of the first communication node according to the first state data;
[0012] after adjusting the state of the first port, the method further comprises:
[0013] updating the forwarding database table of the first communication node according to the updated state value of the state machine of the first communication node and the first state data.
[0014] Optionally, each communication node is configured with a state machine and a forwarding database table, a state value of the state machine being used to represent an update authority of the forwarding database table, after adjusting the state of the second port at the two ends of the redundant link based on the second state data, the method further comprises:
[0015] updating the state value of the state machine of the second communication node based on the second state data, and updating the forwarding database table of the second communication node.
[0016] Optionally, the adjusting the state of the first port according to the state change of the target communication link, before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second port at the two ends of the redundant link, comprises:
[0017] in the case that the state of the target communication link changes from normal to fault, adjusting the state of the first port to a blocked state before updating the global link state data of the first communication node corresponding to the first port;
[0018] in the case that the state of the target communication link changes from fault to normal, adjusting the state of the first port to a normal state after adjusting the state of the second port at the two ends of the redundant link.
[0019] Optionally, the adjusting the state of the second port at the two ends of the redundant link based on the second state data, comprises:
[0020] if the second state data represents that there is no communication link in a fault state, adjusting the state of the second port to a blocked state;
[0021] if the second state data represents that there is a communication link in a fault state, adjusting the state of the second port to a normal state.
[0022] Optionally, the method according to claim 1 or 2, wherein the number of data bits of the global link state data is the same as the number of the communication links, and different data bits of the global link state data represent the states of different communication links.
[0023] Optionally, the updating, according to the first state data, of the global link state data of the second communication node at two ends of the redundant link to obtain second state data comprises:
[0024] in the case that the state of the target communication link changes from normal to fault, performing a bitwise AND operation on the first state data and the global link state data of the second communication node at two ends of the redundant link to obtain the second state data;
[0025] in the case that the state of the target communication link changes from fault to normal, performing a bitwise OR operation on the first state data and the global link state data of the second communication node at two ends of the redundant link to obtain the second state data.
[0026] A communication control device of a vehicle, the vehicle comprising a plurality of communication nodes connected by communication links and forming a ring network communication structure, and a redundant link being configured in the ring network communication structure, each communication node storing global link state data for representing the states of all communication links, the device comprising:
[0027] a state data determination module configured to update the global link state data of a first communication node corresponding to a first port in response to a state change of a target communication link to obtain first state data, wherein the first port is a port at two ends of the target communication link;
[0028] a second port adjustment module configured to update the global link state data of a second communication node at two ends of the redundant link according to the first state data to obtain second state data, and adjust the state of a second port at two ends of the redundant link based on the second state data;
[0029] a first port adjustment module configured to adjust the state of the first port before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second port at two ends of the redundant link, according to the state change of the target communication link.
[0030] An electronic device including a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the communication control method of a vehicle as described above.
[0031] A computer-readable storage medium having stored thereon a computer program, the computer program, when executed by a processor, implementing the communication control method of a vehicle as described above.
[0032] The embodiments of the present application have the following advantages: by updating the global link state data of the first communication node corresponding to the first port in response to the state change of the target communication link to obtain first state data, updating the global link state data of the second communication node at both ends of the redundant link according to the first state data to obtain second state data, and updating and synchronizing between the communication nodes based on the global link state data, each communication node can learn the state of all communication links, and then adjusting the state of the second port and the state of the corresponding first port based on the second state data, the state-based communication control is realized, the state of the port is avoided from being inconsistent with the state of the actual communication link, the problem of data storm caused by the error of the port state is avoided, and the stability of data transmission and the robustness of the vehicle communication system are improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0034] Figure 1 is a step flow chart of a communication control method of a vehicle provided by an embodiment of the present application;
[0035] Figure 2 is an architecture schematic diagram of a communication control system provided by an embodiment of the present application;
[0036] Figure 3 is an implementation process diagram of a communication control of a vehicle provided by an embodiment of the present application;
[0037] Figure 4 is a structure block diagram of a communication control device of a vehicle provided by an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. Obviously, the described embodiments are 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 creative labor fall within the scope of protection of the present application.
[0039] With reference to Figure 1 , a step flow chart of a communication control method of a vehicle is shown, the vehicle comprising a plurality of communication nodes, each of which is connected through a communication link and constitutes a ring network communication structure, and a redundant link is configured in the ring network communication structure, and each communication node stores global link state data, which is used to represent the state of all communication links, and can specifically include the following steps:
[0040] Step 101, in response to the state change of the target communication link, updating the global link state data of the first communication node corresponding to the first port, to obtain first state data; wherein the first port is the port at both ends of the target communication link;
[0041] Step 102, according to the first state data, updating the global link state data of the second communication node at both ends of the redundant link, to obtain second state data, and adjusting the state of the second port at both ends of the redundant link based on the second state data;
[0042] Step 103, according to the state change of the target communication link, adjusting the state of the first port before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second port at both ends of the redundant link.
[0043] The communication node can be various communication elements of the vehicle, such as a controller, etc.
[0044] The communication link refers to the physical link between each communication element for data communication;
[0045] The ring network communication structure refers to the communication structure in which each communication node is networked in a ring topology, and the redundant link refers to a communication link that does not work under normal conditions and works as a redundant link when a fault communication link occurs;
[0046] In some examples, as Figure 2As shown, the communication nodes are controller A, controller B, controller C, and controller D. Each controller is connected in sequence through ports 1 and 2 of an Ethernet switch to form a communication link (e.g., link 1 formed by port 1 of controller A and port 2 of controller B). Among them, link 4 between controller B and controller C is a redundant link. Under normal conditions, port 1 of controller B and port 2 of controller C are blocked, and link 4 does not work. The data transmission direction is from controller B to controller A, then from controller A to controller D, then from controller D to controller C, or the reverse path.
[0047] Global link status data is used to characterize the status of all communication links, making it easier for each communication node to know the status of other communication links.
[0048] In step 101, the target communication link can be any communication link among all communication links that has undergone a state change. The state change can include changing from normal to fault, or from fault back to normal. By updating the global link state data (i.e. historical data) stored by the first communication node through the latest state of the target communication link, the first state data is obtained.
[0049] In some examples, such as Figure 2 As shown, links 1-4 are all in normal condition. When link 2 fails, the first ports at both ends are port 2 of controller A and port 1 of controller D. The first communication nodes are controller A and controller D. Controller A and controller D originally stored global link status data indicating that the status of links 1-4 is normal. Then, the global link status data of controller A and controller D is updated to global link status data indicating that link 2 has failed and links 1 and 3-4 are normal, which is the first status data.
[0050] If link2 recovers to normal, the global link status data of controllers A and D will be updated to global link status data indicating that the status of links 1-4 is normal.
[0051] In some embodiments of the present invention, the number of data bits in the global link status data is the same as the number of communication links, and different data bits in the global link status data represent the status of different communication links.
[0052] The number of data bits, also known as the data length of global link status data, is used to represent the status of the corresponding communication link, with each data bit representing the status of the corresponding communication link.
[0053] In some examples, global link status data can be represented using a mask of 0s and 1s, where a value of 0 indicates a communication link failure and a value of 1 indicates normal operation. For example... Figure 2As shown, the first bit of the global link state data can represent the state of link1, the second bit can represent the state of link2, and so on. The global link state data representing that the states of link1-4 are all normal is 1111, and the global link state data representing that link2 is abnormal is 1011.
[0054] In step 102, based on the first state data, the global link state data of the second communication node at both ends of the redundant link is updated, that is, the states of the respective communication links are synchronized, to obtain second state data, and the second communication node adjusts the state of the second port according to the indication of the second state data, for example, adjusts the state of the second port from the normal state to the blocked state, or from the blocked state to the normal state, and the like.
[0055] Taking the above example, link2 is faulty, and link4 is a redundant link, then controller B and controller C are the second communication node, and port1 of controller B and port2 of controller C are the second port. Then controller A and controller D can be controlled to send a fault message to controller B and controller C, and the fault message carries the first state data, so that controller B and controller C update the originally stored global link state data (i.e. historical data) according to the first state data to obtain the second state data.
[0056] In some embodiments of the present application, the adjusting the state of the second port at both ends of the redundant link based on the second state data comprises:
[0057] If the second state data represents that there is no communication link in the fault state, the state of the second port is adjusted to the blocked state.
[0058] If the second state data represents that there is a communication link in the fault state, the state of the second port is adjusted to the normal state.
[0059] In some examples, link2 is faulty, and link4 is a redundant link, at this time, the updated second state data represents that there is a communication link in the fault state, then port1 of controller B and port2 of controller C are adjusted to the normal state to enable the redundant link; if link2 recovers from the fault to the normal state, at this time, the updated second state data represents that there is no communication link in the fault state, then port1 of controller B and port2 of controller C are adjusted to the blocked state to disable the redundant link.
[0060] In some embodiments of the present application, the updating the global link state data of the second communication node at both ends of the redundant link according to the first state data to obtain the second state data comprises:
[0061] When the state of the target communication link changes from normal to fault, the first state data and the global link state data of the second communication nodes at both ends of the redundant link are bitwise ANDed to obtain the second state data.
[0062] When the state of the target communication link changes from fault to normal, the first state data and the global link state data of the second communication nodes at both ends of the redundant link are bitwise ORed to obtain the second state data.
[0063] In some examples, such as Figure 2 As shown, when the state of link2 changes from normal to fault, the first state data is 1011. The global link state data originally stored by controllers B and C is 1111. Then, a bitwise AND operation is performed to get: 1011&1111=1011. Therefore, the second state data is 1011.
[0064] When link2 recovers from a fault to normal, the first state data is 1111. The global link state data originally stored by controllers B and C is 1011. Then, a bitwise OR operation is performed to obtain: 1111||1011=1111. Therefore, the second state data is 1111.
[0065] In step 103, depending on the different state changes of the target communication link, the state of the first port is adjusted before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second ports at both ends of the redundant link.
[0066] In some embodiments of the present invention, adjusting the state of the first port according to the state change of the target communication link, before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second ports at both ends of the redundant link, includes:
[0067] When the state of the target communication link changes from normal to faulty, the state of the first port is adjusted to blocked before updating the global link state data of the first communication node corresponding to the first port.
[0068] When the state of the target communication link changes from faulty to normal, after adjusting the state of the second ports at both ends of the redundant link, the state of the first port is adjusted to normal.
[0069] In a specific implementation, if the state of the target communication link changes from normal to fault, the state of the first port needs to be adjusted to the blocking state to stop the communication of the target communication link; if the state of the target communication link changes from fault to normal, the enabled redundant link needs to be stopped first, and then the state of the first port is adjusted to the normal state to make the target communication link that recovers to normal resume communication.
[0070] In some examples, as shown in FIG. 2, link2 fails, and port2 of controller A and port1 of controller D are adjusted to the blocking state to timely stop the communication of link2 before the global link state data of the first communication node corresponding to the first port is updated. Figure 2
[0071] If link2 recovers from the fault, port1 of controller B and port2 of controller C are adjusted to the blocking state, and after the redundant link is closed, port2 of controller A and port1 of controller D are adjusted to the normal state to resume the communication of link2.
[0072] In some embodiments of the present application, each communication node is configured with a state machine and a forwarding database table, and the state value of the state machine is used to represent the update permission of the forwarding database table. After the global link state data of the first communication node corresponding to the first port is updated to obtain the first state data, the method further comprises:
[0073] updating the state value of the state machine of the first communication node according to the first state data;
[0074] After the state of the first port is adjusted, the method further comprises:
[0075] updating the forwarding database table of the first communication node according to the updated state value of the state machine of the first communication node and the first state data.
[0076] The forwarding database table (FDB) is used to save the mapping relationship between the MAC address and the port of each communication node, and directly determines the data forwarding path.
[0077] The state machine is a state-based model, and the state value of the state machine represents the update permission of the forwarding database table, i.e., whether the forwarding database table can be updated. For example, the state value of the state machine of a certain communication node is in the idle state, indicating that the forwarding database table can be updated; the state value of the state machine of a certain communication node is in the protection state, indicating that the communication node does not update the forwarding database table when receiving a packet sent by a non-adjacent controller.
[0078] In some examples, link2 fails, based on the first state data (characterizing that link2 fails), the state value of the state machine of the first communication node is updated from the idle state to the protection state, indicating that the FDB table can only be updated by the first communication node; after adjusting port2 of controller A and port1 of controller D to the blocked state, controller A and controller D have the update authority of the FDB, then controller A and controller D update the corresponding FDB table according to the first state data;
[0079] Link2 recovers from failure, based on the first state data (characterizing that all communication links are normal), the state value of the state machine of the first communication node is updated from the protection state to the idle state, indicating that the FDB table can be updated by any communication node;
[0080] After adjusting port1 of controller B and port2 of controller C to the blocked state, controller B and controller C send a request recovery message to controller A and controller D, since controller B and controller C have the update authority of the FDB, then controller A and controller D update the corresponding FDB table based on the first state data.
[0081] In actual application, based on the ring network communication architecture shown in Figure 2 An FDB table can be shown in the following table:
[0082]
[0083] Among them, the first state data 1111 indicates that all communication links are normal, the source controller represents the sending end of the data, the destination controller represents the receiving end of the data, unblock represents non-blocking, and block represents blocking.
[0084] In this embodiment, through the global link state data, each communication node can maintain the link state of the entire system by itself, and then the global link state data and the state value of the state machine are combined to complete the change of the port state and the update of the FDB table, which can prevent network storm caused by port state error, and can fix the state of the FDB table in the case of the same link state, avoiding the case that different MAC address table states may occur even in the case of the same link state by using the ERPS control protocol.
[0085] In some embodiments of the application, each communication node is configured with a state machine and a forwarding database table, the state value of the state machine is used to characterize the update authority of the forwarding database table, and after adjusting the state of the second port at both ends of the redundant link based on the second state data, the method further comprises:
[0086] Based on the second state data, update the state value of the state machine of the second communication node, and update the forwarding database table of the second communication node.
[0087] In some examples, as Figure 2 shown, link2 fails, after adjusting the port1 of controller B and the port2 of controller C to normal state, the state value of the state machine of controller B and controller C is updated from idle state to protection state, and only controller B and controller C can update the FDB table of each other; controller B and controller C have the permission to update the FDB table, then according to the second state data, the corresponding FDB table is matched and updated.
[0088] In some embodiments of the present application, as Figure 2 shown, the ring network communication architecture, wherein the ring network redundancy control protocol stack is responsible for sending and receiving control messages, state values of state machines and global link state data, and the Ethernet switch is responsible for performing state operations of ports and updating FDB tables, then based on the ring network communication architecture, an implementation process of communication control of a vehicle is as Figure 3 shown, and specifically includes:
[0089] Initialization:
[0090] S101, the system is normally powered on, the ring network redundancy control protocol stack is enabled, and the link state values (i.e. global link state data) are written as 1111 by means of masking, wherein 1 represents a normal link, 0 represents an abnormal link, the first bit represents link1, the second bit represents link2, and so on. The state value of the state machine of the four controllers is idle state, and the VLAN state of the port1 of controller B and the port2 of controller C is blocked.
[0091] link2 link abnormal disconnection:
[0092] S201, if link2 link abnormal disconnection, controller A and controller D detect that link2 is disconnected and immediately block the VLAN state of the port2 of controller A and the port1 of controller D, then write the local link state value as 1011, the state value of the state machine is updated from idle state to protection state, and the corresponding MAC address table (i.e. FBD) is matched according to the link state value 1011.
[0093] S202, controller A and controller D send link failure messages to the outside, and the link state value carried in the message is 1011.
[0094] S203, after receiving the link fault message, the controller B and the controller C perform an AND operation between the link state value and the local link state, that is, 1111 & 1011 = 1011, update the value after the operation as the local link state value, then switch the state machine state to the protection state 1, open the VLAN state of the port 1 of the controller B and the port 2 of the controller C, and switch the MAC address table according to the link state value 1011.
[0095] link2 link abnormal recovery:
[0096] S301, if the link2 link abnormal recovery, the controller A and the controller D detect that the link2 is recovered and write the local link state value as 1111, and the state machine is switched from the protection state 1 to the idle state.
[0097] S302, the controller A and the controller D send a link recovery message to the outside, and the link state value carried in the message is 1111.
[0098] S303, after receiving the link recovery message, the controller B and the controller C perform an OR operation between the link state value and the local link state, that is, 1011 || 1111 = 1111, update the value after the operation as the local link state value, then switch the state machine state to the idle state, block the VLAN state of the port 1 of the controller B and the port 2 of the controller C, and switch the MAC address table according to the link state value 1111.
[0099] S304, after completing the above operation, the controller B and the controller C send a request initialization message to the outside.
[0100] S305, the controller A and the controller D receive the request initialization message in the idle state of the state machine, open the VLAN state of the port 2 of the controller A and the port 1 of the controller D, and switch the MAC address table according to the link state value 1111.
[0101] The embodiment of the application has the following advantages: by updating the global link state data of the first communication node corresponding to the first port to obtain the first state data in response to the state change of the target communication link, updating the global link state data of the second communication node at both ends of the redundant link to obtain the second state data according to the first state data, and updating and synchronizing the global link state data between the communication nodes, each communication node can know the state of all communication links, and then the adjustment of the second port state and the adjustment of the corresponding first port state are performed based on the second state data, the state-based communication control is realized, the inconsistency between the state of the port and the state of the actual communication link is avoided, the problem of data storm caused by the error of the port state is avoided, and the stability of data transmission and the robustness of the vehicle communication system are improved.
[0102] It should be noted that for the method embodiments, the series of acts complement each other to achieve the present application embodiments, and this can not be performed in other sequence without the support for the present application embodiments. In addition, it should be noted that each of the acts described in the specification can be performed by hardware, software, firmware or any combination thereof, and the present application embodiments are not limited to the acts described in the specification.
[0103] Referring to Figure 4 , a structure schematic diagram of a communication control device provided by an embodiment of the present application is shown, the vehicle includes a plurality of communication nodes, each of the communication nodes is connected through a communication link and forms a ring network communication structure, and a redundant link is configured in the ring network communication structure, and each of the communication nodes stores global link state data, the global link state data is used to represent the state of all communication links, and the device can specifically include the following modules:
[0104] The state data determination module 401 is configured to update the global link state data of the first communication node corresponding to the first port in response to the state change of the target communication link, and obtain first state data; wherein the first port is a port at two ends of the target communication link.
[0105] The second port adjustment module 402 is configured to update the global link state data of the second communication node at two ends of the redundant link according to the first state data, obtain second state data, and adjust the state of the second port at two ends of the redundant link based on the second state data.
[0106] The first port adjustment module 403 is configured to adjust the state of the first port before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second port at two ends of the redundant link, according to the state change of the target communication link.
[0107] In some embodiments of the present application, each of the communication nodes is configured with a state machine and a forwarding database table, the state value of the state machine is used to represent the update permission of the forwarding database table, and the device further includes:
[0108] The first state machine update module is configured to update the state value of the state machine of the first communication node according to the first state data.
[0109] The forwarding database table first update module is configured to update the forwarding database table of the first communication node according to the updated state value of the state machine of the first communication node and the first state data.
[0110] In some embodiments of the present application, each communication node is configured with a state machine and a forwarding database table, a state value of the state machine is used to represent an update permission of the forwarding database table, and the device further comprises:
[0111] A forwarding database table second update module is configured to update the state value of the state machine of the second communication node based on the second state data, and update the forwarding database table of the second communication node.
[0112] In some embodiments of the present application, the first port adjustment module 403 comprises:
[0113] A first adjustment submodule is configured to, in a case where the state of the target communication link changes from normal to fault, adjust the state of the first port to a blocked state before updating the global link state data of the first communication node corresponding to the first port.
[0114] A second adjustment submodule is configured to, in a case where the state of the target communication link changes from fault to normal, adjust the state of the first port to a normal state after adjusting the states of the second ports at both ends of the redundant link.
[0115] In some embodiments of the present application, the second port adjustment module 402 comprises:
[0116] A blocked adjustment submodule is configured to, if the second state data represents that there is no communication link in the fault state, adjust the state of the second port to a blocked state.
[0117] A normal adjustment submodule is configured to, if the second state data represents that there is a communication link in the fault state, adjust the state of the second port to a normal state.
[0118] In some embodiments of the present application, the number of data bits of the global link state data is the same as the number of communication links, and different data bits of the global link state data represent the states of different communication links.
[0119] In some embodiments of the present application, the second port adjustment module 402 comprises:
[0120] A bitwise AND operation submodule is configured to, in a case where the state of the target communication link changes from normal to fault, perform bitwise AND operation on the first state data and the global link state data of the second communication node at both ends of the redundant link to obtain the second state data.
[0121] A bitwise OR operation submodule is configured to, in a case where the state of the target communication link changes from fault to normal, perform bitwise OR operation on the first state data and the global link state data of the second communication node at both ends of the redundant link to obtain the second state data.
[0122] Some embodiments of the present application further provide an electronic device, which can include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program, when executed by the processor, implements the communication control method of the vehicle.
[0123] Some embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the communication control method of the vehicle.
[0124] Some embodiments of the present application further provide a computer program product, which includes a computer program, and the computer program, when executed by a processor, implements the communication control method of the vehicle.
[0125] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts are referred to the part of the method embodiments.
[0126] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the country and region, and provide corresponding operation portal for the user to choose authorization or refusal.
[0127] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts between the embodiments can be referred to each other.
[0128] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device, or computer program product. Therefore, the embodiments of the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0129] The embodiments of the present application are described with reference to the flowchart illustrations and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0130] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operational steps are carried out on the computer or other programmable terminal devices to produce a computer implemented process so that the instructions executed on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0132] Although preferred embodiments of the present application have been described, those skilled in the art will be able to make additional modifications and variations to these embodiments without departing from the scope of the present application. Accordingly, the appended claims are intended to encompass all such modifications and variations as falling within the scope of the present application.
[0133] Finally, it needs to be pointed out that in this article, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or terminal device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or terminal device including the above element.
[0134] The above provides a detailed description of a communication control method and device, equipment and medium of a vehicle. The principles and implementation modes of the present application are described in this article by applying specific examples. The above example is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed; in view of the above, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A communication control method for a vehicle, characterized in that, The vehicle includes multiple communication nodes, each connected to the others via communication links to form a ring network communication structure. The ring network communication structure is configured with redundant links. Each communication node stores global link status data, which is used to characterize the status of all communication links. The method includes: In response to a change in the state of the target communication link, the global link state data of the first communication node corresponding to the first port is updated to obtain the first state data; wherein, the first port is the port at both ends of the target communication link; Based on the first status data, update the global link status data of the second communication nodes at both ends of the redundant link to obtain the second status data, and adjust the status of the second ports at both ends of the redundant link based on the second status data. Based on the state change of the target communication link, the state of the first port is adjusted before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second ports at both ends of the redundant link.
2. The method according to claim 1, characterized in that, Each communication node is configured with a state machine and a forwarding database table. The state value of the state machine is used to characterize the update permission of the forwarding database table. After updating the global link state data of the first communication node corresponding to the first port and obtaining the first state data, the method further includes: Update the state value of the state machine of the first communication node based on the first state data; After adjusting the state of the first port, the method further includes: The forwarding database table of the first communication node is updated based on the updated state value of the state machine of the first communication node and the first state data.
3. The method according to claim 1, characterized in that, Each communication node is configured with a state machine and a forwarding database table. The state value of the state machine is used to characterize the update permissions of the forwarding database table. After adjusting the state of the second ports at both ends of the redundant link based on the second state data, the method further includes: Based on the second state data, update the state value of the state machine of the second communication node, and update the forwarding database table of the second communication node.
4. The method according to claim 1 or 2, characterized in that, The step of adjusting the state of the first port before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second ports at both ends of the redundant link, based on the state change of the target communication link includes: When the state of the target communication link changes from normal to faulty, the state of the first port is adjusted to blocked before updating the global link state data of the first communication node corresponding to the first port. When the state of the target communication link changes from faulty to normal, after adjusting the state of the second ports at both ends of the redundant link, the state of the first port is adjusted to normal.
5. The method according to claim 1 or 2, characterized in that, The step of adjusting the state of the second ports at both ends of the redundant link based on the second state data includes: If the second state data indicates that there is no communication link in a faulty state, adjust the state of the second port to a blocked state; If the second status data indicates that there is a communication link in a faulty state, adjust the status of the second port to a normal state.
6. The method according to claim 1 or 2, characterized in that, The number of bits in the global link status data is the same as the number of communication links, and different bits in the global link status data represent the status of different communication links.
7. The method according to claim 6, characterized in that, The step of updating the global link status data of the second communication nodes at both ends of the redundant link based on the first status data to obtain the second status data includes: When the state of the target communication link changes from normal to fault, the first state data and the global link state data of the second communication nodes at both ends of the redundant link are bitwise ANDed to obtain the second state data. When the state of the target communication link changes from fault to normal, the first state data and the global link state data of the second communication nodes at both ends of the redundant link are bitwise ORed to obtain the second state data.
8. A communication control device for a vehicle, characterized in that, The vehicle includes multiple communication nodes, each connected to the others via communication links to form a ring network communication structure. The ring network communication structure is configured with redundant links. Each communication node stores global link status data, which characterizes the status of all communication links. The device includes: The status data determination module is used to update the global link status data of the first communication node corresponding to the first port in response to the status change of the target communication link, so as to obtain the first status data; wherein, the first port is the port at both ends of the target communication link; The second port adjustment module is used to update the global link status data of the second communication nodes at both ends of the redundant link according to the first status data to obtain the second status data, and adjust the status of the second ports at both ends of the redundant link based on the second status data. The first port adjustment module is used to adjust the state of the first port before updating the global link state data of the first communication node corresponding to the first port, or after adjusting the state of the second ports at both ends of the redundant link, based on the state change of the target communication link.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the communication control method for the vehicle as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the communication control method for the vehicle as described in any one of claims 1 to 7.