Data retrieval method, device, central control server and system

By splitting data in the mobile edge computing MEC node cluster and storing key fields in memory, the data retrieval delay problem is solved, high real-time and flexibility are achieved, and resource consumption is reduced.

CN115344599BActive Publication Date: 2025-09-02CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210982730.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2025-09-02
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

In the prior art, there is disk IO delay during data retrieval, which cannot meet the high real-time requirements.

Method used

By splitting the data by key fields and non-key fields in the mobile edge computing MEC node cluster, the key fields are stored in memory, and the non-key fields are stored in the timing database, and the key field data is directly obtained from the memory as the search result, avoiding disk IO delay.

Benefits of technology

It realizes high real-time data retrieval, ensures rapid response and flexibility of industrial data, and reduces system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344599B_ABST
    Figure CN115344599B_ABST
Patent Text Reader

Abstract

The present invention provides a data retrieval method, device, central control server, and system, which relate to the field of electronic information technology and are used to solve the problem that data retrieval has disk IO latency, resulting in the inability to meet high real-time retrieval requirements. The method includes: receiving a data retrieval request and determining whether the target field of the data retrieval request is consistent with a preset key field; if so, determining a first target MEC node pre-selected from a mobile edge computing (MEC) node cluster for storing key field data, and obtaining pre-stored key field data corresponding to the key field from the memory of the first target MEC node as a data retrieval result. The present invention, for data retrieval requests with a preset key field as the target field, avoids disk IO latency by obtaining key field data pre-stored in the memory of the MEC node as the data retrieval result, thereby ensuring high real-time performance of data retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information technology, and in particular to a data retrieval method, device, central control server and system. Background Art

[0002] Data retrieval relies on pre-stored data and is affected by the data storage method. Existing data storage methods typically store data on disk. When retrieving stored data, there will inevitably be disk IO (Input Output) delays when retrieving data from the disk. In scenarios where the real-time nature of the retrieved data is highly required, existing methods cannot meet the requirements. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art and provide a data retrieval method, device, central control server and system to solve the problem in the prior art that when retrieving stored data, there is disk IO delay, which makes it impossible to meet high real-time retrieval requirements.

[0004] In a first aspect, the present invention provides a data retrieval method, applied to a central control server, comprising:

[0005] Receive a data retrieval request, and determine whether the target field of the data retrieval request is consistent with a preset key field;

[0006] If so, determine a first target MEC node pre-selected from a mobile edge computing MEC node cluster for storing key field data, and obtain pre-stored key field data corresponding to the key field from the memory of the first target MEC node as a data retrieval result.

[0007] Preferably, before receiving the data retrieval request, the method further includes:

[0008] Determine key fields, and control the splitting of the data to be stored into key field data and non-key field data according to the key fields;

[0009] Selecting a first target MEC node and several second target MEC nodes from the MEC node cluster according to preset conditions;

[0010] Controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes.

[0011] Preferably, before determining the key field, the method further includes:

[0012] Receive a registration request for a certain industrial device;

[0013] Determining a data template of the certain industrial equipment according to the registration request;

[0014] The data template is sent to the certain industrial device to control the certain industrial device to generate the data generated by the certain industrial device in real time into data to be stored according to the data template.

[0015] Preferably, the determining of the key fields specifically includes:

[0016] When receiving a registration request for a certain industrial device, determining a key field for the certain industrial device based on target fields of data retrieval requests for similar registered industrial devices received in the past;

[0017] After completing the registration of a certain industrial device, determine whether the target field of the latest received data retrieval request for the certain industrial device is consistent with the original key field for the certain industrial device. If not, determine the target field of the latest received data retrieval request for the certain industrial device as the new key field for the certain industrial device.

[0018] Preferably, after determining the target field of the most recently received data retrieval request for the certain industrial device as a new key field for the certain industrial device, the method further comprises:

[0019] Determine the original first target MEC node corresponding to the key field for the certain industrial equipment, and control the original key field data of the certain industrial equipment stored in the memory of the original first target MEC node corresponding to the key field for the certain industrial equipment to be stored in the time series database of the several second target MEC nodes.

[0020] Preferably, the control splits the data to be stored into key field data and non-key field data according to the key field, specifically including:

[0021] The key field is sent to a certain industrial device to control the certain industrial device to split its own data to be stored into key field data and non-key field data according to the key field in real time.

