CN110928870A - Real-time path database - Google Patents
Real-time path database Download PDFInfo
- Publication number
- CN110928870A CN110928870A CN201811080578.7A CN201811080578A CN110928870A CN 110928870 A CN110928870 A CN 110928870A CN 201811080578 A CN201811080578 A CN 201811080578A CN 110928870 A CN110928870 A CN 110928870A
- Authority
- CN
- China
- Prior art keywords
- data
- real
- database system
- path database
- time path
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The real-time path database belongs to the technical field of information, is mainly applied to petroleum, petrochemical and power industries, and is large in cross-regional property, substations are distributed nationwide, and an air-conditioning center cannot supervise operation or analysis if no reliable data exists. The invention solves the problem of centralized collection and release of production operation data. The data access method is different from other database systems, all data nodes have independent address areas and are stored in the memory in a hash mode, data access is only performed through path names, namely the data areas are quickly located, and data reading and updating are all performed in the memory, so that the throughput efficiency is very high. The method can quickly and stably provide data support for other business systems, such as various trend analysis tools, alarm monitoring, ERP systems and the like.
Description
Technical Field
The real-time path database is mainly applied to industrial data real-time acquisition and release, can be used for carrying out high concurrent data acquisition and release on PLC (programmable logic controller) equipment of various types in industrial production, and provides data support for an industrial information platform with strict data real-time requirement.
Background
In the field of industrial real-time communication, as various types of PLCs (programmable logic controllers) such as ControlLogix5000 series and Kuntze PLC (programmable logic controllers) are used in a production environment, due to the fact that protocols of various manufacturers are different, data collection and monitoring cannot be processed in a centralized mode, a traditional relational database and a traditional real-time database are dwarfed in some production environments only concerned with data real-time performance, the requirement for high-concurrency data updating and reading is met, the query speed is low, the deployment cost is very high, a specially-assigned person is required to maintain regularly, the expansibility is poor, if data are provided for a third party, a special programmer is required to analyze SDK (software development kit) to complete the data real-time performance, and based on the background, the real-time path database which is concentrated on the data real-time performance is invented.
Disclosure of Invention
An efficient data centralized acquisition and storage scheme is provided by depending on an industrial PLC system
A real-time path database, PDB for short, aims to provide a real-time database which is updated and stored at high concurrency by a keyword path, completely breaks away from the dependence of a hard disk because the operation speed of the hard disk is hundreds of times slower than that of a memory, solves the problem of the operation speed of all databases, provides a unified data structure, and can directly submit corresponding requests according to the data structure when technical personnel develop expansibility, so that data can be obtained.
The scheme of the invention is described by a C language as follows:
firstly, initializing a path database.
The algorithm is packaged in an operation Class (CPDB), and a 36-bit NULL pointer address array (m _ hPDB) is initialized at the instantiation of the operation class, and the data member address is set to NULL, which avoids wasting system memory.
And secondly, compiling a key value hash algorithm.
Designing a Hash algorithm, and corresponding characters 0-9 and a-z to subscripts of an address array one by one, namely 0-35, by calculating an ASCII code value.
For example, according to the ASCII table, the ASCII code values of 0-9 digits are from 48 to 57, it can be determined that the subscript value of the address array m _ hPDB is obtained by subtracting 48 from the digit class, and similarly, the ASCII code values of a-z are from 97 to 122, and the subscript value of the address array m _ hPDB is obtained by subtracting 87 from the value of the digit class.
Third, data updating
When a storage request is initiated by data, the algorithm accepts two parameters, namely a key and a data address, and then splits a key value of the key into paths, such as PZT01, the algorithm splits the key into 5, that is, the data address pointed by PZT01 can be queried only if five times of positioning are needed. The details are as follows
1. Key values are first stored in a temporary string array.
2. Through the for loop, the first character 'P' of the key is fetched.
3. And calculating the address subscript corresponding to the P, namely 25, by using a hash algorithm.
4. And judging whether the current character is the last bit, if so, ending the path addressing, and updating the data address variable under the key value. If not, a new 36-bit address array is opened up under the key value to serve as a storage array of a second path, and the pointer of the array is assigned to the address pointer under the current key value.
5. And (4) circularly carrying out the addressing process of the step (4) until the last character, updating the data address and finishing the addressing. The old data address can be deleted according to the use condition or delete, or the self-writing algorithm is saved in the database, so that the third software is kept synchronous.
Fourthly, data positioning and reading
When the real-time numerical value is read, only keywords are needed to be input, the data area can be located through the keywords, the algorithm can sequentially locate the data area according to the character strings of the key values, then the data are extracted through the internal data structure, and PZT01 in the third step is taken as an example.
1. First the array index of the first letter is located and we will get 25 by the hashing algorithm.
2. The data address under 25 is directly queried, and if addressing is not finished, the address array variable at array 25 is assigned to a temporary address array to keep addressing.
And (5) circulating the step 2 until the last character, judging whether the data address is empty, and if the data address is the empty address, indicating that no data exists under the keyword.
Claims (6)
1. A real-time path database system is characterized in that a real-time data processing system which can acquire PLCs of different manufacturers and different types in a distributed manner and store the PLCs by taking keywords as paths is provided.
2. The real-time path database system according to claim 1, wherein the data is distributed for collection, data path storage, and data distribution.
3. The real-time path database system of claim 1, wherein the distributed collection of data comprises the steps of:
and communication protocol identification, which is used for communicating with the PLC equipment by using a fixed industrial data communication protocol (such as CIP, IEC, MODBUS TCP) to read data.
4. And (4) converting a data protocol, and organizing a TCP data stream by a private data structure of the acquired data information for transmission.
5. The real-time path database system of claim 1 wherein the data path storage comprises a centralized collection of TCP data packets for parsing and storage in memory with a key as a path.
6. The real-time path database system of claim 1, wherein the data distribution is divided into a production network and an office network due to data security requirements, and the data distribution is mainly to read data from the data server through the mapping of an industrial firewall and mainly to provide production data for other user systems (such as ERP and office OA systems).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811080578.7A CN110928870A (en) | 2018-09-17 | 2018-09-17 | Real-time path database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811080578.7A CN110928870A (en) | 2018-09-17 | 2018-09-17 | Real-time path database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110928870A true CN110928870A (en) | 2020-03-27 |
Family
ID=69855860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811080578.7A Pending CN110928870A (en) | 2018-09-17 | 2018-09-17 | Real-time path database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110928870A (en) |
-
2018
- 2018-09-17 CN CN201811080578.7A patent/CN110928870A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101059695B (en) | Programmatic access to controller construct and variable names | |
US20060020578A1 (en) | Time stamp methods for unified plant model | |
CN109902105A (en) | For the data query system of micro services framework, method, equipment and storage medium | |
CN102999524B (en) | A kind of document associations search method and system | |
CN111680198B (en) | File management system and method based on file segmentation and feature extraction | |
CN106789898B (en) | Remote data transmission terminal, system and coding and decoding method thereof | |
Wu et al. | The Internet of Things enabled shop floor scheduling and process control method based on Petri nets | |
CN111708895B (en) | Knowledge graph system construction method and device | |
Afzal et al. | OWLMap: fully automatic mapping of ontology into relational database schema | |
KR101455880B1 (en) | Primary server architectural networking arrangement and methods therefor | |
CN104820700B (en) | Processing method of unstructured data of transformer substation | |
CN114900346B (en) | Network security testing method and system based on knowledge graph | |
CN101645073A (en) | Method for guiding prior database file into embedded type database | |
CN115801411A (en) | High-order data feature extraction and identification method for power internet of things attack behavior | |
Brecher et al. | Gaining IIoT insights by leveraging ontology-based modelling of raw data and Digital Shadows | |
Wu et al. | An Auxiliary Decision‐Making System for Electric Power Intelligent Customer Service Based on Hadoop | |
CN112528323B (en) | Data processing method and device | |
CN110928870A (en) | Real-time path database | |
CN116743790B (en) | Device data acquisition, device data analysis method and device and computer device | |
JP2022018435A (en) | Data management apparatus and data management method | |
US20190258653A1 (en) | System of dynamic hierarchies based on a searchable entity model | |
Wang et al. | Leveraging relational database for fast construction of OPC UA information model | |
Yisong et al. | Study on the relationship between transmission line failure rate and lightning information based on Neo4j | |
CN114490924A (en) | Intellectual property data management method and system with isolated internal and external networks | |
TCACIUCGHERASIM | A solution for the uniform integration of field devices in an industrial supervisory control and data acquisition system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200327 |
|
WD01 | Invention patent application deemed withdrawn after publication |