CN109446179A - A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode - Google Patents
A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode Download PDFInfo
- Publication number
- CN109446179A CN109446179A CN201811160216.9A CN201811160216A CN109446179A CN 109446179 A CN109446179 A CN 109446179A CN 201811160216 A CN201811160216 A CN 201811160216A CN 109446179 A CN109446179 A CN 109446179A
- Authority
- CN
- China
- Prior art keywords
- database
- module
- export
- memory
- service
- 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 concurrent method of SQLITE database realizing multi-service is established based on Memory mode the present invention provides a kind of, comprising: starting host simultaneously starts receiving module, uploading module and export module;Receiving module connects the its.db database of hard disk, itsA.db and itsB.db database and additional its.db database is respectively created in uploading module and export module in Memory;For receiving module by the data deposit its.db database of the front end received, respective additional database its.db is inquired in uploading module and export module timing;Uploading module and export module complete the movement of response by respective Memory, and uploading module and export module update respective Memory field value respectively after operating successfully.It is of the present invention a kind of the concurrent method of SQLITE database realizing multi-service to be established based on Memory mode, with the use of SQLITE database as storage medium, and database is concurrently accessed by multiple modules, make not interfereing with each other between database, improves the execution efficiency of memory.
Description
Technical field
The invention belongs to computer fields, establish SQLITE database realizing based on Memory mode more particularly, to one kind
The concurrent method of multi-service.
Background technique
High definition embedded intelligence traffic host is a for safe city and intelligent transportation row of embedded conceptual design
The dedicated industry host of industry application and exploitation, the host can receive and analyze the illegal and bayonet letter of intelligent transportation camera transmission
Breath and image data, as each crossing vehicle data high definition embedded intelligence traffic host is to polymorphic type, mass data is deposited
The embedded device of the increase in demand of storage, more and more high definition embedded intelligence traffic hosts begins to use database as number
According to the medium of storage, and mass data is locally stored by database realizing, data forwarding, time control, network inquiry etc.
Business.
Intelligent transportation camera acquires real-time vision signal, and the information of vehicles in vision signal is extracted and divided
Analysis, and be converted into data flow and be sent to high definition embedded intelligence traffic host, high definition embedded intelligence traffic host receives traffic
The real-time streaming data and violation information of camera, and the violation information is stored in the database of equipment, at the same time, multiple modules
Database is concurrently accessed, newest violation data is obtained, and completes to upload more platforms, USB device is exported, supports client
Additions and deletions, which change, the operation such as looks into.
Summary of the invention
In view of this, the present invention is directed to propose a kind of establish the multi-service of SQLITE database realizing simultaneously based on Memory mode
The method of hair concurrently accesses database as storage medium, and by multiple modules with the use of SQLITE database, makes data
It is not interfere with each other between library, improves the execution efficiency of memory.
In order to achieve the above objectives, the technical scheme of the present invention is realized as follows:
A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode, comprising:
Step 1: starting host simultaneously starts receiving module, uploading module and export module;
Step 2: receiving module connects the its.db database of hard disk, and uploading module creates itsA.db number in Memory
According to library and additional its.db database, export module creates itsB.db database and and additional its.db data in Memory
Library;
Step 3: the data of the front end received are stored in its.db database by receiving module, uploading module and export
Respective additional database its.db is inquired in module timing, and the data conversion storage for being not carried out upload is entered itsA.db number by uploading module
According in library, export module will be not carried out derived data conversion storage and enter in itsB.db database;
Step 4: uploading module and export module complete the movement of response by respective Memory, after operating successfully on
Transmission module and export module update respective Memory field value respectively;
Step 5: after pending data is disposed, by SQL statement by receiving module and the respective Memory number of export module
It updates according to the data in library itsA.db and itsB.db into its.db database, completes data by the interior synchronization for being stored to hard disk.
Uploading module and export module can obtain the newest data of database simultaneously, complete corresponding upload, and export is looked into
The operation such as inquiry, and the certain field of modules more new database after completing respective business, realize service condition and data
The consistency of library recording status.
Further, in step 3, uploading module and export module are copied every time when by data conversion storage to respective memory bank
No more than 100 records of shellfish.
Further, in step 3, uploading module is to be uploaded in upload procedure one by one, and export module is being derived
It is to be exported in journey one by one.
Further, the structure of tri- databases of its.db, itsA.db in step 2 and itsB.db is identical, and creation is deposited
Storage media is different.
Further, in step 1, starting receiving module, uploading module and export module can be defaulted after it boots up.
Further, in step 2, receiving module connects the its.db database of hard disk automatically.
Compared with the existing technology, a kind of Memory mode that is based on of the present invention establishes the more industry of SQLITE database realizing
Concurrent method of being engaged in has the advantage that
It is of the present invention it is a kind of the concurrent method of SQLITE database realizing multi-service is established based on Memory mode, with
SQLITE database realizes the storage, upload and export of information, and the state of real-time update database as storage medium;
The content of multiple Memory databases is independent, does not interfere with each other, and be written back to local with the shortest time after completing relevant operation
The database of hard disk improves program to reduce multiple modules simultaneously to a database manipulation bring stealth mutual exclusion and waiting
It is concurrent, improve the execution efficiency of memory.
Detailed description of the invention
The attached drawing for constituting a part of the invention is used to provide further understanding of the present invention, schematic reality of the invention
It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.
In the accompanying drawings:
Fig. 1 is based on Memory mode for one kind described in the embodiment of the present invention and establishes the multi-service of SQLITE database realizing simultaneously
The method flow schematic diagram of hair.
Specific embodiment
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", "upper", "lower",
The orientation or positional relationship of the instructions such as "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outside" is
It is based on the orientation or positional relationship shown in the drawings, is merely for convenience of description of the present invention and simplification of the description, rather than instruction or dark
Show that signified device or element must have a particular orientation, be constructed and operated in a specific orientation, therefore should not be understood as pair
Limitation of the invention.In addition, term " first ", " second " etc. are used for description purposes only, it is not understood to indicate or imply phase
To importance or implicitly indicate the quantity of indicated technical characteristic.The feature for defining " first ", " second " etc. as a result, can
To explicitly or implicitly include one or more of the features.In the description of the present invention, unless otherwise indicated, " multiple "
It is meant that two or more.
In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase
Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can
To be mechanical connection, it is also possible to be electrically connected;It can be directly connected, can also can be indirectly connected through an intermediary
Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood by concrete condition
Concrete meaning in the present invention.
The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
As shown in Figure 1, a kind of establish the concurrent method of SQLITE database realizing multi-service based on Memory mode, packet
It includes:
Step 1: starting host simultaneously starts receiving module, uploading module and export module;
Step 2: receiving module connects the its.db database of hard disk, and uploading module creates itsA.db number in Memory
According to library and additional its.db database, export module creates itsB.db database and and additional its.db data in Memory
Library;
Step 3: the data of the front end received are stored in its.db database by receiving module, uploading module and export
Respective additional database its.db is inquired in module timing, and the data conversion storage for being not carried out upload is entered itsA.db number by uploading module
According in library, export module will be not carried out derived data conversion storage and enter in itsB.db database;
Step 4: uploading module and export module complete the movement of response by respective Memory, after operating successfully on
Transmission module and export module update respective Memory field value respectively;
Step 5: after pending data is disposed, by SQL statement by receiving module and the respective Memory number of export module
It updates according to the data in library itsA.db and itsB.db into its.db database, completes data by the interior synchronization for being stored to hard disk.
Uploading module and export module can obtain the newest data of database simultaneously, complete corresponding upload, and export is looked into
The operation such as inquiry, and the certain field of modules more new database after completing respective business, realize service condition and data
The consistency of library recording status.
As shown in Figure 1, uploading module and export module are copied every time when by data conversion storage to respective memory bank in step 3
No more than 100 records of shellfish.
As shown in Figure 1, uploading module is to be uploaded in upload procedure one by one, and export module is exporting in step 3
It is to be exported one by one in the process.
As shown in Figure 1, the structure of tri- databases of its.db, itsA.db and itsB.db in step 2 is identical, creation
Storage medium is different.
As shown in Figure 1, starting receiving module, uploading module and export module can be defaulted after it boots up in step 1.
As shown in Figure 1, receiving module connects the its.db database of hard disk automatically in step 2.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (6)
1. a kind of establish the concurrent method of SQLITE database realizing multi-service based on Memory mode, it is characterised in that: include:
Step 1: starting host simultaneously starts receiving module, uploading module and export module;
Step 2: the its.db database of the receiving module connection hard disk, the uploading module create in Memory
ItsA.db database simultaneously additional its.db database, the export module create in Memory itsB.db database with and it is attached
Add its.db database;
Step 3: the receiving module by the data of the front end received deposit its.db database, the uploading module and
Respective additional database its.db is inquired in export module timing, and the uploading module enters the data conversion storage for being not carried out upload
In itsA.db database, the export module will be not carried out derived data conversion storage and enter in itsB.db database;
Step 4: the uploading module and export module complete the movement responded, institute after operating successfully by respective Memory
It states uploading module and export module and updates respective Memory field value respectively;
Step 5: after pending data is disposed, by SQL statement by the receiving module and the respective Memory number of export module
It updates according to the data in library itsA.db and itsB.db into its.db database, completes data by the interior synchronization for being stored to hard disk.
A kind of the concurrent side of SQLITE database realizing multi-service is established based on Memory mode 2. according to claim 1
Method, it is characterised in that: in step 3, the uploading module and export module are copied every time when by data conversion storage to respective memory bank
No more than 100 records of shellfish.
A kind of the concurrent side of SQLITE database realizing multi-service is established based on Memory mode 3. according to claim 1
Method, it is characterised in that: in step 3, the uploading module is to be uploaded in upload procedure one by one, and the export module exists
It is to be exported in export process one by one.
A kind of the concurrent side of SQLITE database realizing multi-service is established based on Memory mode 4. according to claim 1
Method, it is characterised in that: the structure of tri- databases of its.db, itsA.db and itsB.db in step 2 is identical, creation storage
Medium is different.
A kind of the concurrent side of SQLITE database realizing multi-service is established based on Memory mode 5. according to claim 1
Method, it is characterised in that: in step 1, the starting receiving module, uploading module and export module can be defaulted after it boots up.
A kind of the concurrent side of SQLITE database realizing multi-service is established based on Memory mode 6. according to claim 1
Method, it is characterised in that: in step 2, the receiving module connects the its.db database of hard disk automatically.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811160216.9A CN109446179A (en) | 2018-09-30 | 2018-09-30 | A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811160216.9A CN109446179A (en) | 2018-09-30 | 2018-09-30 | A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109446179A true CN109446179A (en) | 2019-03-08 |
Family
ID=65545854
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811160216.9A Pending CN109446179A (en) | 2018-09-30 | 2018-09-30 | A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109446179A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170507A (en) * | 2007-11-14 | 2008-04-30 | 中兴通讯股份有限公司 | Asynchronous concurrent processing method |
CN101329685A (en) * | 2008-07-30 | 2008-12-24 | 烽火通信科技股份有限公司 | Implementing method of memory database on household gateway |
CN102201013A (en) * | 2011-06-24 | 2011-09-28 | 厦门雅迅网络股份有限公司 | Vehicle state management method based on memory database |
CN104598610A (en) * | 2015-01-29 | 2015-05-06 | 无锡江南计算技术研究所 | Step-by-step database data distribution uploading and synchronizing method |
CN106844418A (en) * | 2016-11-25 | 2017-06-13 | 李燕芳 | A kind of internal storage data processing system |
CN107818127A (en) * | 2017-09-09 | 2018-03-20 | 国网浙江省电力公司 | A kind of querying method and system for multi-source data |
CN108153852A (en) * | 2017-12-22 | 2018-06-12 | 中国平安人寿保险股份有限公司 | A kind of data processing method, device, terminal device and storage medium |
-
2018
- 2018-09-30 CN CN201811160216.9A patent/CN109446179A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101170507A (en) * | 2007-11-14 | 2008-04-30 | 中兴通讯股份有限公司 | Asynchronous concurrent processing method |
CN101329685A (en) * | 2008-07-30 | 2008-12-24 | 烽火通信科技股份有限公司 | Implementing method of memory database on household gateway |
CN102201013A (en) * | 2011-06-24 | 2011-09-28 | 厦门雅迅网络股份有限公司 | Vehicle state management method based on memory database |
CN104598610A (en) * | 2015-01-29 | 2015-05-06 | 无锡江南计算技术研究所 | Step-by-step database data distribution uploading and synchronizing method |
CN106844418A (en) * | 2016-11-25 | 2017-06-13 | 李燕芳 | A kind of internal storage data processing system |
CN107818127A (en) * | 2017-09-09 | 2018-03-20 | 国网浙江省电力公司 | A kind of querying method and system for multi-source data |
CN108153852A (en) * | 2017-12-22 | 2018-06-12 | 中国平安人寿保险股份有限公司 | A kind of data processing method, device, terminal device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103150394B (en) | Distributed file system metadata management method facing to high-performance calculation | |
CN103268318B (en) | A kind of distributed key value database system of strong consistency and reading/writing method thereof | |
US8682968B2 (en) | Method, system, and node for node interconnection on content delivery network | |
CN103577528B (en) | The method and system optimized is transmitted for data | |
CN108028813A (en) | System and method for using the subnet prefix value being used in the global route header (GRH) of linear forwarding table (LFT) lookup in high-performance computing environment | |
CN109302466A (en) | Data processing method, relevant device and computer storage medium | |
CN103605698A (en) | Cloud database system used for distributed heterogeneous data resource integration | |
CN104618482A (en) | Cloud data access method, server, traditional storage device and architecture | |
CN102195815B (en) | Network management method and device | |
CN102917005B (en) | A kind of mass memory access method supporting affairs and device | |
CN105677703A (en) | NAS file system, and access method and apparatus thereof | |
CN109327332B (en) | LIO-based iSCSI GateWay high-availability implementation method under Ceph cloud storage | |
CN110287201A (en) | Data access method, device, equipment and storage medium | |
CN103345502A (en) | Transaction processing method and system of distributed type database | |
CN110442561A (en) | Distributed file storage system and its storage method based on block chain | |
CN102857510A (en) | Method and device for issuing ACL (access control list) items | |
CN106484327A (en) | A kind of data processing method and associated storage device | |
CN106294842A (en) | A kind of data interactive method, platform and distributed file system | |
CN115273029A (en) | Intelligent agent motion prediction method based on heterogeneous graph convolution network | |
CN109271113A (en) | A kind of data management system and method based on cloud storage | |
CN109446179A (en) | A method of it is concurrent that SQLITE database realizing multi-service being established based on Memory mode | |
CN103064749B (en) | Inter-process communication method | |
CN104205730A (en) | Network element data access method, device and network management system | |
CN106598548A (en) | Solution method and device for read-write conflict of storage unit | |
CN113542074A (en) | Method and system for visually managing east-west network traffic of kubernets cluster |
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: 20190308 |