[0022] Preferably, selecting a first target MEC node and a plurality of second target MEC nodes from the MEC node cluster according to preset conditions specifically includes:

[0023] Collect the memory usage and disk usage of each MEC node in the MEC node cluster in real time and record them in a pre-established management database. The disk usage reflects the storage capacity of the time series database of each MEC node.

[0024] Selecting, through the management database, a MEC node with the lowest current memory usage in the MEC node cluster as the first target MEC node;

[0025] According to the data volume and storage rate of the non-critical field data, several MEC nodes with the lowest current disk usage in the MEC node cluster are selected as the second target MEC nodes through the management database.

[0026] Preferably, after collecting the memory usage of each MEC node in the MEC node cluster in real time, the method further includes:

[0027] When the memory usage of a certain MEC node reaches a preset threshold, control is performed to store key field data whose generation time exceeds a preset time range stored in the memory of the certain MEC node into the time series database of the plurality of second target MEC nodes.

[0028] Preferably, the controlling storing the key field data into the memory of the first target MEC node specifically includes:

[0029] Controlling the generation time of the key field data and the key field data to form a key-value pair according to a key-value format, and controlling the key-value pair to be stored in the memory of the first target MEC node.

[0030] Preferably, after controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes, the method further comprises:

[0031] Collecting in real time the index information of the key field data stored in the memory of the first target MEC node and the index information of the non-key field data stored in the time series databases of the plurality of second target MEC nodes, and recording all the index information in a pre-established management database;

[0032] After determining whether the target field of the data retrieval request is consistent with the preset key field, the method further includes:

[0033] If not, query the index information in the management database to determine a second target MEC node where the non-key field data corresponding to the target field of the data retrieval request is stored, and obtain the corresponding non-key field data from the time series database of the second target MEC node as the data retrieval result.

[0034] Preferably, the data retrieval request is sent by the industrial control application in real time, and the data retrieval result is returned to the industrial control application in real time.

[0035] In a second aspect, the present invention provides a data retrieval device, comprising:

[0036] A receiving and judging module, configured to receive a data retrieval request and judge whether a target field of the data retrieval request is consistent with a preset key field;

[0037] A determination and acquisition module is connected to the receiving and judging module, and is used to determine, if yes, a first target MEC node pre-selected from a mobile edge computing MEC node cluster for storing key field data, and obtain the pre-stored key field data corresponding to the key field from the memory of the first target MEC node as a data retrieval result.

[0038] In a third aspect, the present invention provides a central control server, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the data retrieval method as described above.

[0039] In a fourth aspect, the present invention provides a data retrieval system, comprising:

[0040] The central control server is used to execute the data retrieval method described above;

[0041] A mobile edge computing MEC node cluster is connected to the central control server, and the MEC node cluster includes a pre-selected first target MEC node for storing key field data.

[0042] Preferably, the system further comprises:

[0043] The industrial equipment is connected to the central control server and the MEC node cluster, and is used to generate data to be stored according to the control of the central control server, and split the data to be stored into key field data and non-key field data.

[0044] Preferably, the system further comprises:

[0045] The industrial control application is connected to the central control server and is used to send data retrieval requests to the central control server in real time and receive data retrieval results returned by the central control server in real time.

[0046] The present invention provides a data retrieval method, device, central control server and system. For data retrieval requests with pre-set key fields as target fields, the method obtains the key field data pre-stored in the memory of the MEC node as the data retrieval result, thereby avoiding the IO delay problem caused by reading data from the disk and ensuring the high real-time performance of data retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flow chart of a data retrieval method according to an embodiment of the present invention;

[0048] Figure 2 It is a structural diagram of a data retrieval system according to an embodiment of the present invention;

[0049] Figure 3 It is a structural diagram of a data retrieval device according to an embodiment of the present invention;

[0050] Figure 4 It is a structural diagram of a central control server according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0052] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.

[0053] It is understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments may be combined with each other.

[0054] It can be understood that, for the convenience of description, the drawings of the present invention only show parts related to the present invention, while parts unrelated to the present invention are not shown in the drawings.

[0055] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

[0056] It will be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.

[0057] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented using a hardware-based system that implements the specified functions, or may be implemented using a combination of hardware and computer instructions.

[0058] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.

[0059] To facilitate understanding of the present invention, a specific scenario with high real-time retrieval requirements is first proposed.

