Bus communication method, device and system, electronic device and storage medium
By using address mapping tables and dynamic adjustment of communication time slots, the problem of integrating different bus protocols was solved, achieving efficient communication between field devices, meeting the requirements of high real-time applications, and improving network robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-10
AI Technical Summary
Different manufacturers use different bus protocols, which makes system integration difficult, protocol barriers are serious, communication delays are uncertain, making it difficult to meet the requirements of high real-time applications, and the failure of a single node may affect the communication quality of the entire network.
Seamless integration of multiple heterogeneous protocols is achieved through address mapping tables, communication time slots are divided and bandwidth resources are dynamically adjusted, node device status is monitored to isolate faulty nodes, and a unified communication service layer is used to shield the differences in underlying protocols.
It achieves seamless integration of various field devices, improves protocol compatibility and network bandwidth utilization, meets the needs of high real-time applications, enhances robustness and fault isolation capabilities, and reduces costs.
Smart Images

Figure CN121644484A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial data communication technology, and in particular to a bus communication method, device, system, electronic device, and storage medium. Background Technology
[0002] In industrial communication networks, fieldbus is used to connect field smart instruments, actuators, controllers and other devices, and is a key underlying technology for realizing factory digitalization and intelligence. Currently, various fieldbus protocols exist in the market, such as Profinet (Process Field Network), PROFIBUS (Process Fieldbus), Modbus, CANopen (Controller Area Network Open Protocol), and EtherCAT (Ethernet Control Automation Technology). However, the following pain points exist: Different manufacturers use different bus protocols, and protocol barriers lead to difficulties in system integration and poor interoperability, forming "automation islands"; Traditional buses use master-slave polling, Carrier Sense Multiple Access with Collision Detection (CSMA / CA), or Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) mechanisms, which result in resource contention. Under heavy network load, communication latency is uncertain, making it difficult to meet the needs of high real-time applications, such as motion control; Communication cycles and bandwidth allocation are usually statically configured and cannot be flexibly adjusted according to the dynamic changes in data flow of nodes in the network, resulting in low bandwidth utilization or compromised real-time performance; Communication failure of a single node, such as continuous occupation of the bus, may affect the communication quality of the entire network, and it is difficult to effectively isolate the fault.
[0003] In related technologies, protocol conversion can be performed through gateways, but this solution increases system complexity and latency; another solution is to improve determinism through Time-Sensitive Networking (TSN), but these are mostly focused on the Ethernet layer and do not adequately consider compatibility with field devices and cost control. Summary of the Invention
[0004] This invention provides a bus communication method, device, system, electronic device, and storage medium to solve the technical problems of difficulties in integrating field devices with different fieldbus protocols and the inability to flexibly adjust communication resources.
[0005] This invention provides a bus communication method, the method comprising: acquiring the protocol type and physical address of multiple node devices; allocating a global logical address to each node device and establishing an address mapping table between the global logical address, the physical address and the protocol type to transmit and address the service data of each node device; dividing a reference communication period into multiple communication time slots to transmit service data of different node devices and different service types through each communication time slot; monitoring the bandwidth utilization of each communication time slot and the data volume of each node device, and dynamically adjusting the bandwidth resources of each communication time slot.
[0006] In one embodiment of the present invention, the reference communication period is divided into multiple communication time slots, including: dividing the reference communication period into fixed time slots, dynamic polling time slots, and event-triggered time slots; generating a dynamic polling list according to the data update cycle and priority of each node device, so as to transmit corresponding regular periodic data in the dynamic polling time slots according to the polling of the dynamic polling list; wherein, the fixed time slots are used to transmit low-latency periodic data corresponding to each node device, and the event-triggered time slots are used to transmit burst data.
[0007] In one embodiment of the present invention, the event triggering time slot includes a bandwidth request time slot and an allocable time slot; the bandwidth request time slot is used to request bandwidth for transmission, so as to request a transmission window for the burst data in the subsequent allocable time slot.
[0008] In one embodiment of the present invention, dynamically adjusting the bandwidth resources of each communication time slot includes: if a node device meets preset conditions in multiple reference communication cycles, then shrinking the communication time slot corresponding to the node device to obtain idle bandwidth resources, wherein the preset conditions include the data volume of the target time slot corresponding to the node device being less than a preset allocation quota, or the bandwidth utilization rate of the target time slot corresponding to the node device being less than a preset utilization rate threshold, wherein the target time slot is the fixed time slot or the dynamic polling time slot; if the bandwidth request queue of the event triggering time slot is greater than a preset quantity threshold, or the dynamic polling time slot is congested, then expanding the event triggering time slot or the dynamic polling time slot according to the idle bandwidth resources and applying it in the next reference communication cycle.
[0009] In one embodiment of the present invention, after dividing the reference communication period into multiple communication time slots, the method further includes: monitoring the communication status of each of the node devices; if a node device does not respond or continuously sends error frames within multiple consecutive reference communication periods, the node device is identified as a faulty node, and the faulty node is removed from the dynamic polling list corresponding to each of the node devices, and all time slot resources allocated to the faulty node are reclaimed.
[0010] In one embodiment of the present invention, after establishing the address mapping table between the global logical address, the physical address, and the protocol type, the method further includes: converting service data of the corresponding protocol type into the transmission format corresponding to the address mapping table through the node device; and transmitting the converted service data from the corresponding communication time slot format through the node device according to the service type of the service data and the device type of the node device.
[0011] This invention provides a bus communication device, comprising: an acquisition module for acquiring the protocol type and physical address of multiple node devices; an addressing module for allocating a global logical address to each node device and establishing an address mapping table between the global logical address, the physical address, and the protocol type, for transmitting and addressing the service data of each node device; a time slot division module for dividing a reference communication period into multiple communication time slots to transmit service data of different node devices and different service types through each communication time slot; and a bandwidth adjustment module for monitoring the bandwidth utilization of each communication time slot and the data volume of each node device, and dynamically adjusting the bandwidth resources of each communication time slot.
[0012] This invention provides a bus communication system, comprising node devices, conventional slave devices, and a bus communication device as described in claim 7, wherein the number of node devices is multiple; each node device includes a multi-protocol slave device and / or a protocol conversion gateway; the multi-protocol slave device is a field device that supports at least one fieldbus protocol and supports protocol format conversion; the conventional slave device is a field device that supports at least one fieldbus protocol but does not support protocol format conversion; the protocol conversion gateway is used to provide protocol format conversion services for the conventional slave device; the protocol format conversion is used to convert the service data corresponding to the fieldbus protocol into the transmission format corresponding to the address mapping table, and the bus communication device is connected to the node devices.
[0013] The present invention provides an electronic device, the electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the bus communication method as described in any of the above embodiments.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform the bus communication method described in any of the above embodiments.
[0015] The beneficial effects of the present invention are as follows: The bus communication method, device, system, electronic device and storage medium proposed in the present invention can seamlessly integrate field devices with multiple heterogeneous protocols through address mapping table, and can flexibly adapt to the data communication needs of different node devices and different service types through communication time slot mechanism and dynamic adjustment of bandwidth resources. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0017] In the attached diagram: Figure 1 A schematic diagram of an exemplary system architecture provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a bus communication method provided in one embodiment of the present invention; Figure 3 This is a schematic diagram of communication time slot division provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of a dynamic bandwidth management process provided in one embodiment of the present invention; Figure 5 This is a block diagram of a bus communication device provided in one embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0018] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0019] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0020] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0021] Please see Figure 1 , Figure 1 This is a schematic diagram of an exemplary system architecture provided in an embodiment of the present invention. Figure 1 As shown, the system architecture may include a master controller, node devices, and conventional slave devices. The master controller executes the bus communication method of this invention through protocol parsing, global addressing management, communication time slot allocation, and bandwidth management. The node devices include multi-protocol slave devices and a protocol conversion gateway. Multi-protocol slave devices are field devices that support at least one fieldbus protocol and can convert the service data of the fieldbus protocol into the transmission format corresponding to the address mapping table. Conventional slave devices are traditional slave devices that do not support the bus communication method of this invention, using fieldbus protocols such as PROFIBUS DP (Distributed Peripheral Process Fieldbus), Modbus, etc. The protocol conversion gateway is connected to the conventional slave devices and is used to convert the service data of the fieldbus protocols supported by the conventional slave devices into the transmission format corresponding to the address mapping table, and to communicate with the master controller on behalf of the conventional slave devices. The master controller, node devices, and conventional slave devices are connected through a unified bus link, which can use materials such as twisted-pair cable, coaxial cable, or industrial Ethernet cable as the transmission medium. Figure 1 In this system, the master controller connects multiple protocol conversion gateways and multi-protocol slave devices that natively support the new protocol through a unified bus link; Protocol conversion gateway A is connected to a sensor cluster that follows the Modbus protocol, and protocol conversion gateway B is connected to an actuator cluster that follows the PROFIBUS-DP protocol; The master controller knows the logical address of all node devices and their corresponding protocol type through an address mapping table.
[0022] For example, the master station controller obtains the protocol type and physical address of multiple node devices; assigns a global logical address to each node device and establishes an address mapping table between the global logical address, physical address and protocol type to address the transmission of service data of each node device; divides the baseline communication period into multiple communication time slots to transmit service data of different node devices and different service types through each communication time slot; monitors the bandwidth utilization of each communication time slot and the data volume of each node device, and dynamically adjusts the bandwidth resources of each communication time slot.
[0023] In related technologies, there are technical problems in integrating field devices with different fieldbus protocols and in flexibly adjusting communication resources.
[0024] To address the aforementioned technical problems, this invention provides a bus communication method, device, system, electronic device, and storage medium. The implementation details of the technical solutions of the embodiments of this invention are described in detail below.
[0025] Please see Figure 2 , Figure 2 This is a flowchart illustrating a bus communication method provided in one embodiment of the present invention. Figure 2 As shown, in an exemplary embodiment, the bus communication method includes at least steps S210 to S240, which are described in detail below: Step S210: Obtain the protocol type and physical address of multiple node devices; In one embodiment of the present invention, the protocol type includes various fieldbus protocols, such as Profinet (process field network) and EtherCAT (Ethernet control automation technology).
[0026] Step S220: Assign a global logical address to each node device and establish an address mapping table between the global logical address, physical address and protocol type to enable transmission addressing for the service data of each node device.
[0027] In one embodiment of the present invention, after establishing an address mapping table between global logical address, physical address and protocol type, the method further includes: converting service data of the corresponding protocol type into the transmission format corresponding to the address mapping table through a node device; and transmitting the converted service data by the node device according to the service type of the service data and the device type of the node device from the corresponding communication time slot format.
[0028] In one embodiment of the present invention, a unified communication service layer is constructed above the physical layer and the data link layer. The communication service layer provides a unified Application Programming Interface (API) to upper-layer applications, shielding them from the differences in underlying physical protocols. A unique global logical address is assigned to all node devices in the bus network, and an address mapping table is maintained between global logical addresses, physical addresses, and protocol types.
[0029] Step S230: Divide the baseline communication period into multiple communication time slots to transmit service data of different node devices and different service types through each communication time slot.
[0030] In one embodiment of the present invention, the reference communication period is divided into multiple communication time slots, including: dividing the reference communication period into fixed time slots, dynamic polling time slots, and event-triggered time slots; generating a dynamic polling list according to the data update cycle and priority of each node device, so as to transmit the corresponding regular periodic data in the dynamic polling time slots according to the polling of the dynamic polling list; wherein, the fixed time slots are used to transmit the low-latency periodic data corresponding to each node device, and the event-triggered time slots are used to transmit burst data.
[0031] In one embodiment of the invention, the low-latency periodic data includes the controller output and the real-time position feedback of the motor. The bandwidth resources of this fixed time slot are pre-allocated to ensure its low latency and determinism.
[0032] In one embodiment of the present invention, the event triggering time slot includes a bandwidth request time slot and an allocable time slot; the bandwidth request time slot is used to request bandwidth for transmission so as to request a transmission window for burst data in the subsequent allocable time slot.
[0033] In one embodiment of the present invention, conventional periodic data includes process variables such as temperature and pressure. The master station controller generates a dynamic polling list based on the data update cycle and priority of the node devices.
[0034] In one embodiment of the present invention, burst data, such as non-periodic, sudden alarm information and diagnostic information, is processed. Node devices request bandwidth by sending a brief bandwidth request within a micro-timeslot, i.e., a bandwidth request timeslot. After receiving the bandwidth request, the master station controller allocates a transmission window for it in an allocable timeslot within the subsequent event trigger timeslot.
[0035] In one embodiment of the present invention, please refer to Figure 3 , Figure 3 This is a schematic diagram of communication time slot allocation provided in one embodiment of the present invention. Figure 3 As shown, a baseline communication cycle is 10 milliseconds (ms). The fixed time slot, marked by a thick solid line rectangle, is 2ms, used to transmit real-time position control commands and real-time position feedback from the servo drive. The dynamic polling time slot, marked by a dotted-dash line rectangle, is 5ms, during which the master controller polls sensors such as temperature and pressure sequentially. The event triggering time slot, marked by a thick dashed line rectangle, is 3ms. A bandwidth request is sent to the master controller via a micro-time slot to request a transmission window in subsequent event triggering time slots for reporting sudden data such as alarm data. For example, if a flow meter reports an alarm, the master controller, after detecting its bandwidth request, allocates a transmission window within the event triggering time slot for reporting detailed alarm data.
[0036] Step S240: Monitor the bandwidth utilization of each communication time slot and the data volume of each node device, and dynamically adjust the bandwidth resources of each communication time slot.
[0037] In one embodiment of the present invention, dynamically adjusting the bandwidth resources of each communication time slot includes: if a node device meets preset conditions in multiple reference communication cycles, then shrinking the communication time slot corresponding to the node device to obtain idle bandwidth resources. The preset conditions include that the data volume of the target time slot corresponding to the node device is less than a preset allocation quota, or the bandwidth utilization rate of the target time slot corresponding to the node device is less than a preset utilization rate threshold. The target time slot is a fixed time slot or a dynamically polled time slot. If the bandwidth request queue of the event-triggered time slot is greater than a preset quantity threshold, or the dynamically polled time slot is congested, then expanding the event-triggered time slot or the dynamically polled time slot according to the idle bandwidth resources and applying it in the next reference communication cycle.
[0038] In one embodiment of the present invention, the present invention adjusts bandwidth resources by adjusting the time slice of the corresponding communication time slot.
[0039] In one embodiment of the present invention, the master station controller monitors the bandwidth utilization of each communication time slot and the data traffic characteristics of each node device in real time. When the amount of data in a fixed time slot or a dynamic polling time slot is lower than the preset allocation for a long period of time, the master station controller can dynamically shrink the communication time slot and allocate the saved idle bandwidth resources to the more needed dynamic polling time slot or event-triggered time slot; otherwise, it can expand the capacity.
[0040] In one embodiment of the present invention, please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating the dynamic bandwidth management process provided in one embodiment of the present invention. Figure 4 As shown, monitoring begins; the master controller continuously monitors the bandwidth utilization of each communication time slot; it determines if the bandwidth utilization of the fixed time slot / dynamic polling time slot is consistently below a preset utilization threshold: if so, it dynamically shrinks the corresponding communication time slot; otherwise, it proceeds to the step of determining if the event trigger request queue is too long or the dynamic polling time slot is congested; if so, it expands the corresponding communication time slot from idle bandwidth resources; otherwise, it continues to monitor the bandwidth utilization of each communication time slot; a new time slot allocation configuration is generated and applied to the next baseline communication cycle. For example, the master controller monitors and finds that the data update frequency of a certain pressure sensor has decreased, and its bandwidth utilization in the dynamic polling time slot is consistently below 30%. The master controller then decides to shrink the time slice allocated to the pressure sensor and incorporate the saved idle bandwidth resources into the event trigger time slot for burst data transmission.
[0041] In one embodiment of the present invention, after dividing the reference communication period into multiple communication time slots, the method further includes: monitoring the communication status of each node device; if a node device does not respond or continuously sends error frames within multiple consecutive reference communication periods, the node device is identified as a faulty node, and the faulty node is removed from the dynamic polling list corresponding to each node device, and all time slot resources allocated to the faulty node are reclaimed.
[0042] In one embodiment of the present invention, the master station controller monitors the communication status of each node device. If a node device fails to respond or continuously sends error frames for multiple consecutive baseline communication cycles, the master station controller marks it as a faulty node, removes it from the dynamic polling list, and reclaims all time slot resources allocated to it, ensuring that the fault is isolated and does not affect the normal operation of other node devices in the network.
[0043] This invention seamlessly integrates field devices with various heterogeneous protocols through protocol abstraction and protocol conversion gateways, protecting existing user investments and improving protocol compatibility. A fixed time slot mechanism provides real-time assurance for critical control data, meeting the needs of high-performance motion control and other scenarios. Dynamic polling of time slots and bandwidth management mechanisms significantly improve network bandwidth utilization and flexibly adapt to dynamic changes in data flow. A faulty node isolation mechanism prevents the propagation of faults in individual nodes, enhancing the robustness of the entire bus communication system. Compared to a full upgrade to Time-Sensitive Networking (TSN), this invention achieves performance improvements at a lower cost through the enhancement and integration of bus communication technologies.
[0044] Please see Figure 5 , Figure 5 This is a block diagram of a bus communication device provided in one embodiment of the present invention. This device can be applied to... Figure 1 The implementation environment shown is specifically configured in the main station controller. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which this device is applicable.
[0045] like Figure 5 As shown, a bus communication device 500 according to an embodiment of the present invention includes: an acquisition module 510, an addressing module 520, a time slot division module 530, and a bandwidth adjustment module 540.
[0046] Among them, the acquisition module 510 is used to acquire the protocol type and physical address of multiple node devices; The addressing module 520 is used to assign global logical addresses to each node device and establish an address mapping table between global logical addresses, physical addresses and protocol types to enable transmission addressing of service data for each node device. The time slot division module 530 is used to divide the reference communication period into multiple communication time slots so as to transmit service data of different node devices and different service types through each communication time slot; The bandwidth adjustment module 540 is used to monitor the bandwidth utilization of each communication time slot and the data volume of each node device, and dynamically adjust the bandwidth resources of each communication time slot.
[0047] It should be noted that the bus communication device and the bus communication method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments and will not be repeated here. In practical applications, the bus communication device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0048] Embodiments of the present invention also provide a bus communication system, the system including node devices, conventional slave devices, and a bus communication device as described in claim 7, wherein the number of node devices is multiple; the node devices include multi-protocol slave devices and / or protocol conversion gateways; the multi-protocol slave devices are field devices that support at least one fieldbus protocol and support protocol format conversion; the conventional slave devices are field devices that support at least one fieldbus protocol but do not support protocol format conversion; the protocol conversion gateway is used to provide protocol format conversion services for the conventional slave devices; the protocol format conversion is used to convert the service data corresponding to the fieldbus protocol into the transmission format corresponding to the address mapping table, and the bus communication device is connected to the node devices.
[0049] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the bus communication method provided in the above embodiments.
[0050] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device provided in one embodiment of the present invention. Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0051] like Figure 6As shown, the computer system 600 includes a central processing unit 601, which can perform various appropriate actions and processes based on a program stored in a read-only memory 602 or a program loaded from a storage section 608 into a random access memory 603, such as performing the methods described in the above embodiments. The random access memory 603 also stores various programs and data required for system operation. The central processing unit 601, the read-only memory 602, and the random access memory 603 are interconnected via a bus 604. An input / output interface 605 is also connected to the bus 604.
[0052] The following components are connected to the input / output interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0053] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions defined in the system of the present invention.
[0054] The computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), flash memory, optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. Computer programs contained on computer-readable media can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0055] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0056] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.
[0057] Another aspect of the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the bus communication methods provided in the above embodiments. This computer-readable storage medium may be included in the electronic devices described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0058] In the above embodiments, unless otherwise specified, the use of ordinal numbers such as "first" and "second" to describe common objects only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must be in a given order, whether temporally, spatially, sequentially, or in any other way.
[0059] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A bus communication method characterized by, The method comprises: acquiring protocol types and physical addresses of a plurality of node devices; allocating global logical addresses to each of the node devices and establishing an address mapping table between the global logical addresses, the physical addresses and the protocol types to perform transmission addressing on service data of each of the node devices; dividing a reference communication period into a plurality of communication time slots to transmit service data of different node devices and different service types through each of the communication time slots; monitoring bandwidth utilization of each of the communication time slots and data volume of each of the node devices and dynamically adjusting bandwidth resources of each of the communication time slots.
2. The bus communication method according to claim 1, wherein, The method of dividing a reference communication period into a plurality of communication time slots comprises: dividing the reference communication period into fixed time slots, dynamic polling time slots and event-triggered time slots; generating a dynamic polling list according to data update periods and priorities of each of the node devices to transmit corresponding regular periodic data in the dynamic polling time slots according to polling of the dynamic polling list; wherein the fixed time slots are used to transmit low-latency periodic data corresponding to each of the node devices, and the event-triggered time slots are used to transmit burst data.
3. The bus communication method according to claim 2, wherein The event-triggered time slots comprise bandwidth application time slots and allocatable time slots; the bandwidth application time slots are used to transmit bandwidth applications to apply transmission windows for the burst data in subsequent allocatable time slots.
4. The bus communication method according to claim 2, wherein The method of dynamically adjusting bandwidth resources of each of the communication time slots comprises: if a node device meets preset conditions in a plurality of reference communication periods, shrinking a communication time slot corresponding to the node device to obtain idle bandwidth resources, the preset conditions comprising that data volume of a target time slot corresponding to the node device is less than a preset allocation quota or bandwidth utilization of the target time slot is less than a preset utilization threshold, the target time slot being the fixed time slot or the dynamic polling time slot; if a bandwidth request queue of the event-triggered time slot is greater than a preset quantity threshold or the dynamic polling time slot is congested, expanding the event-triggered time slot or the dynamic polling time slot according to the idle bandwidth resources and applying in a next reference communication period.
5. The bus communication method according to claim 2, wherein After dividing the reference communication period into a plurality of communication time slots, the method further comprises: monitoring communication states of each of the node devices; if a node device does not respond or continuously sends error frames in a plurality of continuous reference communication periods, determining the node device as a faulty node and removing the faulty node from a dynamic polling list corresponding to each of the node devices to recover all time slot resources allocated for the faulty node.
6. The bus communication method according to any one of claims 1 to 5, characterized by, After establishing the address mapping table between the global logical addresses, the physical addresses and the protocol types, the method further comprises: converting, by the node device, service data of a corresponding protocol type into a transmission format corresponding to the address mapping table; transmitting, by the node device, the service data converted from the corresponding communication time slot transmission format according to a service type of the service data and a device type of the node device.
7. A bus communication device, characterized by comprising: The device comprises: an acquisition module configured to acquire protocol types and physical addresses of a plurality of node devices; an addressing module configured to assign a global logical address to each of the node devices and to establish an address mapping table between the global logical address, the physical address and the protocol type for transmission addressing of service data of each of the node devices; a time slot division module configured to divide a reference communication period into a plurality of communication time slots for transmission of service data of different node devices and different service types via each of the communication time slots; a bandwidth adjustment module configured to monitor bandwidth utilization of each of the communication time slots and data volume of each of the node devices and to dynamically adjust bandwidth resources of each of the communication time slots.
8. A bus communication system, characterized by The system comprises node devices, conventional slave devices and the bus communication device of claim 7, wherein the number of the node devices is plural; The node devices comprise multi-protocol slave devices and / or protocol conversion gateways; The multi-protocol slave devices are field devices supporting at least one field bus protocol and supporting protocol format conversion; The conventional slave devices are field devices supporting at least one field bus protocol and not supporting protocol format conversion; The protocol conversion gateways are configured to provide protocol format conversion services for the conventional slave devices; The protocol format conversion is configured to convert service data corresponding to the field bus protocol into a transmission format corresponding to the address mapping table, and the bus communication device is connected with the node devices.
9. An electronic device, comprising: The electronic device comprises: one or more processors; a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the bus communication method of any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, which, when executed by a processor of a computer, causes the computer to perform the bus communication method of any one of claims 1 to 6.