CN112434017A - Novel database module and data communication method thereof - Google Patents
Novel database module and data communication method thereof Download PDFInfo
- Publication number
- CN112434017A CN112434017A CN202011455201.2A CN202011455201A CN112434017A CN 112434017 A CN112434017 A CN 112434017A CN 202011455201 A CN202011455201 A CN 202011455201A CN 112434017 A CN112434017 A CN 112434017A
- Authority
- CN
- China
- Prior art keywords
- unit
- module
- function
- database
- data
- 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
- 238000004891 communication Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000003780 insertion Methods 0.000 claims abstract description 19
- 230000037431 insertion Effects 0.000 claims abstract description 19
- 238000013467 fragmentation Methods 0.000 claims abstract description 17
- 238000006062 fragmentation reaction Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims abstract description 12
- 238000004364 calculation method Methods 0.000 claims abstract description 9
- 230000002688 persistence Effects 0.000 claims description 3
- 238000007726 management method Methods 0.000 description 6
- 238000013500 data storage Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a novel database module and a data communication method thereof, in particular to a novel database module which comprises a communication unit, a function fragmentation unit, a calculation processing unit, a storage unit and a cache unit, wherein the communication unit is a module for communicating a database hardware module with an upper computer, the function fragmentation unit is a section of program and is used for determining whether a data packet is an insertion function or a search function according to a function flag bit of a data head, the function fragmentation unit is used for simply analyzing the data packet and binding a cpu (central processing unit) and is used for improving the utilization rate of the cpu, the calculation processing unit comprises a query unit and an insertion and index management unit, and the query unit is used for performing query operation according to a query instruction analyzed by the function fragmentation unit. According to the invention, by developing database software on hardware, the dependence of a database on a system can be eliminated, and the problem that hardware equipment is difficult to use the database is solved.
Description
Technical Field
The invention relates to the technical field of databases, in particular to a novel sensor database module of an industrial Internet of things and a data communication method thereof.
Background
Database is widely used in various system construction as basic software, the current database software is generally constructed on the basis of a system and can be implemented only by installing the system software in advance, and meanwhile, the occupied system resources are large, and higher computing resources and storage resources are required.
However, with the development of the internet of things, more and more intelligent devices and sensors are applied to different scenes, and these devices have the characteristics of low power consumption, low computing capability and low storage capacity, and when the current database is operated again, larger resources are needed, a file system is needed for support, and the use of grammar is complex, so that it is difficult to use the database to manage data in the sensor of the internet of things. Some sensors distributed in different industrial scenes generate a lot of data every second, for example, a fan vibration sensor generates 10MB of data every second, and the data generated by the industrial sensors are mainly transmitted to an edge gateway or a cloud terminal in a network or wired mode for data storage and management, so that huge calculation and storage pressure is brought to edge computing equipment. On the other hand, the database is used on the edge computing equipment, and related professional database personnel are required to maintain the database for a long time, so that the implementation cost is high, and the efficiency is low.
In order to solve the problems, the invention provides a novel database module and a data communication method thereof.
Disclosure of Invention
In order to achieve the purpose, the invention adopts the following technical scheme:
a novel database module comprises a communication unit, a function fragmentation unit, a calculation processing unit, a storage unit and a cache unit, wherein the communication unit is a module for communicating a database hardware module with an upper computer, the function fragmentation unit is a section of program and is used for determining whether a data packet is an insertion function or a search function according to a function flag bit of a data head, the function fragmentation unit is used for simply analyzing the data packet and binding a cpu to improve the utilization rate of the cpu, the calculation processing unit comprises a query unit and an insertion and index management unit, the query unit is used for performing query operation according to a query instruction analyzed by the function fragmentation unit, the query unit binds the cpu, and the insertion and index management unit is used for processing the instruction of the insertion data analyzed by the communication unit, the insertion and index management unit binds the cpu; the cache unit is composed of an SRAM positioned in a chip, and the SRAM reserves 5-10KB as a data cache in practical practice.
A novel data communication method of a database module comprises the following steps:
step one, a registration stage: the method comprises the following steps that in a registration stage, when an upper computer uses a database module, corresponding hardware stamp password information needs to be sent to the module, the module verifies the password, the password is burned out in a module rom, if the password is not verified, failure information is directly returned, the module is not started at the moment, all subsequent instructions are considered to be illegal instructions, if the password is verified, the module is initialized, a related secondary index is loaded into an SRAM of a chip, a result is returned to the upper computer, and at the moment, the module is started successfully and can process the subsequent instructions;
step two, working stage: the working stage is mainly that the upper computer utilizes the database module to carry out data increase and query operations. After the upper computer assembles an instruction to be inserted or inquired according to a certain format, the instruction is sent to the module, and the module performs corresponding operations of insertion, inquiry and table establishment;
step three, finishing the stage: and in the finishing stage, the upper computer does not use the database module to perform persistence operation any more, sends a finishing work instruction, and writes corresponding index data into the flash after the module receives the finishing work instruction.
Compared with the prior art, the invention has the beneficial effects that:
by developing database software on hardware, the dependency of the database on a system can be relieved, and the problem that hardware equipment is difficult to use the database is solved.
Drawings
FIG. 1 is a block diagram of a novel database module according to the present invention;
FIG. 2 is a flow chart of a novel data communication method for a database module according to the present invention;
fig. 3 is a program diagram of data fragmentation storage in the novel database module provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Referring to fig. 1-3, a novel database module comprises a communication unit, a function fragmentation unit, a calculation processing unit, a storage unit, a cache unit, wherein the communication unit is used for communicating a database hardware module with an upper computer, and can use uart, spi and other modes, the function fragmentation unit is a section of program and is used for determining whether a data packet is an insertion function or a search function according to a function flag bit of a data header, the function fragmentation unit is used for simply analyzing the data packet and binding a cpu to improve the utilization rate of the cpu, the calculation processing unit comprises a query unit and an insertion and index management unit, the query unit is used for performing query operation according to a query instruction analyzed by the function fragmentation unit, the query unit is used for binding the cpu, and the insertion and index management unit is used for processing the instruction of the insertion data analyzed by the communication unit, the data only needs to be written into the index, and the CPU is bound by the insertion and index management unit; the cache unit consists of an SRAM positioned in a chip, and the SRAM reserves 5-10KB as a data cache in practical practice; the plug-in flash communicates with the chip through spi, a secondary cache conforming to the storage capacity of the flash is constructed in the flash, and part of the content of the secondary cache is mapped one by one in an SRAM (static random access memory) in the chip by using a fifo algorithm.
The invention also discloses a novel data communication method of the database module, which comprises the following steps:
step one, a registration stage: the method comprises the following steps that in a registration stage, when an upper computer uses a database module, corresponding hardware stamp password information needs to be sent to the module, the module verifies the password, the password is burned out in the module rom, if the password is not verified, failure information is directly returned, the module is not started at the moment, subsequent instructions are considered to be illegal instructions, if the password is verified, the module is initialized, relevant first-level and second-level indexes are loaded into an SRAM of a chip, a result is returned to the upper computer, and at the moment, the module is started successfully and can process the subsequent instructions;
step two, working stage: the working stage is mainly that the upper computer utilizes the database module to carry out data increase and query operations. After the upper computer assembles an instruction to be inserted or inquired according to a certain format, the instruction is sent to the module, and the module performs corresponding operations of insertion, inquiry and table establishment;
step three, finishing the stage: and in the finishing stage, the upper computer does not use the database module to perform persistence operation any more, sends a finishing work instruction, and writes corresponding index data into the flash after the module receives the finishing work instruction.
In particular, as shown in fig. 3: 1. the slice header is used to indicate the base address of the current data storage area (base address + offset address is the actual storage address), and the address corresponding to the table meta.
2. The slice trailer is used for indicating the slice header address of the next slice and the address relative to the current base address.
3. The index 1, 2, the.
4. The data area is the user's stored relevant data.
The design of the size of the fragment needs to be determined according to the type of the storage medium, the size of the data cache ram, and the length of one record indicated in the table meta, and needs to be optimally designed when the data table meta is designed.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (2)
1. A novel database module comprises a communication unit, a function fragmentation unit, a calculation processing unit, a storage unit and a cache unit, and is characterized in that the communication unit is a module for communicating a database hardware module with an upper computer, the function fragmentation unit is a section of program and is used for determining whether a data packet is an insertion function or a search function according to a function flag bit of a data header, the function fragmentation unit is used for simply analyzing the data packet and binding a cpu to improve the utilization rate of the cpu, the calculation processing unit comprises an inquiry unit and an insertion and index management unit, the inquiry unit is used for carrying out inquiry operation according to an inquiry instruction analyzed by the function fragmentation unit, the inquiry unit binds the cpu, and the insertion and index management unit is used for processing the instruction of inserting data analyzed by the communication unit, the insertion and index management unit binds the cpu; the cache unit is composed of an SRAM positioned in a chip, and the SRAM reserves 5-10KB as a data cache in practical practice.
2. A novel data communication method of a database module is characterized by comprising the following steps:
step one, a registration stage: the method comprises the following steps that in a registration stage, when an upper computer uses a database module, corresponding hardware stamp password information needs to be sent to the module, the module verifies the password, the password is burned out in a module rom, if the password is not verified, failure information is directly returned, the module is not started at the moment, all subsequent instructions are considered to be illegal instructions, if the password is verified, the module is initialized, a related secondary index is loaded into an SRAM of a chip, a result is returned to the upper computer, and at the moment, the module is started successfully and can process the subsequent instructions;
step two, working stage: the working stage is mainly that the upper computer utilizes the database module to carry out data increase and query operations. After the upper computer assembles an instruction to be inserted or inquired according to a certain format, the instruction is sent to the module, and the module performs corresponding operations of insertion, inquiry and table establishment;
step three, finishing the stage: and in the finishing stage, the upper computer does not use the database module to perform persistence operation any more, sends a finishing work instruction, and writes corresponding index data into the flash after the module receives the finishing work instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011455201.2A CN112434017A (en) | 2020-12-10 | 2020-12-10 | Novel database module and data communication method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011455201.2A CN112434017A (en) | 2020-12-10 | 2020-12-10 | Novel database module and data communication method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112434017A true CN112434017A (en) | 2021-03-02 |
Family
ID=74691373
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011455201.2A Pending CN112434017A (en) | 2020-12-10 | 2020-12-10 | Novel database module and data communication method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112434017A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102339317A (en) * | 2011-10-20 | 2012-02-01 | 北京握奇数据系统有限公司 | High-capacity database card and data communication method thereof |
CN104166686A (en) * | 2014-07-28 | 2014-11-26 | 北京中科启信软件技术有限公司 | Database system based on PCI or PCIE board card, host and using method |
CN106357779A (en) * | 2016-09-27 | 2017-01-25 | 北京市水利自动化研究所 | Internet of Things perception terminal |
CN106952464A (en) * | 2017-01-19 | 2017-07-14 | 武汉企鹅能源数据有限公司 | Intelligent data acqusition system and acquisition method |
CN108804686A (en) * | 2018-06-14 | 2018-11-13 | 北京全联互控科技有限公司 | A kind of whole solution of internet of things data acquisition processing and analysis application |
-
2020
- 2020-12-10 CN CN202011455201.2A patent/CN112434017A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102339317A (en) * | 2011-10-20 | 2012-02-01 | 北京握奇数据系统有限公司 | High-capacity database card and data communication method thereof |
CN104166686A (en) * | 2014-07-28 | 2014-11-26 | 北京中科启信软件技术有限公司 | Database system based on PCI or PCIE board card, host and using method |
CN106357779A (en) * | 2016-09-27 | 2017-01-25 | 北京市水利自动化研究所 | Internet of Things perception terminal |
CN106952464A (en) * | 2017-01-19 | 2017-07-14 | 武汉企鹅能源数据有限公司 | Intelligent data acqusition system and acquisition method |
CN108804686A (en) * | 2018-06-14 | 2018-11-13 | 北京全联互控科技有限公司 | A kind of whole solution of internet of things data acquisition processing and analysis application |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102079860B1 (en) | Text address processing method and device | |
CN106874348B (en) | File storage and index method and device and file reading method | |
CN111611225A (en) | Data storage management method, query method, device, electronic equipment and medium | |
CN109542857B (en) | Audit log storage method, audit log query method, audit log storage device, audit log query device and related equipment | |
CN102591855A (en) | Data identification method and data identification system | |
CN113010542B (en) | Service data processing method, device, computer equipment and storage medium | |
CN113254470B (en) | Data modification method, device, computer equipment and storage medium | |
CN110975293A (en) | Method, device, server and medium for establishing resource reference relation table | |
US20230367815A1 (en) | Energy-efficient hardware-software collaborative method and apparatus for graph processing | |
CN112416880A (en) | Method and device for optimizing storage performance of mass small files based on real-time merging | |
CN110222046B (en) | List data processing method, device, server and storage medium | |
CN111666344A (en) | Heterogeneous data synchronization method and device | |
US7653070B2 (en) | Method and system for supporting efficient and cache-friendly TCP session lookup operations based on canonicalization tags | |
CN106934066B (en) | Metadata processing method and device and storage equipment | |
CN112434017A (en) | Novel database module and data communication method thereof | |
CN116842012A (en) | Method, device, equipment and storage medium for storing Redis cluster in fragments | |
CN107273401A (en) | Management method, mobile device and the storage device of application data file | |
CN116932421A (en) | Data storage method, device, equipment and storage medium | |
US8037048B2 (en) | Web site search and selection method | |
CN112860712B (en) | Block chain-based transaction database construction method, system and electronic equipment | |
CN112925753B (en) | File additional writing method and device, electronic equipment and storage medium | |
CN115544169A (en) | Data synchronization method, device, equipment and storage medium | |
CN108984615B (en) | Data query method and system and storage medium | |
CN113625954A (en) | Volume information query method, device, equipment and readable storage medium | |
CN113779025A (en) | Optimization method, system and application of classified data retrieval efficiency in block chain |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210302 |