CN105224361A - A kind of method and system that sqlite3 type embedded database is upgraded - Google Patents

A kind of method and system that sqlite3 type embedded database is upgraded Download PDF

Info

Publication number
CN105224361A
CN105224361A CN201510585070.2A CN201510585070A CN105224361A CN 105224361 A CN105224361 A CN 105224361A CN 201510585070 A CN201510585070 A CN 201510585070A CN 105224361 A CN105224361 A CN 105224361A
Authority
CN
China
Prior art keywords
database
field
target
upgrading
data stream
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.)
Granted
Application number
CN201510585070.2A
Other languages
Chinese (zh)
Other versions
CN105224361B (en
Inventor
范伟
张聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huaxun Ark Photoelectric Technology Co ltd
Original Assignee
Shenzhen Huaxun Fangzhou Software Information Science & Technology Co Ltd
Shenzhen Huaxun Ark Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Huaxun Fangzhou Software Information Science & Technology Co Ltd, Shenzhen Huaxun Ark Technology Co Ltd filed Critical Shenzhen Huaxun Fangzhou Software Information Science & Technology Co Ltd
Priority to CN201510585070.2A priority Critical patent/CN105224361B/en
Publication of CN105224361A publication Critical patent/CN105224361A/en
Priority to PCT/CN2016/093106 priority patent/WO2017045491A1/en
Application granted granted Critical
Publication of CN105224361B publication Critical patent/CN105224361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Abstract

The invention provides a kind of method and system that sqlite3 type embedded database is upgraded, relate to field of embedded technology.The method comprises: on equipment, complete the loading of upgrade application software and restart facility; Read the version number of source database in the version number of target database in upgrade application software and device memory, judge that whether the version number of target database is consistent with the version number of source database; If inconsistent, then source database is backed up, and call upgrade application software embedded with the upgrading configuration of the version number of target database and the version numbers match of source database, according to upgrading configuration, the source database in device memory is upgraded.The present invention can make major part use the equipment of sqlite3 type embedded database all can carry out lossless upgrade operation; farthest protect the data in source database; simplify upgrade step, shorten update time; and be very easy to the maintenance of equipment, decrease the workload of maintainer.

Description

A kind of method and system that sqlite3 type embedded database is upgraded
Technical field
The invention belongs to field of embedded technology, particularly relate to a kind of method and system that sqlite3 type embedded database is upgraded.
Background technology
The Wireless Manager equipment of commercial situations application is because function is more, configuration complicated, often a radio management equipment needs configuration the hundreds of even data of thousands of AP and other entries, and need before use to carry out a large amount of Primary Stage Data configuration efforts, Wireless Manager equipment of the prior art generally adopts sqlite3 embedded database for this reason.And later maintenance is carried out to Wireless Manager equipment, time as New function increase and edition upgrading, often need to safeguard the database of Wireless Manager equipment, such as: add or delete database in tables of data, certain field in tables of data is modified or deletion etc., and existing sqlite3 embedded database is when use sqlite3 order, because the afunction of sqlite3 itself, database literary name section cannot be deleted and be revised by order, such Wireless Manager equipment if desired updating apparatus version, then again must change whole database causes equipment to reconfigure mass data, device upgrade process can be made so loaded down with trivial details, consuming time.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of method and system of upgrading to sqlite3 type embedded database, be intended to solve above-mentioned Wireless Manager equipment if desired updating apparatus version, then again must change whole database causes equipment to reconfigure mass data, can make the problem that device upgrade process is loaded down with trivial details, consuming time like this.
The embodiment of the present invention is achieved in that a kind of method of upgrading to sqlite3 type embedded database, comprising:
Equipment completes the loading of upgrade application software and restart facility;
Read the version number of source database in the version number of target database in described upgrade application software and described device memory, judge that whether the version number of described target database is consistent with the version number of described source database;
If inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
Be in the method for upgrading to sqlite3 type embedded database described in embodiment in the present invention, upgrading to the source database in described device memory according to described upgrading configuration specifically comprises:
Obtain the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database;
The database structure of described source database is utilized to carry out memory headroom distribution, to read the data stream of legacy data table in described source database;
Delete described legacy data table, and utilize the database structure of described target database to create new data table;
By described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
In the method that sqlite3 type embedded database is upgraded described in embodiment in the present invention, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.
In the method that sqlite3 type embedded database is upgraded described in embodiment in the present invention, described upgrading configuration with the form of xml file layout together with described upgrade application Software package, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
In the method that sqlite3 type embedded database is upgraded described in embodiment in the present invention, described according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, specifically comprise to generate target database:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew;
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding;
If described upgrading target is amendment field name, then do not process;
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field;
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
Another object of the embodiment of the present invention is to provide a kind of system of upgrading to sqlite3 type embedded database, comprising:
Application software upgrade module, for completing the loading of upgrade application software and restart facility on equipment;
Judge module, for reading the version number of source database in the version number of target database in described upgrade application software and described device memory, judges that whether the version number of described target database is consistent with the version number of described source database;
Database upgrade module, if for inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
In the system of upgrading to sqlite3 type embedded database described in the embodiment of the present invention, described database upgrade module comprises:
Database structure is reverse sets up unit, for obtaining the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database;
Data stream acquiring unit, for utilizing the database structure of described source database to carry out memory headroom distribution, to read the data stream of legacy data table in described source database;
New data table creating unit, for deleting described legacy data table, and utilizes the database structure of described target database to create new data table;
Data stream is biased moves processing unit, for by described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
In the system that sqlite3 type embedded database is upgraded described in the embodiment of the present invention, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.
In the system that sqlite3 type embedded database is upgraded described in the embodiment of the present invention, described upgrading configuration with the form of xml file layout together with described upgrade application Software package, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
In the system that sqlite3 type embedded database is upgraded described in the embodiment of the present invention, described data stream is biased move processing unit specifically for:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew;
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding;
If described upgrading target is amendment field name, then do not process;
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field;
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
That implements that the embodiment of the present invention provides a kind ofly has following beneficial effect to the method and system that sqlite3 type embedded database is upgraded:
First the embodiment of the present invention owing to completing the loading of upgrade application software and restart facility on equipment, then read the version number of source database in the version number of target database in described upgrade application software and described device memory, judge that whether the version number of described target database is consistent with the version number of described source database, if inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, finally according to described upgrading configuration, the described source database in described device memory is upgraded, thus the effectively perfect deficiency of existing sqlite3 embedded database, supplement the function of sqlite3 embedded database disappearance, major part can be made to use the equipment of sqlite3 type embedded database all can carry out lossless upgrade operation, farthest protect the data in source database, simplify upgrade step, shorten update time, and be very easy to the maintenance of equipment, decrease the workload of maintainer.
Accompanying drawing explanation
Fig. 1 is the specific implementation process flow diagram to the method that sqlite3 type embedded database is upgraded that the embodiment of the present invention provides;
Fig. 2 is according to the specific implementation process flow diagram that upgrading configuration is upgraded to the source database in device memory in the embodiment of the present invention;
Fig. 3 is the structured flowchart to the system that sqlite3 type embedded database is upgraded that the embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Fig. 1 shows the specific implementation flow process to the method that sqlite3 type embedded database is upgraded that the embodiment of the present invention provides.Shown in Figure 1, a kind of method of upgrading to sqlite3 type embedded database that the embodiment of the present invention provides, comprising:
In S101, equipment completes the loading of upgrade application software and restart facility.
In embodiments of the present invention, for the equipment based on embedded application software, the general sqlite3 type embedded database that adopts comes stored configuration and status information.When upgrading to the application software on equipment, because the database used after application software upgrade may be different from the database used before upgrading, therefore also need to carry out upgrading processing to the database in device memory after having loaded ROMPaq.Further, described equipment includes but not limited to Wireless Manager equipment, such as: the equipment of all right routing device or any use sqlite type database.
In S102, read the version number of source database in the version number of target database in described upgrade application software and described device memory, judge that whether the version number of described target database is consistent with the version number of described source database.
In embodiments of the present invention, application software after upgrading carries the version number of target database, the version number of source database in target version that the application software after equipment automatically can read upgrading in the process of the loading restart facility that complete upgrade application software carries number and device memory.
In S103, if inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
In embodiments of the present invention, an application software is to there being multiple upgrading configuration, upgrading configuration be according to upgrading after the version number of target database of application software write, such as: if the target database version number of the application software after upgrading is the 3rd edition, then the upgrading configuration of packing together with described application software comprises: be upgraded to the upgrading configuration of version 3 from version 1 and be upgraded to the upgrading configuration of version 3 from version 2.Concrete, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.And described upgrading configuration is embedded in described upgrade application software with the form of xml file layout, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
As a specific implementation example, Fig. 2 shows according to the specific implementation process that described upgrading configuration is upgraded to the source database in described device memory in step S103, and shown in Figure 2, this process comprises:
In S201, obtain the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database.
In embodiments of the present invention, during due to table data in extraction source database, corresponding legacy data library structure must be used to carry out memory headroom distribute and data extraction, and the database structure in application software after now upgrading is the new database structure of target database, so when upgrading, need, according to new database structure and the corresponding reverse legacy data library structure setting up source database of upgrading configuration, wherein in upgrading configuration, to record the different information of new database structure and legacy data library structure.
In S202, the database structure of described source database is utilized to carry out memory headroom distribution, to read the data stream of legacy data table in described source database.In embodiments of the present invention, malloc () function is adopted to carry out memory headroom distribution.
In S203, delete described legacy data table, and utilize the database structure of described target database to create new data table.
In S204, by described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
Wherein, described according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, specifically comprise to generate target database:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew.
In embodiments of the present invention, if the more than entry mark information found out, then needing the every entry mark information to finding all to process, deleting the information of all corresponding field positions storage found, and re-starting data bit skew.
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding.Equally, in embodiments of the present invention, if find out multiple point of addition, then need to process each point of addition in the multiple point of additions found.
If described upgrading target is amendment field name, then do not process.
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field.As a specific implementation example: if described upgrading target is for change field type into char by int, then delete 4 byte lengths shared by original int type-word section, then add the default value of char type-word section correspondence, carry out that data stream is biased moves.
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
In embodiments of the present invention, described amendment field length specially refers to char ocra font ocr string.Such as: if described upgrading target is for change char type-word segment length into temp [10] by temp [20], the data stream of the original the inside of the legacy data extracted has had the content being greater than 10 bytes, then delete these data, and be added to the default value of 10 bytes, if legacy data is less than or equal to 10 bytes, then do not revise.Otherwise, if described upgrading target is for change char type-word segment length into temp [20] by Temp [10], then need not revise.
In addition, needs illustrate, owing to backing up source database before carrying out upgrading to database in the embodiment of the present invention, so once occur that mistake can utilize the reverse database being upgraded to legacy version of the source database of backup in the escalation process of database.
More than can find out, the embodiment of the present invention provides a kind of method of upgrading to sqlite3 type embedded database, can realize by splitting the extraction of data existing in database, the upgrading of database is carried out under harmless prerequisite, the effectively perfect deficiency of existing sqlite3 embedded database, supplement the function of sqlite3 embedded database disappearance, major part can be made to use the equipment of sqlite3 type embedded database all can carry out lossless upgrade operation, farthest protect the data in source database, simplify upgrade step, shorten update time, and be very easy to the maintenance of equipment, decrease the workload of maintainer.
Fig. 3 shows the structured flowchart to the system that sqlite3 type embedded database is upgraded that the embodiment of the present invention provides, and this system is arranged in the equipment described in the embodiment of the present invention, for running above-mentioned Fig. 1 ~ method provided embodiment illustrated in fig. 2.Illustrate only part related to the present embodiment for convenience of explanation.
Shown in Figure 3, the embodiment of the present invention provides a kind of system of upgrading to sqlite3 type embedded database, comprising:
Application software upgrade module 1, for completing the loading of upgrade application software and restart facility on equipment;
Judge module 2, for reading the version number of source database in the version number of target database in described upgrade application software and described device memory, judges that whether the version number of described target database is consistent with the version number of described source database;
Database upgrade module 3, if for inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
Optionally, described database upgrade module 3 comprises:
Database structure is reverse sets up unit 31, for obtaining the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database;
Data stream acquiring unit 32, for utilizing the database structure of described source database to carry out memory headroom distribution, to read the data stream of legacy data table in described source database;
New data table creating unit 33, for deleting described legacy data table, and utilizes the database structure of described target database to create new data table;
Data stream is biased moves processing unit 34, for by described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
Optionally, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.
Optionally, described upgrading configuration is embedded in described upgrade application software with the form of xml file layout, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
Optionally, described data stream biased move processing unit 34 specifically for:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew;
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding;
If described upgrading target is amendment field name, then do not process;
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field;
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
It should be noted that, modules in the said system that the embodiment of the present invention provides, due to the inventive method embodiment based on same design, its technique effect brought is identical with the inventive method embodiment, particular content see describing in the inventive method embodiment, can repeat no more herein.
Therefore, a kind of system of upgrading to sqlite3 type embedded database that the embodiment of the present invention provides can realize by splitting the extraction of data existing in database equally, the upgrading of database is carried out under harmless prerequisite, the effectively perfect deficiency of existing sqlite3 embedded database, supplement the function of sqlite3 embedded database disappearance, major part can be made to use the equipment of sqlite3 type embedded database all can carry out lossless upgrade operation, farthest protect the data in source database, simplify upgrade step, shorten update time, and be very easy to the maintenance of equipment, decrease the workload of maintainer.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1., to the method that sqlite3 type embedded database is upgraded, it is characterized in that, comprising:
Equipment completes the loading of upgrade application software and restart facility;
Read the version number of source database in the version number of target database in described upgrade application software and described device memory, judge that whether the version number of described target database is consistent with the version number of described source database;
If inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
2. the method for upgrading to sqlite3 type embedded database as claimed in claim 1, is characterized in that, upgrading to the source database in described device memory according to described upgrading configuration specifically comprises:
Obtain the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database;
The database structure of described source database is utilized to carry out memory headroom distribution, to read the data stream of legacy data table in described source database;
Delete described legacy data table, and utilize the database structure of described target database to create new data table;
By described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
3. the method for as claimed in claim 2 sqlite3 type embedded database being upgraded, it is characterized in that, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.
4. the method for as claimed in claim 3 sqlite3 type embedded database being upgraded, it is characterized in that, described upgrading configuration with the form of xml file layout together with described upgrade application Software package, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
5. the method for upgrading to sqlite3 type embedded database as claimed in claim 4, is characterized in that, described according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, specifically comprises to generate target database:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew;
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding;
If described upgrading target is amendment field name, then do not process;
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field;
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
6., to the system that sqlite3 type embedded database is upgraded, it is characterized in that, comprising:
Application software upgrade module, for completing the loading of upgrade application software and restart facility on equipment;
Judge module, for reading the version number of source database in the version number of target database in described upgrade application software and described device memory, judges that whether the version number of described target database is consistent with the version number of described source database;
Database upgrade module, if for inconsistent, then described source database is backed up, and call described upgrade application software embedded with the upgrading configuration of the version number of described target database and the version numbers match of described source database, according to described upgrading configuration, the described source database in described device memory is upgraded.
7. the system of as claimed in claim 6 sqlite3 type embedded database being upgraded, it is characterized in that, described database upgrade module comprises:
Database structure is reverse sets up unit, for obtaining the database structure of target database, according to database structure and the reverse database structure setting up described source database of described upgrading configuration of described target database;
Data stream acquiring unit, for utilizing the database structure of described source database to carry out memory headroom distribution, to read the data stream of legacy data table in described source database;
New data table creating unit, for deleting described legacy data table, and utilizes the database structure of described target database to create new data table;
Data stream is biased moves processing unit, for by described data stream recovery in described new data table, and according to the biased shift-in row relax of described upgrading configuration to data stream in described new data table, to generate target database.
8. the system of as claimed in claim 7 sqlite3 type embedded database being upgraded, it is characterized in that, described upgrading configuration comprises the field change information of data structure in database structure in target database and source database, and described field change information comprises: delete field, add field, amendment field name, amendment field type and amendment field length.
9. the system of as claimed in claim 8 sqlite3 type embedded database being upgraded, it is characterized in that, described upgrading configuration with the form of xml file layout together with described upgrade application Software package, and each upgrading target in described upgrading configuration stores with the form of chained list as a unit, to perform the upgrading target in described upgrading configuration according to described linked list order in database upgrade process.
10. the system of upgrading to sqlite3 type embedded database as claimed in claim 9, is characterized in that, described data stream is biased move processing unit specifically for:
If described upgrading target for deleting field, then searches according to position the target bit obtaining field store to be deleted to described data stream, delete the information that described target bit place stores, and re-start data bit skew;
If described upgrading target for adding field, then searches according to position the point of addition obtaining field to be added to described data stream, add corresponding field length at described point of addition place, and compose the data of acquiescence to new field of adding;
If described upgrading target is amendment field name, then do not process;
If described upgrading target is amendment field type, then calculate the position side-play amount of field location to be modified place data stream, and delete the data stream at described field location to be modified place, then field interpolation is carried out, and calculate the position side-play amount of the interpolation field location place data stream that makes new advances, mathematic interpolation is carried out to two position side-play amounts, to carry out biased moving, and at the new position write default value adding field;
If described upgrading target is amendment field length, then according to treating that change length is carried out the biased of data stream and moved, and write default value.
CN201510585070.2A 2015-09-15 2015-09-15 A kind of method and system upgraded to sqlite3 type embedded databases Active CN105224361B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510585070.2A CN105224361B (en) 2015-09-15 2015-09-15 A kind of method and system upgraded to sqlite3 type embedded databases
PCT/CN2016/093106 WO2017045491A1 (en) 2015-09-15 2016-08-03 Method and system for upgrading sqlite3 embedded database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510585070.2A CN105224361B (en) 2015-09-15 2015-09-15 A kind of method and system upgraded to sqlite3 type embedded databases

Publications (2)

Publication Number Publication Date
CN105224361A true CN105224361A (en) 2016-01-06
CN105224361B CN105224361B (en) 2018-05-25

Family

ID=54993353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510585070.2A Active CN105224361B (en) 2015-09-15 2015-09-15 A kind of method and system upgraded to sqlite3 type embedded databases

Country Status (2)

Country Link
CN (1) CN105224361B (en)
WO (1) WO2017045491A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045491A1 (en) * 2015-09-15 2017-03-23 华讯方舟科技有限公司 Method and system for upgrading sqlite3 embedded database
CN108614868A (en) * 2018-04-16 2018-10-02 北京酷我科技有限公司 A kind of database automatically updating method
CN108845818A (en) * 2018-07-02 2018-11-20 四川长虹电器股份有限公司 A kind of smart television data upgrade processing method based on sqlite technology
CN109241071A (en) * 2018-08-23 2019-01-18 海南新软软件有限公司 A kind of Android database upgrade method, apparatus and terminal
CN109285298A (en) * 2018-09-30 2019-01-29 苏州浪潮智能软件有限公司 A kind of method for remote updating applied to bank self-help system
CN112486546A (en) * 2020-12-18 2021-03-12 上海中通吉网络技术有限公司 SQLITE database upgrading method, device, terminal and system
CN112711432A (en) * 2020-12-31 2021-04-27 北京安博通科技股份有限公司 Feature library upgrading method and device for network security equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143348A (en) * 2019-11-25 2020-05-12 三盟科技股份有限公司 Data translation method, system, computer device and readable storage medium
CN112783549A (en) * 2021-01-08 2021-05-11 东风汽车股份有限公司 Method for upgrading data version number of automobile electric control element

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1713143A (en) * 2004-06-24 2005-12-28 华为技术有限公司 Compatibility upgrading method of embedded programm
CN101183361A (en) * 2006-11-13 2008-05-21 中兴通讯股份有限公司 Method of relation data base applications automatic upgrade
CN101901237A (en) * 2009-12-04 2010-12-01 四川川大智胜软件股份有限公司 Type-Index-Value distributed database built based on SQIite
CN102945195A (en) * 2012-11-26 2013-02-27 国电南瑞科技股份有限公司 Master-standby redundancy replication method based on SQLite databases
CN103810257A (en) * 2014-01-24 2014-05-21 华为技术有限公司 Method and device for upgrading software database and equipment
CN103916482A (en) * 2014-04-21 2014-07-09 合肥盈云信息科技有限公司 Data synchronous transmission method based on sqlite
CN104102511A (en) * 2014-07-17 2014-10-15 福建星海通信科技有限公司 SQL (structured query language) Server based automatic script upgrading system and method
US20150106683A1 (en) * 2012-06-14 2015-04-16 Ntrepid Corporation Case data visualization application

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101491626B1 (en) * 2013-07-01 2015-03-05 성균관대학교산학협력단 Memory storage apparatus, memory system and transaction function support method for database
CN103995854A (en) * 2014-05-13 2014-08-20 大唐移动通信设备有限公司 Equipment cross-version upgrading method and device
CN105224361B (en) * 2015-09-15 2018-05-25 华讯方舟科技有限公司 A kind of method and system upgraded to sqlite3 type embedded databases

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1713143A (en) * 2004-06-24 2005-12-28 华为技术有限公司 Compatibility upgrading method of embedded programm
CN101183361A (en) * 2006-11-13 2008-05-21 中兴通讯股份有限公司 Method of relation data base applications automatic upgrade
CN101901237A (en) * 2009-12-04 2010-12-01 四川川大智胜软件股份有限公司 Type-Index-Value distributed database built based on SQIite
US20150106683A1 (en) * 2012-06-14 2015-04-16 Ntrepid Corporation Case data visualization application
CN102945195A (en) * 2012-11-26 2013-02-27 国电南瑞科技股份有限公司 Master-standby redundancy replication method based on SQLite databases
CN103810257A (en) * 2014-01-24 2014-05-21 华为技术有限公司 Method and device for upgrading software database and equipment
CN103916482A (en) * 2014-04-21 2014-07-09 合肥盈云信息科技有限公司 Data synchronous transmission method based on sqlite
CN104102511A (en) * 2014-07-17 2014-10-15 福建星海通信科技有限公司 SQL (structured query language) Server based automatic script upgrading system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017045491A1 (en) * 2015-09-15 2017-03-23 华讯方舟科技有限公司 Method and system for upgrading sqlite3 embedded database
CN108614868A (en) * 2018-04-16 2018-10-02 北京酷我科技有限公司 A kind of database automatically updating method
CN108845818A (en) * 2018-07-02 2018-11-20 四川长虹电器股份有限公司 A kind of smart television data upgrade processing method based on sqlite technology
CN109241071A (en) * 2018-08-23 2019-01-18 海南新软软件有限公司 A kind of Android database upgrade method, apparatus and terminal
CN109285298A (en) * 2018-09-30 2019-01-29 苏州浪潮智能软件有限公司 A kind of method for remote updating applied to bank self-help system
CN112486546A (en) * 2020-12-18 2021-03-12 上海中通吉网络技术有限公司 SQLITE database upgrading method, device, terminal and system
CN112711432A (en) * 2020-12-31 2021-04-27 北京安博通科技股份有限公司 Feature library upgrading method and device for network security equipment
CN112711432B (en) * 2020-12-31 2023-04-07 北京安博通科技股份有限公司 Feature library upgrading method and device for network security equipment

Also Published As

Publication number Publication date
WO2017045491A1 (en) 2017-03-23
CN105224361B (en) 2018-05-25

Similar Documents

Publication Publication Date Title
CN105224361A (en) A kind of method and system that sqlite3 type embedded database is upgraded
JP5342302B2 (en) Firmware update system, firmware distribution server, and program
KR102341388B1 (en) Method, apparatus, device and storage medium for upgrading application
CN102722386B (en) Generate the method and apparatus of radio firmware AKU
US10496401B2 (en) Managing rename of tables and table fields
CN103077043B (en) A kind of method of quick Start-up and operating performance Linux
CN105224370A (en) A kind of method and apparatus of loading ELF document
CN103970585A (en) Method and device for creating virtual machine
CN103530150A (en) Remote updating method for Linux operating system
CN104199750A (en) File recovery method and device of linux system
CN105718507A (en) Data migration method and device
CN104182252A (en) App version incremental updating method
CN105867903A (en) Method and device or splitting code library
CN107391176B (en) Efficient configuration data change processing method
CN109298873B (en) System upgrading method and device
CN103559139A (en) Data storage method and device
CN104461621A (en) Attribute information updating method and device
CN103430178A (en) Method, apparatus and product of data updating
CN102193841B (en) Backup method and device of Subversion configuration database
CN101727503A (en) Method for establishing disk file system
US20220382642A1 (en) Reducing bandwidth during synthetic restores from a deduplication file system
CN104268097A (en) Metadata processing method and system
US11176089B2 (en) Systems and methods for implementing dynamic file systems
WO2019041891A1 (en) Method and device for generating upgrade package
CN109213504A (en) A kind of stackable file system and its loading method and upgrade method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Guangdong Province, Baoan District Xixiang street Xixiang city Shenzhen Tian Yi Lu Chen Tian Bao Industrial District thirty-seventh building 3 floor

Applicant after: CHINA COMMUNICATION SOFTWARE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant after: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 518000 Guangdong Province, Baoan District Xixiang street Xixiang city Shenzhen Tian Yi Lu Chen Tian Bao Industrial District thirty-seventh building 3 floor

Applicant before: CHINA COMMUNICATION SOFTWARE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

COR Change of bibliographic data
C41 Transfer of patent application or patent right or utility model
CB02 Change of applicant information

Address after: 518000 Guangdong Province, Baoan District Xixiang street Xixiang city Shenzhen Tian Yi Lu Chen Tian Bao Industrial District thirty-seventh building 3 floor

Applicant after: HUAXUN ARK INTELLIGENCE INFORMATION TECHNOLOGY (SHENZHEN) CO.,LTD.

Applicant after: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 518000 Guangdong Province, Baoan District Xixiang street Xixiang city Shenzhen Tian Yi Lu Chen Tian Bao Industrial District thirty-seventh building 3 floor

Applicant before: CHINA COMMUNICATION SOFTWARE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

COR Change of bibliographic data
TA01 Transfer of patent application right

Effective date of registration: 20161230

Address after: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District thirty-seventh Building 1 floor and 2 floor on the West

Applicant after: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 518000 Guangdong Province, Baoan District Xixiang street Xixiang city Shenzhen Tian Yi Lu Chen Tian Bao Industrial District thirty-seventh building 3 floor

Applicant before: HUAXUN ARK INTELLIGENCE INFORMATION TECHNOLOGY (SHENZHEN) CO.,LTD.

Applicant before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Fan Wei

Inventor after: Zhang Cong

Inventor after: Fan Congming

Inventor after: Zhao Shukai

Inventor before: Fan Wei

Inventor before: Zhang Cong

GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20210630

Granted publication date: 20180525

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20230421

Granted publication date: 20180525

PD01 Discharge of preservation of patent
TR01 Transfer of patent right

Effective date of registration: 20230714

Address after: 518000 404, building 37, chentian Industrial Zone, chentian community, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Huaxun ark Photoelectric Technology Co.,Ltd.

Address before: 518000 1 / F and 2 / F, building 37, chentian Industrial Zone, Baoan District, Shenzhen City, Guangdong Province

Patentee before: CHINA COMMUNICATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right