Data aggregation and transmission method and apparatus, and device and storage medium
By configuring the aggregation and deaggregation modules, the data between the PLC and I/O devices is combined and split into an aggregated message for transmission, which solves the problems of network bandwidth waste and low data transmission efficiency in C2D communication and achieves more efficient and reliable data transmission.
Patent Information
- Application Number
- PCT/CN2024/143847
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-02
- Filing Date
- 2024-12-30
- Publication Date
- 2025-10-09
AI Technical Summary
In C2D communication between PLCs and industrial field I/O devices, existing technologies have problems such as wasted network bandwidth resources, low data transmission efficiency, poor reliability and stability, especially due to network congestion and quality fluctuations caused by the transmission of a large number of data packets in a short period of time.
Through the configuration of the aggregation module and the deaggregation module, the aggregation module combines multiple I/O data into an aggregated message for transmission, and the deaggregation module splits it into independent data and sends it to the corresponding device, reducing the proportion of header data, increasing the contribution rate of network resources to load data, and reducing the impact of network congestion and quality fluctuations.
It improves the efficiency, reliability and stability of data transmission, reduces the waste of network bandwidth resources, and ensures the accuracy and reliability of data transmission in the network.
Smart Images

Figure CN2024143847_09102025_PF_FP_ABST
Abstract
Description
Data aggregation and transmission method, device, equipment and storage medium
[0001] This disclosure claims priority to Chinese patent application No. 202410396811.1, filed on April 2, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of communication technology, and in particular to a method and apparatus, device, and storage medium for data aggregation and transmission. Background Art
[0003] To meet the on-demand interconnection requirements of all production factors in intelligent manufacturing, leveraging mobile communication technology for controller-to-device (C2D) communication between industrial controllers and field I / O (input / output) devices is a key solution for realizing the Industrial Internet. Industrial controllers, such as programmable logic controllers (PLCs), operate in a cyclical scanning mode, sending output data to I / O devices during each scan cycle.
[0004] Currently, the process of C2D data transmission between PLC and the I / O devices of the industrial control system is as follows: the PLC encapsulates the I / O data to be transmitted into multiple IP packets and outputs them to each corresponding I / O device through the communication network. During the operation of the PLC, the above operation is repeated until the data transmission is completed. Summary of the Invention
[0005] In a first aspect, the present disclosure provides a method for data aggregation and transmission, the method being performed by an aggregation module, the method comprising:
[0006] In some embodiments, as described above, the aggregation module obtains information of N I / O devices in the PLC, and generates aggregation configuration information of the aggregation module and deaggregation configuration information of the deaggregation module based on the information of the N I / O devices, wherein the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period, and the deaggregation configuration information includes the aggregation order of each I / O data and the starting address of each I / O data, and N is a positive integer;
[0007] The aggregation module performs aggregation configuration according to the aggregation configuration information and reads the I / O data according to the aggregation configuration result; combines the read I / O data according to the aggregation configuration result to generate an aggregation message, and outputs the aggregation message to the de-aggregation module;
[0008] The aggregation module sends the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration according to the deaggregation configuration information, and splits the aggregate message sent by the aggregation module based on the deaggregation configuration result to generate N I / O data, and sends the N I / O data to the corresponding N I / O devices.
[0009] In some embodiments, the above method of generating aggregation configuration information of the aggregation module and de-aggregation configuration information of the de-aggregation module based on information of N I / O devices may include:
[0010] The aggregation module determines the aggregation cycle, the aggregation order of each I / O data and the memory address of each I / O data based on the information of N I / O devices, and calculates the starting address of each I / O data in the aggregation message;
[0011] Generate aggregation configuration information based on the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period;
[0012] De-aggregation configuration information is generated according to the aggregation order of each I / O data and the starting address of each I / O data.
[0013] In some embodiments, the above method, in which the aggregation module performs aggregation configuration according to the aggregation configuration information and reads I / O data according to the aggregation configuration result, may include:
[0014] The aggregation module performs aggregation configuration on the aggregation module according to the aggregation configuration information;
[0015] After the aggregation configuration is completed, each I / O data is read from the PLC through the aggregation cycle of the aggregation configuration result and the memory address of each I / O data;
[0016] The method further includes: combining the read I / O data according to the aggregation configuration result to generate an aggregation message, and outputting the aggregation message to the de-aggregation module.
[0017] In some embodiments, the read I / O data are combined to generate an aggregate message according to the aggregation configuration result, and the aggregate message is output to the de-aggregation module, which may include: the aggregation module combines the read I / O data according to the aggregation order of the individual I / O data in the aggregation configuration result to generate an aggregate frame; and encapsulates the aggregate frame into an aggregate message and then outputs the aggregate message to the de-aggregation module.
[0018] In a second aspect, the present disclosure provides another method for data aggregation and transmission, which is performed by a deaggregation module and includes:
[0019] The deaggregation module obtains deaggregation configuration information sent by the aggregation module and performs deaggregation configuration according to the deaggregation configuration information; wherein the deaggregation configuration information is generated by the aggregation module after obtaining information of N I / O devices in the PLC and based on the information of the N I / O devices, and the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, where N is a positive integer;
[0020] The de-aggregation module splits the aggregated message into N I / O data according to the de-aggregation configuration result; and
[0021] The deaggregation module sends N I / O data to the corresponding N I / O devices.
[0022] The aggregate message is obtained in the following manner: an aggregation module generates aggregation configuration information based on information of N I / O devices, performs aggregation configuration according to the aggregation configuration information, reads N I / O data according to the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data according to the aggregation order of each I / O data in the aggregation configuration result to generate an aggregate message, and outputs the aggregate message to a de-aggregation module; and the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period.
[0023] In some embodiments, as in the above method, the deaggregation module obtains the deaggregation configuration information sent by the aggregation module, and performs deaggregation configuration according to the deaggregation configuration information, which may include:
[0024] The deaggregation module receives the deaggregation configuration information sent by the aggregation module, obtains the corresponding I / O device configuration information by identifying all connected I / O device interfaces, and configures the deaggregation module according to the I / O device configuration information and the deaggregation configuration information;
[0025] In some embodiments, the deaggregation module sends N I / O data to corresponding N I / O devices, which may include:
[0026] The deaggregation module calls each I / O device write channel corresponding to the N I / O data through the deaggregation configuration result, so that each I / O data is transmitted to each I / O device through each I / O device write channel.
[0027] In some embodiments, as in the above method, the deaggregation module obtains the deaggregation configuration information sent by the aggregation module, and performs deaggregation configuration according to the deaggregation configuration information, which may include:
[0028] The de-aggregation module obtains the de-aggregation configuration information sent by the aggregation module, and obtains the corresponding I / O device configuration information by identifying all connected I / O device interfaces; wherein the I / O device configuration information includes interface information;
[0029] The deaggregation module generates a correspondence between data addresses and device interfaces based on the corresponding interface information in all I / O device configuration information and the starting addresses of N I / O data in the deaggregation configuration information, and configures the deaggregation module based on the correspondence between data addresses and device interfaces.
[0030] In some embodiments, the above method, the deaggregation module splits the aggregated message into N I / O data according to the deaggregation configuration result, which may include:
[0031] After receiving the aggregation message, the deaggregation module parses the aggregation message according to the starting addresses of the N I / O data in the deaggregation configuration result and the aggregation order of each I / O data to generate N I / O data.
[0032] In some embodiments, as described above, the deaggregation module may send N I / O data to corresponding N I / O devices, which may include:
[0033] The de-aggregation module determines the device interfaces corresponding to the N I / O data for data transmission according to the correspondence between the data addresses and the device interfaces of the de-aggregation configuration result;
[0034] According to the device interface corresponding to each I / O data, the write channel corresponding to each device interface is called, and the N I / O data are sent to the corresponding I / O devices through each write channel.
[0035] In a third aspect, the present disclosure provides a device for data aggregation and transmission, comprising:
[0036] A first control module is configured to obtain information of N I / O devices in the PLC and generate aggregation configuration information of an aggregation module and deaggregation configuration information of a deaggregation module based on the information of the N I / O devices, wherein the aggregation configuration information includes an aggregation order of each I / O data, a memory address of each I / O data, and an aggregation period; the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, and N is a positive integer;
[0037] The framing module is used to perform aggregation configuration according to the aggregation configuration information and read the I / O data according to the aggregation configuration result; it also combines the read I / O data to generate an aggregation message according to the aggregation configuration result and outputs the aggregation message to the de-aggregation module;
[0038] The first control module is also used to send the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration according to the deaggregation configuration information, and splits the aggregation message sent by the aggregation module based on the deaggregation configuration result to generate N I / O data, and sends the N I / O data to the corresponding N I / O devices.
[0039] In some embodiments, the first control module is further configured to enable the aggregation module to determine, based on information of the N I / O devices, an aggregation period, an aggregation order of each I / O data, and a memory address of each I / O data, and calculate a starting address of each I / O data in the aggregated message;
[0040] Generate aggregation configuration information based on the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period;
[0041] De-aggregation configuration information is generated according to the aggregation order of each I / O data and the starting address of each I / O data.
[0042] In some embodiments, the framing module is further configured to enable the aggregation module to perform aggregation configuration on the aggregation module according to the aggregation configuration information;
[0043] After the aggregation configuration is completed, each I / O data is read from the PLC through the aggregation cycle of the aggregation configuration result and the memory address of each I / O data.
[0044] The framing module is further configured to combine the read I / O data to generate an aggregate message according to the aggregation configuration result, and output the aggregate message to the de-aggregation module.
[0045] In some embodiments, the framing module is further configured to
[0046] The aggregation module combines the read I / O data according to the aggregation order of the I / O data in the aggregation configuration result to generate an aggregation frame; and encapsulates the aggregation frame into an aggregation message and outputs the aggregation message to the de-aggregation module.
[0047] In a fourth aspect, the present disclosure provides another apparatus for data aggregation and transmission, comprising:
[0048] a second control module, configured to obtain deaggregation configuration information sent by the aggregation module and perform deaggregation configuration according to the deaggregation configuration information; wherein the deaggregation configuration information is generated by the aggregation module after obtaining information of N I / O devices in the PLC and based on the information of the N I / O devices, and the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, where N is a positive integer;
[0049] An addressing module is configured to decompose an aggregate message to generate N I / O data according to a de-aggregation configuration result, wherein the aggregate message is obtained in the following manner: the aggregation module generates aggregation configuration information according to information of the N I / O devices, performs aggregation configuration according to the aggregation configuration information, reads the N I / O data according to the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data according to the aggregation order of each I / O data in the aggregation configuration result to generate an aggregate message, and outputs the aggregate message to the de-aggregation module; and the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period.
[0050] The addressing module is also used to send N I / O data to corresponding N I / O devices.
[0051] In some embodiments, the second control module is also used to enable the deaggregation module to receive the deaggregation configuration information sent by the aggregation module, and obtain the corresponding I / O device configuration information by identifying all connected I / O device interfaces; and configure the deaggregation module according to the I / O device configuration information and the deaggregation configuration information.
[0052] In some embodiments, the data aggregation and transmission device further includes an interface management module.
[0053] In some embodiments, the addressing module is also used to enable the deaggregation module to call the I / O device write channels corresponding to the N I / O data generated by the interface management module 703 through the deaggregation configuration results, so that each I / O data is transmitted to each I / O device through each I / O device write channel.
[0054] In some embodiments, the second control module is further configured to enable the deaggregation module to obtain the deaggregation configuration information sent by the aggregation module, and obtain corresponding I / O device configuration information by identifying all connected I / O device interfaces; wherein the I / O device configuration information includes interface information;
[0055] The deaggregation module generates a correspondence between data addresses and device interfaces according to the corresponding interface information in all I / O device configuration information and the starting addresses of N I / O data in the deaggregation configuration information, and configures the deaggregation module according to the correspondence between data addresses and device interfaces.
[0056] In some embodiments, the addressing module is further configured to enable the deaggregation module to parse the aggregate message according to the starting addresses of the N I / O data in the deaggregation configuration result and the aggregation order of each I / O data after receiving the aggregate message, so as to generate N I / O data.
[0057] In some embodiments, the addressing module is further configured to enable the deaggregation module to determine the device interfaces for data transmission corresponding to the N I / O data according to the correspondence between the data addresses and the device interfaces of the deaggregation configuration result;
[0058] The write channels corresponding to the respective device interfaces generated by the interface management module are called according to the device interfaces corresponding to the respective I / O data, and the N I / O data are sent to the corresponding respective I / O devices through the respective write channels.
[0059] In some embodiments, the interface management module is further configured to enable the deaggregation module to generate a write channel corresponding to each I / O device by identifying each connected I / O device, so as to be called by the deaggregation module when performing I / O data transmission.
[0060] In a fifth aspect, the present disclosure provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0061] Memory stores computer-executable instructions;
[0062] The processor executes the computer-executable instructions stored in the memory to implement the method involved in the first aspect or the second aspect above.
[0063] In a sixth aspect, the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method involved in the first or second aspect above.
[0064] In a seventh aspect, the present disclosure provides a computer program product comprising computer instructions, which, when executed by a processor, implement the method as described in the first or second aspect above.
[0065] In an eighth aspect, the present disclosure provides a computer program comprising computer instructions, which, when executed by a processor, implement the method as described in the first or second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0067] FIG1 is a schematic diagram of an application scenario of a method for data aggregation and transmission provided by an embodiment of the present disclosure.
[0068] FIG2 is a structural diagram of a method for data aggregation and transmission provided by an embodiment of the present disclosure.
[0069] FIG3 is a flow chart of a method for data aggregation and transmission provided by an embodiment of the present disclosure.
[0070] FIG4 is a schematic diagram of the structure of an aggregate message provided by an embodiment of the present disclosure.
[0071] FIG5 is a flowchart of a method for data aggregation and transmission provided by an embodiment of the present disclosure.
[0072] FIG6 is a schematic structural diagram of a device for data aggregation and transmission provided by an embodiment of the present disclosure.
[0073] FIG7 is a schematic structural diagram of another device for data aggregation and transmission provided by an embodiment of the present disclosure.
[0074] FIG8 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
[0075] The above drawings have shown clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0077] In this disclosure, expressions such as "first" and "second" do not limit the quantity or order of execution, and expressions such as "first" and "second" do not necessarily mean different. Unless otherwise specified, " / " means "or" or "and / or." For example, A / B can mean A or B. "And / or" in this document is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A, only B, and A and B.
[0078] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0079] C2D communication applies mobile communication technology to industrial control systems, enabling controller-to-device communication between industrial controllers and industrial I / O devices. Industrial control systems consist of industrial controllers, multiple industrial I / O devices, and gateways. Industrial controllers, including programmable logic controllers (PLCs), operate in a cyclical scanning mode, transmitting C2D data in a specific communication cycle. During each C2D communication cycle, the PLC must output a large number of data packets to the vast number of I / O devices on the industrial site.
[0080] The process of C2D data transmission between PLC and industrial I / O devices is as follows: PLC encapsulates the I / O data to be transmitted into multiple IP data packets and outputs them to each corresponding I / O device through the communication network within one communication cycle. During the operation of PLC, the above operations are repeated in each communication cycle until the data transmission is completed.
[0081] For example, FIG1 is a schematic diagram of an application scenario of a method for data aggregation and transmission provided by an embodiment of the present disclosure. As shown in FIG1 , the application scenario of the method for data aggregation and transmission includes a PLC industrial controller 11, a gateway 12, multiple I / O devices 13, and multiple data packets 14. The PLC encapsulates the I / O data to be transmitted into multiple data packets, and sends each data packet from the cloud platform to the gateway device at the industrial site during each communication cycle. The gateway device then sends the data packets encapsulated from each I / O data to the corresponding I / O device, so that each I / O device receives the required data and performs subsequent industrial operations based on the data.
[0082] However, since the I / O data is encapsulated into multiple data packets, each data packet includes header data and payload data, wherein the header data occupies a large number of bytes of the data packet and the payload data only occupies a small number of bytes. Therefore, in the process of transmitting multiple data packets, a large amount of network bandwidth resources are used to transmit the header data of each data packet, and the contribution rate of network bandwidth resources to the transmission of payload data in the data packet is low, resulting in a waste of network bandwidth resources, and the payload data transmitted by a certain network bandwidth resource is limited, which reduces the data transmission efficiency; in addition, the communication cycle of C2D data transmission is short, and all data packets need to be transmitted to each I / O device at the other end within one communication cycle. Therefore, a large number of data packets are transmitted in the network at the same time period, causing congestion in the communication network, and a large number of data packets are easily affected by fluctuations in network quality, which is likely to cause some data packets to arrive at each I / O device late, reducing data transmission efficiency while also reducing the reliability and stability of data transmission.
[0083] The present disclosure controls the required I / O devices through the PLC to access the deaggregation module of the industrial control system to complete the connectivity of the C2D data transmission channel, and then obtains the information of N I / O devices from the PLC through the aggregation module, and generates deaggregation configuration information and aggregation configuration information according to the device information, and transmits the deaggregation configuration information to the deaggregation module through the network. The aggregation module is configured according to the aggregation configuration information and then reads the I / O data, and the read I / O data is combined to generate an aggregation message, and the aggregation message is transmitted to the deaggregation module through the network, so that the deaggregation module of the industrial control system configures the deaggregation module according to the received deaggregation configuration information and the interface information of each connected I / O device, and parses the received aggregation message after the configuration is completed to generate each I / O data, and determines the I / O device interface corresponding to each I / O data through the configuration result of the deaggregation module, thereby determining the corresponding I / O device, and realizing the transmission of the I / O data by calling the corresponding device interface channel. By aggregating each I / O data into an aggregate message for transmission, the proportion of header data bytes is reduced, the contribution of network resources to load data is increased, and transmission efficiency is improved. Moreover, by transmitting only one aggregate message in the network, network congestion and the impact of network quality fluctuations are reduced, thereby improving the stability and reliability of data transmission.
[0084] The data aggregation and transmission method provided in the present disclosure is intended to at least solve the above technical problems.
[0085] The following exemplary embodiments describe in detail the technical solutions of the present disclosure and how they solve the aforementioned technical problems. The following exemplary embodiments may be combined with one another, and identical or similar concepts or processes may not be described in detail in certain embodiments. The following embodiments of the present disclosure are described in conjunction with the accompanying drawings.
[0086] The data aggregation and transmission method disclosed in the present invention can be used in an industrial control system. The execution subject of the method can be a device for data aggregation and transmission, or an industrial control system that runs a device for data aggregation and transmission. The following description takes an industrial control system that runs a device for data aggregation and transmission as an example, wherein the industrial control system includes a PLC, an aggregation module, a deaggregation module and an I / O device. This embodiment involves an example process in which a PLC industrial controller transmits aggregated data to an I / O device through an aggregation module and a deaggregation module.
[0087] FIG2 is a schematic diagram of the structure of a method for data aggregation and transmission provided by an embodiment of the present disclosure. As shown in FIG2 , the structure includes a PLC industrial controller (abbreviated as “PLC”) 11, a gateway 12, an aggregation module 15, a deaggregation module 16, a plurality of I / O devices 13, and an aggregation message 14. The PLC sends the I / O data to be transmitted to the aggregation module. After the aggregation module obtains all the I / O data, it combines the various I / O data to generate an aggregation message, and transmits the aggregation message to the deaggregation module through the network and the gateway. After receiving the aggregation message, the deaggregation module parses the aggregation message and generates various independent I / O data. The deaggregation module then sends the various I / O data to the corresponding I / O devices, so that each I / O device receives the required data and performs subsequent industrial operations based on the data.
[0088] FIG3 is a flow chart of a method for data aggregation and transmission provided by an embodiment of the present disclosure. As shown in FIG3 , the application scenario provided by this embodiment is based on the application scenario shown in FIG2 . The method for data aggregation and transmission includes the following steps:
[0089] S301. The PLC outputs the information of the I / O device to the aggregation module.
[0090] For example, the aggregation module reads I / O device information from the PLC through the Mc interface, and the PLC outputs information about N I / O devices to the aggregation module through the Mc interface. As shown in Figure 6, the Mc interface is the interface for transmitting I / O device information between the aggregation module and the PLC, where N is a positive integer.
[0091] In some embodiments, the I / O device information includes the number of I / O devices, I / O device identification, the number of I / O data bytes sent to the I / O device and the sending cycle, and the memory address where each of the above I / O data is stored in the PLC.
[0092] S302: The aggregation module generates aggregation configuration information and de-aggregation configuration information.
[0093] For example, the aggregation module receives information from N I / O devices and generates aggregation configuration information for the aggregation module and deaggregation configuration information for the deaggregation module based on the information from the N I / O devices. The aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period. The deaggregation configuration information includes the aggregation order of each I / O data and the starting address of each I / O data.
[0094] In some embodiments, the aggregation module determines the aggregation period of data transmission between the PLC and the I / O device, the aggregation order of each I / O data, and the memory address of each I / O data stored in the PLC based on the information of N I / O devices, and calculates the starting address of each I / O data in the aggregation message based on the aggregation order of each I / O data and the memory address of each I / O data stored in the PLC, wherein the aggregation message is the carrier for transmitting data between the PLC and the I / O device.
[0095] In some embodiments, the aggregation module generates aggregation configuration information based on the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period; and generates de-aggregation configuration information based on the aggregation order of each I / O data and the starting address of each I / O data.
[0096] S303: The aggregation module performs aggregation configuration according to the aggregation configuration information.
[0097] For example, the aggregation module performs aggregation configuration on the reading function of the aggregation module according to the generated aggregation configuration information, so that the aggregation module after aggregation configuration can perform related data transmission tasks based on the aggregation configuration information.
[0098] S304: The aggregation module sends de-aggregation configuration information to the de-aggregation module.
[0099] For example, the aggregation module outputs the deaggregation configuration information through the Mn interface, so that the deaggregation configuration information is transmitted to the deaggregation module through the communication network. As shown in Figure 6, the Mn interface is the interface for transmitting the deaggregation configuration information between the aggregation module and the communication network.
[0100] S305. The de-aggregation module performs de-aggregation configuration according to the de-aggregation configuration information.
[0101] For example, the de-aggregation module receives the de-aggregation configuration information sent by the aggregation module, and performs de-aggregation configuration on the de-aggregation module according to the de-aggregation configuration information.
[0102] S306: The aggregation module reads the I / O data and generates an aggregation message.
[0103] For example, after the aggregation module completes the aggregation configuration for the read function based on the aggregation configuration information, it uses the aggregation configuration results to read the individual I / O data from the PLC. The aggregation module combines the read I / O data based on the aggregation configuration results to generate an aggregation frame. The aggregation configuration results include the aggregation period for this data transmission, the memory address of each I / O data point, and the order in which the I / O data points are aggregated.
[0104] In one exemplary embodiment, the aggregation module determines whether the aggregation period in the aggregation configuration results is within the current aggregation period. During the aggregation period, the aggregation module reads the I / O data from the PLC based on the memory address of each I / O data. The aggregation module then combines the read I / O data in sequence according to the aggregation order of the I / O data in the aggregation configuration results, generates an aggregation frame, and then adds the corresponding header information to the aggregation frame to encapsulate it into an aggregated message. The header information of the aggregated message does not include the frame header used for parsed data.
[0105] For example, FIG4 is a schematic diagram of the structure of an aggregate message provided by an embodiment of the present disclosure. As shown in FIG4 , the aggregate message includes an Ethernet frame header, an IP header, a TCP header, N I / O data, and an FCS. The aggregation module reads N I / O data from the PLC, combines the above N I / O data into an aggregate frame, adds an Ethernet frame header, an IP header, and a TCP header before the first I / O data in the aggregate frame, and adds a frame check sequence (FCS) after the last I / O data in the aggregate frame, thereby encapsulating and generating an aggregate message.
[0106] In some embodiments, the aggregate frame is an application layer data frame that aggregates multiple small-sized I / O data into one frame. The aggregation module can transmit the aggregate frame to the deaggregation module based on the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol.
[0107] In some embodiments, as shown in Figure 6, the aggregation module reads individual I / O data from the PLC via the Ac interface, generates an aggregated message based on the individual I / O data, and then sends the aggregated message to the deaggregation module via the An interface. The Ac interface is the interface between the aggregation module and the PLC for transmitting individual I / O data, while the An interface is the interface between the aggregation module and the deaggregation module for transmitting aggregated messages.
[0108] S307: The aggregation module sends the aggregation message to the deaggregation module.
[0109] For example, the aggregation module encapsulates the aggregation frame into an aggregation message and then outputs the aggregation message to the deaggregation module.
[0110] S308: The de-aggregation module parses the aggregated message to generate various I / O data.
[0111] For example, after the de-aggregation configuration is completed, the de-aggregation module receives the aggregate message sent by the aggregation module and parses the aggregate message to generate restored N I / O data.
[0112] S309: The de-aggregation module sends each I / O data to the I / O device.
[0113] For example, the de-aggregation module sends N I / O data to corresponding I / O devices.
[0114] In the data transmission method provided by the embodiment of the present disclosure, the information of each I / O device is obtained from the PLC through the aggregation module, and the aggregation configuration information of the aggregation module and the deaggregation configuration information of the deaggregation module are generated according to the I / O information, and the reading function in the aggregation module is configured according to the aggregation configuration information. After the configuration is completed, the I / O data is read from the PLC, and the read I / O data are combined to generate an aggregation frame, and the aggregation message is generated after encapsulation and sent to the deaggregation module. In addition, the aggregation module sends the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration based on the deaggregation configuration information, and parses and splits the aggregate message into N I / O data after receiving the aggregate message and sends it to the corresponding device, thereby avoiding transmission delay caused by multiple data packets being transmitted simultaneously in the network within an aggregation cycle, improving data transmission reliability and stability, and increasing the network's contribution to data transmission by encapsulating it into an aggregate message, and then splitting it after the aggregate message arrives, and accurately sending it to each device, thereby improving data transmission efficiency.
[0115] FIG5 is a flow chart of a method for data aggregation and transmission provided by an embodiment of the present disclosure. As shown in FIG5 , the application scenario provided by this embodiment is based on the application scenario shown in FIG2 , and the method for data aggregation and transmission includes S501 to S509 .
[0116] S501. PLC outputs control instructions to the deaggregation module.
[0117] For example, the user inputs the relevant information of the required N I / O devices into the PLC, uploads the control instructions related to each I / O device to the PLC instance, and outputs the control instructions to the deaggregation module, so that the PLC controls the required N I / O devices according to the control instructions and communicates with the deaggregation module.
[0118] S502: The de-aggregation module connects to the required I / O device and obtains the I / O device configuration information.
[0119] For example, the deaggregation module receives the control instructions output by the PLC, and connects the indicated I / O devices to the deaggregation module according to the control instructions, and scans the interfaces of the connected I / O devices, and obtains the configuration information of each I / O device by identifying the interfaces of all connected I / O devices.
[0120] In some embodiments, the I / O device configuration information includes interface information.
[0121] S503: The aggregation module sends de-aggregation configuration information to the de-aggregation module.
[0122] For example, after the aggregation module obtains information of each I / O device, generates deaggregation configuration information according to the information of each I / O device, and sends the deaggregation configuration information to the deaggregation module, the deaggregation module receives the deaggregation configuration information sent by the aggregation module.
[0123] In some embodiments, the de-aggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data.
[0124] S504: The deaggregation module performs deaggregation configuration according to the deaggregation configuration information and the I / O device configuration information.
[0125] For example, the deaggregation module receives the deaggregation configuration information sent by the aggregation module. The deaggregation module generates the correspondence between the data address and the device interface based on the aggregation order of each I / O data in the deaggregation configuration information and the starting address of each I / O data and the various interface information in the I / O device configuration information, and configures the parsing function of the deaggregation module according to the correspondence between the data address and the device interface.
[0126] In an exemplary embodiment, the deaggregation module determines the data address of each I / O data (each frame) in the aggregated message and / or the combined arrangement order of each frame in the aggregated frame based on the aggregation order of each I / O data and the starting address of each I / O data in the deaggregation configuration information, and matches the interface information of each I / O device indicated in the I / O device configuration information with the determined data address of each frame, thereby determining the transmission interface corresponding to the data address of each frame, and then determining the I / O device corresponding to the data address of each frame.
[0127] In some embodiments, as shown in FIG4 , the aggregate frame includes N I / O data frames, where each data frame corresponds to a data address.
[0128] S505: The de-aggregation module waits for input of the aggregated message.
[0129] For example, after the deaggregation module completes the configuration of the parsing function based on the deaggregation configuration information, it waits for the input of the aggregation message. The aggregation message is obtained in the following manner: the aggregation module generates aggregation configuration information based on the information of N I / O devices, performs aggregation configuration based on the aggregation configuration information, reads N I / O data based on the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data based on the aggregation order of each I / O data in the aggregation configuration result to generate an aggregation message, and outputs the aggregation message to the deaggregation module; and the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data and the aggregation period.
[0130] S506: The aggregation module sends the aggregation message to the deaggregation module.
[0131] For example, after the aggregation module reads N I / O data and combines and encapsulates them to generate an aggregation message, and sends the aggregation message to the de-aggregation module, the de-aggregation module is triggered to receive the aggregation message sent by the aggregation module.
[0132] S507: The de-aggregation module parses the aggregated message and generates various I / O data.
[0133] For example, after receiving the aggregation message, the deaggregation module parses the aggregation message according to the starting addresses of the N I / O data in the deaggregation configuration result and the aggregation order of each I / O data, thereby splitting and generating N I / O data.
[0134] S508: The deaggregation module calls the I / O device to write into the channel.
[0135] For example, the deaggregation module determines the device interfaces corresponding to N I / O data through the correspondence between the data addresses and device interfaces in the deaggregation configuration results, and calls the write channels corresponding to N I / O data and / or each device interface according to the device interfaces corresponding to each I / O data, so that each I / O data is transmitted to each I / O device through each I / O device write channel.
[0136] In some embodiments, the de-aggregation module generates a write channel corresponding to each I / O device by identifying each connected I / O device, so as to be called by the de-aggregation module when performing I / O data transmission.
[0137] S509: The de-aggregation module sends each I / O data to the I / O device.
[0138] For example, the de-aggregation module sends N I / O data to corresponding I / O devices by calling the determined write channels.
[0139] In an exemplary embodiment, as shown in Figure 7, the deaggregation module obtains I / O device configuration information through the Mp interface and deaggregation configuration information through the Mg interface. Based on the device configuration information and deaggregation configuration information, the module generates a correspondence between data addresses and device interfaces. Based on this correspondence, the module configures deaggregation for the parsing function within the deaggregation module through the Md interface. After configuration is complete, the deaggregation module receives aggregated messages sent by the aggregation module through the Dg interface. After parsing the aggregated messages, the module invokes the write channels of each I / O device through the Dp interface and sends the corresponding I / O data through each write channel. The Mp interface is the interface through which the deaggregation module obtains I / O device configuration information; the Mg interface is the interface through which the deaggregation module obtains deaggregation configuration information transmitted by the aggregation module over the network; the Md interface is the interface through which the deaggregation module configures deaggregation for the parsing function; the Dg interface is the interface through which the deaggregation module obtains aggregated messages sent by the aggregation module over the network; and the Dp interface is the interface through which the deaggregation module invokes the write channels of each I / O device.
[0140] In the data transmission method provided by the embodiment of the present disclosure, the deaggregation module receives the deaggregation configuration information and the aggregation message sent by the aggregation module, and obtains the I / O device configuration information by scanning each I / O device, generates the correspondence between the data address and the device interface according to the interface information indicated by the I / O device configuration information and the deaggregation configuration information, and configures the deaggregation module according to the correspondence, and parses the received aggregation message according to the starting address of each I / O data in the deaggregation configuration information to split out each I / O data, and determines the interface corresponding to each I / O data through the correspondence between the data address and the device interface, thereby calling the write channel corresponding to each interface, so that the I / O data is sent to the corresponding I / O device through the corresponding write channel, so that after the aggregation module transmits an aggregation message to the device side through the network, the deaggregation module on the device side can also split the aggregation message according to demand and output it accurately to each device, thereby improving the accuracy and reliability of data transmission.
[0141] The present disclosure provides a device for data aggregation and transmission. A schematic structural diagram of the device for data aggregation and transmission is shown in FIG6 . The device 600 for data aggregation and transmission includes:
[0142] A first control module 601 is configured to obtain information of N I / O devices in the PLC and generate aggregation configuration information of an aggregation module and deaggregation configuration information of a deaggregation module based on the information of the N I / O devices, wherein the aggregation configuration information includes an aggregation order of each I / O data, a memory address of each I / O data, and an aggregation period; the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, and N is a positive integer;
[0143] The framing module 602 is configured to perform aggregation configuration according to the aggregation configuration information and read the I / O data according to the aggregation configuration result; further, the framing module 602 combines the read I / O data to generate an aggregate message according to the aggregation configuration result and outputs the aggregate message to the de-aggregation module;
[0144] The first control module 601 is also used to send the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration according to the deaggregation configuration information, and splits the aggregation message sent by the aggregation module based on the deaggregation configuration result to generate N I / O data, and sends the N I / O data to the corresponding N I / O devices.
[0145] In some embodiments, the first control module 601 is further configured to enable the aggregation module to determine, based on information of the N I / O devices, an aggregation period, an aggregation order of each I / O data item, and a memory address of each I / O data item, and calculate a starting address of each I / O data item in the aggregated message.
[0146] Generate aggregation configuration information based on the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period;
[0147] De-aggregation configuration information is generated according to the aggregation order of each I / O data and the starting address of each I / O data.
[0148] In some embodiments, the framing module 602 is further configured to enable the aggregation module to perform aggregation configuration on the aggregation module according to the aggregation configuration information;
[0149] After the aggregation configuration is completed, each I / O data is read from the PLC through the aggregation cycle of the aggregation configuration result and the memory address of each I / O data.
[0150] The framing module 602 also combines the read I / O data according to the aggregation configuration result to generate an aggregate message, and outputs the aggregate message to the de-aggregation module.
[0151] In some embodiments, the framing module 602 further enables the aggregation module to combine the read I / O data according to the aggregation order of the I / O data in the aggregation configuration result, thereby generating an aggregation frame; and encapsulate the aggregation frame into an aggregation message and then output the aggregation message to the deaggregation module.
[0152] The present disclosure provides another device for data aggregation and transmission. The structural diagram of the device for data aggregation and transmission is shown in FIG7 . The device 700 for data aggregation and transmission includes:
[0153] A second control module 701 is configured to obtain deaggregation configuration information sent by the aggregation module and perform deaggregation configuration according to the deaggregation configuration information. The deaggregation configuration information is generated by the aggregation module based on information of N I / O devices in the PLC after the aggregation module obtains information of the N I / O devices. The deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, where N is a positive integer.
[0154] The addressing module 702 is configured to decompose the aggregate message into N I / O data according to the de-aggregation configuration result, wherein the aggregate message is obtained in the following manner: the aggregation module generates aggregation configuration information according to information of the N I / O devices, performs aggregation configuration according to the aggregation configuration information, reads the N I / O data according to the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data according to the aggregation order of each I / O data in the aggregation configuration result to generate an aggregate message, and outputs the aggregate message to the de-aggregation module; the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period.
[0155] The addressing module 702 is further configured to send N I / O data to corresponding N I / O devices.
[0156] In some embodiments, the second control module 701 is also used to enable the deaggregation module to receive the deaggregation configuration information sent by the aggregation module, and obtain the corresponding I / O device configuration information by identifying all connected I / O device interfaces; and configure the deaggregation module according to the I / O device configuration information and the deaggregation configuration information.
[0157] In some embodiments, the apparatus for data aggregation and transmission further includes an interface management module 703 .
[0158] In some embodiments, the addressing module 702 is also used to enable the deaggregation module to call the I / O device write channels corresponding to the N I / O data generated by the interface management module 703 through the deaggregation configuration results, so that each I / O data is transmitted to each I / O device through each I / O device write channel.
[0159] In some embodiments, the second control module 701 is further configured to enable the deaggregation module to obtain the deaggregation configuration information sent by the aggregation module, and obtain corresponding I / O device configuration information by identifying all connected I / O device interfaces; wherein the I / O device configuration information includes interface information;
[0160] The deaggregation module generates a correspondence between data addresses and device interfaces according to the corresponding interface information in all I / O device configuration information and the starting addresses of N I / O data in the deaggregation configuration information, and configures the deaggregation module according to the correspondence between data addresses and device interfaces.
[0161] In some embodiments, the addressing module 702 is further configured to enable the deaggregation module to parse the aggregate message according to the starting addresses of the N I / O data in the deaggregation configuration result and the aggregation order of each I / O data after receiving the aggregate message, so as to generate N I / O data.
[0162] In some embodiments, the addressing module 702 is further configured to enable the deaggregation module to determine the device interfaces corresponding to the N I / O data for data transmission according to the correspondence between the data addresses and the device interfaces of the deaggregation configuration result;
[0163] The write channels corresponding to the respective device interfaces generated by the interface management module 703 are called according to the device interfaces corresponding to the respective I / O data, and the N I / O data are sent to the corresponding respective I / O devices through the respective write channels.
[0164] In some embodiments, the interface management module 703 is further configured to enable the deaggregation module to generate a write channel corresponding to each I / O device by identifying each connected I / O device, so as to be called by the deaggregation module when performing I / O data transmission.
[0165] As shown in FIG8 , an embodiment of the present disclosure provides an electronic device 800 , which includes a processor 801 and a memory 802 communicatively connected to the processor.
[0166] The memory 802 is used to store computer instructions executable by the processor;
[0167] The processor 801 implements each step of the method in the above embodiment when executing the computer instructions. For details, please refer to the relevant description in the above method embodiment.
[0168] In some embodiments, the processor 801 may be independent or integrated with the memory 802. When the processor 801 is independent, the electronic device further includes a bus for connecting the processor 801 and the memory 802.
[0169] The embodiments of the present disclosure further provide a computer-readable storage medium (including a non-transitory computer-readable storage medium), in which computer instructions are stored. When a processor executes the computer instructions, each step of the method in the above embodiment is implemented.
[0170] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0171] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0172] It should be understood that the above-described device embodiments are merely illustrative, and the devices of the present disclosure may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0173] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present disclosure may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.
[0174] If the integrated unit / module is implemented in hardware, the hardware may be a digital circuit, an analog circuit, or the like. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, and the like. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a central processing unit (CPU), a graphics processing unit (GPU), a field-programmable gate array (FPGA), a digital signal processor (DSP), and an application-specific integrated circuit (ASIC). Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), and the like.
[0175] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0176] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined in any way. To keep the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0177] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope of the present disclosure is indicated by the following claims.
[0178] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for data aggregation and transmission, wherein: The method is performed by an aggregation module, and the method includes: The aggregation module obtains information of N input and output I / O devices in the programmable logic controller (PLC), and generates aggregation configuration information of the aggregation module and deaggregation configuration information of the deaggregation module based on the information of the N I / O devices, wherein the aggregation configuration information includes an aggregation order of each I / O data, a memory address of each I / O data, and an aggregation period; the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, and N is a positive integer; The aggregation module performs aggregation configuration according to the aggregation configuration information, and reads I / O data according to the aggregation configuration result; combines the read I / O data according to the aggregation configuration result to generate an aggregation message, and outputs the aggregation message to the de-aggregation module; The aggregation module sends the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration according to the deaggregation configuration information, and splits the aggregation message sent by the aggregation module based on the deaggregation configuration result to generate N I / O data, and sends the N I / O data to the corresponding N I / O devices.
2. The method according to claim 1, wherein Generating aggregation configuration information of the aggregation module and de-aggregation configuration information of the de-aggregation module according to the information of the N I / O devices, including: The aggregation module determines an aggregation period, an aggregation order of each I / O data, and a memory address of each I / O data according to information of the N I / O devices, and calculates a starting address of each I / O data in the aggregated message; generating the aggregation configuration information according to the aggregation order of the respective I / O data, the memory address of the respective I / O data, and the aggregation period; The de-aggregation configuration information is generated according to an aggregation order of each I / O data and a start address of each I / O data.
3. The method according to claim 1 or 2, wherein: The aggregation module performs aggregation configuration according to the aggregation configuration information, and reads I / O data according to the aggregation configuration result, including: The aggregation module performs aggregation configuration on the aggregation module according to the aggregation configuration information; After the aggregation configuration is completed, each I / O data is read from the PLC according to the aggregation cycle of the aggregation configuration result and the memory address of each I / O data.
4. The method according to claim 3, further comprising: The read I / O data are combined according to the aggregation configuration result to generate the aggregation message, and the aggregation message is output to the de-aggregation module.
5. The method according to claim 4, wherein The combining the read I / O data according to the aggregation configuration result to generate the aggregate message, and outputting the aggregate message to the de-aggregation module includes: The aggregation module combines the read I / O data according to the aggregation order of the I / O data in the aggregation configuration result to generate an aggregation frame; and encapsulates the aggregation frame into the aggregation message and outputs the aggregation message to the deaggregation module.
6. A method for data aggregation and transmission, wherein: The method is performed by a deaggregation module, and the method includes: The deaggregation module obtains deaggregation configuration information sent by the aggregation module and performs deaggregation configuration according to the deaggregation configuration information; wherein the deaggregation configuration information is generated by the aggregation module after obtaining information of N input and output I / O devices in the programmable logic controller (PLC) and based on the information of the N I / O devices, and the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, where N is a positive integer; The deaggregation module splits the aggregated message into N I / O data according to the deaggregation configuration result; and The deaggregation module sends the N I / O data to the corresponding N I / O devices, The aggregate message is obtained in the following manner: the aggregation module generates aggregation configuration information based on the information of the N I / O devices, performs aggregation configuration according to the aggregation configuration information, reads N I / O data according to the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data according to the aggregation order of each I / O data in the aggregation configuration result to generate the aggregate message, and outputs the aggregate message to the deaggregation module; and the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data and the aggregation period.
7. The method according to claim 6, wherein: The deaggregation module obtains the deaggregation configuration information sent by the aggregation module, and performs deaggregation configuration according to the deaggregation configuration information, including: The deaggregation module receives the deaggregation configuration information sent by the aggregation module, obtains the corresponding I / O device configuration information by identifying all connected I / O device interfaces; and configures the deaggregation module according to the I / O device configuration information and the deaggregation configuration information.
8. The method according to claim 6 or 7, wherein: The deaggregation module sends the N I / O data to the corresponding N I / O devices, including: The deaggregation module calls each I / O device write channel corresponding to the N I / O data according to the deaggregation configuration result, so that each I / O data is transmitted to each I / O device through the each I / O device write channel.
9. The method according to any one of claims 6 to 8, wherein The deaggregation module obtains the deaggregation configuration information sent by the aggregation module, and performs deaggregation configuration according to the deaggregation configuration information, including: The deaggregation module obtains the deaggregation configuration information sent by the aggregation module, and obtains corresponding I / O device configuration information by identifying all connected I / O device interfaces; wherein the I / O device configuration information includes interface information; The deaggregation module generates a correspondence between data addresses and device interfaces based on the corresponding interface information in all I / O device configuration information and the starting addresses of the N I / O data in the deaggregation configuration information, and configures the deaggregation module based on the correspondence between the data addresses and device interfaces.
10. The method according to any one of claims 6 to 9, wherein The deaggregation module splits the aggregated message into N I / O data according to the deaggregation configuration result, including: After receiving the aggregation message, the deaggregation module parses the aggregation message according to the starting addresses of the N I / O data in the deaggregation configuration result and the aggregation order of the respective I / O data to generate the N I / O data.
11. The method according to any one of claims 6 to 10, wherein The deaggregation module sends the N I / O data to the corresponding N I / O devices, including: The deaggregation module determines the device interfaces for data transmission corresponding to the N I / O data according to the correspondence between the data addresses and the device interfaces of the deaggregation configuration result; The write channels corresponding to the respective device interfaces are called according to the device interfaces corresponding to the respective I / O data, and the N I / O data are sent to the corresponding respective I / O devices through the respective write channels.
12. A device for data aggregation and transmission, comprising: A first control module is configured to obtain information of N input and output I / O devices in a programmable logic controller (PLC), and generate aggregation configuration information of an aggregation module and deaggregation configuration information of a deaggregation module based on the information of the N I / O devices, wherein the aggregation configuration information includes an aggregation order of each I / O data, a memory address of each I / O data, and an aggregation period; the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, and N is a positive integer; a framing module, configured to perform aggregation configuration according to the aggregation configuration information, and read I / O data according to the aggregation configuration result; further combine the read I / O data according to the aggregation configuration result to generate an aggregate message, and output the aggregate message to the deaggregation module; The first control module is also used to send the deaggregation configuration information to the deaggregation module, so that the deaggregation module performs deaggregation configuration according to the deaggregation configuration information, and splits the aggregation message sent by the aggregation module based on the deaggregation configuration result to generate N I / O data, and sends the N I / O data to the corresponding N I / O devices.
13. A device for data aggregation and transmission, comprising: a second control module, configured to obtain deaggregation configuration information sent by the aggregation module and perform deaggregation configuration according to the deaggregation configuration information; wherein the deaggregation configuration information is generated by the aggregation module after obtaining information of N input and output I / O devices in the programmable logic controller (PLC) and based on the information of the N I / O devices, and the deaggregation configuration information includes an aggregation order of each I / O data and a starting address of each I / O data, where N is a positive integer; An addressing module, configured to decompose an aggregate message to generate N I / O data according to a de-aggregation configuration result, wherein the aggregate message is obtained in the following manner: the aggregation module generates aggregation configuration information according to information of the N I / O devices, performs aggregation configuration according to the aggregation configuration information, reads the N I / O data according to the memory address of each I / O data in the aggregation configuration result, combines the read N I / O data according to the aggregation order of each I / O data in the aggregation configuration result to generate an aggregate message, and outputs the aggregate message to the de-aggregation module; and the aggregation configuration information includes the aggregation order of each I / O data, the memory address of each I / O data, and the aggregation period; The addressing module is further configured to send the N I / O data to the corresponding N I / O devices.
14. An electronic device comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5, or the method according to any one of claims 6 to 11.
15. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 or any one of claims 6 to 11 when executed by a processor.
16. A computer program product comprising computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 5, or the method according to any one of claims 6 to 11.
17. A computer program comprising computer instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 5, or the method according to any one of claims 6 to 11.
Citation Information
Patent Citations
Data acquisition method, system and device and medium
CN112487271A
Mobile communication system PLC transmission enhancement method and system based on aggregation frame
CN115190534A
Method, device and equipment for remotely controlling robot through PLC and storage medium
CN116795036A
Enhanced management frame aggregation in a wireless network system
WO2008070738A1
Cited By
Data processing method and device and computer program product
CN121864714A