Communication method, device, network system, vehicle, and computer storage medium
By combining scheduling and contention access strategies in the in-vehicle communication network and selecting the appropriate access method according to the signal type, the problems of high latency and packet loss rate of existing signal access methods under high load are solved, and efficient signal transmission is achieved.
Patent Information
- Application Number
- PCT/CN2025/078900
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-02-24
- Publication Date
- 2026-01-02
AI Technical Summary
In existing in-vehicle communication networks, contention-based signal access methods experience significant increases in latency and packet loss rates under dense network and high load conditions. Meanwhile, scheduling-based access methods are not flexible enough and cannot meet the transmission needs of highly latency-sensitive and urgent data.
A combination of scheduling access strategy and contention access strategy is adopted, and the access method is selected according to the signal type: periodic signals use scheduling access, and event-type signals use contention access. Signal transmission is processed by preset access order and priority to reduce collisions and improve transmission efficiency.
It reduced bus load, decreased data packet loss rate, met the needs of emergency data transmission, and improved the reliability and accuracy of signal transmission.
Smart Images

Figure CN2025078900_02012026_PF_FP_ABST
Abstract
Description
Communication method, apparatus, network system, vehicle and computer storage medium
[0001] Cross-reference to related applications
[0002] The present application claims priority to the Chinese patent application No. 202410869011.7, filed on June 28, 2024, and entitled "Communication method, apparatus, network system, vehicle and computer storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present disclosure relates to the technical field of communication, and in particular to a communication method, apparatus, network system, vehicle and computer storage medium. BACKGROUND
[0004] With the continuous development of mobile Internet, cloud computing and intelligent driving technologies, intelligent connected vehicles are becoming the future trend of the development of the automotive industry in the new era. The development of intelligent connected vehicles has led to a doubling of the number of ECUs (Electronic Control Units), which has put higher requirements on the transmission, processing and application capabilities of vehicle data, and has brought more challenges to the development of in-vehicle communication networks.
[0005] In related technologies, in the in-vehicle network dominated by CAN, LIN and Ethernet, a single node signal access method is usually used, such as a contention-based access method or a scheduling-based access method. However, the contention-based signal access method has a large increase in latency and an increase in packet loss rate in dense networks and high-load situations, which cannot meet the needs of modules with high sensitivity to latency; and the scheduling-based access method can only rely on fixed sequences for data transmission, which is not flexible enough to meet the transmission needs of emergency data.
[0006] DISCLOSURE
[0007] The technical problem to be solved by the present disclosure is to provide a communication method, apparatus, network system, vehicle and computer storage medium, which can help to improve the awareness of returning recyclable containers, and thus can reduce the pollution to the environment caused by the random disposal or untimely recycling of containers.
[0008] To solve the above technical problems, the first aspect of the present disclosure discloses a communication method for a communication network, the communication network comprising a plurality of nodes, the plurality of nodes being in communication through a bus, the method comprising: when a first node needs to access the bus to transmit a first signal, if the first signal is a periodic signal, accessing the first node to the bus to transmit the first signal based on a scheduled access strategy, and / or, if the first signal is an event signal, accessing the first node to the bus to transmit the first signal based on a contention access strategy.
[0009] As an optional implementation, in the first aspect of the present disclosure, before the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy, the method further comprises: when an access request sent by a second node about a second signal is received and the second signal is an event signal, accessing the second node to the bus to transmit the second signal based on the contention access strategy; and after the transmission of the second signal is completed, performing the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy again.
[0010] As an optional implementation, in the first aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy comprises: accessing the first node to the bus to transmit the first signal according to a preset access order corresponding to the first signal and a preset access time length corresponding to the first signal.
[0011] As an optional implementation, in the first aspect of the present disclosure, the preset access order is determined based on a priority corresponding to the first signal and / or a transmission period corresponding to the first signal, and / or the preset access time length is determined based on a preset data amount corresponding to the first signal.
[0012] As an optional implementation, in the first aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy is performed only when the bus is in an idle state.
[0013] As an optional implementation, in the first aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy comprises: accessing the first node to the bus to transmit the first signal according to a priority corresponding to the first signal.
[0014] As an optional implementation, in the first aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy is performed only when the bus is in an idle state.
[0015] As an optional implementation, in the first aspect of the present disclosure, the method further comprises: if the bus is in the non-idle state, counting based on a backoff counter, and when a counting result of the backoff counter meets a preset counting condition, accessing the first node to the bus to transmit the first signal.
[0016] As an optional implementation, in the first aspect of the present disclosure, the backoff counter starts counting after the bus enters an idle state from the non-idle state.
[0017] As an optional implementation, in the first aspect of the present disclosure, the counting result includes a counting duration, and the preset counting condition includes that the counting duration reaches a preset counting duration; and / or, the counting result includes a counting number, and the preset counting condition includes that the counting number reaches a preset counting number.
[0018] The second aspect of the present disclosure discloses an electronic device for a communication network, the communication network comprising a plurality of nodes, the plurality of nodes communicating through a bus, the electronic device comprising: an access module, configured to, when a first node needs to access the bus to transmit a first signal, if the first signal is a periodic signal, access the first node to the bus to transmit the first signal based on a scheduled access strategy, and / or, if the first signal is an event signal, access the first node to the bus to transmit the first signal based on a contention access strategy.
[0019] As an optional implementation, in the second aspect of the present disclosure, the access module is further configured to, before accessing the first node to the bus to transmit the first signal based on the scheduled access strategy, when a second node needs to access the bus to transmit a second signal and the second signal is an event signal, access the second node to the bus to transmit the second signal based on the contention access strategy; and after the transmission of the second signal is completed, perform the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy.
[0020] As an optional implementation, in the second aspect of the present disclosure, the specific way in which the access module accesses the first node to the bus to transmit the first signal based on the scheduled access strategy comprises: accessing the first node to the bus to transmit the first signal according to a preset access order corresponding to the first signal and a preset access duration corresponding to the first signal.
[0021] As an optional implementation, in the second aspect of the present disclosure, the preset access sequence is determined based on a priority corresponding to the first signal and / or a transmission period corresponding to the first signal, and / or, the preset access duration is determined based on a preset data amount corresponding to the first signal.
[0022] As an optional implementation, in the second aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy is performed by the access module when the bus is in an idle state.
[0023] As an optional implementation, in the second aspect of the present disclosure, the specific manner of accessing the first node to the bus to transmit the first signal based on the contention access strategy comprises: accessing the first node to the bus to transmit the first signal according to a priority corresponding to the first signal.
[0024] As an optional implementation, in the second aspect of the present disclosure, the operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy is performed by the access module when the bus is in an idle state.
[0025] As an optional implementation, in the second aspect of the present disclosure, the electronic device further comprises a counting module, configured to count based on a backoff counter when the bus is in a non-idle state.
[0026] The access module is further configured to access the first node to the bus to transmit the first signal when a counting result of the backoff counter meets a preset counting condition.
[0027] As an optional implementation, in the second aspect of the present disclosure, the backoff counter starts counting after the bus enters an idle state.
[0028] As an optional implementation, in the second aspect of the present disclosure, the counting result comprises a counting duration, and the preset counting condition comprises that the counting duration reaches a preset counting duration; and / or, the counting result comprises a counting number, and the preset counting condition comprises that the counting number reaches a preset counting number.
[0029] The third aspect of the present disclosure discloses another electronic device, which comprises a processor coupled with a memory.
[0030] The processor invokes the executable program code stored in the memory to perform the communication method disclosed in the first aspect of the present disclosure.
[0031] The fourth aspect of the present disclosure discloses a network system, the network system comprising a communication network, the network system further comprising the electronic device of the second aspect of the present disclosure or the third aspect of the present disclosure.
[0032] The fifth aspect of the present disclosure discloses a vehicle, the vehicle comprising the electronic device of the second aspect of the present disclosure or the third aspect of the present disclosure, or the vehicle comprising the network system of the fourth aspect of the present disclosure.
[0033] The fourth aspect of the present disclosure discloses a computer storage medium, the computer storage medium storing computer instructions, the computer instructions being invoked to execute the communication method of the first aspect of the present disclosure.
[0034] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects:
[0035] The embodiments of the present disclosure are used for a communication network, the communication network comprising a plurality of nodes, the plurality of nodes communicating through a bus, when a first node needs to access the bus to transmit a first signal, if the first signal is a periodic signal, the first node is accessed to the bus to transmit the first signal based on a scheduling access strategy, and / or, if the first signal is an event signal, the first node is accessed to the bus to transmit the first signal based on a contention access strategy. It can be seen that, by implementing the present disclosure, the periodic signal is accessed to the bus based on the scheduling access strategy. It can be seen that, by implementing the present disclosure, the scheduling access strategy and the contention access strategy are combined, when the node needs to send the periodic signal, the bus is accessed based on the scheduling access strategy, when the node needs to send the event signal, the bus is accessed based on the contention access strategy; due to the periodic transmission characteristics of the periodic signal, the scheduling access strategy can reduce the occurrence of conflicts between the periodic signals and between the periodic signals and the event signals, thereby reducing the bus load and reducing the data packet loss rate, while the event signal trigger time has uncertainty, the contention access mode can make up for the inflexibility of the scheduling access strategy, and meet the transmission demand of emergency data. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.
[0037] FIG. 1 is a schematic diagram of the architecture of a communication network disclosed by the embodiments of the present disclosure;
[0038] FIG. 2 is a flowchart of a communication method disclosed by the embodiments of the present disclosure;
[0039] FIG. 3 is a flow diagram of another communication method according to embodiments of the present disclosure;
[0040] FIG. 4 is a flow diagram of a scheduling access procedure according to embodiments of the present disclosure;
[0041] FIG. 5 is a diagram of a transmission time slot of a periodic signal according to embodiments of the present disclosure;
[0042] FIG. 6 is a flow diagram of a contention access procedure according to embodiments of the present disclosure;
[0043] FIG. 7 is a diagram of an electronic device according to embodiments of the present disclosure;
[0044] FIG. 8 is a diagram of another electronic device according to embodiments of the present disclosure;
[0045] FIG. 9 is a diagram of a network system according to embodiments of the present disclosure;
[0046] FIG. 10 is a diagram of a vehicle according to embodiments of the present disclosure;
[0047] FIG. 11 is a diagram of another vehicle according to embodiments of the present disclosure.
[0048] Reference signs: 600, electronic device; 601, processor; 602, memory; 501, counting module; 502, access module; 701, network system; 702, communication network; vehicle, 800. DETAILED DESCRIPTION
[0049] In order to make the personnel in the art better understand the present disclosure, the technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present disclosure.
[0050] The terms "first" and "second" and the like in the specification and claims of the present disclosure and the above drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or the like that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed or can optionally include other steps or units inherent to such processes, methods, products, or the like.
[0051] Reference to“an embodiment” herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the disclosure. The appearances of the phrase“in an embodiment” in various places in the specification are not necessarily referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that any of the embodiments described herein can be combined with any of the other embodiments.
[0052] The disclosure discloses a communication method, device, network system, vehicle and computer storage medium, which can combine the scheduling access strategy and the contention access strategy, when the node needs to send the periodic signal, then access the bus based on the scheduling access strategy, when the node needs to send the event signal, then access the bus based on the contention access strategy; due to the periodic transmission characteristics of the periodic signal, the scheduling access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event signals, thereby reducing the bus load and reducing the data packet loss rate, while the event signal trigger time has uncertainty, the contention access mode can make up for the inflexibility of the scheduling access strategy, and meet the transmission demand of emergency data. The following will be described in detail.
[0053] In order to better understand the disclosure, the application scenario of the disclosure will be described below.
[0054] As shown in FIG. 1, the disclosure can be applied to a communication network, which can include a plurality of nodes, and the plurality of nodes can communicate through a bus. The communication network can be applied to various scenarios of multi-device communication, such as a vehicle-mounted communication scenario, a whole-house intelligent control scenario, and a logistics communication scenario, etc., and the disclosure embodiments are not limited thereto.
[0055] Taking a vehicle-mounted communication scenario as an example, a vehicle-mounted communication network can be constructed in an EEA (Electrical / Electronic Architecture) architecture. Under the EEA architecture, each ECU (Electronic Control Unit) node, domain controller, and central control platform are used as carriers to enable information sharing and control collaboration among the ECU nodes. Optionally, the vehicle-mounted communication network can be a CAN (Controller Area Network), a LIN (Local Interconnect Network), or an Ethernet, etc. Optionally, the vehicle-mounted communication network can use an OSI (Open System Interconnect) model. The MAC (Media Access Control) layer in the OSI model is used to connect each ECU node to the vehicle-mounted communication network. The MAC layer can connect the ECU nodes to the vehicle-mounted communication network based on a scheduling access strategy or a contention access strategy.
[0056] Embodiment One
[0057] Referring to FIG. 2, FIG. 2 is a flowchart of a communication method according to an embodiment of the present disclosure. The communication method described in FIG. 2 can be applied to a communication network, which can include a plurality of nodes that can communicate through a bus. As shown in FIG. 2, the communication method can include the following operation: 101, when a first node needs to access the bus to transmit a first signal, if the first signal is a periodic signal, the first node is connected to the bus to transmit the first signal based on a scheduling access strategy, and / or if the first signal is an event-type signal, the first node is connected to the bus to transmit the first signal based on a contention access strategy.
[0058] Taking FIG. 1 as an example, there are 7 nodes on the bus that need to send signals, of which node 1, node 2, and node 3 transmit periodic signals, and the remaining node 4, node 5, node 6, and node 7 transmit event-type signals. Therefore, when node 1, node 2, and node 3 need to send periodic signals, node 1, node 2, and node 3 are connected to the bus to transmit the corresponding periodic signals based on a scheduling access strategy; when node 4, node 5, node 6, and node 7 need to send event-type signals, node 4, node 5, node 6, and node 7 are connected to the bus to transmit the corresponding event-type signals based on a contention access strategy.
[0059] It can be seen that, by implementing the embodiments of the present disclosure, when the node needs to send a periodic signal, the node accesses the bus based on the scheduled access strategy; when the node needs to send an event signal, the node accesses the bus based on the contention access strategy. Due to the periodic transmission characteristics of the periodic signal, the use of the scheduled access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event signals, thereby reducing the bus load and reducing the data packet loss rate. The event signal trigger time has uncertainty, and the use of the contention access method can make up for the inflexibility of the scheduled access strategy, and meet the transmission requirements of emergency data.
[0060] Optionally, as shown in FIG. 1, the first signal includes identification information (such as ID in FIG. 1) for indicating a signal type of the first signal and data to be transmitted in the first signal. The identification information can be used to distinguish whether the first signal is a periodic signal or an event signal. The periodic signal is transmitted according to a set period, and the event signal is transmitted when there is a related event trigger. The frame type of the first signal is related to the communication protocol of the communication network. Taking the CAN protocol as an example, the frame type of the CAN message, that is, the first signal, can include a data frame type. Optionally, the frame type of the CAN message can also include one or more of a remote frame type, an error frame type, and an overload frame type. The CAN message with the frame type of the data frame type includes an arbitration field and a data field. Optionally, the CAN message with the frame type of the data frame type can also include a frame start and a control field. The arbitration field includes the identification information ID, and the data field includes the data data to be transmitted. Optionally, the arbitration field can also include a remote transmission request. The identification information is used to identify the content of the CAN message, such as the signal type of the CAN message. It can be seen that the identification information can facilitate the convenience of identifying the signal type of the signal sent by the node.
[0061] Optionally, the scheduled access strategy can be a TDMA (Time division multiple access) access strategy, and / or the contention access strategy can be a CSMA / CA (Carrier Sense Multiple Access With Collision Avoidance) access strategy.
[0062] Optionally, the operation of accessing the bus by the first node based on the scheduled access strategy to transmit the first signal is performed only when the bus is in an idle state. In this way, the occurrence of conflicts caused by multiple node accesses can be reduced.
[0063] Further, if the first signal is a periodic signal, the bus is monitored until the bus enters an idle state, and then the first node is accessed to the bus to transmit the first signal based on the scheduled access strategy, which ensures that the periodic signal can be transmitted when the bus is busy, and reduces the packet loss rate.
[0064] As an optional embodiment, the first node is accessed to the bus to transmit the first signal based on the scheduled access strategy can include: the first node is accessed to the bus to transmit the first signal according to the preset access order corresponding to the first signal and the preset access time length corresponding to the first signal.
[0065] It can be seen that when the node needs to transmit a periodic signal, the node is accessed to the bus according to the preset access order and the preset access time length, so that the periodic signal is transmitted in order, the conflict of node access is reduced, and the reliability and accuracy of signal transmission are improved.
[0066] Optionally, the preset access order is determined based on the priority corresponding to the first signal and / or the transmission period corresponding to the first signal, and / or the preset access time length is determined based on the preset data amount corresponding to the first signal. This can improve the transmission efficiency of signals with high priority, and match the transmission period of the periodic signal with its trigger period, and ensure sufficient time to transmit the signal, further improving the accuracy and reliability of signal transmission.
[0067] In an optional embodiment, before the first node is accessed to the bus to transmit the first signal based on the scheduled access strategy, the method can further include: when the second node needs to access the bus to transmit the second signal and the second signal is an event signal, the second node is accessed to the bus to transmit the second signal based on the contention access strategy; and after the second signal is transmitted, the first node is accessed to the bus to transmit the first signal based on the scheduled access strategy.
[0068] It can be seen that implementing this optional embodiment can prioritize the node corresponding to the competitive signal when the periodic signal and the competitive signal conflict in transmission, thereby preferentially transmitting the competitive signal, thereby improving the timeliness of event signal transmission.
[0069] Optionally, the operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy is performed only when the bus is in an idle state. This can reduce the occurrence of access conflicts caused by multiple nodes accessing the bus at the same time.
[0070] As another optional implementation, the accessing the bus by the first node to transmit the first signal based on the contention access strategy can comprise: accessing the bus by the first node to transmit the first signal according to the priority corresponding to the first signal.
[0071] Optionally, the first signal comprises the priority corresponding to the first signal. Taking the CAN protocol as an example, the identification information of the first signal, i.e., the CAN message, can also be used to define the priority of the CAN message transmission.
[0072] In the optional implementation, optionally, the accessing the bus by the first node to transmit the first signal according to the priority corresponding to the first signal can comprise: when a third node in the communication network also needs to access the bus to transmit a third signal, accessing the bus by the first node and the third node to transmit the first signal and the third signal in turn according to the order corresponding to the priorities of the first signal and the third signal.
[0073] Further optionally, the accessing the bus by the first node and the third node to transmit the first signal and the third signal in turn according to the order corresponding to the priorities of the first signal and the third signal can comprise: if the priority corresponding to the first signal is higher than the priority corresponding to the third signal, accessing the bus by the first node to transmit the first signal first, and then accessing the bus by the third node to transmit the third signal after the transmission of the first signal is completed; if the priority corresponding to the first signal is lower than the priority corresponding to the third signal, accessing the bus by the third node to transmit the third signal first, and then accessing the bus by the first node to transmit the first signal after the transmission of the third signal is completed.
[0074] In this way, when there are multiple nodes that need to access, the nodes are accessed in turn according to the priorities of the signals, so as to reduce the node access conflict and improve the transmission efficiency of the signals with higher priorities.
[0075] In the optional implementation, optionally, the priority of the event-type signal is higher than the priority of the periodic-type signal, i.e., when the periodic-type signal and the event-type signal both need to be transmitted, the event-type signal is transmitted first; and the periodic-type signal is transmitted after the transmission of the event-type signal is completed.
[0076] In the optional implementation, optionally, if the first signal is an event-type signal, the method can further comprise: if no node other than the first node needs to access the bus to transmit a signal, monitoring the bus, and when the bus is still in an idle state after monitoring for a preset monitoring duration, accessing the bus by the first node to transmit the first signal.
[0077] It can be seen that the node is connected to the bus after listening for a period of time when the bus is idle, so as to avoid the situation that the bus is busy when the signal with high priority needs to be transmitted.
[0078] In another optional embodiment, the method can further include:
[0079] If the bus is in the non-idle state, counting is performed based on the backoff counter, and when the counting result of the backoff counter meets the preset count condition, the first node is connected to the bus to transmit the first signal.
[0080] Optionally, the operation of counting based on the backoff counter and connecting the first node to the bus to transmit the first signal when the counting result of the backoff counter meets the preset count condition is performed only when the first signal is an event-type signal.
[0081] Optionally, the backoff counter starts counting after the bus enters the idle state from the non-idle state.
[0082] Further optionally, the counting result can include a counting duration, and the preset count condition can include that the counting duration reaches a preset count duration; and / or, the counting result can include a counting number, and the preset count condition can include that the counting number reaches a preset count number.
[0083] Further optionally, the preset count number is a random number selected from a contention window corresponding to the bus.
[0084] Still further optionally, the counting based on the backoff counter can include writing the preset count number into the backoff counter to count down, and the preset count condition includes that the backoff counter counts down to zero.
[0085] It can be seen that the node is connected to the bus to transmit the event-type signal after the backoff counting is performed when the bus is in the non-idle state and enters the idle state, so as to reduce the transmission conflict between the event-type signals.
[0086] Embodiment Two
[0087] Please refer to FIG. 3, which is a flowchart of another communication method disclosed by the embodiments of the present disclosure. The communication method described in FIG. 3 can be applied to a communication network, which can include a plurality of nodes that can communicate through a bus. As shown in FIG. 3, the communication method can include the following operations:
[0088] 201, detecting whether a node needs to be connected to the bus to transmit a signal.
[0089] 202、when it is detected that the first node needs to access the bus to transmit the first signal, if the first signal is an event-type signal, triggering step 203 to be executed, if the first signal is a periodic-type signal, triggering step 204 to be executed.
[0090] 203、entering a contention access procedure for the first node.
[0091] 204、detecting whether there is a second node needing to access the bus to transmit a second signal and the second signal is an event-type signal, if the detection result of step 204 is no, triggering step 205 to be executed, if the detection result of step 204 is yes, triggering step 206 to be executed.
[0092] 205、entering a scheduled access procedure for the first node.
[0093] 206、the first node taking a backoff procedure and entering a contention access procedure for the second node.
[0094] wherein, after step 206 is executed, step 205 is executed again.
[0095] It can be seen that, by combining the scheduled access strategy and the contention access strategy, when the node needs to send a periodic-type signal, the bus is accessed based on the scheduled access strategy; when the node needs to send an event-type signal, the bus is accessed based on the contention access strategy. Due to the periodic transmission characteristics of the periodic-type signal, the scheduled access strategy can reduce the occurrence of conflicts between periodic-type signals and between periodic-type signals and event-type signals, thereby reducing the bus load and the data packet loss rate, while the event-type signal triggering time has uncertainty, and the contention access manner can make up for the inflexibility of the scheduled access strategy, meeting the transmission requirements of emergency data.
[0096] In an optional embodiment, as shown in FIG. 4, FIG. 4 is a flowchart of a scheduled access procedure disclosed by an embodiment of the present disclosure. As shown in FIG. 4, the scheduled access procedure can include the following operations:
[0097] 301、detecting whether the bus is in an idle state, if it is detected that the bus is in a non-idle state, triggering step 302 to be executed, if it is detected that the bus is in an idle state, triggering step 303 to be executed.
[0098] 302、listening to the bus until it is detected that the bus enters an idle state.
[0099] 303、accessing the bus to transmit the first signal according to the preset access order corresponding to the first signal and the preset access time length corresponding to the first signal.
[0100] It can be seen that the periodic signal can be transmitted when the bus is idle. Since the periodic signal has a periodic transmission characteristic and a relatively fixed data transmission amount, a scheduling access strategy based on a preset access sequence and a preset access duration is adopted, which can reduce the generation of conflicts compared with a contention access strategy.
[0101] As to the preset access sequence and the preset access duration corresponding to the first signal in step 303, please refer to FIG. 5, which is a schematic diagram of a transmission time slot of a periodic signal disclosed by an embodiment of the present disclosure. As shown in FIG. 5, it is assumed that there are signals of nine nodes E1, E2 and E3 that need to be transmitted on a bus transmission time T, and then according to the priority corresponding to the signals and the preset data amount of the signals, the preset access sequence and the preset access duration corresponding to the signals of different nodes can be set. For example, according to the priority corresponding to the signals of each node, the preset access sequence of each node is E1, E2, E3,..., E9, wherein E1 is allocated two time slots on the bus according to the size of the signal data amount, and E2 is allocated one time slot on the bus according to the size of the signal data amount. In this way, by means of the preset access duration and the preset access sequence, the intensification of conflicts in the case of high network load when multiple nodes access at the same time can be reduced. In this way, the transmission efficiency of the signal with a higher priority can be improved, the transmission period of the periodic signal can be matched with the trigger period of the periodic signal, and sufficient time is ensured for transmitting the signal, thereby further improving the accuracy and reliability of signal transmission.
[0102] In an optional embodiment, as shown in FIG. 6, which is a schematic diagram of a contention access process disclosed by an embodiment of the present disclosure. As shown in FIG. 6, the contention access process can include the following operations:
[0103] 401: Detect whether the bus is in an idle state, if it is detected that the bus is in an idle state, trigger step 402, if it is detected that the bus is in a non-idle state, trigger step 405.
[0104] 402: Detect whether there is a third node that needs to access the bus to transmit a third signal, if the detection result is yes, trigger step 403, if the detection result is no, trigger step 404.
[0105] 403: According to the priority corresponding to the first signal and the priority corresponding to the third signal, the first node and the third node are sequentially accessed to the bus in the order corresponding to the respective priorities to transmit the first signal and the third signal.
[0106] That is, if the priority corresponding to the first signal is higher than the priority corresponding to the third signal, the first node is connected to the bus to transmit the first signal first, and then the third node is connected to the bus to transmit the third signal; if the priority corresponding to the third node is higher than the priority corresponding to the first node, the third node is connected to the bus to transmit the third signal first, and then the first node is connected to the bus to transmit the first signal.
[0107] 404, listen to the bus, and when the bus is still in an idle state after listening for a preset listening duration, connect the first node to the bus to transmit the first signal.
[0108] 405, execute a CSMA / CA backoff algorithm, and select a random number from a contention window corresponding to the bus to write to a backoff counter.
[0109] 406, once it is detected that the bus enters an idle state, start timing based on the backoff counter, and if the bus is in a non-idle state, freeze the backoff counter.
[0110] 407, when the backoff counter counts to 0, connect the first node to the bus to transmit the first signal.
[0111] It can be seen that in this way, when an event-type signal is encountered, the node is connected to the bus using a contention access strategy. Considering the uncertainty of the triggering time of the event-type signal, through the CSMA / CA collision avoidance mechanism, the bus can be listened to, collision avoidance can be achieved, and the packet loss rate can be reduced.
[0112] Embodiment Three
[0113] Please refer to FIG. 7, which is a structural schematic diagram of an electronic device 600 disclosed by an embodiment of the present disclosure. The electronic device 600 described in FIG. 7 can be applied in a communication network, which can include multiple nodes that can communicate through a bus. As shown in FIG. 7, the communication method can include an access module 502 configured to, when a first node needs to transmit a first signal, connect the first node to the bus to transmit the first signal based on a scheduling access strategy if the first signal is a periodic signal, and / or connect the first node to the bus to transmit the first signal based on a contention access strategy if the first signal is an event-type signal.
[0114] It can be seen that, by combining the scheduling access strategy and the contention access strategy, when the node needs to send a periodic signal, the node accesses the bus based on the scheduling access strategy, and when the node needs to send an event signal, the node accesses the bus based on the contention access strategy. Due to the periodic transmission characteristics of the periodic signal, the scheduling access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event signals, thereby reducing the bus load and the data packet loss rate. The event signal trigger time has uncertainty, and the contention access mode can compensate for the inflexibility of the scheduling access strategy, thereby meeting the transmission requirements of emergency data.
[0115] In an optional embodiment, the access module 502 is further configured to, before accessing the first node to the bus based on the scheduling access strategy to transmit the first signal, access the second node to the bus based on the contention access strategy to transmit the second signal when the second node needs to transmit the second signal and the second signal is an event signal; and after the transmission of the second signal is completed, perform the operation of accessing the first node to the bus based on the scheduling access strategy to transmit the first signal.
[0116] It can be seen that, by implementing the optional embodiment, when a transmission conflict occurs between a periodic signal and a contention signal, the node corresponding to the contention signal is accessed in priority, thereby preferentially transmitting the contention signal, and thereby improving the timeliness of the transmission of the event signal.
[0117] In another optional embodiment, the specific manner in which the access module 502 accesses the first node to the bus based on the scheduling access strategy to transmit the first signal can include: accessing the first node to the bus to transmit the first signal according to a preset access order corresponding to the first signal and a preset access time length corresponding to the first signal.
[0118] It can be seen that, in this way, when the node needs to transmit a periodic signal, the node is accessed to the bus according to the preset access order and the preset access time length, so that the periodic signal is transmitted in order, the conflict of node access is reduced, and the reliability and accuracy of signal transmission are improved.
[0119] In yet another optional embodiment, the preset access order is determined in advance based on a priority corresponding to the first signal and / or a transmission period corresponding to the first signal, and / or the preset access time length is determined in advance based on a preset data amount corresponding to the first signal. In this way, the transmission efficiency of the signal with a higher priority can be improved, the transmission period of the periodic signal is matched with the trigger period of the periodic signal, and sufficient time is ensured for signal transmission, thereby further improving the accuracy and reliability of signal transmission.
[0120] In yet another optional embodiment, the operation of accessing the first node to the bus to transmit the first signal based on the scheduling access strategy is performed by the access module 502 only when the bus is in an idle state. In this way, the situation that multiple nodes access the bus at the same time and cause access conflicts can be reduced.
[0121] In yet another optional embodiment, the specific way of accessing the first node to the bus to transmit the first signal based on the contention access strategy can include: accessing the first node to the bus to transmit the first signal according to the priority corresponding to the first signal.
[0122] In this way, when multiple nodes need to be accessed, the nodes are accessed according to the priority of the signals, so that the transmission efficiency of the signals with higher priority is improved while the access conflicts of the nodes are reduced.
[0123] In yet another optional embodiment, the operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy is performed by the access module 502 only when the bus is in an idle state. In this way, the situation that multiple nodes access the bus at the same time and cause access conflicts can be reduced.
[0124] In yet another optional embodiment, the apparatus can further include: a counting module 501 configured to count based on a backoff counter when the bus is in a non-idle state; and the access module 502 is further configured to access the first node to the bus to transmit the first signal when a counting result of the backoff counter meets a preset counting condition.
[0125] In yet another optional embodiment, the backoff counter starts counting after the bus enters an idle state from a non-idle state.
[0126] In yet another optional embodiment, the counting result can include a counting duration, and the preset counting condition can include that the counting duration reaches a preset counting duration; and / or, the counting result can include a counting number, and the preset counting condition can include that the counting number reaches a preset counting number.
[0127] As can be seen, in this way, when the bus is in a non-idle state, the backoff counting is performed after the bus enters an idle state, and the node is accessed to transmit the event-type signal after the counting ends, so that the transmission conflicts between the event-type signals are reduced.
[0128] Embodiment Four
[0129] Please refer to FIG. 8, which is a structural schematic diagram of yet another electronic apparatus 600 disclosed by the embodiments of the present disclosure. As shown in FIG. 8, the electronic apparatus 600 can include a processor 601 connected with a memory 602.
[0130] The processor 601 invokes executable program code stored in the memory 602 to perform the steps in the communication method described in Embodiment One or Embodiment Two of the present disclosure.
[0131] Embodiment Five
[0132] Referring to FIG. 9, FIG. 9 is a structural schematic diagram of a network system 701 disclosed by an embodiment of the present disclosure. As shown in FIG. 9, the network system 701 includes a communication network 702, and the network system 701 further includes the electronic device 600 described in Embodiment Three or Embodiment Four of the present disclosure.
[0133] Embodiment Six
[0134] Referring to FIG. 10, FIG. 10 is a structural schematic diagram of a vehicle 800 disclosed by an embodiment of the present disclosure. As shown in FIG. 10, the vehicle 800 can include the electronic device 600 described in Embodiment Three or Embodiment Four of the present disclosure.
[0135] Embodiment Seven
[0136] Referring to FIG. 11, FIG. 11 is a structural schematic diagram of another vehicle 800 disclosed by an embodiment of the present disclosure. As shown in FIG. 11, the vehicle 800 can include the network system 701 described in Embodiment Five of the present disclosure.
[0137] Embodiment Eight
[0138] An embodiment of the present disclosure discloses a computer storage medium, which stores computer instructions, and the computer instructions are invoked to perform the steps in the communication method described in Embodiment One or Embodiment Two of the present disclosure.
[0139] Embodiment Nine
[0140] An embodiment of the present disclosure discloses a computer program product, which includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the communication method described in Embodiment One or Embodiment Two.
[0141] The apparatus embodiments described above are only schematic, and the modules illustrated as separate components can or can not be physically separate, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0142] With the specific description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platform, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in the contribution to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other medium that can be used to carry or store data in a computer readable manner.
[0143] Finally, it should be noted that: the communication method, device, vehicle network system, vehicle and medium disclosed by the embodiments of the present disclosure are only the preferred embodiments of the present disclosure, and are used to illustrate the technical solutions of the present disclosure, but not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand; the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A communication method for a communication network, c h a r a c t e r i s e d by The communication network comprises a plurality of nodes which communicate through a bus, and the method comprises: When a first node needs to access the bus to transmit a first signal, if the first signal is a periodic signal, the first node is accessed to the bus to transmit the first signal based on a scheduled access strategy, and / or if the first signal is an event signal, the first node is accessed to the bus to transmit the first signal based on a contention access strategy.
2. The method of claim 1, wherein, Before the first node is accessed to the bus to transmit the first signal based on the scheduled access strategy, the method further comprises: When a second node needs to access the bus to transmit a second signal and the second signal is an event signal, the second node is accessed to the bus to transmit the second signal based on the contention access strategy; After the second signal is transmitted, the operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy is performed again.
3. The method according to claim 1 or 2, characterized in that, The operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy comprises: According to a preset access order corresponding to the first signal and a preset access duration corresponding to the first signal, the first node is accessed to the bus to transmit the first signal.
4. The method of claim 3, wherein, The preset access order is determined in advance based on a priority corresponding to the first signal and / or a transmission period corresponding to the first signal, and / or the preset access duration is determined in advance based on a preset data amount corresponding to the first signal.
5. The method according to any one of claims 1-4, characterized in that, The operation of accessing the first node to the bus to transmit the first signal based on the scheduled access strategy is performed only when the bus is in an idle state.
6. The method according to any one of claims 1-5, characterized in that, The operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy comprises: According to a priority corresponding to the first signal, the first node is accessed to the bus to transmit the first signal.
7. The method according to any one of claims 1 to 6, characterized in that, The operation of accessing the first node to the bus to transmit the first signal based on the contention access strategy is performed only when the bus is in an idle state.
8. The method of claim 7, wherein, The method further comprises: If the bus is in a non-idle state, a backoff counter is counted, and when a count result of the backoff counter satisfies a preset count condition, the first node is accessed to the bus to transmit the first signal.
9. The method of claim 8, wherein, The backoff counter starts counting after the bus enters an idle state from the non-idle state.
10. The method of claim 9, wherein, The count result comprises a count duration, and the preset count condition comprises that the count duration reaches a preset count duration; and / or the count result comprises a count number, and the preset count condition comprises that the count number reaches a preset count number.
11. An electronic device (600), characterized by The electronic device (600) comprises a processor (601) coupled with a memory (602); The processor (601) invokes the executable program code stored in the memory (602) to perform the communication method according to any one of claims 1-10.
12. A network system (701), characterized by The network system (701) comprises: a communication network (702); and a network device (703). The electronic device (600) as claimed in claim 11.
13. A vehicle (800), characterized by The vehicle (800) comprises the electronic device (600) as claimed in claim 11 or the network system (701) as claimed in claim 12.
14. A computer storage medium, characterized in that The computer storage medium stores computer instructions, which are invoked to perform the communication method as claimed in any one of claims 1-10.
Citation Information
Patent Citations
Low delay intelligent substation wireless communication mechanism
CN109548165A
Real-time dynamic bandwidth allocation method for bus communication network
CN115913810A
CAN communication architecture of vehicle-mounted sensor
CN117319127A
Event type message processing method and device, electronic equipment, storage medium and vehicle
CN118233235A
Bipolar polymer electrolyte membrane for water electrolysis and manufacturing method thereof
KR1020240018105A