A method, device and equipment for real-time data publishing
By setting data buffers in industrial equipment and packaging and publishing high-frequency data according to protocol type, the problem of insufficient high-frequency data transmission performance in the existing technology is solved, and efficient data transmission and processing efficiency improvement is achieved.
Patent Information
- Application Number
- CN202210911207.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing high-frequency data release method requires dedicated real-time Ethernet technology hardware support, resulting in high cost and insufficient performance, making it difficult to effectively transmit large amounts of high-frequency data.
By setting the data buffer area in industrial equipment, determining the time T based on the maximum allowable delay, reading high-frequency data within the target time range, and packaging and publishing according to the target protocol type, using standard protocol type or user-selected protocols Type, reduce communication interaction and bandwidth usage.
There is no need to add additional communication hardware, improve high-frequency data transmission performance, reduce bandwidth usage, and improve processing efficiency on the data and consumer sides.
Smart Images

Figure CN115102951B_ABST
Abstract
Description
Technical Field
[0001] The technical field to which this application belongs is data processing technology, and in particular, relates to a method and device for real-time data publishing. Background Art
[0002] Real-time monitoring of the high-frequency data generated by industrial equipment during operation is of great value for condition monitoring, online diagnosis, and offline analysis. However, the millisecond-level high-frequency data corresponding to a large number of monitoring variables poses severe challenges to the publication and collection of massive data.
[0003] Currently, existing methods for publishing high-frequency data require hardware devices specifically designed for real-time data transmission in the fields of industrial control and data acquisition, such as physical devices such as PowerLink or Profinet, to solve the problem of real-time Ethernet technology transmitting real-time data. The collected high-frequency data can then be directly published using this hardware device. However, this publishing method requires the support of high-cost communication hardware required by dedicated real-time Ethernet technology. At the same time, since the standard protocol used to transmit high-frequency data has not been further optimized for high-frequency scenarios, it is difficult for network bandwidth and computing performance to support excessively high data volumes, such as the continuous transmission of more than 1,000 20ms high-frequency variables, resulting in poor high-frequency data transmission performance. Summary of the Invention
[0004] The present application provides a real-time data publishing method, apparatus, and device to improve the transmission performance of high-frequency data without adding additional communication hardware.
[0005] The technical solutions provided in this application include:
[0006] In a first aspect, an embodiment of the present application provides a method for real-time data publishing, which is applied to industrial equipment. The method includes:
[0007] When it is determined that the duration of high-frequency data collected on the industrial equipment has reached a preset duration T, the cached data within the target time range is read from the set data cache area. The target time range is a time range with the current time as the end time and the duration T as the duration. The duration T is determined based on the maximum allowable delay, which is determined based on the business scenario of the data consumer in the industrial equipment.
[0008] The read high-frequency data is packaged according to the target protocol type, and the packaged high-frequency data is published to registered users according to the publishing strategy matching the target protocol type, and the high-frequency data publishing time is less than T.
[0009] In a second aspect, an embodiment of the present application provides a real-time data publishing device, which is applied to industrial equipment. The device includes:
[0010] A data reading unit is configured to read cached data within a target time range from a set data cache area when it is determined that the time duration for collecting high-frequency data on the industrial equipment has reached a preset time duration T. The target time range is a time range with the current time as the end time and the time duration T as the time duration. The time duration T is determined based on a maximum allowable delay, which is determined based on a business scenario of a data consumer in the industrial equipment.
[0011] The data publishing unit is used to package the read high-frequency data according to the target protocol type, and publish the packaged high-frequency data to registered users according to the publishing strategy matching the target protocol type, and the time taken to publish the high-frequency data is less than T.
[0012] It can be seen from the above technical solutions that in this application, when the industrial equipment publishes high-frequency data, when it is determined that the time length of the high-frequency data collected on the industrial equipment has reached the preset time length T, the cached data within the time range with the current time as the end time and the time length T is read from the set data cache area, and the read high-frequency data is packaged according to the target protocol type, and the packaged high-frequency data is published to the registered users according to the publishing strategy that matches the target protocol type. It can be seen that the technical solution provided by the embodiment of the present application does not require additional communication hardware for supporting real-time Ethernet technology. At the same time, the time length T is determined based on the business scenario of the data consumption end in the industrial equipment. When the data is published, the packaged high-frequency data can also be published according to the publishing strategy that matches the target protocol type, so that the data can be read in an orderly manner and published according to the publishing strategy, thereby improving the transmission performance of the high-frequency data. At the same time, the publication of batch data can reduce communication interaction, reduce bandwidth occupancy, and thus improve the processing efficiency of the data side and the consumer side. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] 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.
[0014] Figure 1 A flowchart of a method for real-time data publication provided in this application;
[0015] Figure 2 A flowchart of a data compression method provided by this application;
[0016] Figure 3 A schematic diagram of the structure of a real-time data publishing device provided by this application;
[0017] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0018] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] See also Figure 1 , Figure 1 This application provides a flowchart of a real-time data publishing method, which is applied to industrial equipment. In actual application, each industrial device is connected to its corresponding edge computing device, and each edge computing device is connected to a central server, thus forming an edge computing platform for industrial equipment.
[0020] like Figure 1 As shown, the process may include the following steps:
[0021] In step 101 , when it is determined that the time duration for collecting high-frequency data on the industrial equipment has reached a preset time duration T, step 102 is executed.
[0022] Among them, the target time range is a time range with the current time as the end time and the duration T as the above-mentioned duration. The duration T is determined based on the maximum allowable delay, and the maximum allowable delay is determined based on the business scenario of the data consumption end in the industrial equipment.
[0023] As an embodiment, the above-mentioned time length T is half of the maximum allowed delay. If the maximum allowed delay is 1000 milliseconds, then T is 500 milliseconds.
[0024] It should be noted that the real-time requirement T on the data consumption side is greater than the sampling interval t on the data generation side. In practical applications, as an embodiment, T / t>10.
[0025] As an embodiment, when the duration of collecting high-frequency data on the industrial equipment reaches a preset duration, the data generation side will send the collected high-frequency data to the data consumption side to be cached in a set data cache area.
[0026] In this step, step 102 is executed every T time period.
[0027] In this embodiment, the data consumption end is a device on the data consumption side that is used to obtain high-frequency data and process the obtained high-frequency data. If the data consumption side is an edge computing platform, then the data consumption end is the edge computing device in the edge computing platform.
[0028] Step 102: Read cached data within a target time range from a set data cache area.
[0029] The data buffer is a pre-set buffer area. In some embodiments, the data buffer area buffers all high-frequency data within at least 2T time to prevent data errors caused by the release time exceeding T.
[0030] After executing step 102, as an embodiment, it further includes: for each high-frequency variable corresponding to the read high-frequency data, checking whether the number of high-frequency data corresponding to the high-frequency variable is a preset number, if not, adjusting the collected high-frequency data, that is, increasing or decreasing the collected high-frequency data so that the number of high-frequency data corresponding to the high-frequency variable collected within the time length T reaches the preset number. The technical solution provided by this embodiment can check whether each high-frequency variable has collected a preset number of data points, i.e., high-frequency data, within the most recent time length T. If a preset number of data points are collected, this means that the clock used in the sampling interval has not experienced clock drift. If the data points collected are higher than the preset number or lower than the preset number, this means that the clock used in the sampling interval has experienced clock drift, and it is necessary to use a fixed-interval sampling technology to solve the increase or decrease in data points caused by clock drift. In some embodiments, the preset number is T*f, where f is the acquisition frequency.
[0031] Step 103: Pack the read high-frequency data according to the target protocol type, and publish the packed high-frequency data to registered users according to the publishing policy matching the target protocol type.
[0032] As an embodiment, the target protocol type is a default protocol type or other protocol type determined according to a selection instruction, the default protocol type is a standard protocol type, and the high-frequency data publishing time is less than T.
[0033] In this embodiment, a default standard protocol type is recommended for data publishing, but other protocol types are also supported for user selection. For example, a private format based on TCP (Transmission Control Protocol) is used to transmit high-frequency data in real time.
[0034] Each standard protocol type corresponds to a publishing strategy that matches the standard protocol type. This step adopts an appropriate publishing strategy based on the standard protocol type to package and publish all high-frequency data within the T period in quasi-real time. In some embodiments, the publishing strategy includes: one protocol publishing point corresponds to one monitoring variable, and each monitoring variable is packaged separately according to the strategy release. In some other embodiments, the publishing strategy includes: for different sub-components of an industrial device, the strategy releases the high-frequency data corresponding to each sub-component. In another embodiment, the publishing strategy includes: for the high-frequency data of the same industrial device, the strategy releases the high-frequency data of the industrial device as a whole.
[0035] This step only publishes the packaged high-frequency data in real time to registered users, that is, users who have signed contracts in advance, to improve data security.
[0036] It should be noted that due to real-time requirements, data collection will continue with a higher priority during the data release process. Based on this, the data release time must not exceed T time. It will be sent after collecting high-frequency data for T time. During the sending period, high-frequency data for the next T time will be collected at the same time. The two buffers with a length of T are used in turn to ensure data continuity.
[0037] So far, completed Figure 1 Description shown.
[0038] It can be seen that in the technical solution provided by the embodiment of the present application, when the industrial equipment publishes high-frequency data, when it is determined that the time length of the high-frequency data collected on the industrial equipment has reached the preset time length T, the cached data within the time range with the current time as the end time and the time length T is read from the set data cache area, and the read high-frequency data is packaged according to the target protocol type, and the packaged high-frequency data is published to the registered users according to the publishing strategy that matches the target protocol type. It can be seen that the technical solution provided by the embodiment of the present application does not require additional communication hardware for supporting real-time Ethernet technology. At the same time, the time length T is determined based on the business scenario of the data consumption end in the industrial equipment. When the data is published, the packaged high-frequency data can also be published according to the publishing strategy that matches the target protocol type, so that the data can be read in an orderly manner and published according to the publishing strategy, thereby improving the transmission performance of the high-frequency data. At the same time, the publication of batch data can reduce communication interaction, reduce bandwidth occupancy, and thus improve the processing efficiency of the data side and the consumer side.
[0039] In completion Figure 1 Following the flowchart, as an embodiment, if the protocol type selected by the user is a standard protocol type, the method for implementing the packaging of the read high-frequency data according to the target protocol type in step 103 includes: selecting a measurement point type that matches the user-selected standard protocol based on the support and publishing performance of each standard protocol for the measurement point type to which the high-frequency data belongs, and packaging the high-frequency data corresponding to the measurement point type. In this embodiment, the measurement point type is an analog type or a switch type. Based on this, the appropriate measurement point type is selected based on the fixed-length or variable-length characteristics of the published data packet. For example, BIN byte arrays are mostly used for fixed-length data packets (uncompressed), while encoded character strings are mostly used for variable-length data packets (compressed). The selection is based on the standard protocol's support and publishing performance for the measurement point type.
[0040] As an example, Figure 2 As shown, after step 101, the following steps are also included:
[0041] Step A: removing the time stamp corresponding to each high-frequency data from the high-frequency data corresponding to the measurement point type, and compressing the high-frequency data after the time stamp is removed.
[0042] It can be seen that the technical solution provided in this embodiment can further reduce the amount of high-frequency data by compressing high-frequency data without time stamps.
[0043] As an embodiment, the implementation of the above step A may include steps A1 to A3.
[0044] In step A1, when it is determined that the read high-frequency data contains analog data of the measuring point type being analog, step A2 is executed. In step A3, when it is determined that the read high-frequency data contains switch data of the measuring point type being switch, step A3 is executed.
[0045] Step A2: extracting analog data from the analog data at a preset frequency, removing the time stamp carried by the analog data, and compressing the analog variable data after the time stamp is removed.
[0046] In this embodiment, clock drift inevitably causes the amount of high-frequency data sampled within a period of time T to differ from the preset number N, where N = T*f. Frequency sampling ensures that N = T*f, and the time stamp can be omitted. Based on this, the analog data in this step is sampled using the frequency method after removing the clock, and lossy compression is performed based on accuracy requirements without a time stamp, in order to reduce the amount of data.
[0047] Step A3: compress the switch value data.
[0048] As an embodiment, when it is determined that the read high-frequency data includes switch quantity data whose measurement point type is switch quantity, the method further includes: removing the time stamp corresponding to each switch quantity data from the switch quantity data, and compressing the switch quantity data after the time stamp is removed.
[0049] In this embodiment, the time scale index ranges from 0 to N-1, where N is the number of high-frequency data within a time period of T.
[0050] As another example, Figure 2 As shown, after completing the packaging of the high-frequency data corresponding to the measurement point type, the following steps are also included:
[0051] Step 201: Determine the compression algorithm used to compress the high-frequency data compression package, and select an encryption algorithm that matches the compression algorithm.
[0052] Step 202: perform secondary compression on the compressed high-frequency data compression package using the compression algorithm to obtain a new high-frequency data compression package.
[0053] As an embodiment, LZW (Lempel-Ziv-Welch Encoding, string table compression algorithm) can be used to re-compress the compressed high-frequency data package to further reduce the amount of high-frequency data.
[0054] Step 203: Use the encryption algorithm to encrypt the high-frequency data compression package corresponding to the protocol type that needs to be encrypted; and add metadata that does not need to be encrypted before the encrypted high-frequency data compression package to generate a high-frequency data packet to be released, wherein the metadata is used to describe the encrypted high-frequency data compression package.
[0055] Some standard protocols support encrypted transmission, while others do not. Therefore, this embodiment requires encrypting the high-frequency data compression packets corresponding to the protocol type that requires encryption. In one embodiment, the encryption algorithm may be an AES (Advanced Encryption Standard) algorithm that matches LZW.
[0056] This step performs secondary compression on the compressed high-frequency data package to further reduce the data volume and lower the bandwidth usage.
[0057] In this embodiment, metadata can be used to describe compressed and / or encrypted data, and cannot be compressed and encrypted, otherwise it will be impossible to decompress and decrypt the encrypted high-frequency data.
[0058] It can be seen that in the improved technical solution of this embodiment, the two data compressions can reduce the data length and lower the bandwidth occupancy. At the same time, the use of the encryption algorithm can ensure the security of the data.
[0059] In order to make the above embodiments easier to understand, let's take an example. Suppose a wind turbine converter plans to publish the high-frequency data shown in Table 1 to the upper-level edge computing platform using the OPCUA protocol, wherein it is necessary to collect the high-frequency data corresponding to subcomponent A, subcomponent B and subcomponent C in the wind turbine converter. The wind turbine converter is connected to an edge computing device in the edge computing platform. According to the business scenario of the edge computing platform, the maximum allowable delay of the edge computing platform is determined to be 2000ms, and the duration T can be taken as half of the maximum allowable delay, that is, 1000ms. The wind turbine converter is set with a data buffer that stores all high-frequency data in the last 2 seconds. The method for the wind turbine converter to publish data in real time includes the following steps:
[0060] The wind turbine converter collects real-time data of the corresponding high-frequency variables every 20ms, 100ms and 500ms and caches it in the set cache area. Every 1000ms, it reads all the high-frequency data of the last 1000ms in the data buffer. That is, when it is determined that the duration of the collected high-frequency data has reached 1000ms, the cached data within 1000ms before the current time is read from the data cache area that can cache 2s of high-frequency data. In addition, the new data in the cached data will overwrite the old data from 2 seconds ago.
[0061] Table 1 All high-frequency data that need to be published for wind turbine converters
[0062]
[0063] For each high-frequency variable read, the system checks whether the number of high-frequency data points corresponding to that variable meets the preset number. If not, the collected high-frequency data is adjusted so that the number of high-frequency data points corresponding to that variable collected within 1000ms reaches the preset number. This solves the technical problem of data increase or decrease caused by clock drift. For example, for subcomponent A of the wind turbine converter, the corresponding standard number of points, or the preset number N, is 1000 / 20 = 50, where the collection frequency f is 1 / 20ms = 50Hz. For subcomponent B of the wind turbine converter, the standard number of points N is 1000 / 100 = 10, where the collection frequency f is 1 / 100ms = 10Hz. For subcomponent C of the wind turbine converter, the standard number of points N is 1000 / 500 = 2, where the collection frequency f is 1 / 500ms = 2Hz.
[0064] The high-frequency data packet read above is compressed, specifically: the read high-frequency data packet is parsed, as shown in Tables 1 and 2, the time stamp corresponding to each data is removed from the high-frequency data containing 5+1+1=7 analog data and 2+2=4 switch data, and the analog data and switch data without the time stamp are compressed, thereby reducing the data volume of the high-frequency data.
[0065] The high-frequency data compression package that has been compressed in bold in Table 2 is compressed twice using the LZW compression algorithm to obtain a new high-frequency data compression package. This step is secondary compression. The high-frequency data compression package corresponding to the protocol type that needs to be encrypted is encrypted using the AES encryption algorithm that matches LZW; and the encrypted high-frequency data compression package is added to the data corresponding to the protocol type that does not need to be encrypted (the bold part in Table 2 is the encrypted and compressed part) to generate a high-frequency data packet to be published. These data information that does not need to be encrypted are "notification sequence number + data time stamp + compression algorithm + encryption algorithm". After adding the information, the final data packet shown in Table 2 is generated. Update the corresponding publishing point X of OPCUA, and the measurement point X selects a variable-length encoding string. The OPCUA standard protocol module of the wind turbine converter sends the latest data packet to all data consumers who subscribe to the measurement point X.
[0066] Table 2 Schematic diagram of the data packet structure corresponding to all high-frequency variables for a single publishing point
[0067]
[0068] This completes the description of the above example.
[0069] The device provided by this application is described below:
[0070] See also Figure 3 , Figure 3 This is a structural diagram of a real-time data publishing device 300, which is applied to industrial equipment. The device includes:
[0071] The data reading unit 301 is used to read the cached data within the target time range from the set data cache area when it is determined that the time length of the high-frequency data collected on the industrial equipment has reached a preset time length T. The target time range is a time range with the current time as the end time and the time length T as the time length. The time length T is determined based on the maximum allowable delay, and the maximum allowable delay is determined based on the business scenario of the data consumption end in the industrial equipment.
[0072] The data publishing unit 302 is used to package the read high-frequency data according to the target protocol type, and publish the packaged high-frequency data to registered users according to the publishing strategy matching the target protocol type. The high-frequency data publishing time is less than T.
[0073] As an embodiment, the device further includes: the target protocol type is a default protocol type or other protocol type determined according to the selection instruction, and the default protocol type is a standard protocol type.
[0074] As an embodiment, the device further includes:
[0075] The checking unit is used to check whether the number of high-frequency data corresponding to each high-frequency variable read is a preset number. If not, the collected high-frequency data is adjusted so that the number of high-frequency data corresponding to the high-frequency variable collected within the time length T reaches the preset number.
[0076] As an embodiment, if the protocol type selected by the user is a standard protocol type, the data publishing unit includes a packaging subunit for packaging the read high-frequency data according to the protocol type selected by the user;
[0077] The packaging subunit is specifically used for:
[0078] According to the support and publishing performance of each standard protocol for the measurement point type to which the high-frequency data belongs, the measurement point type that matches the standard protocol selected by the user is selected to package the high-frequency data corresponding to the measurement point type.
[0079] As an embodiment, the packing subunit includes a first packing module for packing high-frequency data corresponding to the measurement point type;
[0080] The first packaging module is specifically used to:
[0081] The time stamp corresponding to each high-frequency data is removed from the high-frequency data corresponding to the measurement point type, and the high-frequency data after the time stamp is removed is compressed.
[0082] As an embodiment, the packing subunit further includes a second packing module for packing high-frequency data corresponding to the measurement point type;
[0083] The second packaging module is specifically used to:
[0084] Determining a compression algorithm used to compress the high-frequency data compression packet, and selecting an encryption algorithm that matches the compression algorithm;
[0085] The encryption algorithm is used to encrypt the high-frequency data compression package corresponding to the measurement point type that needs to be compressed, and the data corresponding to the measurement point type that does not need to be compressed is added to the encrypted high-frequency data compression package to generate a high-frequency data packet to be published.
[0086] As an embodiment, the release strategy includes: corresponding one protocol release point to one monitoring variable, and releasing according to a strategy of individually encapsulating each monitoring variable.
[0087] As an embodiment, the release strategy includes: for different sub-components of an industrial device, a strategy for encapsulating high-frequency data corresponding to each sub-component is released.
[0088] As an embodiment, the publishing strategy includes: for high-frequency data of the same industrial device, publishing a strategy for overall packaging of the high-frequency data of the industrial device.
[0089] As an embodiment, the data buffer area buffers all high-frequency data within at least 2T time.
[0090] As an embodiment, the preset number is T*f, where f is the acquisition frequency.
[0091] So far, completed Figure 3 Description shown.
[0092] It can be seen that in the technical solution provided by the embodiment of the present application, when the industrial equipment publishes high-frequency data, when it is determined that the time length of the high-frequency data collected on the industrial equipment has reached the preset time length T, the cached data within the time range with the current time as the end time and the time length T is read from the set data cache area, and the read high-frequency data is packaged according to the target protocol type, and the packaged high-frequency data is published to the registered users according to the publishing strategy that matches the target protocol type. It can be seen that the technical solution provided by the embodiment of the present application does not require additional communication hardware for supporting real-time Ethernet technology. At the same time, the time length T is determined based on the business scenario of the data consumption end in the industrial equipment. When the data is published, the packaged high-frequency data can also be published according to the publishing strategy that matches the standard protocol type or the protocol type selected by the user, so that the data can be read in an orderly manner and published according to the publishing strategy, thereby improving the transmission performance of the high-frequency data. At the same time, the publication of batch data can reduce communication interaction, reduce bandwidth occupancy, and thus improve the processing efficiency of the data side and the consumer side.
[0093] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0094] The electronic device provided in the embodiment of the present application, from the hardware level, can be seen in the hardware architecture diagram. Figure 4 The system comprises a machine-readable storage medium and a processor, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; and the processor is configured to execute the machine-executable instructions to implement the real-time data publishing operation disclosed in the above example.
[0095] The machine-readable storage medium provided in an embodiment of the present application stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the real-time data publishing operation disclosed in the above example.
[0096] Here, the machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage media, or a combination thereof.
[0097] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0098] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0099] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] Furthermore, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0103] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0104] So far, completed Figure 4 Description of the device shown.
[0105] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for real-time data publishing, characterized in that: Applied to industrial equipment, the method comprises: When it is determined that the duration of high-frequency data collected on the industrial equipment has reached a preset duration T, the cached data within the target time range is read from the set data cache area. The target time range is a time range with the current time as the end time and the duration T as the duration. The duration T is determined based on the maximum allowable delay, which is determined based on the business scenario of the data consumer in the industrial equipment. The read high-frequency data is packaged according to the target protocol type, and the packaged high-frequency data is published to registered users according to the publishing policy matching the target protocol type, and the publishing time of the packaged high-frequency data is less than T; After reading the cached data within the target time range from the set data cache area, the method further includes: For each high-frequency data corresponding to the high-frequency variable read, check whether the number of high-frequency data corresponding to the high-frequency variable is the preset number. If not, adjust the collected high-frequency data so that the number of high-frequency data corresponding to the high-frequency variable collected within the time length T reaches the preset number.
2. The method according to claim 1, characterized in that The target protocol type is a default protocol type or another protocol type determined according to a selection instruction, and the default protocol type is a standard protocol type.
3. The method according to claim 1, characterized in that If the protocol type selected by the user is a standard protocol type, the high-frequency data read is packaged according to the target protocol type, including: According to the support and publishing performance of each standard protocol for the measurement point type to which the high-frequency data belongs, the measurement point type that matches the standard protocol selected by the user is selected to package the high-frequency data corresponding to the measurement point type.
4. The method according to claim 3, characterized in that The packaging of the high-frequency data corresponding to the measurement point type includes: The time stamp corresponding to each high-frequency data is removed from the high-frequency data corresponding to the measurement point type, and the high-frequency data after the time stamp is removed is compressed.
5. The method according to claim 4, characterized in that After packaging the high-frequency data corresponding to the measurement point type, the method further includes: Determining a compression algorithm used to compress the high-frequency data compression packet, and selecting an encryption algorithm that matches the compression algorithm; Using the compression algorithm to perform secondary compression on the compressed high-frequency data compression package to obtain a new high-frequency data compression package; The encryption algorithm is used to encrypt the high-frequency data compression package corresponding to the protocol type that needs to be encrypted; and metadata that does not need to be encrypted is added before the encrypted high-frequency data compression package to generate a high-frequency data packet to be published, wherein the metadata is used to describe the encrypted high-frequency data compression package.
6. The method according to any one of claims 1 to 5, characterized in that: The release strategy at least includes: One protocol publishing point corresponds to one monitoring variable, and is published according to the strategy of each monitoring variable being individually packaged; or / and Publish a strategy for encapsulating high-frequency data corresponding to different sub-components of an industrial device; or / and A strategy for comprehensively packaging the high-frequency data of the same industrial equipment is released.
7. The method according to claim 1, characterized in that The data buffer area caches all high-frequency data within at least 2T, or / and The preset number is T*f, where f is the acquisition frequency.
8. A real-time data publishing device, characterized in that: Applied to industrial equipment, the device includes: A data reading unit is configured to read cached data within a target time range from a set data cache area when it is determined that the time duration for collecting high-frequency data on the industrial equipment has reached a preset time duration T. The target time range is a time range with the current time as the end time and the time duration T as the time duration. The time duration T is determined based on a maximum allowable delay, which is determined based on a business scenario of a data consumer in the industrial equipment. A data publishing unit is configured to package the read high-frequency data according to a target protocol type, and publish the packaged high-frequency data to registered users according to a publishing strategy matching the target protocol type, wherein the time taken to publish the packaged high-frequency data is less than T; The device also includes: The checking unit is used to check whether the number of high-frequency data corresponding to each high-frequency variable read is a preset number. If not, the collected high-frequency data is adjusted so that the number of high-frequency data corresponding to the high-frequency variable collected within the time length T reaches the preset number.
9. The device according to claim 8, characterized in that The target protocol type is a default protocol type or another protocol type determined according to a selection instruction, and the default protocol type is a standard protocol type.
10. The device according to claim 8, characterized in that If the protocol type selected by the user is a standard protocol type, the data publishing unit includes a packaging subunit for packaging the read high-frequency data according to the protocol type selected by the user; The packaging subunit is specifically used for: According to the support and publishing performance of each standard protocol for the measurement point type to which the high-frequency data belongs, the measurement point type that matches the standard protocol selected by the user is selected to package the high-frequency data corresponding to the measurement point type.
11. The device according to claim 10, characterized in that The packing subunit includes a first packing module for packing high-frequency data corresponding to the measurement point type; The first packaging module is specifically used to: The time stamp corresponding to each high-frequency data is removed from the high-frequency data corresponding to the measurement point type, and the high-frequency data after the time stamp is removed is compressed.
12. The device according to claim 11, characterized in that The packing subunit further includes a second packing module for packing high-frequency data corresponding to the measurement point type; The second packaging module is specifically used to: Determining a compression algorithm used to compress the high-frequency data compression packet, and selecting an encryption algorithm that matches the compression algorithm; The encryption algorithm is used to encrypt the high-frequency data compression package corresponding to the measurement point type that needs to be compressed, and the data corresponding to the measurement point type that does not need to be compressed is added before the encrypted high-frequency data compression package to generate a high-frequency data packet to be published.
13. The device according to any one of claims 8 to 12, characterized in that: The release strategy at least includes: One protocol publishing point corresponds to one monitoring variable, and is published according to the strategy of each monitoring variable being individually packaged; or / and Publish a strategy for encapsulating high-frequency data corresponding to different sub-components of an industrial device; or / and A strategy for comprehensively packaging the high-frequency data of the same industrial equipment is released.
14. The device according to claim 8, characterized in that The data buffer area caches all high-frequency data within at least 2T, or / and The preset number is T*f, where f is the acquisition frequency.
15. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method steps described in any one of claims 1 to 7.