[0060] With the increasing adoption of industrial information technology, more and more large factories are embracing the wave of intelligent and internet-based transformations. In the intelligent transformation of industrial enterprises, data applications, such as industrial data collection, storage, processing, and modeling, have always played a crucial role. Data is the soul of an enterprise's internet-based and intelligent transformation, effectively driving management to make informed decisions. The value of data itself is also rising rapidly within the industry. Therefore, the proper management of industrial data is crucial to the success of industrial enterprises' information transformation and a key measure for increasing corporate profits.

[0061] Industrial data primarily consists of time series data, meaning each piece of data carries a timestamp indicating when it was generated. As equipment continues to operate and time passes, time series data is generated continuously 24 / 7. Therefore, to realize the value of this data, it is necessary to ensure efficient storage within limited hardware resources. Furthermore, industrial applications in industrial control and visualization require high real-time data retrieval performance, coupled with large data volumes. In this context, pursuing high-performance real-time communication requires not only low network latency but also the storage state of the data. If the data being retrieved is stored on disk, disk I / O latency must also be considered, making it impossible to guarantee the real-time performance of industrial control applications.

[0062] Therefore, to meet the above-mentioned demand for real-time retrieval of massive industrial data, a more flexible and faster-responding data storage / retrieval mechanism is needed to ensure the high real-time performance of massive industrial data retrieval.

[0063] Example 1:

[0064] like Figure 1 As shown, the present invention provides a data retrieval method, including step S11 and step S12.

