Communication method and system

By using at least two links to work together between the initiator device and the receiving device, data packet transmission is collected and analyzed in real time, the problem of insufficient reliability of single-channel transmission data is solved, ensuring the continuity and security of industrial production.

CN120378067APending Publication Date: 2025-07-25PIPECHINA SOUTH CHINA CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510269563.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The single-channel data transmission method has obvious limitations in terms of reliability. Once the communication link fails, the data transmission of the entire control system will be interrupted, affecting the continuity and security of industrial production.

Method used

The initiator device obtains the reading results of the to-process data from the receiving device through at least two links, ensuring that each link works together, collects data in real time, transmits in the form of data packets, and improves transmission efficiency through parsing processing and reduces communication load.

Benefits of technology

It ensures the continuity and security of industrial production, improves data transmission efficiency, and reduces the communication load between the initiator and the receiving device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378067A_ABST
    Figure CN120378067A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and system, relates to the technical field of communication, and solves the technical problems that a single-channel data transmission mode in related technologies has obvious limitation in the aspect of reliability and can influence the continuity and safety of industrial production. The method comprises the following steps: in response to a reading operation on to-be-processed data, respectively sending a data reading request to a receiving end device based on at least two links between the initiating end device and the receiving end device, the data reading request comprising an initial storage address of the to-be-processed data and a data length of the to-be-processed data, the data reading request is used for requesting to execute the reading operation on the to-be-processed data; receiving a data reading response from the receiving end device based on each of the at least two links, wherein the data reading response received by each link comprises a target data packet; and analyzing the target data packet received by each link to obtain a reading result of the to-be-processed data corresponding to each link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a communication method and system. Background Art

[0002] In the field of industrial automation control, multiple control systems often need to work together to achieve joint control of threads, and data needs to be transmitted between different control systems.

[0003] In related technologies, data can be transmitted between different control systems using a single-channel transmission method, that is, data interaction between different control systems can be achieved only relying on one communication link.

[0004] However, the above single-channel data transmission method has obvious limitations in terms of reliability. Once the communication link fails, the data transmission of the entire control system will be interrupted, affecting the continuity and safety of industrial production. Summary of the Invention

[0005] This application provides a communication method and system, which solves the technical problem that the single-channel data transmission method in related technologies has obvious limitations in terms of reliability and will affect the continuity and safety of industrial production.

[0006] In a first aspect, this application provides a communication method, which is applied to an initiating device; the method includes: in response to a read operation on data to be processed, sending a data read request to the receiving device respectively based on at least two links between the initiating device and the receiving device, the data read request including the starting storage address of the data to be processed and the data length of the data to be processed, the data read request being used to request to perform the read operation on the data to be processed; receiving a data read response from the receiving device based on each of the at least two links, the data read response received by each link including a target data packet; parsing and processing the target data packet received by each link to obtain the read result of the data to be processed corresponding to each link.

[0007] Optionally, the method further includes: when a write operation on the data to be processed is performed, sending a data write instruction to the receiving device based on a target link, the data write instruction including the starting storage address of the data to be processed and the data length of the data to be processed, the data write instruction being used to indicate to perform the write operation on the data to be processed, the target link being any one of the at least two links in a normal state.

[0008] Optionally, at least two of the above links include a standby link, and the method further includes: when the standby link is in an abnormal state, deleting the read result of the data to be processed corresponding to the standby link.

[0009] Optionally, the method further includes: obtaining a first clock of the receiving-end device received based on the standby link at a first moment and a second clock of the receiving-end device received based on the standby link at a second moment, where the difference between the first moment and the second moment is a first duration; after a second duration, if the second clock is the same as the first clock, determining that the standby link is in an abnormal state, and the second duration is greater than the first duration.

[0010] Optionally, the method further includes: storing the read result of the data to be processed corresponding to each link in the storage area corresponding to each link.

[0011] In a second aspect, the present application provides a communication method, which is applied to a receiving-end device; the method includes: receiving, based on each of at least two links between the initiating-end device and the receiving-end device, a data reading request from the initiating-end device, where each data reading request includes a starting storage address of the data to be processed and a data length of the data to be processed; performing a reading operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed to obtain a read result of the data to be processed; performing an encapsulation process on the read result of the data to be processed to obtain a target data packet; and sending a data reading response to the initiating-end device based on each link, where the data reading response sent by each link includes the target data packet.

[0012] Optionally, the above data to be processed includes multiple communication program segments, and the performing a reading operation on the data to be processed specifically includes: performing a reading operation on each of the multiple communication program segments at intervals of a first scanning period, where the first scanning period is greater than a second scanning period, and the second scanning period is a scanning period executed by a controller in the receiving-end device.

