Communication method and related device
By introducing a multi-network channel redundant transmission method in the vehicle communication system, the data loss and load rate surge caused by vehicle communication network failure are solved, and more stable and reliable data transmission is achieved and user experience is improved.
Patent Information
- Application Number
- CN202311579173.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2025-05-23
AI Technical Summary
When a vehicle communication network fails, the lack of communication redundant design will lead to data loss and a surge in network load rate, affecting the stability and reliability of data transmission.
By introducing a communication method into the communication system, data redundant transmission is performed using multiple network channels. When the state of the first network channel is abnormal, data transmission is determined to be carried out through the first channel set or the second channel set according to the message type to ensure data redundancy and control the network load rate.
It improves the stability and reliability of data transmission, prevents data loss, and effectively improves the user experience, while avoiding the surge in network load rate.
Smart Images

Figure CN120034460A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle communication technology, and in particular to a communication method and related devices. Background Art
[0002] With the continuous development of intelligent networking and autonomous driving of automobiles, the amount of communication data in vehicle networks has continued to surge, and the reliability requirements for controller data communication are becoming increasingly higher. When the vehicle communication network fails and data transmission cannot be carried out normally, communication redundancy design is required to ensure the reliability of data transmission.
[0003] At present, some vehicles may not have communication redundancy design. When a certain network is abnormal, the data that needs to be sent out through this network is not backed up and sent on other networks, resulting in direct data loss, which directly affects the normal operation of data-related vehicle functions. Other vehicles send all the data that multiple controllers need to send out through multiple networks, which doubles the vehicle network load rate and even affects the communication quality, and requires a high ability of the controller to process data. This affects data transmission and poor user experience. Summary of the invention
[0004] The embodiment of the present application provides a communication method and related devices, which can determine the message type of the first message that needs to be sent through the first network channel when the network status of the first network channel is abnormal, and send the first message through the first channel set or the second channel set. In this way, the redundancy of the data can be guaranteed and the load rate of the network channel will not surge, thereby improving the stability and reliability of data transmission and effectively improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a communication system, wherein the communication system includes N network channels, where N is an integer and N≥3, and the method includes:
[0006] Acquire a first message, where the first message is assigned to be sent in a first network channel, and the first network channel is one of the N network channels;
[0007] Determining that a network status of the first network channel is abnormal;
[0008] If the message type of the first message is the first type, sending the first message through a first channel set, where the first channel set includes at least one network channel of the N network channels whose network status is normal;
[0009] If the message type of the first message is the second type, the first message is sent through a second channel set, the second channel set includes at least 2 network channels with normal network status among the N network channels, and the number of network channels included in the first channel set is less than the number of network channels included in the second channel set.
[0010] Optionally, the first message allocated to be sent in the first network channel includes messages that have not been sent and messages that have been sent successfully. The messages that have not been sent can also be messages scheduled to be sent in the first network channel.
[0011] In an embodiment of the present application, when the network status of the first network channel is abnormal, the communication system can send the first message through the first channel set or the second channel set according to the message type of the first message. For example, the message can be set to the first type or the second type, and different message types correspond to different backup sending methods.
[0012] In this way, for unimportant messages, their message type can be set to the first type, so that at least one is selected when sending in backup, for example, only one network channel with normal network status is selected for transmission, so as to avoid all network channels from sending the message in backup, and ensure that the load rate of the network channel will not surge. For more important messages, their message type can be set to the second type, so that at least two are selected when sending in backup, for example, all network channels with normal network status are selected for sending, so as to improve the success rate of message sending. In short, users can flexibly set the message type of messages and send messages in backup. On the one hand, it can prevent data loss and ensure the normal operation of communication functions. On the other hand, it can also ensure that the load rate of the network channel will not surge. While ensuring data redundancy, it can also improve the stability and reliability of data transmission, and effectively improve user experience.
[0013] In a possible implementation of the first aspect, the first type is a common message, and the second type is an important message.
[0014] In a possible implementation of the first aspect, the N network channels include the first network channel and at least one network channel having the same communication mode as the first network channel, and the communication mode of the network channels in the first channel set is the same as the communication mode of the first network channel.
[0015] In the above implementation, selecting a network channel with the same communication mode for data transmission can increase the speed of data transmission, and can also improve the stability and reliability of data transmission, which can effectively improve the user experience.
[0016] In a possible implementation manner of the first aspect, the first channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0017] In a possible implementation manner of the first aspect, the network channel in the first channel set is a network channel with the highest priority among the N network channels.
[0018] In this way, when the network status of the first network channel is abnormal, selecting a network channel with a normal network status and the highest priority to send the first message can improve the stability and reliability of data transmission, and can also increase the speed of data transmission, which can effectively improve the user experience.
[0019] In another possible implementation manner of the first aspect, the network channel with the highest priority includes a network channel with the highest bit rate or the highest transmission rate among network channels with the same communication mode as the first network channel.
[0020] In this way, when the network status of the first network channel is abnormal, selecting a network channel with the same communication mode as the first network channel and the highest bit rate or the highest transmission rate to send the first message can improve the stability and reliability of data transmission, and can also increase the speed of data transmission, which can effectively improve the user experience.
[0021] In another possible implementation of the first aspect, at least two of the N network channels have a communication mode that is the same as that of the first network channel, and a communication mode of the network channels in the second channel set is the same as that of the first network channel.
[0022] And / or, the N network channels include a network channel having a communication mode different from that of the first network channel, and the second channel set includes the network channels among the N network channels having a communication mode different from that of the first network channel.
[0023] In yet another possible implementation of the first aspect, the second channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0024] In the above implementation, selecting a network channel with the same communication mode for data transmission can increase the speed of data transmission, and can also improve the stability and reliability of data transmission, which can effectively improve the user experience.
[0025] In another possible implementation manner of the first aspect, the N network channels include a network channel having a communication mode different from that of the first network channel.
[0026] The second channel set further includes at least one network channel among the N network channels whose network status is normal and whose communication mode is different from that of the first network channel.
[0027] In another possible implementation of the first aspect, the communication mode of the first network channel is one of CAN communication, CAN-FD communication, Ethernet communication and optical fiber communication.
[0028] In this way, data can be transmitted through multiple communication methods. When a certain communication method is abnormal, data can also be transmitted through other communication methods, which can improve the stability and reliability of data transmission and effectively improve user experience.
[0029] In another possible implementation manner of the first aspect, the abnormal network status includes one or more of error frames, message timeout, and bus OFF occurring in the N network channels.
[0030] In this way, the network status of each network channel can be monitored in real time. When an abnormality occurs in a network channel, backup can be sent in time to ensure data redundancy while improving the stability and reliability of data transmission, which can effectively improve user experience.
[0031] In another possible implementation of the first aspect, the method further includes:
[0032] Obtaining a list of messages scheduled to be sent on the network channels in the first channel set;
[0033] The sending the first message through the first channel set includes:
[0034] If there is a second message with the same content as the first message in the message list, the earlier time between the original scheduled sending time of the first message and the original scheduled sending time of the second message is used as the time for sending the second message, and the second message is sent through the first channel set.
[0035] In another possible implementation of the first aspect, the method further includes:
[0036] Obtaining a list of messages scheduled to be sent on the network channel in the second channel set;
[0037] The sending the first message through the second channel set includes:
[0038] When there is a third message with the same content as the first message in the message list, the earlier time between the original scheduled sending time of the first message and the original scheduled sending time of the third message is used as the time for sending the third message, and the third message is sent through the second channel set.
[0039] In this way, when the message scheduled to be sent on the network channel with normal network status has the same content as the first message, it will not be sent repeatedly, which can avoid waste of resources, prevent repeated operations, and effectively improve user experience.
[0040] In another possible implementation of the first aspect, the method further includes:
[0041] When the network state of the first network channel is abnormal, determine the load rate of each network channel in the N network channels, where the load rate is determined according to one or more of the communication mode of the network channel, the number of unsent messages of the network channel, the estimated time required for the network channel to send all messages, the bit rate of the network channel, the transmission rate of the network channel, and the message delay time of the network channel;
[0042] The network channels in the first channel set are the network channels with the lowest load rate among the N network channels, and the network channels in the second channel set are the network channels with a load rate lower than a first threshold among the N network channels, and the first threshold is predefined or pre-set.
[0043] In this way, when the network status of the first network channel is abnormal, the load rate of each network channel is determined according to multiple influencing factors, and the network channel with the lowest load rate is selected to send the first message. This can improve the stability and reliability of data transmission, and can also increase the speed of data transmission, which can effectively improve the user experience.
[0044] In a second aspect, an embodiment of the present application provides a processing device, the processing device is included in a communication system, the communication system includes N network channels, N is an integer and N ≥ 3, the processing device includes an acquisition unit and a processing unit,
[0045] The acquiring unit is used to acquire a first message, where the first message is assigned to be sent in a first network channel, and the first network channel is one of the N network channels;
[0046] The processing unit is used for:
[0047] Determining that a network status of the first network channel is abnormal;
[0048] If the message type of the first message is the first type, sending the first message through a first channel set, where the first channel set includes at least one network channel whose network status is normal among the N network channels;
[0049] If the message type of the first message is the second type, the first message is sent through a second channel set, the second channel set includes at least 2 network channels with normal network status among the N network channels, and the number of network channels included in the first channel set is less than the number of networks included in the second channel set.
[0050] In a possible implementation of the second aspect, the first type is a common message, and the second type is an important message.
[0051] In a possible implementation of the second aspect, the N network channels include the first network channel and at least one network channel having the same communication mode as the first network channel, and the communication mode of the network channels in the first channel set is the same as the communication mode of the first network channel.
[0052] In a possible implementation manner of the second aspect, the first channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0053] In a possible implementation manner of the second aspect, the network channel in the first channel set is the network channel with the highest priority among the N network channels.
[0054] In yet another possible implementation of the second aspect, the network channel with the highest priority includes a network channel with the highest bit rate or the highest transmission rate among network channels with the same communication mode as the first network channel.
[0055] In yet another possible implementation of the second aspect, at least two of the N network channels have a communication mode that is the same as that of the first network channel, and a communication mode of the network channels in the second channel set is the same as that of the first network channel.
[0056] And / or, the N network channels include a network channel having a communication mode different from that of the first network channel, and the second channel set includes the network channels among the N network channels having a communication mode different from that of the first network channel.
[0057] In yet another possible implementation of the second aspect, the second channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0058] In yet another possible implementation manner of the second aspect, the N network channels include a network channel having a communication mode different from that of the first network channel.
[0059] The second channel set further includes at least one network channel among the N network channels whose network status is normal and whose communication mode is different from that of the first network channel.
[0060] In another possible implementation of the second aspect, the communication mode of the first network channel is one of CAN communication, CAN-FD communication, Ethernet communication and optical fiber communication.
[0061] In another possible implementation manner of the second aspect, the abnormal network status includes one or more of error frames, message timeout, and bus OFF occurring in the N network channels.
[0062] In yet another possible implementation of the second aspect, the acquisition unit is further configured to acquire a message list scheduled to be sent on a network channel in the first channel set;
[0063] The processing unit is also used to, if there is a second message with the same content as the first message in the message list, use the earlier of the original scheduled sending time of the first message and the original scheduled sending time of the second message as the time for sending the second message, and send the second message through the first channel set.
[0064] In yet another possible implementation of the second aspect, the acquisition unit is further configured to acquire a message list scheduled to be sent on a network channel in the second channel set;
[0065] The processing unit is also used to, if there is a third message with the same content as the first message in the message list, use the earlier of the original scheduled sending time of the first message and the original scheduled sending time of the third message as the time for sending the third message, and send the third message through the second channel set.
[0066] In another possible implementation of the second aspect, the processing unit is further configured to determine, when the network state of the first network channel is abnormal, a load rate of each network channel in the N network channels, where the load rate is determined according to one or more of a communication mode of the network channel, a number of unsent messages of the network channel, an estimated time required for the network channel to send all messages, a bit rate of the network channel, a transmission rate of the network channel, and a message delay time of the network channel;
[0067] The network channels in the first channel set are the network channels with the lowest load rate among the N network channels, and the network channels in the second channel set are the network channels with a load rate lower than a first threshold among the N network channels, and the first threshold is predefined or pre-set.
[0068] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory; the processor executes instructions stored in the memory so that the electronic device implements the method described in any one of the first aspects above.
[0069] Optionally, the electronic device further includes a communication interface, wherein the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor.
[0070] It should be noted that the above embodiment is described by taking a processor (or general-purpose processor) that executes the method by calling a computer specification as an example. In the specific implementation process, the processor can also be a dedicated processor, in which case the computer instructions have been pre-loaded in the processor. Optionally, the processor can also include both a dedicated processor and a general-purpose processor.
[0071] Optionally, the processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.
[0072] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed by an electronic device, the electronic device implements the method described in any one of the first aspects above.
[0073] In a fifth aspect, the present application provides a vehicle, comprising the aforementioned processing device or the aforementioned electronic device, so that the vehicle can implement the method described in any one of the aforementioned first aspects.
[0074] In a sixth aspect, the present application provides a computer program product, which includes computer instructions. When the instructions are executed by an electronic device, the electronic device implements any method described in the first aspect.
[0075] Optionally, the computer program product may be a software installation package or an image file. When the aforementioned method is required, the computer program product may be obtained and executed on a computing device.
[0076] The beneficial effects of the technical solutions provided in the second to sixth aspects of the present application can refer to the beneficial effects of the technical solution of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The following is a brief introduction to the drawings required for describing the embodiments.
[0078] Figure 1 It is a schematic diagram of the architecture of a communication system provided by an embodiment of the present application;
[0079] Figure 2 It is a flow chart of a communication method provided in an embodiment of the present application;
[0080] Figure 3A is a schematic diagram of a network channel provided in an embodiment of the present application;
[0081] Figure 3B is a schematic diagram of another network channel provided in an embodiment of the present application;
[0082] Figure 3C is a schematic diagram of another network channel provided in an embodiment of the present application;
[0083] Figure 3D is a schematic diagram of another network channel provided in an embodiment of the present application;
[0084] Figure 4 It is a flowchart of another communication method provided in an embodiment of the present application;
[0085] Figure 5 is a structural schematic diagram of a processing device provided in an embodiment of the present application;
[0086] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0087] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0088] The following is an introduction to the system architecture of the embodiment of the present application. It should be noted that the system architecture and business scenarios described in this application are intended to more clearly illustrate the technical solution of this application, and do not constitute a limitation on the technical solution provided by this application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided by this application is also applicable to similar technical problems.
[0089] See also Figure 1 , Figure 1 Schematic diagram of the architecture of a communication system provided by an embodiment of the present application. Figure 1 As shown, the communication system 10 includes a plurality of network channels. Figure 1 The network channel 1, network channel 2, network channel 3, and network channel n are used as examples for description. The communication system and the network channel are introduced exemplarily below.
[0090] The communication system 10 is a device with data exchange and data processing capabilities. Optionally, the communication system 10 can obtain messages, process messages and control network channels to send messages. Exemplarily, the communication system 10 can be a controller or an electronic device.
[0091] A network channel is a channel or medium with data transmission capability, and a network channel can be used to send messages outward. The communication system 10 may have multiple network channels, such as Figure 1 In the embodiment, the network channel 1, network channel 2, network channel 3, and network channel n are shown in FIG. Optionally, the communication mode of the network channel for data transmission may include one of CAN, CAN-FD, Ethernet, and optical fiber, or a combination of the above communication modes. Exemplarily, the network channel may be a CAN channel, an Ethernet channel, an optical fiber channel, a CAN-FD channel, and the like. That is, there may be multiple ports on the communication system 10, for example, there may be multiple Ethernet ports or CAN ports on the communication system 10.
[0092] Optionally, the communication system 10 has multiple network channels with the same communication mode, that is, the communication modes of some of the multiple network channels included in the communication system 10 may be the same. For example, the communication system 10 includes a total of 5 network channels, including 3 CAN network channels, 2 Ethernet channels, and 5 network channels of other network types.
[0093] Further, the network channels of the same communication mode may be network channels with different communication transmission parameters but the same communication mode. Exemplarily, the network channels of the same communication mode may be CAN network channels with different baud rates or Ethernet channels with different rates, such as a 100M Ethernet channel and a 1000M Ethernet channel.
[0094] As a possible implementation, the communication system 10 can obtain a first message assigned to be sent in the first network channel. When the communication system 10 determines that the network status of the first network channel is abnormal, if the message type of the first message is the first type, the first message is sent through the first channel set; if the message type of the first message is the second type, the first message is sent through the second channel set.
[0095] In an embodiment of the present application, the communication system can send the first message through the first channel set or the second channel set according to the message type of the first message when the network state of the first network channel is abnormal. In this way, for unimportant messages, the message type can be set to the first type, so that at least one is selected during backup transmission, for example, only one network channel with a normal network state is selected for transmission, so as to avoid all network channels from performing backup transmission of the message, and ensure that the load rate of the network channel will not surge. For more important messages, the message type can be set to the second type, so that at least 2 are selected during backup transmission, for example, all network channels with normal network states are selected for transmission, so as to improve the success rate of message transmission. In short, users can flexibly set the message type of the message and send the message for backup. On the one hand, data loss can be prevented and the normal operation of the communication function can be guaranteed. On the other hand, the load rate of the network channel can be guaranteed not to surge, and the stability and reliability of data transmission can be improved while ensuring the redundancy of data, effectively improving the user experience.
[0096] For example, take the vehicle communication scenario as an example. Due to the continuous development of current intelligent networking and autonomous driving of automobiles, the amount of communication data in vehicle networks continues to surge, and the pressure on data communication in communication systems continues to increase. When the vehicle communication network fails and data transmission cannot be performed normally, the communication system can select a network channel with a normal network status to send a message of the first type, and select all network channels with normal network status to send a message of the second type, thereby ensuring the reliability of data transmission through the design of communication redundancy and avoiding a surge in the load rate of the network channel.
[0097] The method of the embodiment of the present application is described in detail below.
[0098] See also Figure 2 , Figure 2 is a flow chart of a communication method provided in an embodiment of the present application. Optionally, the method can be applied to a communication system, for example, the method can be applied to Figure 1 The communication system 10 is shown.
[0099] like Figure 2 The communication method shown may include multiple steps in steps S201-S204. It should be understood that for the convenience of description, the present application describes the steps S201-S204 in this order, and is not intended to limit the execution to the above order. The present application embodiment does not limit the execution order, execution time, execution number, etc. of the above one or more steps. Steps S201-S204 are as follows:
[0100] Step S201: The communication system obtains a first message.
[0101] The first message is assigned to be sent in a first network channel, and the first network channel is one of a plurality of network channels included in the communication system. Optionally, the first message assigned to be sent in the first network channel includes messages that have not been sent and messages that have been sent successfully. The messages that have not been sent can also be messages scheduled to be sent in the first network channel.
[0102] A communication system is a device that has the ability to exchange and process data. Optionally, the communication system can obtain messages, process messages, and send messages through network channels. For example, the communication system can be a controller. The communication system can include multiple network channels, which can be used to send messages outward. For more information about the communication system, see Figure 1 In some embodiments, the number of network channels included in the communication system is represented as M, where M is an integer and M≥2, that is, M=2, M=3, etc. Optionally, in some embodiments, M can also be an integer and M≥3.
[0103] Among them, the network channel is a channel or medium with data transmission capability. The communication mode of the network channel for data transmission may include one or more communication modes such as CAN, CAN-FD, Ethernet, or optical fiber. In the case where the communication system includes multiple communication modes, the communication system can transmit data through multiple communication modes, and can also transmit data through other communication modes when a certain communication mode is abnormal, which can improve the stability and reliability of data transmission and effectively improve the user experience.
[0104] Multiple network channels can be reflected in the communication system through multiple ports, where a port is an outlet for the communication system to communicate with the outside world and is used for communication. For example, a communication system may include multiple Ethernet ports or CAN ports.
[0105] Optionally, the communication modes of some of the M network channels included in the communication system may be the same. Further, the network channels with the same communication mode may be network channels with different network channel parameters but the same communication mode.
[0106] Step S202: The communication system determines that the network status of the first network channel is abnormal.
[0107] A network channel may have a variety of network states during operation, for example, its network state may be normal or abnormal, where the abnormality includes but is not limited to one or more of the abnormal conditions such as error frames, message timeouts, and bus OFF in the network channel. As a possible implementation, the communication system may monitor the network state of each of the multiple network channels to determine the network state of the network channel.
[0108] When the network status of the network channel is abnormal, the communication system needs to perform backup transmission of the message assigned to be sent in the first network channel on other network channels. When the communication system performs backup transmission, the message type of the message is related to the backup transmission mode of the message. Among them, the message type of the message can be expressed as one or more attributes of the message, and the message can be distinguished into multiple types of messages based on the attribute.
[0109] Taking the example that the message type includes the first type and the second type, as a possible implementation, the message may include a first field. When the first field takes the first value, the message type is the first type; when the first field takes the second value, the message type is the second type. Furthermore, the message type can be determined by multiple attributes, for example, by combining the values of the first field and the second field. When the first field takes the second value and the second field takes the third value, the message type is the first type. It is understandable that the first type and the second type in this application are exemplary descriptions made to distinguish different message types. In the specific implementation process, the first type can be an ordinary message, and the second type can be an important message (or a special message). Optionally, in some scenarios, the first type may include more than one type, and the second type may also include more than one type.
[0110] In combination with step S203 and step S204, the backup sending method is introduced below by taking the message type including the first type and the second type as an example.
[0111] Step S203: If the message type of the first message is the first type, the communication system sends the first message through the first channel set.
[0112] Specifically, the first message is a message assigned to be sent on the first network channel. When the network status of the first network channel is abnormal, if the message type of the first message is the first type, the first message is sent through the first channel set, and the first channel set includes at least one network channel with a normal network status among the multiple network channels included in the communication system.
[0113] For ease of understanding, several possible implementations of the first channel set are listed below:
[0114] In implementation mode 1, the first channel set includes at least one network channel with a normal network status among the multiple network channels. Figure 3A , Figure 3A Schematic diagram of a network channel provided in an embodiment of the present application. Figure 3AAs shown, the communication system includes network channels 1 to 4. When network channel 1 fails, the first channel set is at least one of the remaining three network channels with normal network status, that is, any one or any several of network channels 2 to 4 with normal network status.
[0115] In implementation mode 2, the first channel set includes network channels with the same communication mode as the first network channel. The plurality of network channels include the first network channel and at least one network channel with the same communication mode as the first network channel. Figure 3B , Figure 3B FIG. 1 is a schematic diagram of another network channel provided in an embodiment of the present application. Figure 3B As shown, the communication system includes network channels 1 to 4, wherein network channels 1 and 3 are Ethernet channels, and network channels 2 and 4 are CAN channels. When network channel 1 fails, the first channel set includes network channels with the same communication mode as the first network channel, that is, the first channel set includes Figure 3B In this way, selecting a network channel with the same communication mode for data transmission can increase the speed of data transmission and can also improve the stability and reliability of data transmission.
[0116] Furthermore, the first channel set includes all network channels among the multiple network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0117] Exemplarily, the communication system includes network channel 1-network channel 6, wherein network channel 1, network channel 3 and network channel 5 are Ethernet channels, and network channel 2, network channel 4 and network channel 6 are CAN channels. When network channel 1 fails, the first channel set includes all network channels with the same communication mode as the first network channel, that is, the first channel set includes network channel 3 and network channel 5.
[0118] In implementation mode 3, the first channel set includes the network channel with the highest priority among the network channels with normal network status among the multiple network channels. Optionally, the communication system may prioritize each of the multiple network channels, and the network channel with the highest priority may be the network channel with the highest bit rate or the highest transmission rate among the network channels with the same communication mode as the first network channel. Figure 3C , Figure 3C FIG. 1 is a schematic diagram of another network channel provided in an embodiment of the present application. Figure 3CAs shown, the communication system includes network channels 1 to 4, wherein network channels 1 to 3 are Ethernet channels, and network channel 4 is a CAN channel. When network channel 1 (i.e., a 100M Ethernet channel) fails, network channels 2 to 4 are in normal state. The first channel set includes the network channel with the highest priority among network channels 2 to 4, for example, the network channel with a higher transmission rate among network channel 2 (i.e., a 300M Ethernet channel) and network channel 3 (i.e., a 1000M Ethernet channel). Therefore, the first channel set includes Figure 3C Network channel 3 (that is, the 1000M Ethernet channel) in.
[0119] The priority is a parameter used by the communication system to determine the priority of data transmission through one or more network channels among multiple network channels. When sending data in a backup mode, a network channel with a high priority can be selected for backup sending. Optionally, the priority of a network channel can be preset by a user or determined according to network channel parameters.
[0120] Exemplarily, for ease of understanding, Table 1 shows a priority table of multiple possible network channels.
[0121] Table 1 Priority table of multiple network channels
[0122] Network Channel Communication Transfer rate Priority Network channel 1 Ethernet 100M 4 Network Channel 2 Ethernet 600M 2 Network channel 3 Ethernet 300M 3 Network Channel 4 Ethernet 1000M 1
[0123] As shown in Table 1, the priority order of network channels is 1, 2...n, and the priority of network channel 1 is 4, the priority of network channel 2 is 2, the priority of network channel 3 is 3, and the priority of network channel 4 is 1, wherein network channel 4 has the highest priority. Exemplarily, when network channel 1 fails, and the network communication status of network channels 2, 3, and 4 are all normal, since network channel 4 has the highest priority, the first message can be sent through network channel 4.
[0124] Optionally, there may be more than one network channel with the highest priority. In this case, the first channel set includes more than one network channel with the highest priority.
[0125] In this way, by selecting the network channel with the highest priority to send the first message, the stability and reliability of data transmission can be improved, and the speed of data transmission can also be increased.
[0126] In a fourth implementation mode, the first channel set may further include a network channel with the lowest load rate among the multiple network channels. Optionally, the communication system may determine the load rate of each network channel among the multiple network channels when the network status of the first network channel is abnormal. The communication system may determine the load rate of the network channel according to one or more of the communication mode of the network channel, the number of unsent messages of the network channel, the estimated time required for the network channel to send all messages, the bit rate of the network channel, the transmission rate of the network channel, and the message delay time of the network channel. For example, see Figure 3D , Figure 3D FIG. 1 is a schematic diagram of another network channel provided in an embodiment of the present application. Figure 3D As shown, the communication system includes 5 network channels, namely network channel 1 to network channel 5. Network channel 1 is abnormal. At this time, the network status of the remaining 4 network channels are normal. Among them, the load rate of network channel 2 is 30%, the load rate of network channel 3 is 50%, the load rate of network channel 4 is 70%, and the load rate of network channel 5 is 75%. At this time, the first channel set can also include network channel 2, that is, the first channel set includes Figure 3D The communication system can send the first message through the network channel 2.
[0127] In this way, the load rate of each network channel is determined according to multiple channel parameters, and the network channel with the lowest load rate is selected to send the first message, which can improve the stability and reliability of data transmission and also improve the speed of data transmission.
[0128] It should be understood that the above-mentioned embodiments are illustrative examples, and there may be more embodiments in the specific implementation process. In addition, multiple embodiments may be combined.
[0129] Optionally, the network channels in the first channel set belong to multiple network channels, the network status of the network channels in the first channel set is normal, the network channels in the first channel set have the same communication mode as the first network channel, and the network channels in the first channel set have the lowest load rate among the network channels that meet the above conditions. In this way, when the network status of the first network channel is abnormal, a network channel with the same communication mode as the first network channel and the lowest load rate is selected to send the first message, which can better improve the stability and reliability of data transmission, and can also better improve the speed of data transmission, which can effectively improve the user experience.
[0130] As a possible implementation, the first message is a message scheduled to be sent through the first network channel at a first time, the message type of the first message is the first type, the communication system obtains a list of first messages scheduled to be sent on the network channels in the first channel set, and if there is a second message with the same content as the first message in the first message list, the communication system uses the earlier time of the original scheduled sending time of the first message and the original scheduled sending time of the second message as the time to send the second message. The communication system sends the second message through the first channel set.
[0131] Exemplarily, the communication system detects that network channel 1 is abnormal at the 6th second, and network channel 2 is normal. The first channel set includes network channel 2. The communication system obtains message 1 scheduled to be sent through network channel 1 at the 10th second. The message type of message 1 is the first type. The communication system obtains the first message list scheduled to be sent through network channel 2. For example, the first message list includes message 2, message 3, and message 4. The communication system detects that message 2 has the same content as message 1. Message 2 is scheduled to be sent through network channel 2 at the 15th second. Between the 10th second and the 15th second, the 10th second is an earlier moment. At this time, the communication system controls network channel 2 to send message 2 at the 10th second.
[0132] In another exemplary embodiment, the communication system detects that network channel 1 is abnormal at the 6th second, network channel 2 and network channel 3 are normal, and the first channel set includes network channel 2 and network channel 3. The communication system obtains message 1 scheduled to be sent through network channel 1 at the 10th second, and the message type of message 1 is the first type. The communication system obtains the first message list scheduled to be sent through the first channel set, that is, the first message list scheduled to be sent through network channel 2 and network channel 3. For example, the first message list includes message 2, message 3, and message 4, wherein the communication system detects that message 2 and message 4 have the same content as message 1, message 2 is scheduled to be sent through network channel 2 at the 15th second, and message 4 is scheduled to be sent through network channel 3 at the 8th second. Among the 10th second, the 15th second, and the 8th second, the 8th second is an earlier time. At this time, the communication system controls network channel 2 to send message 2 at the 8th second, and controls network channel 3 to send message 4 at the 8th second. That is to say, for any network channel with a normal network status, messages with the same content are not sent repeatedly.
[0133] In this way, when the message scheduled to be sent on the network channel with normal network status has the same content as the first message, it will not be sent repeatedly, which can avoid waste of resources, prevent repeated operations, and effectively improve user experience.
[0134] Step S204: If the message type of the first message is the second type, the communication system sends the first message through the second channel set.
[0135] Step S204 introduces another backup sending method. When the network status of the first network channel is abnormal, if the message type of the first message is the second type, the first message is sent through the second channel set. The second channel set includes at least two network channels with normal network status among the multiple network channels included in the communication system. Exemplarily, the number of network channels in the second channel set is represented as K, where K is an integer greater than 1. It should be noted that the number of network channels included in the first channel set is less than the number of network channels included in the second channel set.
[0136] For ease of understanding, several possible implementations of the second channel set are listed below:
[0137] In implementation mode 1, the second channel set includes at least two network channels with normal network status among the multiple network channels. For example, the second channel set includes all network channels with normal network status among the multiple network channels. For example, Figure 3A As shown, the communication system includes network channels 1 to 4. When network channel 1 fails, the second channel set includes all the remaining three network channels with normal network status, that is, the second channel set includes Figure 3A For example, the communication system includes 10 network channels, and network channel 1 is abnormal. At this time, the network status of the remaining 9 network channels are normal. At this time, the second channel set can include 2 or all of the remaining 9 network channels. In this way, the transmission success rate of the first message can be improved.
[0138] It should be noted that, in order to facilitate the explanation of the differences in the backup sending methods, K is limited to an integer greater than 1. In some possible scenarios, if the communication system only includes the first network channel and the third network channel, when the first network channel fails, all the network channels with normal network status are only one third network channel, and the second channel set includes this third network channel, that is, this solution is also applicable to the case where K=1.
[0139] In the second implementation mode, the communication mode of the network channels in the second channel set is the same as the communication mode of the first network channels.
[0140] Exemplarily, the communication system includes M network channels, at least two of the M network channels have the same communication mode as the first network channel, for example, N of the M network channels have the same communication mode as the first network channel.
[0141] Furthermore, the second channel set includes all network channels with normal network status among the N network channels, where N is an integer and N≥3.
[0142] At this time, M and N may be the same or different. When M>N, there is a network channel in the M network channels that has a different communication mode from the N network channels. For example, Figure 3C As shown, the communication system includes network channels 1 to 4, wherein network channels 1 to 3 are Ethernet channels, network channel 4 is a CAN channel, and the communication modes of network channels 1 to 3 are the same. When network channel 1 fails, the network status of network channels 2 to 4 is normal. The second channel set includes the network channels with normal network status among network channels 1 to 3, that is, the second channel set includes Figure 3C For another example, the communication system includes 10 network channels, and network channel 1 is abnormal. At this time, the network status of the remaining 9 network channels are normal, among which 3 network channels of the remaining 9 network channels have the same communication mode as network channel 1. At this time, the second channel set can include these 3 network channels with the same communication mode as network channel 1. In this way, selecting network channels with the same communication mode for data transmission can improve the speed of data transmission, and can also improve the stability and reliability of data transmission.
[0143] Further, the second channel set includes network channels with a different communication mode from the first network channel. For example, when M>N, that is, there are network channels with a different communication mode from the N network channels among the M network channels. At this time, the second channel set includes at least one network channel with a different communication mode from the first network channel, or the second channel set includes the N network channels and at least one network channel with a different communication mode from the first network channel. For example, the communication system includes 10 network channels, and network channel 1 is abnormal. At this time, the network status of the remaining 9 network channels are normal, among which 3 network channels of the remaining 9 network channels have the same communication mode as network channel 1. At this time, the second channel set can include these 3 network channels with the same communication mode as network channel 1, and / or the second channel set can include at least one network channel of the remaining 6 network channels.
[0144] In implementation mode three, the second channel set may also include network channels among the multiple network channels whose load rates are lower than the first threshold. Optionally, the communication system may determine the load rate of each network channel among the multiple network channels when the network status of the first network channel is abnormal. The communication system may determine the load rate of the network channel based on one or more of the communication mode of the network channel, the number of unsent messages of the network channel, the estimated time required for the network channel to send all messages, the bit rate of the network channel, the transmission rate of the network channel, and the message delay time of the network channel. Optionally, the first threshold is used to indicate the condition that the load rate of the network channel needs to meet. The first threshold is predefined or predefined. For example, the first threshold may be a value lower than 60%, such as 55%, 40%, etc. Exemplary, such as Figure 3D As shown, the communication system includes 5 network channels, namely network channel 1 to network channel 5, and network channel 1 is abnormal. At this time, the network status of the remaining 4 network channels are normal, among which the load rate of network channel 2 is 30%, the load rate of network channel 3 is 50%, the load rate of network channel 4 is 70%, and the load rate of network channel 5 is 75%. The first threshold is a value lower than 60%. At this time, the second channel set can include network channel 2 and network channel 3.
[0145] In this way, the load rate of each network channel is determined according to multiple influencing factors, and a network channel with a load rate lower than a first threshold is selected to send the first message, which can improve the stability and reliability of data transmission and also improve the speed of data transmission.
[0146] It should be understood that the above-mentioned embodiments are illustrative examples, and there may be more embodiments in the specific implementation process. In addition, multiple embodiments may be combined.
[0147] Optionally, the network channels in the second channel set belong to multiple network channels, the network status of the network channels in the second channel set is normal, the network channels in the second channel set have the same communication mode as the first network channel, and the network channels in the second channel set are network channels whose load rate is lower than the first threshold among the network channels that meet the above conditions. In this way, when the network status of the first network channel is abnormal, a network channel having the same communication mode as the first network channel and a load rate lower than the first threshold is selected to send the first message, which can better improve the stability and reliability of data transmission, and can also better improve the speed of data transmission, which can effectively improve the user experience.
[0148] As a possible implementation, the first message is a message scheduled to be sent through the first network channel at a first time, the message type of the first message is the second type, the communication system obtains a list of second messages scheduled to be sent on the network channel in the second channel set, and if there is a third message with the same content as the first message in the second message list, the communication system uses the earlier time of the original scheduled sending time of the first message and the original scheduled sending time of the third message as the time to send the third message. The communication system sends the third message through the second channel set.
[0149] Exemplarily, the communication system includes 4 network channels. The communication system detects that network channel 1 is abnormal at the 6th second, and network channel 2, network channel 3, and network channel 4 are normal. The communication system obtains message 1 scheduled to be sent through network channel 1 at the 10th second. The message type of message 1 is the second type. The communication system obtains a second message list scheduled to be sent through network channel 2, network channel 3, and network channel 4. For example, the second message list includes 10 messages, namely message 2, message 3, message 4, and message 5. Among them, the communication system detects that message 4 has the same content as message 1, and message 4 is scheduled to be sent through network channel 3 at the 8th second. Between the 8th second and the 10th second, the 8th second is an earlier moment. At this time, the communication system controls network channel 3 to send message 4 at the 8th second.
[0150] In another exemplary embodiment, the communication system detects that the network channel 1 is abnormal at the 6th second, and the network channel 2 and the network channel 3 are normal. The first channel set includes the network channel 2 and the network channel 3. The communication system obtains the message 1 scheduled to be sent through the network channel 1 at the 10th second, and the message type of the message 1 is the first type. The communication system obtains the second message list scheduled to be sent through the network channel 2, the network channel 3 and the network channel 4. For example, the second message list includes 10 messages such as message 2, message 3, message 4, and message 5. Among them, the communication system detects that the content of message 4 and message 6 is the same as that of message 1. Message 4 is scheduled to be sent through the network channel 3 at the 8th second, and message 6 is scheduled to be sent through the network channel 4 at the 12th second. Among the 8th second, the 10th second and the 12th second, the 8th second is an earlier time. At this time, the communication system controls the network channel 3 to send the message 4 at the 8th second, and controls the network channel 4 to send the message 6 at the 8th second. That is to say, for any network channel with a normal network status, messages with the same content are not sent repeatedly.
[0151] In this way, when the message scheduled to be sent on the network channel with normal network status has the same content as the first message, it will not be sent repeatedly, which can avoid waste of resources, prevent repeated operations, and effectively improve user experience.
[0152] As a possible implementation method, when M=2, in the event of an abnormality in network channel 1, regardless of whether the first message is of the first type or the second type, the communication system will back up and send the first message through network channel 2. At this time, the network channels selected by the two backup methods of the communication system for the first message of the first type and the first message of the second type are the same, but the selection logic corresponding to the two backup methods is different.
[0153] exist Figure 2 In the illustrated embodiment, the communication system can send the first message through the first channel set or the second channel set according to the message type of the first message when the network state of the first network channel is abnormal. In this way, for unimportant messages, the message type can be set to the first type, so that at least one is selected during backup transmission, for example, only one network channel with a normal network state is selected for transmission, so as to avoid all network channels from performing backup transmission of the message, and ensure that the load rate of the network channel will not surge. For more important messages, the message type can be set to the second type, so that at least two are selected during backup transmission, for example, all network channels with normal network states are selected for transmission, so as to improve the success rate of message transmission. In short, the user can flexibly set the message type of the message and send the message for backup transmission, which can prevent data loss and ensure the normal operation of the communication function on the one hand, and ensure that the load rate of the network channel will not surge on the other hand, and improve the stability and reliability of data transmission while ensuring the redundancy of data, and effectively improve the user experience.
[0154] above Figure 2 The embodiment shown includes multiple possible solutions. For ease of understanding, one possible solution is described below. It should be understood that Figure 4 For some of the terms, logic, etc. in the scheme shown, please refer to Figure 2 The embodiment shown.
[0155] See also Figure 4 , Figure 4 1 is a flow chart of another communication method provided in an embodiment of the present application. The method comprises the following steps:
[0156] S1: The communication system divides the message types of the messages to be sent out into a first type and a second type.
[0157] The first type is different from the second type. Optionally, the second type may be a message of higher importance or a message selected by a user.
[0158] S2: The communication system determines the priorities of multiple network channels included in the communication system.
[0159] In some embodiments, the communication system may include M network channels, where M is an integer and M≥2, that is, M=2, M=3, etc. Optionally, in some embodiments, M may also be an integer and M≥3.
[0160] Optionally, the communication system may determine the priority of the network channel based on one or more of the communication mode of the network channel, the number of unsent messages of the network channel, the time expected to be required for the network channel to send all messages, the bit rate of the network channel, the transmission rate of the network channel, and the message delay duration of the network channel.
[0161] S3: The communication system monitors the network status of each network channel in real time.
[0162] When the network status of the network channel is normal, step S4 is executed; when the network status of the network channel is abnormal, step S5 is executed.
[0163] The abnormal network status includes one or more of abnormal conditions such as error frames, message timeouts, and bus OFF in multiple network channels.
[0164] S4: The communication system sends a message through a logic control network channel according to a predetermined normal state.
[0165] S5: The communication system sends a message according to an abnormal state. If the message type of the message is the first type, the message is sent through a network channel with the highest priority that is of the same type as the network channel and has a normal network state; if the message type of the message is the second type, the message is sent through multiple network channels of the same type as the network channel and have a normal network state.
[0166] The network channels of the same type may be network channels with the same communication mode.
[0167] exist Figure 4 In the illustrated embodiment, the communication system can classify the message types of the messages to be sent out into the first type and the second type, and determine the priorities of the multiple network channels included in the communication system. The communication system can monitor the network status of each network channel in real time. When the network status is normal, the message is sent according to the predetermined normal status sending logic. When the network status is abnormal, the message is sent according to the abnormal status. If the message type of the message is the first type, the message is sent through the network channel with the highest priority and the same network status as the communication mode of the network channel. If the message type of the message is the second type, the message is sent through multiple network channels with the same network status as the communication mode of the network channel. In this way, the first message can be sent as a backup to prevent data loss, ensure the normal operation of the communication function, and ensure that the load rate of the network channel will not surge. While ensuring the redundancy of the data, the stability and reliability of data transmission can be improved, effectively improving the user experience.
[0168] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0169] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a processing device provided in an embodiment of the present application. The processing device 50 may include an acquisition unit 501 and a processing unit 502. The processing device 50 is used to implement the aforementioned communication method, for example Figure 2 , Figure 4 The communication method in the illustrated embodiment.
[0170] It should be noted that the division of the above multiple units is only a logical division based on functions, and does not limit the specific structure of the processing device 50. In a specific implementation, some functional modules may be subdivided into more small functional modules, and some functional modules may be combined into one functional module.
[0171] In a possible implementation, the processing device is included in a communication system, the communication system includes N network channels, N is an integer and N≥3,
[0172] An acquiring unit 501 is configured to acquire a first message, where the first message is assigned to be sent in a first network channel, and the first network channel is one of the N network channels;
[0173] The processing unit 502 is used for:
[0174] Determining that a network status of the first network channel is abnormal;
[0175] If the message type of the first message is the first type, sending the first message through a first channel set, where the first channel set includes at least one network channel of the N network channels whose network status is normal;
[0176] If the message type of the first message is the second type, the first message is sent through the second channel set, the second channel set includes at least 2 network channels with normal network status among N network channels, and the number of network channels included in the first channel set is less than the number of networks included in the second channel set.
[0177] In a possible implementation manner, the first type is a common message, and the second type is an important message.
[0178] In a possible implementation, the N network channels include a first network channel and at least one network channel having the same communication mode as the first network channel, and the communication mode of the network channels in the first channel set is the same as the communication mode of the first network channel.
[0179] In a possible implementation, the first channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0180] In a possible implementation manner, the network channel in the first channel set is the network channel with the highest priority among the N network channels.
[0181] In a possible implementation manner, the network channel with the highest priority includes a network channel with the highest bit rate or the highest transmission rate among network channels with the same communication mode as the first network channel.
[0182] In a possible implementation, at least two of the N network channels have the same communication mode as the first network channel, and the communication mode of the network channels in the second channel set is the same as the communication mode of the first network channel.
[0183] And / or, the N network channels include a network channel having a communication mode different from that of the first network channel, and the second channel set includes the network channels among the N network channels having a communication mode different from that of the first network channel.
[0184] In a possible implementation, the second channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
[0185] In a possible implementation, the N network channels include a network channel having a communication mode different from that of the first network channel.
[0186] The second channel set further includes at least one network channel among the N network channels whose network status is normal and whose communication mode is different from that of the first network channel.
[0187] In a possible implementation, the communication mode of the first network channel is one of CAN communication, CAN-FD communication, Ethernet communication and optical fiber communication.
[0188] In a possible implementation manner, the abnormal network status includes one or more of the following: error frames occurring in the N network channels, message timeout, and bus OFF.
[0189] In a possible implementation, the acquisition unit 501 is further configured to acquire a message list scheduled to be sent on a network channel in the first channel set;
[0190] The processing unit 502 is also used to send the second message through the first channel set using the earlier of the originally scheduled sending time of the first message and the originally scheduled sending time of the second message as the sending time of the second message if there is a second message with the same content as the first message in the message list.
[0191] In a possible implementation, the acquisition unit 501 is further configured to acquire a message list scheduled to be sent on a network channel in the second channel set;
[0192] The processing unit 502 is also used to send the third message through the second channel set using the earlier of the original scheduled sending time of the first message and the original scheduled sending time of the third message as the sending time of the third message when there is a third message with the same content as the first message in the message list.
[0193] In a possible implementation, the processing unit 502 is further configured to determine, when the network state of the first network channel is abnormal, a load rate of each network channel in the N network channels, where the load rate is determined according to one or more of a communication mode of the network channel, a number of unsent messages of the network channel, a time length expected for the network channel to send all messages, a bit rate of the network channel, a transmission rate of the network channel, and a message delay time length of the network channel;
[0194] The second network channel is the network channel with the lowest load rate among the N network channels, and the plurality of third network channels are the network channels with load rates lower than a first threshold among the N network channels. The first threshold is predefined or pre-set.
[0195] It should be noted that the above-mentioned units (acquisition unit 501 and processing unit 502) are used to execute the relevant steps of the above-mentioned method. For example, acquisition unit 501 is used to execute the relevant content of step S201, and processing unit 502 is used to execute the relevant content of S202-S204.
[0196] Figure 6 The figure shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device is a device with processing capabilities, where the device can be a physical device, such as a server (such as a rack server), a host, etc., or a virtual device, such as a virtual machine, a container, etc.
[0197] like Figure 6 As shown, the electronic device 60 includes: a processor 601, a memory 602, and one or more programs, and may include a communication interface 603. It should be understood that the present application does not limit the number of processors and memories in the electronic device 60.
[0198] The processor 601 is a module for performing calculations, and may include a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), a digital signal processor (DSP), a microcontroller unit (MCU), or one or more integrated circuits for controlling the execution of the above program.
[0199] The memory 602 is used to provide a storage space, and the storage space can optionally store application data, user data, operating system, computer programs, etc. The memory 602 may include a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, and may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0200] The memory 602 may exist independently and be connected to the processor 601 via a bus. The memory 602 may also be integrated with the processor 601 .
[0201] The communication interface 603 is used to provide information input or output for the at least one processor. And / or, the communication interface 603 can be used to receive data sent externally and / or send data to the outside. The communication interface 603 can be a wired link interface including an Ethernet cable, etc., or a wireless link (Wi-Fi, Bluetooth, general wireless transmission and other wireless communication technologies, etc.) interface. Optionally, the communication interface 603 can also include a transmitter (such as a radio frequency transmitter, an antenna, etc.) coupled to the interface, or a receiver, etc.
[0202] In the embodiment of the present application, the one or more programs are stored in the memory 602 in the form of program codes and are configured to be executed by the processor 601. The programs include instructions for implementing the steps in the aforementioned communication method. Figure 2 , Figure 4 That is, the memory 602 stores executable instructions, and the processor 601 executes the executable instructions to implement the aforementioned communication method, for example Figure 2 , Figure 4 That is, the memory 602 stores instructions for executing the communication method.
[0203] Alternatively, the memory 602 stores executable instructions, and the processor 601 executes the executable instructions to respectively implement the functions of one or more units (or devices) in the aforementioned acquisition unit and processing unit, thereby realizing the communication method.
[0204] The embodiment of the present application further provides a vehicle, the vehicle comprising the aforementioned processing device or the aforementioned electronic device, so that the vehicle implements the aforementioned communication method, for example Figure 2 , Figure 4 The communication method in the embodiment of the present invention.
[0205] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. The computer program instructions are used to implement the aforementioned communication method, for example Figure 2 , Figure 4 The communication method in the embodiment of the present invention.
[0206] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium includes instructions, and the instructions are used to implement the aforementioned communication method, for example Figure 2 , Figure 4 The communication method in the embodiment of the present invention.
[0207] The computer-readable storage medium may be any available medium that can be stored in an electronic device, or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
[0208] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0209] The "at least one" mentioned in the embodiments of the present application refers to one or more, and "plurality" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0210] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" used in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first channel set and the second channel set are only for the convenience of description, and do not indicate the difference in the deployment order, importance, etc. of the first channel set and the second channel set.
[0211] Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0212] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A communication method, It is characterized in that Applied to a communication system, the communication system includes N network channels, N is an integer and N≥3, the method includes: Acquire a first message, where the first message is assigned to be sent in a first network channel, and the first network channel is one of the N network channels; Determining that a network status of the first network channel is abnormal; If the message type of the first message is the first type, sending the first message through a first channel set, where the first channel set includes at least one network channel of the N network channels whose network status is normal; If the message type of the first message is the second type, the first message is sent through a second channel set, the second channel set includes at least 2 network channels with normal network status among the N network channels, and the number of network channels included in the first channel set is less than the number of network channels included in the second channel set.
2. The method according to claim 1, It is characterized in that The N network channels include the first network channel and at least one network channel having the same communication mode as the first network channel, and the communication mode of the network channels in the first channel set is the same as the communication mode of the first network channel.
3. The method according to claim 2, It is characterized in that The first channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
4. The method according to claim 1 or 2, It is characterized in that The network channel in the first channel set is the network channel with the highest priority among the N network channels.
5. The method according to claim 1 or 2, It is characterized in that The communication mode of at least two network channels among the N network channels is the same as that of the first network channel, and the communication mode of the network channels in the second channel set is the same as that of the first network channel. And / or, the N network channels include a network channel having a communication mode different from that of the first network channel, and the second channel set includes the network channels among the N network channels having a communication mode different from that of the first network channel.
6. The method according to claim 1, It is characterized in that The second channel set includes all network channels among the N network channels whose network status is normal and whose communication mode is the same as that of the first network channel.
7. The method according to claim 6, It is characterized in that The N network channels include a network channel having a communication mode different from that of the first network channel, The second channel set further includes at least one network channel among the N network channels whose network status is normal and whose communication mode is different from that of the first network channel.
8. The method according to any one of claims 1 to 7, It is characterized in that The communication mode of the first network channel is one of CAN communication, CAN-FD communication, Ethernet communication and optical fiber communication.
9. The method according to any one of claims 1 to 8, It is characterized in that The abnormal network status includes one or more of error frames, message timeout and bus OFF in the N network channels.
10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: Obtaining a list of messages scheduled to be sent on the network channels in the first channel set; The sending the first message through the first channel set includes: If there is a second message with the same content as the first message in the message list, the earlier time between the original scheduled sending time of the first message and the original scheduled sending time of the second message is used as the time for sending the second message, and the second message is sent through the first channel set.
11. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: Obtaining a list of messages scheduled to be sent on the network channel in the second channel set; The sending the first message through the second channel set includes: When there is a third message with the same content as the first message in the message list, the earlier time between the original scheduled sending time of the first message and the original scheduled sending time of the third message is used as the time for sending the third message, and the third message is sent through the second channel set.
12. A processing device, It is characterized in that The processing device is included in a communication system, the communication system includes N network channels, N is an integer and N≥3, the processing device includes an acquisition unit and a processing unit, The acquiring unit is used to acquire a first message, where the first message is assigned to be sent in a first network channel, and the first network channel is one of the N network channels; The processing unit is used for: Determining that a network status of the first network channel is abnormal; If the message type of the first message is the first type, sending the first message through a first channel set, where the first channel set includes at least one network channel whose network status is normal among the N network channels; If the message type of the first message is the second type, the first message is sent through a second channel set, the second channel set includes at least 2 network channels with normal network status among the N network channels, and the number of network channels included in the first channel set is less than the number of networks included in the second channel set.
13. An electronic device, It is characterized in that The electronic device comprises a processor and a memory, wherein a program is stored in the memory, and the program comprises instructions for executing the method according to any one of claims 1-11.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store a computer program, wherein the computer program includes instructions for executing the method according to any one of claims 1 to 11.
15. A vehicle, It is characterized in that The vehicle comprises the processing device of claim 12 or the electronic device of claim 13 .