[0065] Specifically, in this embodiment, Figure 1 The method shown is applied to Figure 2 The data retrieval system shown is particularly applied to the central control server 1 in the system; the system includes: industrial equipment 3, MEC (Mobile Edge Computing) node cluster 2, central control server 1 and industrial control application 4; a number of industrial equipment 3 can be registered with the central control server 1 according to the service capabilities of the system. The industrial equipment 3 will continuously generate time series data, and each industrial equipment 3 is connected to all MEC nodes; the MEC node cluster 2 includes n MEC nodes, namely Figure 2 MEC1, MEC2...MECn, each MEC node is equipped with a time series database, which is responsible for storing the time series data received from the industrial equipment 3. Its storage location is generally the disk of each MEC node itself. Each MEC node is actually a server, which must have a certain amount of memory, and n MEC nodes are distributed and deployed on the side of the industrial equipment 3. In addition, each MEC node is equipped with a corresponding management program for managing its own data storage method and receiving instructions from the central control server 1 to complete data query, indexing and other operations; the central control server 1 is the central control management server, which is equipped with a management database and a central control management program. The central control management program is used for the entire MEC node cluster 2 and each industrial equipment 3 to monitor the CPU (Central Processing The MEC server 1 dynamically plans the storage mode of the time series data generated by the industrial equipment 3 and processes the data retrieval requests sent by the industrial control application 4 as the server of the industrial control application 4. The management database is used to record the real-time information of each MEC node, including available memory, index information of the data stored in the time series database, etc., to facilitate real-time monitoring and real-time retrieval queries. The industrial control application 4 sends a real-time retrieval request to the central control server 1 to obtain the required time series data of the industrial equipment 3 in real time. It will be understood that this embodiment is aimed at the specific application scenario of real-time and rapid retrieval of industrial data through the central control server 1 after distributed storage in the MEC node cluster 2, and the method provided by the present invention is not limited to this application scenario.

[0066] like Figure 1 The method includes: S11, receiving a data retrieval request, and determining whether a target field of the data retrieval request is consistent with a preset key field.

[0067] Optionally, before receiving the data retrieval request, the method further includes:

[0068] Determine key fields, and control the splitting of the data to be stored into key field data and non-key field data according to the key fields;

[0069] Selecting a first target MEC node and several second target MEC nodes from MEC node cluster 2 according to preset conditions;

[0070] Controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes.

[0071] Optionally, before determining the key field, the method further includes:

[0072] Receiving a registration request from an industrial device 3;

[0073] Determining a data template of the certain industrial device 3 according to the registration request;

[0074] The data template is sent to the certain industrial device 3 to control the certain industrial device 3 to generate the data generated by itself in real time into data to be stored according to the data template.

[0075] Optionally, determining the key fields specifically includes:

[0076] When receiving a registration request for a certain industrial device 3, determining a key field for the certain industrial device 3 based on target fields of data retrieval requests for similar registered industrial devices 3 received in the past;

[0077] After completing the registration of a certain industrial equipment 3, determine whether the target field of the latest received data retrieval request for the certain industrial equipment 3 is consistent with the original key field for the certain industrial equipment 3. If not, determine the target field of the latest received data retrieval request for the certain industrial equipment 3 as the new key field for the certain industrial equipment 3.

[0078] Optionally, after determining the target field of the most recently received data retrieval request for the certain industrial device 3 as a new key field for the certain industrial device 3, the method further includes:

[0079] Determine the original first target MEC node corresponding to the key field of the certain industrial equipment 3, and control the original key field data of the certain industrial equipment 3 stored in the memory of the original first target MEC node corresponding to the key field of the certain industrial equipment 3 to be stored in the time series database of the several second target MEC nodes.

[0080] Optionally, the control splits the data to be stored into key field data and non-key field data according to the key field, specifically including:

[0081] The key field is sent to a certain industrial device 3 to control the certain industrial device 3 to split its own data to be stored into key field data and non-key field data according to the key field in real time.

[0082] Specifically, in this embodiment, when a new industrial device 3 is to be connected to the system, it needs to register with the central control server 1. The central control server 1 determines the data template and initial key field of the new industrial device 3 in combination with the data retrieval request corresponding to the data of the same type of industrial device 3, and sends the determined data template and initial key field to the new industrial device 3 to control the new industrial device 3 to generate the data to be stored in the form of a data template from its own time series data, and to split the stored data according to the initial key field at the beginning. For example, the commonly used search script for a certain industrial device 3 (can be multiple) is: select field2 from test_table where time='**'. It can be seen from the above script that the search task is to query the value of field2 at a certain time point, and it is believed that there is no query demand for the field1 field. Therefore, the field2 field is determined to be the key field. When a certain industrial device 3 has data to be stored, the field2 data is split as the key field data and the field1 data is split as the non-key field data. The data sample is shown in the following table:

[0083] Table 1 Data sample of a certain industrial equipment 3

[0084] Field Name Field Type Is it critical time Timestamp - field1 Field False field2 Field True

[0085] The central control server 1 receives the data retrieval request sent by the industrial control application 4 in real time. This request is generally sent once every time interval (set by the industrial control application 4) in industrial applications. Since the key field is set to meet the high real-time requirements of the data retrieval request of the industrial control application 4, each time a data retrieval request is received, it is checked whether the target field of the data retrieval request has changed. If it has changed, the key field is changed. Specifically, at the beginning, it is determined whether the target field of each received data retrieval request is consistent with the initial key field. If so, the initial key field is temporarily kept as the key field unchanged. If not, the inconsistent corresponding target field is determined as the new key field and resent to the industrial device 3. After that, if the received target field is the same as the initial key field, the target field is changed. If the field changes again (each time it is compared with the key field most recently sent to the industrial device 3), the changed target field is again determined as the new key field, and this continues. Each time the key field is changed, the original key field data stored in the memory is written to the disk, that is, the original key field data is stored in the time series database, that is, stored on the disk. When the query script of the data retrieval request changes the target key field, the central control server 1 will respond quickly to the change, release the MEC node memory that stores the original key field key-value pair, and quickly store the new data into a new key-value pair according to the new retrieval requirement. This not only ensures the system's flexibility and the ability to automatically respond to changes in demand, but also avoids memory waste through memory reuse.

[0086] Optionally, selecting a first target MEC node and several second target MEC nodes from the MEC node cluster 2 according to preset conditions specifically includes:

[0087] The memory usage and disk usage of each MEC node in the MEC node cluster 2 are collected in real time and recorded in a pre-established management database. The disk usage reflects the storage capacity of the time series database of each MEC node.

[0088] Selecting, through the management database, the MEC node with the lowest current memory usage in the MEC node cluster 2 as the first target MEC node;

[0089] According to the data volume and storage rate of the non-critical field data, several MEC nodes with the lowest current disk usage in the MEC node cluster 2 are selected as the second target MEC nodes through the management database.

[0090] Optionally, after collecting the memory usage of each MEC node in the MEC node cluster 2 in real time, the method further includes:

[0091] When the memory usage of a certain MEC node reaches a preset threshold, control is performed to store key field data whose generation time exceeds a preset time range stored in the memory of the certain MEC node into the time series database of the plurality of second target MEC nodes.

[0092] Optionally, the controlling storing the key field data into the memory of the first target MEC node specifically includes:

[0093] Controlling the generation time of the key field data and the key field data to form a key-value pair according to a key-value format, and controlling the key-value pair to be stored in the memory of the first target MEC node.

[0094] Specifically, in this embodiment, the central control server 1 monitors the memory and disk usage of the MEC node cluster 2 in real time, specifically, collects the memory usage and disk usage of each MEC node in real time and records them in the management database; when an industrial device 3 has data to be stored, the central control server 1 selects the MEC node with the lowest current memory usage to store the key field data, and stores (time, field2) in the memory of the MEC node in the key-value format; specifically, the industrial device 3 sends the split key field data to the MEC node with the lowest current memory usage according to the control of the central control server 1, and the MEC node parses the data sent by the industrial device 3 according to the control of the central control server 1, extracts the key-value pairs of the corresponding key fields and stores them in the memory, and stores the key field data in the memory in the form of key-value pairs, which not only ensures the high real-time retrieval of the key fields in a targeted manner, but also facilitates the calculation of the target key fields during time range retrieval; for the data of other fields, that is, non-key field data, they are distributed after splitting. These data are often stored on disk. Since industrial data are often time-series data, time-series databases generally create indexes for time fields to ensure real-time queries. In this embodiment, the time-series database index can be created according to existing technologies. These storage methods are all stored as records in the management database of the central control server 1. Since the method of this embodiment needs to control the memory usage of each MEC node, and this storage solution is targeted at data retrieval requests with high real-time requirements, old data does not need to be kept in the memory at all times. The memory only needs to store data within the time range related to the current data retrieval requirements. Therefore, the central control server 1 will continuously monitor the memory of the MEC node. When a preset threshold is reached, the old data is stored in the time-series database according to the queue model, that is, it is written to the disk (stored to disk). Real-time monitoring of memory usage can effectively ensure the efficient use of the memory of each MEC node. The data writing mechanism after expiration will not cause problems such as memory overflow that may be caused by high memory consumption.

[0095] S12. If yes, determine a first target MEC node pre-selected from the mobile edge computing MEC node cluster 2 for storing key field data, and obtain pre-stored key field data corresponding to the key field from the memory of the first target MEC node as a data retrieval result.

[0096] Optionally, after controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes, the method further includes:

[0097] Collecting in real time the index information of the key field data stored in the memory of the first target MEC node and the index information of the non-key field data stored in the time series databases of the plurality of second target MEC nodes, and recording all the index information in a pre-established management database;

[0098] After determining whether the target field of the data retrieval request is consistent with the preset key field, the method further includes:

[0099] If not, query the index information in the management database to determine a second target MEC node where the non-key field data corresponding to the target field of the data retrieval request is stored, and obtain the corresponding non-key field data from the time series database of the second target MEC node as the data retrieval result.

[0100] Optionally, the data retrieval request is sent by the industrial control application 4 in real time, and the data retrieval result is returned to the industrial control application 4 in real time.

[0101] Specifically, in this embodiment, the central control server 1 receives the data retrieval request sent by the industrial control application 4 in real time. If the target field of the data retrieval request received this time is the same as the original key field, the retrieval result is obtained from the memory of the first target MEC node. At this time, since the data is read directly from the memory, there is no disk IO delay, which meets the high real-time performance of industrial data retrieval; if the target field of the data retrieval request received this time is different from the original key field, that is, relative to the current storage mode, the data to be retrieved this time is non-key field data, then the retrieval result is first obtained from the time series database of the second target MEC node for this data retrieval request. Since the industrial control application 4 has continuity in data retrieval, it will still send the same data retrieval request for a period of time. Therefore, at this time, the key field is also changed to the target field of this data retrieval request and sent to the industrial equipment 3, and then the above steps S11-S12 are continued to be executed. Then, the data retrieval request using the same target field can obtain a high real-time retrieval effect.

[0102] Specifically, when the data distributed storage and retrieval method provided in this embodiment 1 is applied to industrial information management, it targets the high real-time data retrieval requirements often seen in industrial control applications 4 and faces massive industrial data. It provides a total-split scheduling mode based on the unified management of the central control server 1 and the distributed storage of the MEC node cluster 2. According to the data retrieval requirements for industrial control services, the efficient retrieval of industrial time series data is guaranteed by splitting the key field data and storing them in the memory. It provides an integrated solution for efficient storage and real-time retrieval of massive industrial data. By switching data storage between memory and disk, disk IO delay is avoided for retrieval with high real-time requirements, thereby achieving the purpose of flexible storage and fast retrieval. The system can be simply configured to automatically retrieve data in real time. At the same time, the enterprise does not need to set up and maintain a computer room of the same scale as the Internet 2C business, which is conducive to reducing the economic and manpower costs required for the informatization transformation of traditional industrial enterprises.

[0103] Example 2:

[0104] like Figure 3 As shown, embodiment 2 of the present invention provides a data retrieval device, including:

[0105] The receiving and judging module 11 is used to receive a data retrieval request and judge whether the target field of the data retrieval request is consistent with a preset key field;

[0106] The determination and acquisition module 12 is connected to the receiving and judging module 11, and is used to determine the first target MEC node pre-selected from the mobile edge computing MEC node cluster 2 for storing key field data, and obtain the pre-stored key field data corresponding to the key field from the memory of the first target MEC node as the data retrieval result.

[0107] Optionally, the device further includes a data storage module, specifically including:

[0108] a splitting unit, configured to determine a key field and control the splitting of the data to be stored into key field data and non-key field data according to the key field;

[0109] A selection unit, configured to select a first target MEC node and a plurality of second target MEC nodes from the MEC node cluster 2 according to preset conditions;

[0110] A storing unit is connected to the splitting unit and the selecting unit, and is used to control the key field data to be stored in the memory of the first target MEC node, and to control the non-key field data to be stored in the time series database of the plurality of second target MEC nodes.

[0111] Optionally, the device further includes a registration unit, specifically including:

[0112] A first receiving subunit, configured to receive a registration request from an industrial device 3;

[0113] a first determining subunit, connected to the first receiving subunit, configured to determine a data template of the certain industrial device 3 according to the registration request;

[0114] The first sending subunit is connected to the first determining subunit, and is used to send the data template to the certain industrial device 3 to control the certain industrial device 3 to generate the data generated by itself in real time into data to be stored according to the data template.

[0115] Optionally, the splitting unit includes a determining subunit, specifically configured to:

[0116] When receiving a registration request for a certain industrial device 3, determining a key field for the certain industrial device 3 based on target fields of data retrieval requests for similar registered industrial devices 3 received in the past;

[0117] After completing the registration of a certain industrial equipment 3, determine whether the target field of the latest received data retrieval request for the certain industrial equipment 3 is consistent with the original key field for the certain industrial equipment 3. If not, determine the target field of the latest received data retrieval request for the certain industrial equipment 3 as the new key field for the certain industrial equipment 3.

[0118] Optionally, the device further comprises:

[0119] The disk placement unit is connected to the determination subunit and is used to determine the original first target MEC node corresponding to the key field of the certain industrial equipment 3, and control the storage of all the original key field data of the certain industrial equipment 3 stored in the memory of the original first target MEC node corresponding to the key field of the certain industrial equipment 3 into the time series database of the several second target MEC nodes.

[0120] The splitting unit includes a splitting subunit, which is specifically used to:

[0121] The key field is sent to a certain industrial device 3 to control the certain industrial device 3 to split its own data to be stored into key field data and non-key field data according to the key field in real time.

[0122] Optionally, the device further comprises:

[0123] A collection unit is used to collect the memory usage and disk usage of each MEC node in the MEC node cluster 2 in real time and record them in a pre-established management database, wherein the disk usage reflects the storage capacity of the time series database of each MEC node;

[0124] The selected unit specifically includes:

[0125] A first selection subunit, connected to the collection unit, is configured to select, through the management database, the MEC node with the lowest current memory usage in the MEC node cluster 2 as the first target MEC node;

[0126] The second selection subunit is connected to the collection unit and is used to select several MEC nodes with the lowest current disk usage in the MEC node cluster 2 as the second target MEC nodes through the management database based on the data volume and storage rate of the non-critical field data.

[0127] Optionally, the tray placement unit is further connected to the collection unit for:

[0128] When the memory usage of a certain MEC node reaches a preset threshold, control is performed to store key field data whose generation time exceeds a preset time range stored in the memory of the certain MEC node into the time series database of the plurality of second target MEC nodes.

[0129] Optionally, the deposit unit includes a first deposit subunit, specifically configured to:

[0130] Controlling the generation time of the key field data and the key field data to form a key-value pair according to a key-value format, and controlling the key-value pair to be stored in the memory of the first target MEC node.

[0131] Optionally, the collecting unit is further used for:

[0132] Collecting in real time the index information of the key field data stored in the memory of the first target MEC node and the index information of the non-key field data stored in the time series databases of the plurality of second target MEC nodes, and recording all the index information in a pre-established management database;

[0133] The determining and obtaining module 12 is further configured to:

[0134] If not, the second target MEC node where the non-key field data corresponding to the target field of the data retrieval request is stored is queried through the index information in the management database, and the corresponding non-key field data is obtained from the time series database of the queried second target MEC node as the retrieval result.

[0135] Optionally, the data retrieval request is sent by the industrial control application 4 in real time, and the data retrieval result is returned to the industrial control application 4 in real time.

[0136] Example 2 is a device claim corresponding to Example 1, and the two can be referenced to each other for easier understanding.

[0137] Example 3:

[0138] like Figure 4 As shown, embodiment 3 of the present invention provides a central control server, which includes a memory 10 and a processor 20. The memory 10 stores a computer program. When the processor 20 runs the computer program stored in the memory 10, the processor 20 executes the data retrieval method described in embodiment 1.

[0139] The memory 10 is connected to the processor 20. The memory 10 may be a flash memory, a read-only memory, or other memory. The processor 20 may be a central processing unit or a single-chip microcomputer.

[0140] The memory 10 includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read-only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0141] Example 4:

[0142] like Figure 2 As shown, embodiment 4 of the present invention provides a data retrieval system, including:

[0143] Central control server 1, used to execute the data retrieval method as described in Example 1;

[0144] A mobile edge computing MEC node cluster 2 is connected to the central control server 1, and the MEC node cluster includes a pre-selected first target MEC node for storing key field data.

[0145] Optionally, the system further comprises:

[0146] The industrial device 3 is connected to the central control server 1 and the MEC node cluster 2, and is used to generate data to be stored according to the control of the central control server 1, and split the data to be stored into key field data and non-key field data.

[0147] Optionally, the system further comprises:

[0148] The industrial control application 4 is connected to the central control server 1 and is used to send data retrieval requests to the central control server 1 in real time and receive data retrieval results returned by the central control server 1 in real time.

[0149] Embodiments 1-4 of the present invention provide a data retrieval method, device, central control server, and system. For data retrieval requests with pre-set key fields as target fields, the key field data pre-stored in the MEC node memory is obtained as the data retrieval result, thereby avoiding the IO delay problem caused by reading data from the disk and ensuring the high real-time performance of data retrieval.

[0150] It will be understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present invention, and the present invention is not limited thereto. Those skilled in the art will appreciate that various modifications and improvements can be made without departing from the spirit and substance of the present invention, and such modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A data retrieval method, characterized in that: Applied to the central control server, the method includes: Receive a data retrieval request from an industrial control application, and determine whether a target field of the data retrieval request is consistent with an originally preset key field; If yes, determine a first target MEC node pre-selected from the mobile edge computing MEC node cluster for storing key field data corresponding to the original preset key field, and obtain the pre-stored key field data corresponding to the original preset key field from the memory of the first target MEC node as a data retrieval result; If not, the key field data corresponding to the original preset key field will be written to the disk, the target field of this data retrieval request will be obtained as the new preset key field, and the new preset key field will be sent to the industrial device so that the industrial device will store the key field data corresponding to the new preset key field in the memory of the MEC node.