[0013] Optionally, the method further includes: receiving, based on a target link, a data writing instruction from the initiating-end device, where the data writing instruction includes a starting storage address of the data to be processed and a data length of the data to be processed, and the target link is any one of the at least two links in a normal state; and performing the writing operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0014] Optionally, the performing the writing operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed specifically includes: writing the data to be processed into the storage area corresponding to the target link based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0015] In a third aspect, the present application provides a communication device, including: a transceiver module and a processing module; the transceiver module is configured to, in response to a read operation on data to be processed, send a data read request to the receiving device respectively based on at least two links between the initiating device and the receiving device, the data read request including the starting storage address of the data to be processed and the data length of the data to be processed, and the data read request is used to request to perform the read operation on the data to be processed; the transceiver module is further configured to receive a data read response from the receiving device based on each of the at least two links, and the data read response received by each link includes a target data packet; the processing module is configured to parse and process the target data packet received by each link to obtain the read result of the data to be processed corresponding to each link.

[0016] Optionally, the transceiver module is further configured to, when responding to a write operation on the data to be processed, send a data write instruction to the receiving device based on a target link, the data write instruction including the starting storage address of the data to be processed and the data length of the data to be processed, and the data write instruction is used to instruct to perform the write operation on the data to be processed, and the target link is any one of the at least two links in a normal state.

[0017] Optionally, at least two of the above links include a standby link, and the communication device further includes a deletion module; the deletion module is configured to delete the read result of the data to be processed corresponding to the standby link when the standby link is in an abnormal state.

[0018] Optionally, the communication device further includes a determination module; the transceiver module is further configured to obtain a first clock of the receiving device received based on the standby link at a first moment and a second clock of the receiving device received based on the standby link at a second moment, and the difference between the first moment and the second moment is a first duration; the determination module is configured to, after a second duration, if the second clock is the same as the first clock, determine that the standby link is in an abnormal state, and the second duration is greater than the first duration.

[0019] Optionally, the communication device further includes a storage module; the storage module is configured to store the read result of the data to be processed corresponding to each link into the storage area corresponding to each link.

[0020] Fourthly, the present application provides a communication device, including: a transceiver module and a processing module; the transceiver module is configured to receive a data reading request from an initiating device based on each of at least two links between the initiating device and the receiving device, and each of the data reading requests includes a starting storage address of the data to be processed and a data length of the data to be processed; the processing module is configured to perform a reading operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed, so as to obtain a reading result of the data to be processed; the processing module is further configured to perform an encapsulation process on the reading result of the data to be processed to obtain a target data packet; the transceiver module is further configured to send a data reading response to the initiating device based on each of the links, and the data reading response sent by each of the links includes the target data packet.

[0021] Optionally, the data to be processed includes a plurality of communication program segments; the processing module is specifically configured to perform a reading operation on each of the plurality of communication program segments every first scanning period, the first scanning period is greater than a second scanning period, and the second scanning period is a scanning period executed by a controller in the receiving device.

[0022] Optionally, the transceiver module is further configured to receive a data writing instruction from the initiating device based on a target link, the data writing instruction includes a starting storage address of the data to be processed and a data length of the data to be processed, and the target link is any one of the at least two links in a normal state; the processing module is further configured to perform the writing operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0023] Optionally, the processing module is specifically configured to write the data to be processed into a storage area corresponding to the target link based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0024] Fifthly, the present application provides a communication system, and the communication system includes a sending device and a receiving device. The sending device is configured to execute any one of the optional communication methods in the first aspect above, and the receiving device is configured to execute any one of the optional communication methods in the second aspect above.

[0025] Sixthly, the present application provides an electronic device, including: a processor and a memory configured to store instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement any one of the optional communication methods in the first aspect above, or implement any one of the optional communication methods in the second aspect above.

[0026] In a seventh aspect, the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is enabled to execute any of the optional communication methods in the first aspect above, or execute any of the optional communication methods in the second aspect above.

[0027] In an eighth aspect, the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions run on an electronic device, the electronic device is enabled to execute any of the optional communication methods in the first aspect above, or execute any of the optional communication methods in the second aspect above.

[0028] For the communication method and system provided by the present application, in response to a read operation on data to be processed, the initiating device can obtain the read result of the data to be processed from the receiving device based on at least two links, ensuring that each link (which can also be understood as each channel) can work collaboratively during normal operation, and collecting data between the initiating device and the receiving device in real time to ensure the continuity and safety of industrial production. Additionally, since the read result of the data to be processed is obtained by the initiating device through parsing and processing the target data packet, specifically, the data to be processed is transmitted between the initiating device and the receiving device in the form of data packets. This can improve the data transmission efficiency and reduce the communication load between the initiating device and the receiving device. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art.

