WO2026001032A1 - 通信方法、装置、网络系统、车辆及计算机存储介质 - Google Patents
通信方法、装置、网络系统、车辆及计算机存储介质Info
- Publication number
- WO2026001032A1 WO2026001032A1 PCT/CN2025/078900 CN2025078900W WO2026001032A1 WO 2026001032 A1 WO2026001032 A1 WO 2026001032A1 CN 2025078900 W CN2025078900 W CN 2025078900W WO 2026001032 A1 WO2026001032 A1 WO 2026001032A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- signal
- bus
- node
- transmit
- access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
Definitions
- This disclosure relates to the field of communication technology, and in particular to a communication method, apparatus, network system, vehicle, and computer storage medium.
- intelligent connected vehicles With the continuous development of technologies such as mobile internet, cloud computing, and intelligent driving, intelligent connected vehicles are increasingly becoming the future trend of the automotive industry in the new era.
- the development of intelligent connected vehicles has led to a significant increase in the number of ECUs (Electronic Control Units), placing higher demands on the transmission, processing, and application capabilities of in-vehicle data, and bringing more challenges to the development of in-vehicle communication networks.
- ECUs Electronic Control Units
- in-vehicle networks typically employ a single node signal access method, such as a contention-based access method or a scheduling-based access method.
- contention-based signal access methods experience significant increases in latency and packet loss rate under dense network and high load conditions, failing to meet the needs of modules highly sensitive to latency.
- scheduling-based access methods rely on a fixed data transmission sequence, lacking flexibility and unable to meet the transmission needs of urgent data.
- the technical problem to be solved by this disclosure is to provide a communication method, device, network system, vehicle, and computer storage medium that can help raise awareness of recyclable containers, thereby reducing environmental pollution caused by improper disposal or failure to recycle containers in a timely manner.
- the first aspect of this disclosure provides a communication method for a communication network, the communication network comprising multiple nodes communicating via 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 scheduling access strategy, and/or, if the first signal is an event-type signal, accessing the first node to the bus to transmit the first signal based on a contention access strategy.
- the method before connecting the first node to the bus to transmit the first signal based on the scheduling access strategy, the method further includes: when receiving an access request from the second node regarding the transmission of a second signal and the second signal is an event-type signal, connecting the second node to the bus to transmit the second signal based on a contention access strategy; and after the second signal has been transmitted, performing the operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy.
- the step of connecting the first node to the bus to transmit the first signal based on a scheduling access strategy includes: connecting 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.
- the preset access order is predetermined based on the priority corresponding to the first signal and/or the transmission period corresponding to the first signal, and/or the preset access duration is predetermined based on the preset data volume corresponding to the first signal.
- the operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy is performed only when the bus is in an idle state.
- the step of connecting the first node to the bus to transmit the first signal based on a contention access strategy includes: connecting the first node to the bus to transmit the first signal according to the priority corresponding to the first signal.
- the operation of connecting 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.
- the method further includes: if the bus is in a non-idle state, counting is performed based on a backoff counter; when the counting result of the backoff counter meets a preset counting condition, the first node is connected to the bus to transmit the first signal.
- the backoff counter begins counting after the bus transitions from the non-idle state to the idle state.
- the counting result includes a counting duration, and the preset counting condition includes the counting duration reaching a preset counting duration; and/or, the counting result includes a counting count, and the preset counting condition includes the counting count reaching a preset counting count.
- a second aspect of this disclosure discloses an electronic device for a communication network, the communication network including multiple nodes communicating via a bus, the electronic device including: 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 transmit the first signal based on a scheduling access strategy, and/or, if the first signal is an event-type signal, access the first node to transmit the first signal based on a contention access strategy.
- the access module is further configured to, before the first node is connected to the bus to transmit the first signal based on a scheduling access strategy, when the second node needs to connect to the bus to transmit the second signal and the second signal is an event-type signal, connect the second node to the bus to transmit the second signal based on a contention access strategy; and after the second signal is transmitted, execute the operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy.
- the specific method by which the access module connects the first node to the bus to transmit the first signal based on a scheduling access strategy includes: connecting 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.
- the preset access order is predetermined based on the priority corresponding to the first signal and/or the transmission period corresponding to the first signal, and/or the preset access duration is predetermined based on the preset data volume corresponding to the first signal.
- the operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy is performed by the access module only when the bus is in an idle state.
- the specific method by which the access module connects the first node to the bus to transmit the first signal based on a contention access strategy includes: connecting the first node to the bus to transmit the first signal according to the priority corresponding to the first signal.
- the operation of connecting the first node to the bus to transmit the first signal based on the contention access strategy is performed by the access module only when the bus is in an idle state.
- the electronic device further includes: a counting module, the counting module being used to count based on a backoff counter when the bus is in a non-idle state;
- the access module is further configured to connect the first node to the bus to transmit the first signal when the counting result of the backoff counter meets the preset counting conditions.
- the backoff counter starts counting after the bus enters an idle state.
- the counting result includes a counting duration, and the preset counting condition includes the counting duration reaching a preset counting duration; and/or, the counting result includes a counting count, and the preset counting condition includes the counting count reaching a preset counting count.
- a third aspect of this disclosure discloses another electronic device, said electronic device including a processor coupled to a memory;
- the processor invokes the executable program code stored in the memory to execute the communication method as disclosed in the first aspect of this disclosure.
- the fourth aspect of this disclosure discloses a network system, which includes a communication network and further includes electronic devices disclosed in the second or third aspect of this disclosure.
- the fifth aspect of this disclosure discloses a vehicle that includes the electronic devices disclosed in the second or third aspect of this disclosure, or the vehicle that includes the network system disclosed in the fourth aspect of this disclosure.
- the fourth aspect of this disclosure discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the communication method disclosed in the first aspect of this disclosure.
- This disclosure is used in a communication network, which includes multiple nodes that communicate via a bus.
- a first node needs to access the bus to transmit a first signal
- 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
- the first signal is an event-type signal
- the first node is accessed to the bus to transmit the first signal based on a contention access strategy. Therefore, by implementing this disclosure, periodic signals are accessed to the bus based on a scheduling access strategy.
- the scheduling access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event-type signals, thereby reducing bus load and data packet loss rate. Since the triggering time of event-type signals is uncertain, the contention access method can compensate for the inflexibility of the scheduling access strategy and meet the transmission needs of urgent data.
- Figure 1 is a schematic diagram of the architecture of a communication network disclosed in an embodiment of this disclosure
- Figure 2 is a flowchart illustrating a communication method disclosed in an embodiment of this disclosure
- Figure 3 is a flowchart illustrating another communication method disclosed in an embodiment of this disclosure.
- Figure 4 is a schematic flowchart of a scheduling access process disclosed in an embodiment of this disclosure.
- Figure 5 is a schematic diagram of the transmission time slot of a periodic signal disclosed in an embodiment of this disclosure.
- Figure 6 is a schematic flowchart of a contention access process disclosed in an embodiment of this disclosure.
- Figure 7 is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this disclosure.
- Figure 8 is a schematic diagram of the structure of another electronic device disclosed in an embodiment of this disclosure.
- Figure 9 is a schematic diagram of the structure of a network system disclosed in an embodiment of this disclosure.
- Figure 10 is a structural schematic diagram of a vehicle disclosed in an embodiment of this disclosure.
- FIG 11 is a structural schematic diagram of another vehicle disclosed in this embodiment.
- This disclosure provides a communication method, apparatus, network system, vehicle, and computer storage medium that combines a scheduling access strategy and a contention access strategy.
- a node needs to send a periodic signal, it accesses the bus based on the scheduling access strategy; when a node needs to send an event-type signal, it accesses the bus based on the contention access strategy.
- the scheduling access strategy reduces conflicts between periodic signals and between periodic signals and event-type signals, thereby reducing bus load and data packet loss rate. Since the triggering time of event-type signals is uncertain, the contention access method compensates for the inflexibility of the scheduling access strategy and meets the transmission needs of urgent data.
- this disclosure can be applied to a communication network, which may include multiple nodes that can communicate via a bus.
- This communication network can be applied to various scenarios of multi-device communication, such as vehicle communication, whole-house smart control, and logistics communication. The embodiments of this disclosure are not limited to these scenarios.
- the vehicular communication network can be built using an EEA (Electrical/Electronic Architecture) architecture.
- ECU Electronic Control Unit
- the vehicular communication network can be CAN (Controller Area Network), LIN (Local Interconnect Network), or Ethernet, etc.
- the vehicular communication network can adopt the OSI (Open System Interconnect) model.
- the MAC (Media Access Control) layer in the OSI model is used to connect each ECU node to the vehicular communication network.
- the MAC layer can connect ECU nodes to the vehicular communication network based on scheduling access strategies or contention access strategies.
- Figure 2 is a flowchart illustrating a communication method disclosed in an embodiment of this disclosure.
- the communication method described in Figure 2 can be applied to a communication network, which may include multiple nodes that can communicate via a bus.
- the communication method may include the following operations: 101.
- the first signal is a periodic signal, based on a scheduling access strategy, the first node is accessed to the bus to transmit the first signal; and/or, if the first signal is an event-type signal, based on a contention access strategy, the first node is accessed to the bus to transmit the first signal.
- FIG. 1 there are 7 nodes on the bus that need to send signals.
- Nodes 1, 2, and 3 transmit periodic signals
- nodes 4, 5, 6, and 7 transmit event-type signals. Therefore, when nodes 1, 2, and 3 need to send periodic signals, they are connected to the bus to transmit the corresponding periodic signals based on the scheduling access strategy.
- nodes 4, 5, 6, and 7 need to send event-type signals, they are connected to the bus to transmit the corresponding event-type signals based on the contention access strategy.
- the scheduling access strategy and the contention access strategy are combined.
- a node needs to send a periodic signal, it accesses the bus based on the scheduling access strategy; when a node needs to send an event-type signal, it accesses the bus based on the contention access strategy.
- the scheduling access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event-type signals, thereby reducing the bus load and the data packet loss rate. Since the triggering time of event-type signals is uncertain, the contention access method can make up for the lack of flexibility of the scheduling access strategy and meet the transmission needs of urgent data.
- the first signal includes identification information (ID in Figure 1) indicating the signal type of the first signal and the data to be transmitted in the first signal.
- This identification information can be used to distinguish whether the first signal is a periodic signal or an event-type signal.
- Periodic signals are sent according to a set period, while event-type signals are sent when a relevant event triggers.
- 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 first signal, i.e., the CAN message, can include a data frame type.
- the frame type of the CAN message can also include one or more of the following: remote frame type, error frame type, and overload frame type.
- a CAN message with a data frame type includes an arbitration field and a data field.
- a CAN message with a 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 contains the data to be transmitted.
- 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 is evident that the identification information facilitates the identification of the signal type of the signal sent by the node.
- the scheduling access strategy can be a TDMA (Time Division Multiple Access) access strategy
- the contention access strategy can be a CSMA/CA (Carrier Sense Multiple Access With Collision Avoidance) access strategy.
- the operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy described above is only performed when the bus is idle. This can reduce the occurrence of conflicts caused by multiple nodes accessing the bus.
- the first signal is a periodic signal
- the bus is monitored until it enters an idle state, and then the above-mentioned scheduling access strategy is executed to connect the first node to the bus to transmit the first signal. This ensures that the periodic signal can still transmit the signal when the bus is busy, reducing the packet loss rate.
- connecting the first node to the bus to transmit the first signal based on the scheduling access strategy may include: connecting the first node to the bus to transmit the first signal according to the preset access order corresponding to the first signal and the preset access duration corresponding to the first signal.
- this allows nodes to be connected to the bus according to a preset access order and preset access duration when they need to transmit periodic signals, thus enabling the orderly transmission of periodic signals, reducing node access conflicts, and improving the reliability and accuracy of signal transmission.
- the preset access sequence is predetermined based on the priority of the first signal and/or the transmission period of the first signal, and/or the preset access duration is predetermined based on the preset data volume of the first signal. This can improve the transmission efficiency of higher priority signals, match the transmission period of periodic signals with their trigger period, and ensure sufficient time to complete signal transmission, further improving the accuracy and reliability of signal transmission.
- the method before connecting the first node to the bus to transmit the first signal based on the scheduling access strategy, may further include: when the second node needs to connect to the bus to transmit the second signal and the second signal is an event-type signal, connecting the second node to the bus to transmit the second signal based on the contention access strategy; after the second signal is transmitted, performing the above-mentioned operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy.
- implementing this optional embodiment can prioritize accessing the node corresponding to the contention signal when there is a transmission conflict between periodic signals and contention signals, thereby prioritizing the transmission of the contention signal and improving the timeliness of event-type signal transmission.
- the operation of connecting the first node to the bus to transmit the first signal based on the contention access strategy described above is only performed when the bus is idle. This can reduce the occurrence of access conflicts caused by multiple nodes connecting to the bus simultaneously.
- connecting the first node to the bus to transmit the first signal based on a contention access strategy may include: connecting the first node to the bus to transmit the first signal according to the priority corresponding to the first signal.
- the first signal includes the priority corresponding to the first signal.
- the first signal that is, the identification information of the CAN message, can also be used to define the priority of CAN message transmission.
- the first node may be connected to the bus to transmit the first signal according to the priority corresponding to the first signal. This may include: when a third node in the communication network also needs to connect to the bus to transmit the third signal, the first node and the third node may be connected to the bus in sequence according to the priority corresponding to the first signal and the priority corresponding to the third signal to transmit the first signal and the third signal.
- the first node and the third node are connected to the bus in sequence according to the order corresponding to their respective priorities to transmit the first signal and the third signal. This may include: 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 first to transmit the first signal, and after the first signal is transmitted, the third node is connected to the bus to transmit the third signal; if the priority corresponding to the first signal is lower than the priority corresponding to the third signal, the third node is connected to the bus first to transmit the third signal, and after the third signal is transmitted, the first node is connected to the bus to transmit the first signal.
- the priority of event-type signals is higher than that of periodic signals. That is, when both periodic signals and event-type signals need to be transmitted, event-type signals are transmitted first; and periodic signals are transmitted only after the event-type signals have been transmitted.
- the method may further include: if other nodes besides the first node do not need to connect to the bus to transmit signals, listening to the bus, and when the bus is still idle after a preset listening time, connecting the first node to the bus to transmit the first signal.
- the high-priority signals can be prevented from being transmitted when the bus is busy.
- the method may further include:
- the bus If the bus is not idle, it counts based on the backoff counter. When the count result of the backoff counter meets the preset counting conditions, the first node is connected to the bus to transmit the first signal.
- the above-mentioned counting based on a backoff counter when the counting result of the backoff counter meets the preset counting conditions, the operation of connecting the first node to the bus to transmit the first signal is only executed when the first signal is an event-type signal.
- the backoff counter starts counting after the bus transitions from a non-idle state to an idle state.
- the counting result may include the counting duration, and the preset counting condition may include the counting duration reaching the preset counting duration; and/or, the counting result may include the number of counts, and the preset counting condition may include the number of counts reaching the preset number of counts.
- the preset count is a random number selected from the contention window corresponding to the bus.
- counting based on a backoff counter can include: writing a preset number of counts into the backoff counter for counting down, where the preset counting condition includes the backoff counter counting down to zero.
- a backoff count is performed after entering an idle state. After the count is completed, the node is connected to transmit event-type signals, thereby reducing transmission conflicts between event-type signals.
- Figure 3 is a flowchart illustrating another communication method disclosed in this embodiment.
- the communication method described in Figure 3 can be applied to a communication network, which may include multiple nodes that can communicate via a bus.
- the communication method may include the following operations:
- step 203 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, step 203 is triggered; if the first signal is a periodic signal, step 204 is triggered.
- step 204 Detect whether there is a second node that needs to connect to 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, trigger the execution of step 205. If the detection result of step 204 is yes, trigger the execution of step 206.
- the first node adopts a backoff procedure and enters the competitive access procedure of the second node.
- step 205 is executed.
- the scheduling access strategy can reduce the occurrence of conflicts between periodic signals and between periodic signals and event-type signals, thereby reducing the bus load and the data packet loss rate.
- the contention access method can compensate for the lack of flexibility of the scheduling access strategy and meet the transmission needs of urgent data.
- FIG4 is a schematic flowchart of a scheduling access process disclosed in this embodiment.
- the scheduling access process may include the following operations:
- step 301 Detect whether the bus is in an idle state. If the bus is detected to be in a non-idle state, trigger the execution of step 302. If the bus is detected to be in an idle state, trigger the execution of step 303.
- the first node is connected to the bus to transmit the first signal.
- this allows for the transmission of periodic signals when the bus is idle. Since the periodic transmission characteristics of periodic signals and the relatively fixed amount of data transmitted are relatively fixed, we adopt a scheduling access strategy based on a preset access order and preset access duration. Compared with the contention access strategy, this can reduce the occurrence of conflicts.
- Figure 5 is a schematic diagram of the transmission time slots of a periodic signal disclosed in an embodiment of this disclosure. As shown in Figure 5, assuming that there are 9 nodes (E1, E2, E3, etc.) whose signals need to be transmitted on the bus transmission time T, the preset access order and preset access duration corresponding to the signals of different nodes can be set according to the priority of the signals and the preset data size of the signals. For example, according to the priority of each node's signal, the preset access order of each node is from E1, E2, E3...E9.
- FIG6 is a schematic flowchart of a contention access process disclosed in this embodiment. As shown in FIG6, the contention access process may include the following operations:
- step 401 Detect whether the bus is in an idle state. If the bus is detected to be in an idle state, trigger the execution of step 402. If the bus is detected to be in a non-idle state, trigger the execution of step 405.
- the first node and the third node are connected to the bus in sequence according to the order corresponding to their respective priorities to transmit the first signal and the third signal.
- the first node is connected to the bus first to transmit the first signal, and then the third node is connected to the bus to transmit the third signal; if the priority of the third node is higher than the priority of the first node, the third node is connected to the bus first to transmit the third signal, and then the first node is connected to the bus to transmit the first signal.
- this approach employs a contention-based access strategy to connect nodes to the bus when event-type signals are encountered.
- the CSMA/CA collision avoidance mechanism enables bus monitoring, collision avoidance, and reduction of packet loss rate.
- Figure 7 is a schematic diagram of the structure of an electronic device 600 disclosed in an embodiment of this disclosure.
- the electronic device 600 described in Figure 7 can be applied in a communication network, which may include multiple nodes that can communicate via a bus.
- the communication method may include: an access module 502, configured to, when a first node needs to transmit a first signal, if the first signal is a periodic signal, connect the first node 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, connect the first node to the bus to transmit the first signal based on a contention access strategy.
- the access module 502 is further configured to, before connecting the first node to the bus to transmit the first signal based on the scheduling access strategy, connect the second node to the bus to transmit the second signal based on the contention access strategy when the second node needs to transmit the second signal and the second signal is an event-type signal; and after the second signal is transmitted, execute the above-mentioned operation of connecting the first node to the bus to transmit the first signal based on the scheduling access strategy.
- implementing this optional embodiment can prioritize accessing the node corresponding to the contention signal when there is a transmission conflict between periodic signals and contention signals, thereby prioritizing the transmission of the contention signal and improving the timeliness of event-type signal transmission.
- this allows nodes to be connected to the bus according to a preset access order and preset access duration when they need to transmit periodic signals, thus enabling the orderly transmission of periodic signals, reducing node access conflicts, and improving the reliability and accuracy of signal transmission.
- the operation of connecting 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 idle. This reduces the occurrence of access conflicts caused by multiple nodes accessing the bus simultaneously.
- the specific method by which the access module 502 connects the first node to the bus to transmit the first signal based on the contention access strategy may include: connecting the first node to the bus to transmit the first signal according to the priority corresponding to the first signal.
- the operation of connecting the first node to the bus to transmit the first signal is performed by the access module 502 only when the bus is idle. This reduces the occurrence of access conflicts caused by multiple nodes simultaneously accessing the bus.
- the device may further include: a counting module 501, which is used to count based on a backoff counter when the bus is in a non-idle state; and an access module 502, which is also used to access the first node to transmit a first signal when the counting result of the backoff counter meets a preset counting condition.
- a counting module 501 which is used to count based on a backoff counter when the bus is in a non-idle state
- an access module 502 which is also used to access the first node to transmit a first signal when the counting result of the backoff counter meets a preset counting condition.
- a backoff count is performed after entering an idle state. After the count ends, the node is connected to transmit event-type signals, thereby reducing transmission conflicts between event-type signals.
- Figure 8 is a schematic diagram of the structure of another electronic device 600 disclosed in this embodiment.
- the electronic device 600 may include a processor 601, which is connected to a memory 602;
- Figure 9 is a schematic diagram of the structure of a network system 701 disclosed in an embodiment of this disclosure.
- the network system 701 includes a communication network 702, and the network system 701 also includes the electronic device 600 described in Embodiment 3 or Embodiment 4 of this disclosure.
- Figure 10 is a structural schematic diagram of a vehicle 800 disclosed in an embodiment of this disclosure.
- the vehicle 800 may include the electronic device 600 described in Embodiment 3 or Embodiment 4 of this disclosure.
- This disclosure provides a computer storage medium storing computer instructions that, when invoked, execute steps in the communication method described in Embodiment 1 or Embodiment 2 of this disclosure.
- This disclosure provides a computer program product including a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the steps of the communication method described in Embodiment 1 or Embodiment 2.
- This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
- ROM read-only memory
- RAM random access memory
- PROM programmable read-only memory
- EPROM erasable programmable read-only memory
- OTPROM one-time programmable read-only memory
- EEPROM electrically-erasable programmable read-only memory
- CD-ROM compact disc read-only memory
- CD-ROM compact disc read-only memory
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
公开了一种车辆,该车辆包括电子装置或网络系统。还公开了一种通信方法及计算机存储介质。该方法用于通信网络,该通信网络包括多个节点,该多个节点通过总线通信。该方法包括:当第一节点需要传输第一信号时,若该第一信号为周期型信号,基于调度接入策略,将该第一节点接入该总线以传输该第一信号,和/或,若该第一信号为事件型信号,基于竞争接入策略,将该第一节点接入该总线以传输第一信号(101)。
Description
相关申请的交叉引用
本申请要求在2024年6月28日提交至中国国家知识产权局、申请号为202410869011.7、名称为“通信方法、装置、网络系统、车辆及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本公开涉及通信技术领域,尤其涉及一种通信方法、装置、网络系统、车辆及计算机存储介质。
随着移动互联、云计算以及智能驾驶等技术的不断发展,智能网联汽车越来越成为新时代汽车行业发展的未来趋势。智能网联汽车的发展使得ECU(Electronic Control Unit,车载电子控制单元)的数量随之成倍增长,对车载数据的传输、处理和应用能力提出了更高的要求,为车内通信网络的发展带来了更多的挑战。
相关技术中,以CAN、LIN和以太网为主流的车内网络中,通常采用单一的节点信号接入方式,比如采用基于竞争的接入方式,又或者采用基于调度的接入方式。然而,基于竞争的信号接入方式在密集网络和高负载的情况下,时延会大幅度增长,丢包率也会增加,无法满足对时延敏感度高的模块的需求;而基于调度的接入方式,只能依靠固定的顺序进行数据传递,不够灵活,无法满足紧急数据的传输需求。
公开内容
本公开所要解决的技术问题在于,提供一种通信方法、装置、网络系统、车辆及计算机存储介质,能够有利于提高归还可循环使用容器的意识,进而能够减少因容器被乱丢弃或未被及时回收而给环境带来的污染。
为了解决上述技术问题,本公开第一方面公开了一种通信方法,用于通信网络,所述通信网络包括多个节点,所述多个节点通过总线通信,所述方法包括:当第一节点需要接入所述总线以传输第一信号时,若所述第一信号为周期型信号,基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号,和/或,若所述第一信号为事件型信号,基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第一方面中,在所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号之前,所述方法还包括:当接收到第二节点关于第二信号发送的接入请求且所述第二信号为事件型信号时,基于竞争接入策略,将所述第二节点接入所述总线以传输所述第二信号;当所述第二信号传输完毕后,再执行所述的基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作。
作为一种可选的实施方式,在本公开第一方面中,所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号,包括:根据所述第一信号对应的预设接入顺序以及所述第一信号对应的预设接入时长,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第一方面中,所述预设接入顺序是基于所述第一信号对应的优先级和/或所述第一信号对应的传输周期预先确定的,和/或,所述预设接入时长是基于所述第一信号对应的预设数据量预先确定的。
作为一种可选的实施方式,在本公开第一方面中,所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是在所述总线处于空闲状态时才执行的。
作为一种可选的实施方式,在本公开第一方面中,所述基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号,包括:根据所述第一信号对应的优先级,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第一方面中,所述基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是在所述总线处于空闲状态时才执行的。
作为一种可选的实施方式,在本公开第一方面中,所述方法还包括:若所述总线处于非空闲状态,基于退避计数器进行计数,当所述退避计数器的计数结果满足预设计数条件时,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第一方面中,所述退避计数器是在所述总线从所述非空闲状态进入空闲状态后开始计数的。
作为一种可选的实施方式,在本公开第一方面中,所述计数结果包括计数时长,所述预设计数条件包括所述计数时长达到预设计数时长;和/或,所述计数结果包括计数次数,所述预设计数条件包括所述计数次数达到预设计数次数。
本公开第二方面公开了一种电子装置,用于通信网络,所述通信网络包括多个节点,所述多个节点通过总线通信,所述电子装置包括:接入模块,用于当第一节点需要接入所述总线以传输第一信号时,若所述第一信号为周期型信号,基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号,和/或,若所述第一信号为事件型信号,基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第二方面中,所述接入模块,还用于在基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号之前,当第二节点需要接入所述总线以传输第二信号且所述第二信号为事件型信号时,基于竞争接入策略,将所述第二节点接入所述总线以传输所述第二信号;当所述第二信号传输完毕后,再执行所述的基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作。
作为一种可选的实施方式,在本公开第二方面中,所述接入模块基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的具体方式,包括:根据所述第一信号对应的预设接入顺序以及所述第一信号对应的预设接入时长,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第二方面中,所述预设接入顺序是基于所述第一信号对应的优先级和/或所述第一信号对应的传输周期预先确定的,和/或,所述预设接入时长是基于所述第一信号对应的预设数据量预先确定的。
作为一种可选的实施方式,在本公开第二方面中,所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是所述接入模块在所述总线处于空闲状态时才执行的。
作为一种可选的实施方式,在本公开第二方面中,所述接入模块基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号的具体方式,包括:根据所述第一信号对应的优先级,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第二方面中,所述基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是所述接入模块在所述总线处于空闲状态时才执行的。
作为一种可选的实施方式,在本公开第二方面中,所述电子装置还包括:计数模块,所述计数模块用于当所述总线处于非空闲状态时,基于退避计数器进行计数;
所述接入模块,还用于当所述退避计数器的计数结果满足预设计数条件时,将所述第一节点接入所述总线以传输所述第一信号。
作为一种可选的实施方式,在本公开第二方面中,所述退避计数器是在所述总线进入空闲状态后开始计数的。
作为一种可选的实施方式,在本公开第二方面中,所述计数结果包括计数时长,所述预设计数条件包括所述计数时长达到预设计数时长;和/或,所述计数结果包括计数次数,所述预设计数条件包括所述计数次数达到预设计数次数。
本公开第三方面公开了另一种电子装置,所述电子装置包括处理器,所述处理器与存储器耦合;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行如本公开第一方面公开的通信方法。
本公开第四方面公开了一种网络系统,所述网络系统包括通信网络,所述网络系统还包括本公开第二方面或本公开第三方面公开的电子装置。
本公开第五方面公开了一种车辆,所述车辆包括本公开第二方面或本公开第三方面公开的电子装置,或者,所述车辆包括本公开第四方面公开的网络系统。
本公开第四方面公开了一种计算机存储介质,所述计算机存储介质存储有计算机指令,所述计算机指令被调用时,用于执行本公开第一方面公开的通信方法。
与现有技术相比,本公开实施例具有以下有益效果:
本公开实施例用于通信网络,通信网络包括多个节点,多个节点通过总线通信,当第一节点需要接入总线以传输第一信号时,若第一信号为周期型信号,基于调度接入策略,将第一节点接入总线以传输第一信号,和/或,若第一信号为事件型信号,基于竞争接入策略,将第一节点接入总线以传输第一信号。可见,通过实施本公开,将周期型信号基于调度接入策略接入总线。可见,实施本公开通过将调度接入策略和竞争接入策略相结合,在节点需要发送周期型信号时,则基于调度接入策略接入总线,在节点需要发送事件型信号时,则基于竞争接入策略接入总线;由于周期型信号的周期发送特性,采用调度接入策略能够减少周期型信号之间以及周期型信号与事件型信号冲突的发生,进而降低总线负载,降低数据丢包率,而事件型信号触发时间具有不确定性,采用竞争的接入方式能够弥补调度接入策略不够灵活的缺点,满足紧急数据的传输需求。
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本公开实施例公开的一种通信网络的架构示意图;
图2是本公开实施例公开的一种通信方法的流程示意图;
图3是本公开实施例公开的另一种通信方法的流程示意图;
图4是本公开实施例公开的一种调度接入流程的流程示意图;
图5是本公开实施例公开的一种周期型信号的传输时隙示意图;
图6是本公开实施例公开的一种竞争接入流程的流程示意图;
图7是本公开实施例公开的一种电子装置的结构示意图;
图8是本公开实施例公开的另一种电子装置的结构示意图;
图9是本公开实施例公开的一种网络系统的结构示意图;
图10是本公开实施例公开的一种车辆的结构示意图;
图11是本公开实施例公开的又一种车辆的结构示意图。
附图标记:
600、电子装置;601、处理器;602、存储器;501、计数模块;502、接入模块;701、网络系统;702、通信网络;
车辆、800。
600、电子装置;601、处理器;602、存储器;501、计数模块;502、接入模块;701、网络系统;702、通信网络;
车辆、800。
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚和完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开的说明书和权利要求书及上述附图中的术语“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或端没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或端固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本公开的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本公开公开了一种通信方法、装置、网络系统、车辆及计算机存储介质,能够将调度接入策略和竞争接入策略相结合,在节点需要发送周期型信号时,则基于调度接入策略接入总线,在节点需要发送事件型信号时,则基于竞争接入策略接入总线;由于周期型信号的周期发送特性,采用调度接入策略能够减少周期型信号之间以及周期型信号与事件型信号冲突的发生,进而降低总线负载,降低数据丢包率,而事件型信号触发时间具有不确定性,采用竞争的接入方式能够弥补调度接入策略不够灵活的缺点,满足紧急数据的传输需求。以下分别进行详细说明。
为了更好地对本公开进行理解,以下将对本公开的应用场景进行说明。
如图1所示,本公开可以应用于通信网络中,该通信网络可以包括多个节点,多个节点可以通过总线通信,该通信网络可以应用于多设备通信的多种场景,比如车载通信场景、全屋智能控制场景和物流通信场景等,本公开实施例不做限定。
以车载通信场景为例,车载通信网络可以以EEA(Electrical/Electronic Architecture,电子电气架构)架构构建,在EEA架构下,以各ECU(Electronic Control Unit,电子控制单元)节点、域控制器和中央控制平台为载体,使得各ECU节点实现信息共享与控制协同。可选的,车载通信网络可以为CAN(Controller Area Network,控制器局域网络)、LIN(Local Interconnect Network,局域互联网络)或以太网等等。可选的,车载通信网络可以采用OSI(Open System Interconnect,开放式系统互联)模型,OSI模型中的MAC(Media Access Control,介质访问控制)层用于将各个ECU节点接入车载通信网络中,MAC层可以基于调度接入策略或竞争接入策略将ECU节点接入车载通信网络。
实施例一
请参阅图2,图2是本公开实施例公开的一种通信方法的流程示意图。其中,图2所描述的通信方法可以应用于通信网络中,该通信网络可以包括多个节点,多个节点可以通过总线通信。如图2所示,该通信方法可以包括以下操作:101、当第一节点需要接入总线以传输第一信号时,若第一信号为周期型信号,基于调度接入策略,将第一节点接入总线以传输第一信号,和/或,若第一信号为事件型信号,基于竞争接入策略,将第一节点接入总线以传输第一信号。
以图1为例,总线上有7个节点需要发送信号,其中节点1、节点2和节点3传输周期型信号,其余的节点4、节点5、节点6和节点7则传输事件型信号。因此,当节点1、节点2和节点3需要发送周期型信号时,则基于调度接入策略,将节点1、节点2和节点3接入总线以传输相应的周期型信号;当节点4、节点5、节点6和节点7需要发送事件型信号时,则基于竞争接入策略,将节点4、节点5、节点6和节点7接入总线以传输相应的事件型信号。
可见,实施本公开实施例,通过将调度接入策略和竞争接入策略相结合,在节点需要发送周期型信号时,则基于调度接入策略接入总线;在节点需要发送事件型信号时,则基于竞争接入策略接入总线;由于周期型信号的周期发送特性,采用调度接入策略能够减少周期型信号之间以及周期型信号与事件型信号冲突的发生,进而降低总线负载,降低数据丢包率,而事件型信号触发时间具有不确定性,采用竞争的接入方式能够弥补调度接入策略不够灵活的缺点,满足紧急数据的传输需求。
可选的,如图1所示,第一信号包含用于表示第一信号的信号类型的标识信息(如图1中的ID)以及第一信号中待传输的数据,该标识信息可以用于区分第一信号为周期型信号还是事件型信号,其中周期型信号按照设定的周期进行发送,事件型信号则在有相关事件触发时发送。第一信号的帧类型与通信网络的通信协议相关,以CAN协议为例,第一信号,也即CAN报文的帧类型可以包括数据帧类型,可选的,CAN报文的帧类型还可以包括远程帧类型、错误帧类型以及过载帧类型等中的一种或多种。其中,帧类型为数据帧类型的CAN报文中包含仲裁场和数据场,可选的,帧类型为数据帧类型的CAN报文还可以包括帧起始和控制场等。其中仲裁场包含标识信息ID,数据场中包含待传输的数据data,可选的,仲裁场还可以包括远程发送请求。其中,标识信息用于识别CAN报文的内容,比如CAN报文的信号类型。可见,通过标识信息能够便于识别节点发送的信号的信号类型识别的便捷性。
可选的,调度接入策略可以为TDMA(Time division multiple access,时分多址)接入策略,和/或,竞争接入策略可以为CSMA/CA(Carrier Sense Multiple Access With Collision Avoidance,载波监听多址接入/冲突避免)接入策略。
可选的,上述基于调度接入策略,将第一节点接入总线以传输第一信号的操作是在总线处于空闲状态时才执行的。这样能够减少多节点接入而导致冲突的情况发生。
进一步可选的,若第一信号为周期型信号,当总线处于非空闲状态时,则对总线进行监听,直至监听到总线进入空闲状态,再执行上述的基于调度接入策略,将第一节点接入总线以传输第一信号的操作,这样能够确保周期型信号在总线繁忙时仍然能够传输信号,降低丢包率。
作为一种可选的实施方式,基于调度接入策略,将第一节点接入总线以传输第一信号,可以包括:根据第一信号对应的预设接入顺序以及第一信号对应的预设接入时长,将第一节点接入总线以传输第一信号。
可见,这样能够在节点需要传输周期型信号时,根据预设接入顺序和预设接入时长将节点接入总线,使得周期型信号有序传输,减少节点接入的冲突,提高信号传输的可靠性和准确性。
可选的,预设接入顺序是基于第一信号对应的优先级和/或第一信号对应的传输周期预先确定的,和/或,预设接入时长是基于第一信号对应的预设数据量预先确定的。这样能够提高优先级较高的信号的传输效率,且使得周期型信号的传输周期与其触发周期相匹配,并且确保有充足的时间传输完成信号,进一步提高了信号传输的准确性和可靠性。
在一个可选的实施例中,在基于调度接入策略,将第一节点接入总线以传输第一信号之前,该方法还可以包括:当第二节点需要接入总线以传输第二信号且第二信号为事件型信号时,基于竞争接入策略,将第二节点接入总线以传输第二信号;当第二信号传输完毕后,再执行上述的基于调度接入策略,将第一节点接入总线以传输第一信号的操作。
可见,实施该可选的实施例能够在周期型信号和竞争型信号发生传输冲突时,优先接入竞争型信号对应的节点,从而优先传输竞争型信号,从而提高事件型信号传输的时效性。
可选的,上述基于竞争接入策略,将第一节点接入总线以传输第一信号的操作是在总线处于空闲状态时才执行的。这样能够减少多个节点同时接入总线而导致接入冲突的情况发生。
作为另一种可选的实施方式,基于竞争接入策略,将第一节点接入总线以传输第一信号,可以包括:根据第一信号对应的优先级,将第一节点接入总线以传输第一信号。
可选的,第一信号包含第一信号对应的优先级,以CAN协议为例,第一信号,也即CAN报文的标识信息还可以用于定义CAN报文发送的优先级。
在该可选的实施方式中,可选的,根据第一信号对应的优先级,将第一节点接入总线以传输第一信号,可以包括:当通信网络中第三节点也需要接入总线以传输发送第三信号时,根据第一信号对应的优先级和第三信号对应的优先级,将第一节点和第三节点依照相应优先级对应的顺序依次接入总线以传输第一信号和第三信号。
进一步可选的,根据第一信号对应的优先级和第三信号对应的优先级,将第一节点和第三节点依照相应优先级对应的顺序依次接入总线以传输第一信号和第三信号,可以包括:若第一信号对应的优先级高于第三信号对应的优先级,先将第一节点接入总线以传输第一信号,在第一信号传输完成后,再将第三节点接入总线以传输第三信号;若第一信号对应的优先级低于第三信号对应的优先级,先将第三节点接入总线以传输第三信号,在第三信号传输完毕后,再将第一节点接入总线以传输第一信号。
这样,在有多个节点需要接入时,根据信号的优先级来先后接入相应的节点,从而在减少节点接入冲突的同时提高优先级较高的信号的传输效率。
在该可选的实施方式中,可选的,事件型信号的优先级高于周期型信号的优先级,也即,当周期型信号与事件型信号都需要传输时,优先传输事件型信号;当事件型信号传输完毕后,再传输周期型信号。
在该可选的实施方式中,可选的,若第一信号为事件型信号,该方法还可以包括:若除第一节点之外的其他节点不需要接入总线以传输信号,对总线进行监听,当在监听预设监听时长后总线仍处于空闲状态时,将第一节点接入总线以传输第一信号。
可见,这样在总线空闲的情况下仍然监听一段时间后再将节点接入总线,从而避免优先级较高的信号在需要传输时总线繁忙的情况发生。
在另一个可选的实施例中,该方法还可以包括:
若总线处于非空闲状态,基于退避计数器进行计数,当退避计数器的计数结果满足预设计数条件时,将第一节点接入总线以传输第一信号。
可选的,上述基于退避计数器进行计数,当退避计数器的计数结果满足预设计数条件时,将第一节点接入总线以传输第一信号的操作是在第一信号为事件型信号才执行的。
可选的,退避计数器是在总线从非空闲状态进入空闲状态后开始计数的。
进一步可选的,计数结果可以包括计数时长,预设计数条件可以包括计数时长达到预设计数时长;和/或,计数结果可以包括计数次数,预设计数条件可以包括计数次数达到预设计数次数。
进一步可选的,预设计数次数为从总线对应的竞争窗口中选择的随机数。
又进一步可选的,基于退避计数器进行计数,可以包括:将预设计数次数写入退避计数器进行倒数,预设计数条件包括退避计数器倒数至零。
可见,这样在总线处于非空闲状态时,在进入空闲状态后进行退避计数,在计数结束后将节点接入以传输事件型信号,从而减少事件型信号之间的传输冲突。
实施例二
请参阅图3,图3是本公开实施例公开的另一种通信方法的流程示意图。其中,图3所描述的通信方法可以应用于通信网络中,该通信网络可以包括多个节点,多个节点可以通过总线通信。如图3所示,该通信方法可以包括以下操作:
201、检测是否有节点需要接入总线传输信号。
202、当检测到第一节点需要接入总线以传输第一信号时,若第一信号为事件型信号,触发执行步骤203,若第一信号为周期型信号,触发执行步骤204。
203、进入关于第一节点的竞争接入流程。
204、检测是否有第二节点需要接入总线以传输第二信号且第二信号为事件型信号,若步骤204的检测结果为否,触发执行步骤205,若步骤204的检测结果为是,触发执行步骤206。
205、进入第一节点的调度接入流程。
206、第一节点采取退避流程,进入第二节点的竞争接入流程。
其中,当步骤206执行完毕后,再执行步骤205。
可见,实施本公开实施例通过将调度接入策略和竞争接入策略相结合,在节点需要发送周期型信号时,则基于调度接入策略接入总线;在节点需要发送事件型信号时,则基于竞争接入策略接入总线。由于周期型信号的周期发送特性,采用调度接入策略能够减少周期型信号之间以及周期型信号与事件型信号冲突的发生,进而降低总线负载,降低数据丢包率,而事件型信号触发时间具有不确定性,采用竞争的接入方式能够弥补调度接入策略不够灵活的缺点,满足紧急数据的传输需求。
在一个可选的实施例中,如图4所示,图4是本公开实施例公开的一种调度接入流程的流程示意图。如图4所示,该调度接入流程可以包括以下操作:
301、检测总线是否处于空闲状态,若检测到总线处于非空闲状态,触发执行步骤302,若检测到总线处于空闲状态,触发执行步骤303。
302、对总线进行监听,直至监听到总线进入空闲状态。
303、根据第一信号对应的预设接入顺序以及第一信号对应的预设接入时长,将第一节点接入总线以传输第一信号。
可见,这样能够在总线空闲时传输周期型信号,由于周期型信号的周期发送特性以及数据发送量相对固定,我们采用基于预设接入顺序和预设接入时长的调度接入策略,相比较于竞争接入策略,可以减少冲突的产生。
关于步骤303中第一信号对应的预设接入顺序以及预设接入时长,请参阅图5,图5是本公开实施例公开的一种周期型信号的传输时隙示意图。如图5所示,假设总线传输时间T上有E1、E2和E3等9个节点的信号需要传输,那么根据信号对应的优先级以及信号的预设数据量大小,可以设定不同节点的信号对应的预设接入顺序以及预设接入时长。比如,根据各个节点的信号对应的优先级,各个节点的预设接入顺序为从E1、E2、E3......E9,其中,E1根据其信号数据量的大小,在总线上分配两个时隙,E2则根据其信号数据量的大小,在总线上分配一个时隙。通过这种按预设接入时长以及预设接入顺序的方式,可以减少在网络负载高的情况下,多个节点同时接入时冲突的加剧。这样能够提高优先级较高的信号的传输效率,且使得周期型信号的传输周期与其触发周期相匹配,并且确保有充足的时间传输完成信号,进一步提高了信号传输的准确性和可靠性。
在一个可选的实施例中,如图6所示,图6是本公开实施例公开的一种竞争接入流程的流程示意图。如图6所示,该竞争接入流程可以包括如下操作:
401:检测总线是否处于空闲状态,若检测到总线处于空闲状态,触发执行步骤402,若检测到总线处于非空闲状态,触发执行步骤405。
402:检测是否有第三节点需要接入总线以传输第三信号,若检测结果为是,则触发执行步骤403,若检测结果为否,则触发执行步骤404。
403、根据第一信号对应的优先级和第三信号对应的优先级,将第一节点和第三节点依照相应优先级对应的顺序依次接入总线以传输第一信号和第三信号。
也即,若第一信号对应的优先级高于第三信号对应的优先级,则先将第一节点接入总线以传输第一信号,再将第三节点接入总线以传输第三信号;若第三节点对应的优先级高于第一节点对应的优先级,则先将第三节点接入总线以传输第三节点,再将第一节点接入总线以传输第一信号。
404、对总线进行监听,当在监听预设监听时长后总线仍处于空闲状态时,将第一节点接入总线以传输第一信号。
405、执行CSMA/CA退避算法,从总线对应的竞争窗口内选择一个随机数写入退避计数器。
406、一旦检测到总线进入空闲状态,基于退避计数器开始计时,如果总线处于非空闲状态,则冻结退避计数器。
407、当退避计数器计数为0时,将第一节点接入总线以传输第一信号。
可见,这样在遇到事件型信号时,采用竞争接入策略将节点接入总线。考虑到事件型信号的触发时间的不确定性,通过CSMA/CA冲突避免机制,能够对总线进行监听,实现冲突避让,降低丢包率。
实施例三
请参阅图7,图7是本公开实施例公开的一种电子装置600的结构示意图。其中,图7所描述的电子装置600可以应用于通信网络中,该通信网络可以包括多个节点,多个节点可以通过总线通信。如图7所示,该通信方法可以包括:接入模块502,用于当第一节点需要传输第一信号时,若第一信号为周期型信号,基于调度接入策略,将第一节点接入总线以传输第一信号,和/或,若第一信号为事件型信号,基于竞争接入策略,将第一节点接入总线以传输第一信号。
可见,实施本公开实施例通过将调度接入策略和竞争接入策略相结合,在节点需要发送周期型信号时,则基于调度接入策略接入总线,在节点需要发送事件型信号时,则基于竞争接入策略接入总线。由于周期型信号的周期发送特性,采用调度接入策略能够减少周期型信号之间以及周期型信号与事件型信号冲突的发生,进而降低总线负载,降低数据丢包率,而事件型信号触发时间具有不确定性,采用竞争的接入方式能够弥补调度接入策略不够灵活的缺点,满足紧急数据的传输需求。
在一个可选的实施例中,接入模块502,还用于在基于调度接入策略,将第一节点接入总线以传输第一信号之前,当第二节点需要传输第二信号且第二信号为事件型信号时,基于竞争接入策略,将第二节点接入总线以传输第二信号;当第二信号传输完毕后,再执行上述的基于调度接入策略,将第一节点接入总线以传输第一信号的操作。
可见,实施该可选的实施例能够在周期型信号和竞争型信号发生传输冲突时,优先接入竞争型信号对应的节点,从而优先传输竞争型信号,从而提高事件型信号传输的时效性。
在另一个可选的实施例中,接入模块502基于调度接入策略,将第一节点接入总线以传输第一信号的具体方式,可以包括:根据第一信号对应的预设接入顺序以及第一信号对应的预设接入时长,将第一节点接入总线以传输第一信号。
可见,这样能够在节点需要传输周期型信号时,根据预设接入顺序和预设接入时长将节点接入总线,使得周期型信号有序传输,减少节点接入的冲突,提高信号传输的可靠性和准确性。
在又一个可选的实施例中,预设接入顺序是基于第一信号对应的优先级和/或第一信号对应的传输周期预先确定的,和/或,预设接入时长是基于第一信号对应的预设数据量预先确定的。这样能够提高优先级较高的信号的传输效率,且使得周期型信号的传输周期与其触发周期相匹配,并且确保有充足的时间传输完成信号,进一步提高了信号传输的准确性和可靠性。
在又一个可选的实施例中,上述基于调度接入策略,将第一节点接入总线以传输第一信号的操作是接入模块502在总线处于空闲状态时才执行的。这样能够减少多个节点同时接入总线而导致接入冲突的情况发生。
在又一个可选的实施例中,接入模块502基于竞争接入策略,将第一节点接入总线以传输第一信号的具体方式,可以包括:根据第一信号对应的优先级,将第一节点接入总线以传输第一信号。
这样,在有多个节点需要接入时,根据信号的优先级来先后接入相应的节点,从而在减少节点接入冲突的同时提高优先级较高的信号的传输效率。
在又一个可选的实施例中,基于竞争接入策略,将第一节点接入总线以传输第一信号的操作是接入模块502在总线处于空闲状态时才执行的。这样能够减少多个节点同时接入总线而导致接入冲突的情况发生。
在又一个可选的实施例中,该装置还可以包括:计数模块501,计数模块501用于当总线处于非空闲状态,基于退避计数器进行计数;和接入模块502,还用于当退避计数器的计数结果满足预设计数条件时,将第一节点接入总线以传输第一信号。
在又一个可选的实施例中,退避计数器是在总线从非空闲状态进入空闲状态后开始计数的。
在又一个可选的实施例中,计数结果可以包括计数时长,预设计数条件可以包括计数时长达到预设计数时长;和/或,计数结果可以包括计数次数,预设计数条件可以包括计数次数达到预设计数次数。
可见,这样在总线处于非空闲状态时,在进入空闲状态后进行退避计数,在计数结束后将节点接入以传输事件型信号,从而减少事件型信号之间的传输冲突。
实施例四
请参阅图8,图8是本公开实施例公开的又一种电子装置600的结构示意图。如图8所示,该电子装置600可以包括处理器601,处理器601与存储器602连接;
处理器601调用存储器602中存储的可执行程序代码,执行本公开实施例一或本公开实施例二所描述的通信方法中的步骤。
实施例五
请参阅图9,图9是本公开实施例公开的一种网络系统701的结构示意图。如图9所示,该网络系统701包括通信网络702,该网络系统701还包括本公开实施例三或本公开实施例四所描述的电子装置600。
实施例六
请参阅图10,图10是本公开实施例公开的一种车辆800的结构示意图,如图10所示,该车辆800可以包括本公开实施例三或本公开实施例四所描述的电子装置600。
实施例七
请请参阅图11,图11是本公开实施例公开的另一种车辆800的结构示意图,如图11所示,该车辆800可以包括本公开实施例五所描述的网络系统701。
实施例八
本公开实施例公开了一种计算机存储介质,该计算机存储介质存储有计算机指令,该计算机指令被调用时,用于执行本公开实施例一或本公开实施例二所描述的通信方法中的步骤。
实施例九
本公开实施例公开了一种计算机程序产品,该计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,且该计算机程序可操作来使计算机执行实施例一或实施例二中所描述的通信方法中的步骤。
以上所描述的装置实施例仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施例的具体描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。
最后应说明的是:本公开实施例公开的一种通信方法、装置、车载网络系统、车辆及介质所揭露的仅为本公开较佳实施例而已,仅用于说明本公开的技术方案,而非对其限制;尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解;其依然可以对前述各项实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应的技术方案的本质脱离本公开各项实施例技术方案的精神和范围。
Claims (14)
- 一种通信方法,用于通信网络,其特征在于,所述通信网络包括多个节点,所述多个节点通过总线通信,所述方法包括:当第一节点需要接入所述总线以传输第一信号时,若所述第一信号为周期型信号,基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号,和/或,若所述第一信号为事件型信号,基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号。
- 根据权利要求1所述的方法,其特征在于,在所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号之前,所述方法还包括:当第二节点需要接入所述总线传输第二信号且所述第二信号为事件型信号时,基于竞争接入策略,将所述第二节点接入所述总线以传输所述第二信号;当所述第二信号传输完毕后,再执行所述的基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作。
- 根据权利要求1或2所述的方法,其特征在于,所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号,包括:根据所述第一信号对应的预设接入顺序以及所述第一信号对应的预设接入时长,将所述第一节点接入所述总线以传输所述第一信号。
- 根据权利要求3所述的方法,其特征在于,所述预设接入顺序是基于所述第一信号对应的优先级和/或所述第一信号对应的传输周期预先确定的,和/或,所述预设接入时长是基于所述第一信号对应的预设数据量预先确定的。
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述基于调度接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是在所述总线处于空闲状态时才执行的。
- 根据权利要求1-5中任一项所述的方法,其特征在于,所述基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号,包括:根据所述第一信号对应的优先级,将所述第一节点接入所述总线以传输所述第一信号。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述基于竞争接入策略,将所述第一节点接入所述总线以传输所述第一信号的操作是在所述总线处于空闲状态时才执行的。
- 根据权利要求7所述的方法,其特征在于,所述方法还包括:若所述总线处于非空闲状态,基于退避计数器进行计数,当所述退避计数器的计数结果满足预设计数条件时,将所述第一节点接入所述总线以传输所述第一信号。
- 根据权利要求8所述的方法,其特征在于,所述退避计数器是在所述总线从所述非空闲状态进入空闲状态后开始计数的。
- 根据权利要求9所述的方法,其特征在于,所述计数结果包括计数时长,所述预设计数条件包括所述计数时长达到预设计数时长;和/或,所述计数结果包括计数次数,所述预设计数条件包括所述计数次数达到预设计数次数。
- 一种电子装置(600),其特征在于,所述电子装置(600)包括处理器(601),所述处理器(601)与存储器(602)耦合;所述处理器(601)调用所述存储器(602)中存储的所述可执行程序代码,执行如权利要求1-10中任一项所述的通信方法。
- 一种网络系统(701),其特征在于,所述网络系统(701)包括:通信网络(702);和如权利要求11所述的电子装置(600)。
- 一种车辆(800),其特征在于,所述车辆(800)包括如权利要求11所述的电子装置(600)或如权利要求12所述的网络系统(701)。
- 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机指令,所述计算机指令被调用时,用于执行如权利要求1-10中任一项所述的通信方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410869011.7A CN119814488A (zh) | 2024-06-28 | 2024-06-28 | 通信方法、装置、网络系统、车辆及计算机存储介质 |
| CN202410869011.7 | 2024-06-28 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2026001032A1 true WO2026001032A1 (zh) | 2026-01-02 |
Family
ID=95263099
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/078900 Pending WO2026001032A1 (zh) | 2024-06-28 | 2025-02-24 | 通信方法、装置、网络系统、车辆及计算机存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119814488A (zh) |
| WO (1) | WO2026001032A1 (zh) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100195664A1 (en) * | 2009-01-30 | 2010-08-05 | Texas Instruments Inc. | Smart Adjustment of Backoff Counter and Contention Window for Improved Random Access |
| CN109548165A (zh) * | 2019-01-24 | 2019-03-29 | 重庆邮电大学 | 一种低时延的智能变电站无线通信机制 |
| KR20220095944A (ko) * | 2020-12-30 | 2022-07-07 | 주식회사 블루텍 | 저속 가변 전송 rate 기반의 통신시스템 실시간 MAC 구조 |
| CN115913810A (zh) * | 2022-11-02 | 2023-04-04 | 西安现代控制技术研究所 | 一种总线通信网络的实时动态带宽分配方法 |
| CN117319127A (zh) * | 2023-08-18 | 2023-12-29 | 东风汽车集团股份有限公司 | 一种车载传感器的can通信架构 |
| CN118233235A (zh) * | 2022-12-21 | 2024-06-21 | 北京车和家信息技术有限公司 | 事件型报文处理方法、装置、电子设备、存储介质及车辆 |
-
2024
- 2024-06-28 CN CN202410869011.7A patent/CN119814488A/zh active Pending
-
2025
- 2025-02-24 WO PCT/CN2025/078900 patent/WO2026001032A1/zh active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100195664A1 (en) * | 2009-01-30 | 2010-08-05 | Texas Instruments Inc. | Smart Adjustment of Backoff Counter and Contention Window for Improved Random Access |
| CN109548165A (zh) * | 2019-01-24 | 2019-03-29 | 重庆邮电大学 | 一种低时延的智能变电站无线通信机制 |
| KR20220095944A (ko) * | 2020-12-30 | 2022-07-07 | 주식회사 블루텍 | 저속 가변 전송 rate 기반의 통신시스템 실시간 MAC 구조 |
| CN115913810A (zh) * | 2022-11-02 | 2023-04-04 | 西安现代控制技术研究所 | 一种总线通信网络的实时动态带宽分配方法 |
| CN118233235A (zh) * | 2022-12-21 | 2024-06-21 | 北京车和家信息技术有限公司 | 事件型报文处理方法、装置、电子设备、存储介质及车辆 |
| CN117319127A (zh) * | 2023-08-18 | 2023-12-29 | 东风汽车集团股份有限公司 | 一种车载传感器的can通信架构 |
Non-Patent Citations (2)
| Title |
|---|
| JIANG JIE 线, HU WENJIANG, FAN YU: "The Application of CAN Bus Dispatch Aigorithm in the Electric Automobile Control Net)", APPLICATION OF ELECTRONIC TECHNIQUE, HUABEI JISUAN JIXI TONGGONGCHENG YANJIUSUO (XINXI YEBU DIANZI LIUSUO), CN, no. 6, 30 June 2007 (2007-06-30), CN , pages 127 - 128, XP093383096, ISSN: 0258-7998, DOI: 10.16157/j.issn.0258-7998.2007.06.057 * |
| LIU LU-YUAN ,, WANG XIAO-XIN,, MA JIN-YAN: "Modeling and Performance Evaluation of Time-Triggered CAN Bus", DIANZI KE-JI DAXUE XUEBAO - JOURNAL OF ELECTRONIC SCIENCE ANDTECHNOLOGY OF CHINA, DIANZIKE-JI DAXUE, CHENGDU,, CN, vol. 36, no. 3, 30 June 2007 (2007-06-30), CN , pages 632 - 635, XP093383110, ISSN: 1001-0548 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119814488A (zh) | 2025-04-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5001642A (en) | Method for operating a data processing system | |
| JPH11513158A (ja) | 並列パケット化されたモジュール間調停高速制御およびデータバス | |
| EP2882146A1 (en) | Data transmission device, communication control method, and communication control program | |
| CN116185915B (zh) | 总线调度方法、装置及设备、介质和基板管理控制芯片 | |
| CN116545953A (zh) | 终端以太网调度方法、系统、存储介质及计算机 | |
| US20030202509A1 (en) | Information processing apparatus and method, and distribution medium | |
| CN115357926A (zh) | 基于SoC芯片的AXI总线协议访问权限控制方法及装置 | |
| CN117650941A (zh) | Can报文的检测方法、检测装置、处理器及计算机设备 | |
| US5982781A (en) | Process for information transmission in a bus system having several participants | |
| CN119814488A (zh) | 通信方法、装置、网络系统、车辆及计算机存储介质 | |
| US11463555B2 (en) | Local interconnect network (LIN) messaging between LIN partitions separated by a backbone communication network | |
| TW202238407A (zh) | 用於訊息之受控式訊息錯誤及電子控制單元映射技術 | |
| US7428608B2 (en) | Communication system, communication circuit and communication method | |
| WO2026025858A1 (zh) | 通信方法、第一节点、第二节点、架构、车辆及介质 | |
| EP4679212A1 (en) | Test system | |
| CN119316251B (zh) | 一种基于lin多通道并行通讯的系统、方法、设备、介质及产品 | |
| CN118484316A (zh) | 一种进程间通信方法、装置以及车辆 | |
| Luo et al. | Implementation of bootloader based on DoIP | |
| CN117857654A (zh) | 一种航电总线与FlexRay总线的协议转换方法及装置 | |
| CN114885393A (zh) | 一种设备入网的控制方法、装置及终端设备 | |
| JP3104221B2 (ja) | ポーリング遅延回避方式 | |
| CN112243210B (zh) | 适于车联网媒体应用的无冲突多址接入方法、装置和系统 | |
| CN110737420A (zh) | 语音冲突管理方法、系统、计算机可读存储介质及设备 | |
| CN114996180A (zh) | 一种访问控制方法、系统、芯片、板卡和电子设备 | |
| CN113032307A (zh) | 一种集成器件访问请求处理方法及相关组件 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25824427 Country of ref document: EP Kind code of ref document: A1 |