2. The method according to claim 1, characterized in that Before receiving the data retrieval request, the method further includes: Determine key fields, and control the splitting of the data to be stored into key field data and non-key field data according to the key fields; Selecting a first target MEC node and several second target MEC nodes from the MEC node cluster according to preset conditions; Controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes.

3. The method according to claim 2, characterized in that Before determining the key fields, the method further includes: Receive a registration request for a certain industrial device; Determining a data template of the certain industrial equipment according to the registration request; The data template is sent to the certain industrial device to control the certain industrial device to generate the data generated by the certain industrial device in real time into data to be stored according to the data template.

4. The method according to claim 2, characterized in that The key fields to be determined specifically include: When receiving a registration request for a certain industrial device, determining a key field for the certain industrial device based on target fields of data retrieval requests for similar registered industrial devices received in the past; After completing the registration of a certain industrial device, determine whether the target field of the latest received data retrieval request for the certain industrial device is consistent with the original key field for the certain industrial device. If not, determine the target field of the latest received data retrieval request for the certain industrial device as the new key field for the certain industrial device.

5. The method according to claim 4, characterized in that After determining the target field of the most recently received data retrieval request for the certain industrial device as a new key field for the certain industrial device, the method further includes: Determine the original first target MEC node corresponding to the key field for the certain industrial equipment, and control the original key field data of the certain industrial equipment stored in the memory of the original first target MEC node corresponding to the key field for the certain industrial equipment to be stored in the time series database of the several second target MEC nodes.