[0030] Figure 1 It is a schematic diagram of the network architecture of a communication system provided by an embodiment of the present application;

[0031] Figure 2 It is a schematic diagram of the network structure of another communication system provided by an embodiment of the present application;

[0032] Figure 3 It is a schematic flowchart of a communication method provided by an embodiment of the present application;

[0033] Figure 4 It is a schematic flowchart of a method for determining the link state provided by an embodiment of the present application;

[0034] Figure 5 It is a schematic flowchart of a cyclic time-sharing scanning mechanism provided by an embodiment of the present application;

[0035] Figure 6 It is a schematic flowchart of a process for data reading provided by an embodiment of the present application;

[0036] Figure 7 Schematic flowchart of another communication method provided by an embodiment of the present application;

[0037] Figure 8 Schematic flowchart of a process for data selection provided by an embodiment of the present application;

[0038] Figure 9 Schematic flowchart of a process for data writing provided by an embodiment of the present application;

[0039] Figure 10 Schematic structural diagram of a communication device provided by an embodiment of the present application;

[0040] Figure 11 Schematic structural diagram of another communication device provided by an embodiment of the present application;

[0041] Figure 12 Schematic structural diagram of another communication device provided by an embodiment of the present application;

[0042] Figure 13 Schematic structural diagram of another communication device provided by an embodiment of the present application. Detailed implementation

[0043] The communication method and system provided by an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0044] Terms such as "first" and "second" in the description and drawings of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first clock and the second clock are used to distinguish different clocks, rather than to describe the specific order of the clocks.

[0045] In addition, the terms "include" and "have" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes other steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0046] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.

[0047] As used in this application, "and / or" includes any one of the two methods or the use of both methods simultaneously.

[0048] In the description of this application, unless otherwise specified, "a plurality of" means two or more.

[0049] In the current industrial control system site, there are often multiple control systems working together to achieve joint monitoring and control of the site. Different signals are connected to different systems, and data inter - transfer is required. For example, the basic process control system (BPCS) and the safety instrumented system (SIS), etc. Among different control systems, the common communication method mostly uses single - channel data transmission, often relying on only one communication link for data interaction. This single - channel communication method has obvious limitations in terms of reliability. Once the communication link fails, such as line damage, signal interruption caused by electromagnetic interference, etc., it will cause the data transmission of the control system to be interrupted, and then may lead to the failure of the entire control system, seriously affecting the continuity and safety of industrial production.

[0050] In addition, although some related technologies have realized the risks of single - channel and began to try to introduce redundant communication, most of the existing redundant communication technologies simply copy the communication link, lacking an intelligent management and efficient switching mechanism for dual channels. When the dual channels work simultaneously, problems such as data conflict and poor synchronization may occur, and there are defects such as high latency and large misjudgment rate in the fault judgment and switching process, which cannot truly meet the strict requirements of complex control systems for highly reliable and highly real - time communication.

[0051] Based on the description in the background technology, since in the related technology, the single - channel data transmission method has obvious limitations in terms of reliability, once the communication link fails, it will cause the data transmission of the entire control system to be interrupted, affecting the continuity and safety of industrial production. Based on this, the embodiments of this application provide a communication method and system. In response to the read operation of the data to be processed, the initiating device can obtain the read result of the data to be processed from the receiving device based on at least two links, ensuring that each link (which can also be understood as each channel) can work together during normal operation, and real - time collect the data between the initiating device and the receiving device for mutual transmission, guaranteeing the continuity and safety of industrial production. In addition, since the read result of the data to be processed is obtained by the initiating device through parsing and processing the target data packet, specifically, the data to be processed is transmitted between the initiating device and the receiving device in the form of data packets. This can improve the data transmission efficiency and reduce the communication load between the initiating device and the receiving device.

[0052] A communication method provided by an embodiment of the present application can be applied to a communication system. As Figure 1 shown, the communication system includes a sending-end device 101 and a receiving-end device 102. Generally, in practical applications, the connections between the above devices can be wireless connections. For the convenience of intuitively representing the connection relationships between the devices, Figure 1 solid lines are used for illustration in

[0053] Among them, the sending-end device 101 is used to send a data reading request to the receiving-end device 102, and the data reading request is used to request to perform a reading operation on the data to be processed.

[0054] The receiving-end device 102 is used to receive a data writing instruction from the sending-end device 101, and the data writing instruction is used to instruct to perform a writing operation on the data to be processed.

[0055] In the embodiment of the present application, the sending-end device 101 and the receiving-end device 102 can be divided into functional modules. Combining Figure 1 , as Figure 2 shown, the sending-end device 101 includes a main controller 1011, a standby controller 1012, a main communication module 1013, a standby communication module 1014, and other modules 1015. The receiving-end device 102 includes a main controller 1020, an expansion module 1021, a redundancy module 1022, other modules 1023, a standby controller 1024, an expansion module 1025, a redundancy module 1026, other modules 1027, an expansion module 1028, an expansion module 1029, a main communication module 1030, a standby communication module 1031, and other modules 1032.

