Data adaptation method, and apparatus
By using different data channels in the data adapter to read and adapt different types of data in the SCADA system, the inefficiency problem caused by frequent switching of data channels in the prior art is solved, and more efficient data adaptation is achieved.
Patent Information
- Application Number
- PCT/CN2023/114068
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-27
AI Technical Summary
When existing data adapters read real-time data of energy system from SCADA systems, they need to frequently switch data channels, resulting in very low data acquisition and adaptation efficiency, especially when processing tens of thousands of data, which takes a long time.
By determining the data labels of the SCADA system measurement data, reading and using different data channels (such as digital data channels and analog data channels) to read and adapt different data types separately, avoiding switching of data channels, thereby improving the efficiency of data adaptation.
This method significantly improves the efficiency of data adaptation by avoiding switching of data channels and reduces the time for data acquisition and adaptation, especially when processing large amounts of real-time data.
Smart Images

Figure CN2023114068_27022025_PF_FP_ABST
Abstract
Description
Data adaptation method and device Technical Field
[0001] The present invention mainly relates to the field of data, and in particular to a data adaptation method and device. Background Art
[0002] Supervisory Control and Data Acquisition (SCADA) systems are widely used in the energy and power sectors to collect data related to energy systems. Energy management systems integrate a variety of advanced algorithms to optimize energy system operations and improve energy efficiency. Energy management systems include data adapters that read data from SCADA systems and convert them into a format that the energy management system can understand.
[0003] The real-time data of energy systems can reach tens of thousands. When existing data adapters read data from SCADA systems, they need to switch the corresponding data channel according to the data type. Due to the need to repeatedly switch data channels, the data collection and adaptation efficiency is very low. For real-time data of energy systems at the tens of thousands, it will take a considerable amount of time.
[0004] Summary of the Invention
[0005] In order to solve the above technical problems, the present invention provides a data adaptation method and device to improve the efficiency of energy management system in adapting data from SCADA system.
[0006] To achieve the above-mentioned objectives, the present invention proposes a data adaptation method for adapting the measurement data of the SCADA system to the energy management system, the data adaptation method comprising: determining the data tag of the measurement data in the SCADA system; reading the data tag of the measurement data, the data tag comprising a first data tag corresponding to a first type of data and a second data tag corresponding to a second type of data; using a first data channel to read the first type of data, and using a second data channel to read the second type of data, and adapting the first type of data and the second type of data to a data format recognizable by the energy management system. To this end, by using the first data channel to read the first type of data, and using the second data channel to read the second type of data, different data channels are used for reading and adapting according to different data types, thereby avoiding the switching of data channels and improving the efficiency of data adaptation.
[0007] Optionally, the data tag includes a digital data tag and an analog data tag, the first type of data is digital data, and the second type of data is analog data, and the method includes: using the first data channel to read the digital data, and using the second data channel to read the analog data. To this end, by using the digital data channel to read digital data and the analog data channel to read analog data, different data channels are used for reading and adapting according to different data types, thereby avoiding data channel switching and improving data adaptation efficiency.
[0008] Optionally, the method further includes: dividing the first data channel into a first multithread, wherein each thread in the first multithread aggregates the read measurement data into the first data channel after reading the measurement data; and dividing the second data channel into a second multithread, wherein each thread in the second multithread aggregates the read measurement data into the second data channel after reading the measurement data. Therefore, by using multiple threads to read the measurement data, the efficiency of data reading is further improved, thereby improving the efficiency of data adaptation.
[0009] Optionally, the method further includes: obtaining the number of cores of the processor; determining a maximum number of threads based on the number of cores; and dividing the first data channel into a first multithread and the second data channel into a second multithread based on the maximum number of threads, wherein the sum of the first multithread and the second multithread is no greater than the maximum number of threads. Therefore, dividing the first data channel into the first multithread and the second data channel into the second multithread based on the number of cores of the processor can prevent processor overload and improve the overall configuration efficiency of the system.
[0010] Optionally, the method further includes: reading a data description file for the measurement data, the data description file including the amount of first-type data and second-type data; and dividing the first data channel into a first multithread, and dividing the second data channel into a second multithread, based on the amount of the first-type data and the second-type data. Thus, by allocating thread resources based on the amount of the first-type data and the second-type data, resource allocation and data reading efficiency are maximized.
[0011] Optionally, the method further includes: receiving a configuration parameter, the configuration parameter including a first thread configuration parameter and a second thread configuration parameter; dividing the first data channel into a first multithread according to the first configuration parameter, and dividing the second data channel into a second multithread according to the second configuration parameter. Therefore, by configuring the number of the first multithread and the second multithread using the configuration parameters, the flexibility of thread configuration is improved.
[0012] Optionally, reading the data tag of the measurement data includes: receiving a configuration file; filtering the measurement data according to the configuration file, and reading the filtered measurement data. Therefore, filtering the measurement data using the configuration file eliminates the need to read all the measurement data, further improving data reading efficiency and, in turn, data adaptation efficiency.
[0013] The present invention also proposes a data adaptation device for adapting the measurement data of the SCADA system to the energy management system, and the data adaptation device includes: a label determination module, which determines the data label of the measurement data in the SCADA system; a label reading module, which reads the data label of the measurement data, wherein the data label includes a first data label corresponding to the first type of data and a second data label corresponding to the second type of data; an adaptation module, which uses a first data channel to read the first type of data and uses a second data channel to read the second type of data, and adapts the first type of data and the second type of data to a data format recognizable by the energy management system.
[0014] The present invention also provides an electronic device, comprising a processor, a memory, and instructions stored in the memory, wherein the instructions implement the above-mentioned method when executed by the processor.
[0015] The present invention also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method described above is executed.
[0016] The present invention also provides a computer program product, comprising a computer program, which implements the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The following drawings are only intended to illustrate and explain the present invention, and do not limit the scope of the present invention.
[0018] FIG1 is a flow chart of a data adaptation method according to an embodiment of the present invention;
[0019] FIG2 is a schematic diagram of a first data channel and a second data channel according to an embodiment of the present invention;
[0020] FIG3 is a schematic diagram of a multi-threaded acquisition according to an embodiment of the present invention;
[0021] FIG4 is a schematic diagram of a data adaptation device according to an embodiment of the present invention;
[0022] FIG5 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0023] Description of Reference Numerals
[0024] 100 data adaptation method
[0025] Steps 110-130
[0026] CH1 first data channel
[0027] DA1, ..., DAn first type data
[0028] CH2 second data channel
[0029] DB1, ..., DBn second type data
[0030] T1, T2, T3 threads
[0031] 400 data adapter
[0032] 410 tag determination module
[0033] 420 tag reading module
[0034] 430 adapter module
[0035] 500 electronic devices
[0036] 510 processor
[0037] 520 memory DETAILED DESCRIPTION
[0038] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described with reference to the accompanying drawings.
[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0040] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.
[0041] The present invention proposes a data adaptation method for adapting measurement data from a SCADA system to an energy management system. The SCADA system is used to collect data, and the energy management system is used to process and analyze the data based on built-in algorithms to optimize the operating efficiency of the energy system. The data adaptation method of the present invention adapts the data collected by the SCADA system to data that the energy management system can recognize, so that the energy management system can process and analyze it. FIG1 is a flow chart of a data adaptation method 100 according to one embodiment of the present invention. As shown in FIG1 , the data adaptation method 100 includes:
[0042] Step 110: Determine the data tags of the measurement data in the SCADA system.
[0043] A SCADA system, or supervisory control and data acquisition system, can be used to collect data from energy systems. For example, an energy system consists of multiple energy nodes, which can be buildings, factories, or residential communities. This data can include information such as power consumption, time, and status. This data captured by the SCADA system is called measurement data and is stored in the SCADA system's cache in a dedicated data format. A data tag can be a specific attribute value of the data, such as digital data / analog data, or raw data / processed data. Data tags can be manually assigned by the user or automatically assigned based on preset rules.
[0044] Step 120 : Reading data tags of the measurement data, where the data tags include a first data tag corresponding to the first type of data and a second data tag corresponding to the second type of data.
[0045] The measurement data is stored in the cache of the SCADA system, and the data tag of the measurement data determined in step 110 is read. The data tag includes a first data tag corresponding to the first type of data and a second data tag corresponding to the second type of data. For example, the data tag can be digital data / analog data, the first data tag is a digital data tag, the first type of data corresponding to the digital data tag is digital data, the second data tag is an analog data tag, and the second type of data corresponding to the analog data tag is analog data. For another example, the data tag can be raw data / processed data, the first data tag is a raw data tag, the first type of data corresponding to the raw data tag is raw data, the second data tag is a processed data tag, and the second type of data corresponding to the processed data tag is processed data. For this reason, the measurement data can be divided into first type data and second type data according to the data tag.
[0046] Step 130: Use the first data channel to read the first type of data, and use the second data channel to read the second type of data, and adapt the first type of data and the second type of data to a data format recognizable by the energy management system.
[0047] Starting from the first measurement data, the measurement data in the SCADA system cache are traversed. For the first measurement data, the data tag of the first measurement data is read. If the data tag read is the first data tag, the first measurement data is read using the first data channel, and then the second measurement data is moved to. For the second measurement data, if the data tag read is the second data tag, the second measurement data is read using the second data channel, and so on, until all the measurement data are read, and the first type of data and the second type of data are adapted to the data format recognizable by the energy management system. The data format recognizable by the energy management system can be JSON format. The AMQP protocol (such as the RabbitMQ protocol) can be used to read the first type of data using the first data channel and the second type of data using the second data channel. To this end, by using the first data channel to read the first type of data and the second data channel to read the second type of data, different data channels are used for reading and adaptation according to different data types, avoiding the switching of data channels and improving the efficiency of data adaptation.
[0048] Figure 2 is a schematic diagram of a first data channel and a second data channel according to an embodiment of the present invention. As shown in Figure 2, the first data channel CH1 collects first type data DA1, ..., DAn, and the second data channel CH2 collects second type data DB1, ..., DBn, that is, the first data channel CH1 and the second data channel CH2 are used to collect the first type data DA and the second type data respectively.
[0049] In some embodiments, the data tag includes a digital data tag and an analog data tag, the first type of data is digital data, and the second type of data is analog data. The method includes: reading the digital data using a first data channel and reading the analog data using a second data channel. Specifically, a piece of data is status data of an energy node, where a status value of 1 indicates that the energy node is in a normal state, and a status value of 0 indicates that the energy node is in an abnormal state. Its data tag is digital data. When the data is read, it is determined to be digital data based on its data tag, and then the data is read using the first data channel, i.e., the digital data channel. Another piece of data is power consumption data of an energy node, where the power consumption value represents the power consumption of the energy node in a certain time period. Its data tag is analog data. When the data is read, it is determined to be analog data based on its data tag, and then the data is read using the second data channel, i.e., the analog data channel. To this end, by using the digital data channel to read digital data and the analog data channel to read analog data, different data channels are used for reading and adaptation according to different data types, avoiding data channel switching and improving data adaptation efficiency.
[0050] In some embodiments, the method further includes: dividing the first data channel into a first multithread, wherein each thread in the first multithread aggregates the read measurement data into the first data channel after reading the measurement data; dividing the second data channel into a second multithread, wherein each thread in the second multithread aggregates the read measurement data into the second data channel after reading the measurement data. To this end, by using multiple threads to read the measurement data, the efficiency of data reading is further improved, thereby improving the efficiency of data adaptation.
[0051] Figure 3 is a schematic diagram of multi-threaded data acquisition according to an embodiment of the present invention. A first data channel CH1 is divided into first threads T1, T2, and T3. The first threads T1, T2, and T3 each read first-type data DA1, ..., Dan and then aggregate the read first-type data into the first data channel CH1. Similarly, a second data channel CH2 is divided into second threads T1, T2, and T3. The second threads T1, T2, and T3 each read second-type data DB1, ..., DBn and then aggregate the read second-type data into the second data channel CH2.
[0052] In some embodiments, the method further includes: obtaining the number of cores of the processor; determining the maximum number of threads based on the number of cores; dividing the first data channel into a first multithread and the second data channel into a second multithread based on the maximum number of threads, wherein the sum of the first multithread and the second multithread is not greater than the maximum number of threads. For example, if the number of cores of the processor is 8, one thread is run on each core, the maximum number of threads is 8, and the sum of the first multithread and the second multithread is not greater than 8, the first data channel can be divided into 5 threads, and the second data channel can be divided into 3 threads. To this end, dividing the first data channel into a first multithread and the second data channel into a second multithread based on the number of cores of the processor can prevent the processor from overloading and improve the overall configuration efficiency of the system.
[0053] In some embodiments, the method further includes: reading a data description file of the measurement data, the data description file including the number of first type data and second type data; dividing the first data channel into a first multithread and the second data channel into a second multithread based on the number of first type data and second type data. For example, if the data description file records a total of 1,000 data items, of which 700 are digital data and 300 are analog data, thread resources can be allocated in a ratio of 7 to 3. To this end, by allocating thread resources based on the number of first type data and second type data, resource allocation and data reading efficiency are maximized.
[0054] In some embodiments, the method further includes: receiving a configuration parameter, the configuration parameter including a first thread configuration parameter and a second thread configuration parameter; dividing the first data channel into a first multithread according to the first configuration parameter, and dividing the second data channel into a second multithread according to the second configuration parameter. For example, if the user sets the first thread configuration parameter to 5 and the second configuration parameter to 3 in the configuration parameters, the first data channel will be divided into 5 threads and the second data channel will be divided into 3 threads. Therefore, configuring the number of the first and second multithreads through configuration parameters increases the flexibility of thread configuration.
[0055] In some embodiments, reading the data tag for measurement data includes: receiving a configuration file; filtering the measurement data according to the configuration file; and reading the filtered measurement data. For example, a user may specify the amount of energy system measurement data in the configuration file, filter the corresponding amount of measurement data through the configuration file, and then read the measurement data. Therefore, filtering the measurement data through the configuration file eliminates the need to read all the measurement data, further improving the efficiency of data reading and, in turn, data adaptation.
[0056] An embodiment of the present invention provides a data adaptation method, which uses a first data channel to read first type data and a second data channel to read second type data. Different data channels are used for reading and adaptation according to different data types, thereby avoiding switching of data channels and improving the efficiency of data adaptation.
[0057] The present invention also proposes a data adaptation device for adapting measurement data of a SCADA system to an energy management system. FIG4 is a schematic diagram of a data adaptation device 400 according to an embodiment of the present invention. As shown in FIG4 , the data adaptation device 400 includes:
[0058] The tag determination module 410 determines the data tags of the measurement data in the SCADA system;
[0059] The tag reading module 420 reads the data tags of the measurement data, where the data tags include a first data tag corresponding to the first type of data and a second data tag corresponding to the second type of data;
[0060] The adaptation module 430 uses the first data channel to read the first type of data and uses the second data channel to read the second type of data, and adapts the first type of data and the second type of data to a data format recognizable by the energy management system.
[0061] The present invention also provides an electronic device 500. FIG5 is a schematic diagram of an electronic device 500 according to an embodiment of the present invention. As shown in FIG5 , the electronic device 500 includes a processor 510 and a memory 520. The memory 520 stores instructions, wherein the instructions, when executed by the processor 510, implement the method 100 described above.
[0062] The present invention further provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method 100 described above is executed.
[0063] The present invention further provides a computer program product, comprising a computer program, which implements the method 100 described above when the computer program is executed by a processor.
[0064] Some aspects of the methods and apparatus of the present invention may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks," "modules," "engines," "units," "components," or "systems." The processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLCs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present invention may be embodied as computer products in one or more computer-readable media, the product including computer-readable program code. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., cards, sticks, key drives, etc.).
[0065] Flowcharts are used herein to illustrate the operations performed by the methods according to the embodiments of the present application. It should be understood that the preceding operations are not necessarily performed in exact order. Instead, the various steps may be performed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0066] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0067] The above description is only an illustrative embodiment of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes, modifications and combinations made by those skilled in the art without departing from the concept and principle of the present invention shall fall within the scope of protection of the present invention.
[0068] Nouns and pronouns referring to persons in this patent application are not limited to a specific gender.
Claims
1. A data adaptation method (100) for adapting measurement data of a SCADA system to an energy management system, characterized in that: The data adaptation method (100) comprises: Determining data tags (110) of the measurement data in the SCADA system; reading the data tags of the measurement data, the data tags comprising a first data tag corresponding to a first type of data and a second data tag corresponding to a second type of data (120); The first data type data is read using a first data channel, and the second data type data is read using a second data channel, and the first data type data and the second data type data are adapted to a data format recognizable by the energy management system (130).
2. The data adaptation method (100) according to claim 1, characterized in that: The data tag includes a digital data tag and an analog data tag, the first type of data is digital data, and the second type of data is analog data. The method (100) includes: using the first data channel to read digital data, and using the second data channel to read analog data.
3. The data adaptation method (100) according to claim 1 or 2, characterized in that: The method (100) further comprises: Dividing the first data channel into first multiple threads, each thread in the first multiple threads aggregates the read measurement data into the first data channel after reading the measurement data; The second data channel is divided into second multiple threads, and each thread in the second multiple threads aggregates the read measurement data into the second data channel after reading the measurement data.
4. The data adaptation method (100) according to claim 3, characterized in that: The method (100) further comprises: Get the number of cores of the processor; Determining a maximum number of threads based on the number of cores; The first data channel is divided into first multiple threads according to the maximum number of threads, and the second data channel is divided into second multiple threads, and the sum of the first multiple threads and the second multiple threads is not greater than the maximum number of threads.
5. The data adaptation method (100) according to claim 3, characterized in that: The method (100) further comprises: Reading a data description file of the measurement data, wherein the data description file includes a quantity of first type data and a quantity of second type data; Dividing the first data channel into first multiple threads according to the amount of the first type of data and the second type of data, And dividing the second data channel into second multiple threads.
6. The data adaptation method (100) according to claim 3, characterized in that: The method (100) further comprises: Receiving a configuration parameter, the configuration parameter including a first thread configuration parameter and a second thread configuration parameter; The first data channel is divided into first multiple threads according to the first configuration parameter, and the second data channel is divided into second multiple threads according to the second configuration parameter.
7. The data adaptation method (100) according to claim 1, characterized in that: Reading the data tag of the measurement data includes: receiving a configuration file; The measurement data is filtered according to the configuration file, and the filtered measurement data is read.
8. A data adaptation device (400) for adapting measurement data of a SCADA system to an energy management system, characterized in that: The data adaptation device (400) comprises: A label determination module (410) determines a data label of the measurement data in the SCADA system; A label reading module (420) reads the data label of the measurement data, wherein the data label includes a first data label corresponding to the first type of data and a second data label corresponding to the second type of data; An adaptation module (430) uses a first data channel to read the first type of data, and uses a second data channel to read the second type of data, and adapts the first type of data and the second type of data to a data format recognizable by the energy management system.
9. An electronic device (500), comprising a processor (510), a memory (520), and instructions stored in the memory (520), wherein the instructions, when executed by the processor (510), implement the method (100) according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed, perform the method (100) according to any one of claims 1 to 7.
11. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the method (100) according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for data transmission between SCADA (supervisory control and data acquisition) system and database platform
CN102855303A
Multi-source data fusion method for wide-area measurement control system of power distribution network
CN111221794A
Data processing method and system based on SCADA system
CN111884994A
Automatically converting error logs having different format types into a standardized and labeled format having relevant natural language information
US20220101115A1