6. The method according to claim 2, characterized in that The control splits the data to be stored into key field data and non-key field data according to the key field, specifically including: The key field is sent to a certain industrial device to control the certain industrial device to split its own data to be stored into key field data and non-key field data according to the key field in real time.

7. The method according to any one of claims 2 to 6, characterized in that: The selecting a first target MEC node and a plurality of second target MEC nodes from the MEC node cluster according to preset conditions specifically includes: Collect the memory usage and disk usage of each MEC node in the MEC node cluster in real time and record them in a pre-established management database. The disk usage reflects the storage capacity of the time series database of each MEC node. Selecting, through the management database, a MEC node with the lowest current memory usage in the MEC node cluster as the first target MEC node; According to the data volume and storage rate of the non-critical field data, several MEC nodes with the lowest current disk usage in the MEC node cluster are selected as the second target MEC nodes through the management database.

8. The method according to claim 7, characterized in that After collecting the memory usage of each MEC node in the MEC node cluster in real time, the method further includes: When the memory usage of a certain MEC node reaches a preset threshold, control is performed to store key field data whose generation time exceeds a preset time range stored in the memory of the certain MEC node into the time series database of the plurality of second target MEC nodes.

9. The method according to any one of claims 2 to 6, characterized in that: The controlling step of storing the key field data into the memory of the first target MEC node specifically includes: Controlling the generation time of the key field data and the key field data to form a key-value pair according to a key-value format, and controlling the key-value pair to be stored in the memory of the first target MEC node.