[0056] In addition, the sending-end device 101 and the receiving-end device 102 can communicate based on at least two links. For example, Figure 2 the two links shown in

[0057] Specifically, the controllers (including the main controller 1011, the standby controller 1012, the main controller 1020, and the standby controller 1024) are used to perform encapsulation processing on the data to be processed and / or perform parsing processing on data packets.

[0058] The communication modules (including the main communication module 1013, the standby communication module 1014, the main communication module 1030, and the standby communication module 1031) are used to communicate with other devices / devices (specifically communication modules) in the communication system.

[0059] Expansion modules (including expansion module 1021, expansion module 1025, expansion module 1028, and expansion module 1029) are used to increase the number of additional input / output (I / O) points to meet the complex control requirements in a communication system, and can provide more data processing capabilities and network communication functions to adapt to different industrial application scenarios.

[0060] Redundancy modules (including redundancy module 1022 and redundancy module 1026) are used to provide backup modules / components for the communication system, ensuring that the communication system can continue to operate when the primary module / component fails, thereby reducing the risk of downtime and data loss.

[0061] Other modules (including other module 1015, other module 1023, other module 1027, and other module 1032) can be used to implement data acquisition, processing, storage, and analysis functions in a communication system / control system. These functions can be used for monitoring and optimizing the production process to help achieve the intelligence and automation of the production process.

[0062] Exemplarily, the electronic device executing the communication method provided in the embodiments of the present application can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device. The embodiments of the present application do not impose special restrictions on the specific form of the electronic device. It can perform human-computer interaction with the user through one or more of a keyboard, a touchpad, a touch screen, a remote control, voice interaction, or a handwriting device.

[0063] Optionally, the above-mentioned electronic device can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (content delivery network, CDN), and big data and artificial intelligence platforms.

[0064] As Figure 3 shown, the communication method provided in the embodiments of the present application can include S301 - S307.

[0065] S301. In response to a read operation on the data to be processed, the initiating device sends a data read request to the receiving device based on at least two links between the initiating device and the receiving device.

[0066] Wherein, the data read request includes the starting storage address of the data to be processed and the data length of the data to be processed, and the data read request is used to request a read operation on the data to be processed.

[0067] It should be understood that the initiating device and the receiving device in the embodiments of the present application may also be based on different control systems. That is, the initiating device can be understood as an initiating control system, and the receiving device can also be understood as a receiving control system.

[0068] In an alternative implementation, two communication media for data transmission can be designed between the initiating device and the receiving device. The medium type of the communication medium can be determined according to the communication protocol between the initiating device and the receiving device. The communication protocol can be a serial protocol or a network protocol, such as the MODBUS protocol. The communication medium can be a serial cable or a network cable.

[0069] In another alternative implementation, each end of each communication cable can be connected to a communication component in the initiating device and the receiving device respectively. The initiating device and the receiving device can be respectively provided with two communication components, specifically independent communication modules, which have independent communication interfaces.

[0070] In yet another alternative implementation, the initiating device and the receiving device can adopt a dual-machine hot standby redundant architecture, with two sets of mutually redundant controllers working together, and the data between the controllers is kept synchronized. Specifically, the main controller can periodically obtain data from the communication component, and the standby controller can periodically synchronize data with the main controller.

[0071] S302. The receiving device receives a data read request from the initiating device based on each of at least two links between the initiating device and the receiving device.

[0072] Wherein, each data read request includes the starting storage address of the data to be processed and the data length of the data to be processed.

[0073] S303. The receiving device performs a read operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed, and obtains a read result of the data to be processed.

[0074] In the embodiment of the present application, the data transmission between the initiating device and the receiving device can adopt an overall segmented reading and writing mechanism. For the reading process of the data to be processed, the data length of the data to be processed can be read from the above-mentioned starting storage address and mapped as a whole into the storage area allocated in the initiating device (specifically, the controller).

[0075] S304. The receiving device performs encapsulation processing on the reading result of the data to be processed to obtain a target data packet.

[0076] It can be understood that, in order to improve the transmission efficiency between the initiating device and the receiving device and reduce the communication load of the initiating device and the receiving device. For digital quantity data, since it only occupies 1 bit address in the communication system, a packet encapsulation transmission mechanism can be adopted, and the size of the encapsulation packet (or data packet) is determined by the processor in the controller. For example, it can be a 16-bit processor, and specifically, it can be encapsulated into 1 integer data, where each bit corresponds to a digital quantity data to be transmitted. For the reading process of the data to be processed, data encapsulation can be performed in the receiving device and data decapsulation can be performed in the initiating device.

[0077] S305. The receiving device sends a data reading response to the initiating device based on each link.

[0078] Among them, the data reading response sent by each link includes the target data packet.

[0079] S306. The initiating device receives the data reading response from the receiving device based on each link.

[0080] S307. The initiating device performs parsing processing on the target data packet received by each link to obtain the reading result of the data to be processed corresponding to each link.

[0081] In an optional implementation manner, the initiating device can determine the reading result of the data to be processed corresponding to any one of the above-mentioned multiple links as the target result of the data to be processed.

[0082] In another optional implementation manner, the above at least two links include a primary link. The initiating device can also determine the reading result of the data to be processed corresponding to the primary link as the target result of the data to be processed.

[0083] The technical solutions provided by the above embodiments can at least bring the following beneficial effects: As can be seen from S301 - S307, in response to a read operation on the data to be processed, the initiating device can obtain the read result of the data to be processed from the receiving device based on at least two links, ensuring that each link (which can also be understood as each channel) can work in coordination during normal operation, and collecting the data between the initiating device and the receiving device in real - time, thus guaranteeing the continuity and safety of industrial production. Additionally, since the read result of the data to be processed is obtained by the initiating device through parsing and processing the target data packet, specifically, the data to be processed is transmitted between the initiating device and the receiving device in the form of data packets. This can improve the data transmission efficiency and reduce the communication load between the initiating device and the receiving device.

[0084] In some embodiments, the sending device can also store the read result of the data to be processed corresponding to each of the above - mentioned links in the storage area corresponding to each link. Among them, one link corresponds to one storage area.

[0085] Specifically, at least two independent storage areas (which can also be understood as at least two independent register address areas) can be allocated in the initiating device. The type of the storage area / register address area can be selected as a readable and writable register, which are respectively used to store the read results of the data to be processed read by the initiating device from at least two links. The size of the storage area / register address area can be determined according to the amount of data read by the sending device.

[0086] In some other embodiments, among the above - mentioned at least two links, there is a standby link. When the standby link is in an abnormal state, the sending device can delete the read result of the data to be processed corresponding to the standby link.

[0087] In still some other embodiments, the communication method provided by the embodiments of the present application may further include step A - step B.

[0088] Step A: The sending device obtains the first clock of the receiving device received based on the standby link at the first moment and the second clock of the receiving device received based on the standby link at the second moment.

[0089] Wherein, the difference between the first moment and the second moment is the first duration.

[0090] Step B: After the second duration, if the second clock is the same as the first clock, the sending device determines that the standby link is in an abnormal state.

[0091] Wherein, the second duration is greater than the above - mentioned first duration.

[0092] Optionally, if the second clock is different from the first clock, the sending device can determine that the standby link is in a normal state.

[0093] Exemplarily, as Figure 4 shown. The clock of the receiving-end device can be transmitted to the initiating-end device through at least two links and stored in at least two register address areas, and variables are established in the program and associated with the addresses.

[0094] Assume that at least two links include a first link, and the variable in the first link is named T1s. Whether T1s changes can be detected in the sending-end device to implement the communication monitoring function. Specifically, the real-time clock T1s is compared with the clock T1sm after an interval of the first duration (assumed to be m seconds, m > 0). After a delay of the second duration (assumed to be T-Delay seconds), if the values of T1s and T1sm are the same, it is determined that the first link is in an abnormal state (specifically, communication interruption). If the values of T1s and T1sm are different, it is determined that the first link is in a normal state (specifically, normal communication).

[0095] Optionally, the above second duration can be greater than twice the first duration.

[0096] In an implementation manner of the embodiment of the present application, the above data to be processed includes multiple communication program segments, and performing a read operation on the data to be processed may specifically include step C.

[0097] Step C: The receiving-end device performs a read operation on each of the multiple communication program segments at intervals of the first scan period.

[0098] Wherein, the first scan period is greater than the second scan period, and the second scan period is the scan period executed by the controller in the receiving-end device.

[0099] It should be understood that since there may be multiple communication program segments for reading data and writing data in the controller of the receiving-end device, in order to ensure orderly and accurate data transfer and reduce the communication load of the controller, the above multiple communication program segments can adopt a cyclic time-sharing scanning mechanism. Among them, the first scan period (which can also be called the cyclic time-sharing scanning period) can be greater than the second scan period (which can also be called the controller scan period).

[0100] Exemplarily, as Figure 5 shown. Assume that the second scan period is T, the number of communication program segments is n, the first scan period is TON, and the timeout time set by the communication protocol is Tout, then it should satisfy:

[0101] n*TON > Tout, TON > T