10. The method according to any one of claims 2 to 6, characterized in that: After controlling the key field data to be stored in the memory of the first target MEC node, and controlling the non-key field data to be stored in the time series databases of the plurality of second target MEC nodes, the method further includes: Collecting in real time the index information of the key field data stored in the memory of the first target MEC node and the index information of the non-key field data stored in the time series databases of the plurality of second target MEC nodes, and recording all the index information in a pre-established management database; After determining whether the target field of the data retrieval request is consistent with the originally preset key field, the method further includes: If not, query the index information in the management database to determine a second target MEC node where the non-key field data corresponding to the target field of the data retrieval request is stored, and obtain the corresponding non-key field data from the time series database of the second target MEC node as the data retrieval result.

11. The method according to claim 1, wherein The data retrieval request is sent by the industrial control application in real time, and the data retrieval result is returned to the industrial control application in real time.

12. A data retrieval device, characterized in that: include: A receiving and judging module, configured to receive a data retrieval request from an industrial control application and judge whether a target field of the data retrieval request is consistent with an originally preset key field; a determination and acquisition module connected to the receiving and judging module, and configured to, if yes, determine a first target MEC node pre-selected from a mobile edge computing MEC node cluster for storing key field data corresponding to the original preset key field, and obtain the pre-stored key field data corresponding to the original preset key field from the memory of the first target MEC node as a data retrieval result; The data storage module is connected to the receiving and judging module and is used to store the key field data corresponding to the original preset key field on the disk if no, obtain the target field of this data retrieval request as the new preset key field, and send the new preset key field to the industrial device so that the industrial device stores the key field data corresponding to the new preset key field in the memory of the MEC node.

13. A central control server, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the data retrieval method according to any one of claims 1 to 11.

14. A data retrieval system, characterized in that: include: A central control server, configured to execute the data retrieval method according to any one of claims 1 to 11; A mobile edge computing MEC node cluster is connected to the central control server, and the MEC node cluster includes a pre-selected first target MEC node for storing key field data.

15. The system according to claim 14, wherein: Also includes: The industrial equipment is connected to the central control server and the MEC node cluster, and is used to generate data to be stored according to the control of the central control server, and split the data to be stored into key field data and non-key field data.

16. The system according to claim 14 or 15, characterized in that Also includes: The industrial control application is connected to the central control server and is used to send data retrieval requests to the central control server in real time and receive data retrieval results returned by the central control server in real time.

Citation Information

Patent Citations

  • Data processing method and related equipment

    CN111177178A

  • Data retrieval method and device, equipment and storage medium

    CN114064729A