[0102] Specifically, the initiating device can set a trigger enable variable Tn_EN for each communication program segment. The loop scanning process is as follows: Set T1_EN to 1, start timing and execute the first communication program segment. After maintaining the TP time, set T1_EN to 0. After the delay reaches the TON time, set T2_EN to 1, restart timing and execute the second communication program segment. After maintaining the TP time, set T2_EN to 0. After the delay reaches the TON time, trigger sequentially backward until Tn_EN is set to 1, start timing and execute the nth communication program segment. After maintaining the TP time, set Tn_EN to 0. After the delay of the TON time, set T1_EN to 1 again, and perform the loop in this way.

[0103] The following uses a complete example to illustrate the process of the initiating device reading data in the embodiment of the present application.

[0104] As Figure 6 shown, the main controller of the initiating device can initiate a data reading request, specifically by transmitting the reading signal to two communication modules (i.e., communication module 1 and communication module 2) in the initiating device, so as to read data through two communication links (i.e., link 1 and link 2) between the initiating device and the receiving device.

[0105] Then, two communication modules (i.e., communication module 3 and communication module 4) in the receiving device can transmit the reading signal to the main controller of the receiving device after receiving the reading signal, so as to implement the data reading process.

[0106] During the data reading process, the main controller of the receiving device can encapsulate the read data and send it to two communication modules in the initiating device through two communication modules in the receiving device. Then, the main controller of the initiating device can synchronize the data in the two communication modules of the initiating device periodically and perform data de-encapsulation. Then, the main controller in the initiating device can also perform communication monitoring and data selection processes.

[0107] In addition, the backup controller in the initiating device can synchronize the main controller in the initiating device, and the backup controller in the receiving device can also synchronize the main controller in the receiving device.

[0108] As Figure 7 shown, the communication method provided by the embodiment of the present application may further include S701 - S703.

[0109] S701. In response to the write operation of the data to be processed, the initiating device sends a data write instruction to the receiving device based on the target link.

[0110] Among them, the data writing instruction includes the starting storage address of the data to be processed and the data length of the data to be processed. The data writing instruction is used to indicate to perform a writing operation on the data to be processed, and the target link is any one of the at least two links in the normal state.

[0111] S702. The receiving-end device receives the data writing instruction from the initiating-end device based on the target link.

[0112] It should be understood that the initiating-end device and the receiving-end device in the embodiments of the present application can perform bidirectional data transmission and reception, and the communication parameters and data formats can be determined by the adopted protocol. The data transmission and reception process can be implemented by the method of dual-channel reading and single-channel writing between the initiating-end device and the receiving-end device.

[0113] S703. The receiving-end device performs a writing operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0114] It should be understood that the receiving-end device can start from the starting storage address of the data to be processed and write the data length of the data to be processed into the storage area (or register address area) allocated by the receiving-end device (specifically, the controller) as a whole mapping. For data with non-consecutive register address areas, the receiving-end device can also perform segmented reading and writing respectively in the manner provided in the above embodiments. For the data in the storage area / register address area after the reading and writing process is completed, variables can be established according to the usage requirements, and after being associated with the addresses, they can be referenced inside the program.

[0115] In the embodiments of the present application, the data redundancy working mode and data selection mechanism of the at least two links can be specified. Specifically, among the at least two links, there are a primary link (also called the default working link) and a standby link. The sending-end device and / or the receiving-end device can determine which link's corresponding data to select by judging the communication states of the primary link and the standby link.

[0116] Exemplarily, as Figure 8 shown. If the communication state of the primary link is judged to be normal, or the communication state of the standby link is judged to be abnormal (i.e., not normal), or the comprehensive judgment that the communication state of the primary link is abnormal and the communication state of the standby link is normal is false (i.e., not true, specifically, the communication state of the primary link is judged to be normal and / or the communication state of the standby link is judged to be abnormal). Then the data corresponding to the primary link can be selected.

[0117] Correspondingly, if the comprehensive judgment that the communication status of the primary link is abnormal and the communication status of the backup link is abnormal is true, specifically, the communication status of the primary link is judged to be abnormal and the communication status of the backup link is judged to be normal. Then the data corresponding to the backup link can be selected.

[0118] In an optional implementation manner, the above receiving end device performs a write operation on the data to be processed based on the starting storage address and the data length of the data to be processed, specifically including step D.

[0119] Step D: The receiving end device writes the data to be processed into the storage area corresponding to the target link based on the starting storage address and the data length of the data to be processed.

[0120] It should be understood that an independent storage area (or an independent register address area) can be allocated in the receiving end device. The type of this storage area / register address area can be a readable and writable register, which is used to store the data to be written. The size of this storage area / register address area can be determined according to the amount of data to be written.

[0121] The following uses a complete example to illustrate the process of the receiving end device writing data in the embodiments of the present application.

[0122] As Figure 9 shown, the main controller of the initiating end device can initiate a data write request. After encapsulating the data to be processed and the main controller performs communication monitoring, link selection can be performed. That is, select a certain link among at least two links to implement the process of writing the data to be processed.

[0123] After that, the initiating end device can send a write signal to the communication module 3 or communication module 4 in the receiving end device via link 1 or link 2 through communication module 1 or communication module 2. Then the main controller in the receiving end device can perform cycle synchronization and data de-encapsulation on the data in communication module 3 or communication module 4, thereby completing the data write process.

[0124] In addition, the backup controller in the initiating end device can synchronize the main controller in the initiating end device, and the backup controller in the receiving end device can also synchronize the main controller in the receiving end device.

[0125] Embodiments of the present application can divide functional modules for the initiating device, the receiving device, etc. according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0126] In the case of dividing each functional module corresponding to each function, Figure 10 FIG. shows a possible structural schematic diagram of the communication device involved in the above embodiment, as Figure 10 shown, the communication device 100 may include: a transceiver module 1001 and a processing module 1002.

[0127] The transceiver module 1001 is configured to, in response to a read operation on the data to be processed, send a data read request to the receiving device respectively based on at least two links between the initiating device and the receiving device, where the data read request includes the starting storage address of the data to be processed and the data length of the data to be processed, and the data read request is used to request to perform the read operation on the data to be processed.

[0128] The transceiver module 1001 is further configured to receive a data read response from the receiving device based on each of the at least two links, and the data read response received by each link includes a target data packet.

[0129] The processing module 1002 is configured to parse and process the target data packet received by each link to obtain the read result of the data to be processed corresponding to each link.

[0130] Optionally, the transceiver module 1001 is further configured to, when responding to a write operation on the data to be processed, send a data write instruction to the receiving device based on a target link, where the data write instruction includes the starting storage address of the data to be processed and the data length of the data to be processed, and the data write instruction is used to instruct to perform the write operation on the data to be processed, and the target link is any one of the at least two links in a normal state.

[0131] Optionally, at least two of the above links include a standby link, and the communication device 100 further includes a deletion module 1003.

[0132] The deletion module 1003 is configured to delete the read result of the data to be processed corresponding to the standby link when the standby link is in an abnormal state.

[0133] Optionally, the communication device 100 further includes a determination module 1004.

[0134] The transceiver module 1001 is further configured to obtain the first clock of the receiving-end device received based on the standby link at a first moment and the second clock of the receiving-end device received based on the standby link at a second moment, and the difference between the first moment and the second moment is a first duration.

[0135] The determination module 1004 is configured to, after a second duration, determine that the standby link is in an abnormal state if the second clock is the same as the first clock, and the second duration is greater than the first duration.

[0136] Optionally, the communication device 100 further includes a storage module 1005.

[0137] The storage module 1005 is configured to store the read result of the data to be processed corresponding to each link in the storage area corresponding to each link.

[0138] In the case of adopting an integrated unit, Figure 11 shows a possible structural schematic diagram of the communication device involved in the above embodiment. As Figure 11 shown, the communication device 110 may include: a processing module 1101 and a communication module 1102. The processing module 1101 may be configured to control and manage the actions of the communication device 110. The communication module 1102 may be configured to support the communication of the communication device 110 with other entities. Optionally, as Figure 11 shown, the communication device 110 may further include a storage module 1103 for storing the program code and data of the communication device 110.

[0139] Wherein, the processing module 1101 may be a processor or a controller. The communication module 1102 may be a transceiver, a transceiver circuit or a communication interface, etc. The storage module 1103 may be a memory.

[0140] Wherein, when the processing module 1101 is a processor, the communication module 1102 is a transceiver, and the storage module 1103 is a memory, the processor, the transceiver and the memory may be connected through a bus. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0141] In the case of dividing each functional module corresponding to each function, Figure 12 shows a possible structural schematic diagram of the communication device involved in the above embodiment, as Figure 12As shown, the communication device 120 may include: a transceiver module 1201 and a processing module 1202.

[0142] The transceiver module 1201 is configured to receive, based on each of at least two links between the initiating device and the receiving device, a data reading request from the initiating device, and each data reading request includes a starting storage address of the data to be processed and a data length of the data to be processed.

[0143] The processing module 1202 is configured to perform a reading operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed, so as to obtain a reading result of the data to be processed.

[0144] The processing module 1202 is further configured to perform encapsulation processing on the reading result of the data to be processed to obtain a target data packet.

[0145] The transceiver module 1201 is further configured to send a data reading response to the initiating device based on each link, and the data reading response sent by each link includes the target data packet.

[0146] Optionally, the data to be processed includes a plurality of communication program segments.

[0147] The processing module 1202 is specifically configured to perform a reading operation on each of the plurality of communication program segments every first scanning period, the first scanning period is greater than a second scanning period, and the second scanning period is a scanning period executed by a controller in the receiving device.

[0148] Optionally, the transceiver module 1201 is further configured to receive a data writing instruction from the initiating device based on a target link, the data writing instruction includes a starting storage address of the data to be processed and a data length of the data to be processed, and the target link is any one of the at least two links in a normal state.

[0149] The processing module 1202 is further configured to perform the writing operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0150] Optionally, the processing module 1202 is specifically configured to write the data to be processed into a storage area corresponding to the target link based on the starting storage address of the data to be processed and the data length of the data to be processed.

[0151] In the case of adopting an integrated unit, Figure 13 shows a possible structural schematic diagram of the communication device involved in the above embodiment. As Figure 13As shown, the communication device 130 may include: a processing module 1301 and a communication module 1302. The processing module 1301 may be used to control and manage the operations of the communication device 130. The communication module 1302 may be used to support the communication between the communication device 130 and other entities. Optionally, as Figure 13 shown, the communication device 130 may further include a storage module 1303 for storing the program code and data of the communication device 130.

[0152] Among them, the processing module 1301 may be a processor or a controller. The communication module 1302 may be a transceiver, a transceiver circuit, a communication interface, etc. The storage module 1303 may be a memory.

[0153] Among them, when the processing module 1301 is a processor, the communication module 1302 is a transceiver, and the storage module 1303 is a memory, the processor, the transceiver, and the memory may be connected via a bus. The bus may be a PCI bus, an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0154] It should be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0155] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.

[0156] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0157] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that contains one or more media integrated therein. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.

[0159] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A communication method, characterized in that, Applied to the initiating device, the method includes: In response to a read operation on the data to be processed, send a data read request to the receiving device based on at least two links between the initiating device and the receiving device, the data read request including the starting storage address of the data to be processed and the data length of the data to be processed, the data read request being used to request to perform the read operation on the data to be processed; Receive a data read response from the receiving device based on each of the at least two links, the data read response received by each link including a target data packet; Parse and process the target data packet received by each link to obtain the read result of the data to be processed corresponding to each link.

2. The method according to claim 1, characterized in that, The method further includes: In response to a write operation on the data to be processed, send a data write indication to the receiving device based on a target link, the data write indication including the starting storage address of the data to be processed and the data length of the data to be processed, the data write indication being used to indicate to perform the write operation on the data to be processed, the target link being any one of the at least two links in a normal state.

3. The method according to claim 1, characterized in that, At least two of the links include a standby link, and the method further includes: When the standby link is in an abnormal state, delete the read result of the data to be processed corresponding to the standby link.

4. The method according to claim 3, wherein The method further includes: Obtain a first clock of the receiving device received based on the standby link at a first moment and a second clock of the receiving device received based on the standby link at a second moment, the difference between the first moment and the second moment being a first duration; After a second duration, if the second clock is the same as the first clock, determine that the standby link is in an abnormal state, the second duration being greater than the first duration.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Store the read result of the data to be processed corresponding to each link in the storage area corresponding to each link.

6. A communication method, characterized in that, Applied to the receiving device, the method includes: Receive a data read request from the initiating device based on each of at least two links between the initiating device and the receiving device, each data read request including the starting storage address of the data to be processed and the data length of the data to be processed; Perform a read operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed to obtain the read result of the data to be processed; Perform an encapsulation process on the read result of the data to be processed to obtain a target data packet; Send a data read response to the initiating device based on each link, the data read response sent by each link including the target data packet.

7. The method according to claim 6, characterized in that, The data to be processed includes multiple communication program segments, and performing the read operation on the data to be processed includes: A read operation is performed on each of the multiple communication program segments every first scan period, where the first scan period is greater than the second scan period, and the second scan period is the scan period executed by the controller in the receiving end device.

8. The method according to claim 6 or 7, characterized in that, The method further includes: Receiving a data write indication from the initiating end device based on a target link, where the data write indication includes the starting storage address of the data to be processed and the data length of the data to be processed, and the target link is any one of the at least two links in a normal state; Performing the write operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed.

9. The method according to claim 8, wherein The performing the write operation on the data to be processed based on the starting storage address of the data to be processed and the data length of the data to be processed includes: Writing the data to be processed into the storage area corresponding to the target link based on the starting storage address of the data to be processed and the data length of the data to be processed.

10. A communication system, characterized in that, The communication system includes an initiating end device and a receiving end device; The initiating end device is configured to execute the communication method according to any one of claims 1-5 above; The receiving end device is configured to execute the communication method according to any one of claims 6-9 above.