CN105224361B - A kind of method and system upgraded to sqlite3 type embedded databases - Google Patents

A kind of method and system upgraded to sqlite3 type embedded databases Download PDF

Info

Publication number
CN105224361B
CN105224361B CN201510585070.2A CN201510585070A CN105224361B CN 105224361 B CN105224361 B CN 105224361B CN 201510585070 A CN201510585070 A CN 201510585070A CN 105224361 B CN105224361 B CN 105224361B
Authority
CN
China
Prior art keywords
database
field
target
data flow
source database
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.)
Expired - Fee Related
Application number
CN201510585070.2A
Other languages
Chinese (zh)
Other versions
CN105224361A (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 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 Ark Technology Co Ltd filed Critical Shenzhen Huaxun Ark 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
Expired - Fee Related 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of method and system upgraded to sqlite3 type embedded databases, is related to field of embedded technology.This method includes:The loading of upgrade application software and again starting device are completed in equipment;Read the version number of target database and the version number of source database in device memory in upgrade application software, judge target database version number and source database version number it is whether consistent;If inconsistent, source database is backed up, and calls the upgrading configuration of the version numbers match for the version number and source database with target database that upgrade application software embeds, the source database in device memory is upgraded according to upgrading configuration.The present invention can make most of equipment for using sqlite3 type embedded databases that can carry out lossless upgrade operation; the data in source database are protected to the greatest extent; it simplifies upgrade step, shorten update time; and the maintenance of equipment is greatly facilitated, reduces the workload of maintenance personnel.

Description

A kind of method and system upgraded to sqlite3 type embedded databases
Technical field
The invention belongs to field of embedded technology more particularly to a kind of sqlite3 type embedded databases are upgraded Method and system.
Background technology
The Wireless Manager equipment of commercial situations application is since function is more, configuration is complicated, and often a radio management is set It is standby to need to configure the hundreds of even data and other entries of thousands of a AP, and need to carry out substantial amounts of preceding issue before use According to configuration work, Wireless Manager equipment of the prior art is generally using sqlite3 embedded databases therefore.And to wireless Manager apparatus carries out later maintenance, as new function increases and when edition upgrading, it is often necessary to which Wireless Manager is set Standby database safeguarded, such as:It adds or deletes the tables of data in database, modify to certain field in tables of data Or delete etc., and existing sqlite3 embedded databases are when sqlite3 orders are used, because sqlite3 is in itself Afunction can not be deleted and changed to database literary name section by ordering, and such Wireless Manager equipment is if desired Updating apparatus version, then must re-replace entire database causes equipment that must must reconfigure mass data, can so make Device upgrade process is cumbersome, time-consuming.
The content of the invention
The embodiment of the present invention be designed to provide a kind of method upgraded to sqlite3 type embedded databases and System, it is intended to solve above-mentioned Wireless Manager equipment if desired updating apparatus version, then must re-replace entire database and lead The problem of causing equipment that must must reconfigure mass data, so making device upgrade process cumbersome, time-consuming.
The embodiment of the present invention is achieved in that a kind of method upgraded to sqlite3 type embedded databases, bag It includes:
The loading of upgrade application software and again starting device are completed in equipment;
Read the version of source database in the version number of target database and the device memory in the upgrade application software This number, judge whether the version number of the target database is consistent with the version number of the source database;
If inconsistent, the source database is backed up, and call that the upgrade application software embeds with it is described The upgrading configuration of the version numbers match of the version number of target database and the source database is configured according to the upgrading File upgrades the source database in the device memory.
In the method upgraded to sqlite3 type embedded databases for being described in embodiment in the present invention, according to institute State upgrading configuration to the source database in the device memory carry out upgrading specifically include:
The database structure of target database is obtained, is matched somebody with somebody according to the database structure of the target database and the upgrading Put the database structure that file inversely establishes the source database;
Memory headroom distribution is carried out using the database structure of the source database, to read old number in the source database According to the data flow of table;
The legacy data table is deleted, and new data table is created using the database structure of the target database;
By the data stream recovery into the new data table, and according to the upgrading configuration to the new data table The position offset of middle data flow is handled, to generate target database.
In the method upgraded to sqlite3 type embedded databases for being described in embodiment in the present invention, the liter Grade configuration file includes the field change information of data structure in database structure in target database and source database, described Field change information includes:Delete field, addition field, modification field name, modification field type and modification field length.
In the method upgraded to sqlite3 type embedded databases for being described in embodiment in the present invention, the liter Grade configuration file in the form of xml document form together with the upgrade application Software package, and the upgrading configuration In each escalation target stored as a unit in the form of chained list, so as to during database upgrade according to the chain Table order performs the escalation target in the upgrading configuration.
In the method upgraded to sqlite3 type embedded databases for being described in embodiment in the present invention, described The position offset of data flow in the new data table is handled according to the upgrading configuration, it is specific to generate target database Including:
If the escalation target is searched to delete field, to the data flow according to position to obtain field to be deleted The information stored at the target position is deleted in the target position of storage, and re-starts data bit offset;
If the escalation target is addition field, the data flow is searched according to position to obtain field to be added Point of addition, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field;
If the escalation target is modification field name, without processing;
If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated Amount, and the data flow at the field location to be modified is deleted, field addition is then carried out, and calculates new addition field location Locate the position offset of data flow, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and in the position of newly addition field Put place's write-in default value;
If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write Enter default value.
The another object of the embodiment of the present invention is to provide a kind of is to what sqlite3 type embedded databases were upgraded System, including:
Application software upgrade module, for completing the loading of upgrade application software and again starting device in equipment;
Judgment module, for reading in the upgrade application software in the version number and the device memory of target database The version number of source database judges whether the version number of the target database is consistent with the version number of the source database;
If database upgrade module for inconsistent, backs up the source database, and calls the upgrading should It is being embedded with software to configure text with target database version number and the version numbers match of source database upgrading Part upgrades the source database in the device memory according to the upgrading configuration.
In the system upgraded to sqlite3 type embedded databases described in the embodiment of the present invention, the data Storehouse upgraded module includes:
Database structure inversely establishes unit, for obtaining the database structure of target database, according to the number of targets The database structure of the source database is inversely established according to the database structure and the upgrading configuration in storehouse;
Data flow acquiring unit, for carrying out memory headroom distribution using the database structure of the source database, to read Take the data flow of legacy data table in the source database;
New data table creating unit for deleting the legacy data table, and utilizes the database knot of the target database Structure creates new data table;
Data flow position migration processing unit, for by the data stream recovery into the new data table, and according to described Upgrading configuration handles the position offset of data flow in the new data table, to generate target database.
In the system upgraded to sqlite3 type embedded databases described in the embodiment of the present invention, the upgrading Configuration file includes the field change information of data structure in database structure in target database and source database, the word Section change information includes:Delete field, addition field, modification field name, modification field type and modification field length.
In the system upgraded to sqlite3 type embedded databases described in the embodiment of the present invention, the upgrading Configuration file in the form of xml document form together with the upgrade application Software package, and in the upgrading configuration Each escalation target stored as a unit in the form of chained list, so as to during database upgrade according to the chained list Order performs the escalation target in the upgrading configuration.
In the system upgraded to sqlite3 type embedded databases described in the embodiment of the present invention, the data Stream position migration processing unit is specifically used for:
If the escalation target is searched to delete field, to the data flow according to position to obtain field to be deleted The information stored at the target position is deleted in the target position of storage, and re-starts data bit offset;
If the escalation target is addition field, the data flow is searched according to position to obtain field to be added Point of addition, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field;
If the escalation target is modification field name, without processing;
If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated Amount, and the data flow at the field location to be modified is deleted, field addition is then carried out, and calculates new addition field location Locate the position offset of data flow, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and in the position of newly addition field Put place's write-in default value;
If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write Enter default value.
Implement a kind of method and system upgraded to sqlite3 type embedded databases provided in an embodiment of the present invention It has the advantages that:
The embodiment of the present invention is due to the loading for completing upgrade application software first in equipment and starting device again;Then The version number of source database in the version number of target database and the device memory in the upgrade application software is read, is judged Whether the version number of the target database is consistent with the version number of the source database;If inconsistent, to the source data Storehouse is backed up, and the version number with the target database for calling that the upgrade application software embeds and the source database Version numbers match upgrading configuration, finally according to the upgrading configuration to the source in the device memory Database is upgraded, embedding supplemented with sqlite3 so as to the effective perfect deficiency of existing sqlite3 embedded databases Enter the function of formula database missing, can make most of equipment for using sqlite3 type embedded databases that can carry out nothing Updating operation is damaged, the data in source database is protected to the greatest extent, simplifies upgrade step, shortens update time, and And the maintenance of equipment is greatly facilitated, reduce the workload of maintenance personnel.
Description of the drawings
Fig. 1 is the specific reality of the method provided in an embodiment of the present invention upgraded to sqlite3 type embedded databases Existing flow chart;
Fig. 2 is the tool upgraded in the embodiment of the present invention according to upgrading configuration to the source database in device memory Body realizes flow chart;
Fig. 3 is the structural frames of the system provided in an embodiment of the present invention upgraded to sqlite3 type embedded databases Figure.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Fig. 1 shows the tool of the method provided in an embodiment of the present invention upgraded to sqlite3 type embedded databases Body realizes flow.It is shown in Figure 1, it is provided in an embodiment of the present invention a kind of sqlite3 type embedded databases to be upgraded Method, including:
The loading that upgrade application software is completed in equipment in S101 and starting device again.
In embodiments of the present invention, it is generally embedding using sqlite3 types for the equipment based on embedded application software Enter formula database and come storage configuration and status information.When upgrading to the application software in equipment, due to application software liter The database that uses may be different from the database used before upgrading after grade, therefore also need to after upgrade procedure has been loaded pair to set Database in standby memory carries out upgrading processing.Further, the equipment includes but not limited to Wireless Manager equipment, example Such as:It can be with routing device or any equipment using sqlite type databases.
In S102, source number in the version number of target database and the device memory is read in the upgrade application software According to the version number in storehouse, judge whether the version number of the target database is consistent with the version number of the source database.
In embodiments of the present invention, the application software after upgrading comes with the version number of target database, and equipment is completed The loading of upgrade application software simultaneously can read the target that the application software after upgrading carries automatically again during starting device The version number of source database in version number and device memory.
In S103, if inconsistent, the source database is backed up, and the upgrade application software is called to embed The version number and source database with the target database version numbers match upgrading configuration, according to described Upgrading configuration upgrades the source database in the device memory.
In embodiments of the present invention, an application software is corresponding with multiple upgrading configurations, and upgrading configuration is root It is write according to the version number of the target database of the application software after upgrading, such as:If the number of targets of the application software after upgrading It it is the 3rd edition according to storehouse version number, then the upgrading configuration being packaged together with the application software includes:Version is upgraded to from version 1 This 3 upgrading configuration and the upgrading configuration that version 3 is upgraded to from version 2.Specifically, the upgrading configuration bag Include the field change information of data structure in database structure in target database and source database, the field change information Including:Delete field, addition field, modification field name, modification field type and modification field length.And the upgrading is matched somebody with somebody File is put to be embedded in the form of xml document form in the upgrade application software, and it is each in the upgrading configuration Escalation target is stored as a unit in the form of chained list, to be held during database upgrade according to the linked list order Escalation target in the row upgrading configuration.
As a specific implementation example, Fig. 2 is shown in step S103 according to the upgrading configuration to the equipment The specific implementation process that source database in memory is upgraded, shown in Figure 2, which includes:
In S201, obtain the database structure of target database, according to the database structure of the target database and The upgrading configuration inversely establishes the database structure of the source database.
When in embodiments of the present invention, due to the table data in extraction source database, it is necessary to use corresponding old database Structure carries out memory headroom distribution and data extraction, and the database structure in the application software after upgrading at this time is target data The new database structure in storehouse, so in upgrading, it is necessary to reverse according to new database structure and corresponding upgrading configuration The old database structure of source database is established, record has new database structure and old database structure wherein in upgrading configuration Different information.
In S202, memory headroom distribution is carried out using the database structure of the source database, to read the source number According to the data flow of legacy data table in storehouse.In embodiments of the present invention, memory headroom distribution is carried out using malloc () function.
In S203, the legacy data table is deleted, and new data is created using the database structure of the target database Table.
In S204, by the data stream recovery into the new data table, and according to the upgrading configuration to institute The position offset for stating data flow in new data table is handled, to generate target database.
It is wherein, described that the position offset of data flow in the new data table is handled according to the upgrading configuration, It is specifically included with generating target database:
If the escalation target is searched to delete field, to the data flow according to position to obtain field to be deleted The information stored at the target position is deleted in the target position of storage, and re-starts data bit offset.
In embodiments of the present invention, if the more than one target position information found out, need to find every Target position information is all handled, and deletes the information of all corresponding field positions storage found, and re-starts data Position offset.
If the escalation target is addition field, the data flow is searched according to position to obtain field to be added Point of addition, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field.Together Sample in embodiments of the present invention, if finding out multiple point of additions, is needed to each in multiple point of additions for finding A point of addition is all handled.
If the escalation target is modification field name, without processing.
If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated Amount, and the data flow at the field location to be modified is deleted, field addition is then carried out, and calculates new addition field location Locate the position offset of data flow, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and in the position of newly addition field Put place's write-in default value.As a specific implementation example:If the escalation target is that field type is changed to char by int, 4 byte lengths shared by original int type-words section are deleted, the corresponding default value of char type-word sections is then added, carries out data flow position Offset.
If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write Enter default value.
In embodiments of the present invention, the modification field length refers exclusively to char ocra font ocr strings.Such as:If the escalation target For char type-words segment length is changed to temp [10] by temp [20], the data flow of the original the inside of the legacy data extracted has had More than the content of 10 bytes, then the data are deleted, and be added to the default value of 10 bytes, if legacy data is less than or equal to 10 words Section, then do not change.If conversely, the escalation target is that char type-words segment length is changed to temp [20] by Temp [10], no With modification.
Furthermore, it is necessary to explanation, due to being carried out in the embodiment of the present invention before upgrading to database to source database Backup, thus in the escalation process of database once occur mistake be inversely upgraded to using the source database of backup it is old The database of version.
Above as can be seen that the embodiment of the present invention provides a kind of side upgraded to sqlite3 type embedded databases Method can be realized through the extraction fractionation to existing data in database, the upgrading of database is carried out on the premise of lossless, The effective perfect deficiency of existing sqlite3 embedded databases, the work(supplemented with sqlite3 embedded databases missing Can, it can make most of equipment for using sqlite3 type embedded databases that can carry out lossless upgrade operation, utmostly The data protected in source database, simplify upgrade step, shorten update time, and greatly facilitate equipment It safeguards, reduces the workload of maintenance personnel.
Fig. 3 shows the knot of the system provided in an embodiment of the present invention upgraded to sqlite3 type embedded databases Structure block diagram, the system are located in the equipment described in the embodiment of the present invention, are provided for running above-mentioned Fig. 1~embodiment illustrated in fig. 2 Method.It illustrate only part related to the present embodiment for convenience of description.
Shown in Figure 3, offer of the embodiment of the present invention is a kind of to be to what sqlite3 type embedded databases were upgraded System, including:
Application software upgrade module 1, for completing the loading of upgrade application software and again starting device in equipment;
Judgment module 2, for reading the version number of target database and the device memory in the upgrade application software The version number of middle source database judges whether the version number of the target database is consistent with the version number of the source database;
If database upgrade module 3 for inconsistent, backs up the source database, and calls the upgrading The upgrading configuration of the version numbers match for the version number and source database with the target database that application software embeds File upgrades the source database in the device memory according to the upgrading configuration.
Optionally, the database upgrade module 3 includes:
Database structure inversely establishes unit 31, for obtaining the database structure of target database, according to the target Wide area information server structure and the upgrading configuration inversely establish the database structure of the source database;
Data flow acquiring unit 32, for carrying out memory headroom distribution using the database structure of the source database, with Read the data flow of legacy data table in the source database;
New data table creating unit 33 for deleting the legacy data table, and utilizes the database of the target database Structure Creating new data table;
Data flow position migration processing unit 34, for by the data stream recovery into the new data table, and according to institute It states upgrading configuration to handle the position offset of data flow in the new data table, to generate target database.
Optionally, the upgrading configuration includes data knot in database structure in target database and source database The field change information of structure, the field change information include:Delete field, addition field, modification field name, modification field Type and modification field length.
Optionally, the upgrading configuration is embedded in the form of xml document form in the upgrade application software, and Each escalation target in the upgrading configuration is stored as a unit in the form of chained list, so as in database upgrade The escalation target in the upgrading configuration is performed according to the linked list order in the process.
Optionally, the data flow position migration processing unit 34 is specifically used for:
If the escalation target is searched to delete field, to the data flow according to position to obtain field to be deleted The information stored at the target position is deleted in the target position of storage, and re-starts data bit offset;
If the escalation target is addition field, the data flow is searched according to position to obtain field to be added Point of addition, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field;
If the escalation target is modification field name, without processing;
If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated Amount, and the data flow at the field location to be modified is deleted, field addition is then carried out, and calculates new addition field location Locate the position offset of data flow, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and in the position of newly addition field Put place's write-in default value;
If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write Enter default value.
It should be noted that modules in above system provided in an embodiment of the present invention, due to real with the method for the present invention It applies example and is based on same design, the technique effect brought is identical with the method for the present invention embodiment, and particular content can be found in the present invention Narration in embodiment of the method, details are not described herein again.
Therefore, a kind of system for being upgraded to sqlite3 type embedded databases provided in an embodiment of the present invention is similary It can realize by being split to the extraction of existing data in database, the upgrading of database is carried out on the premise of lossless, is had The perfect deficiency of existing sqlite3 embedded databases of effect, the function supplemented with sqlite3 embedded databases missing, It can make most of equipment for using sqlite3 type embedded databases that can carry out lossless upgrade operation, to the greatest extent The data in source database are protected, upgrade step is simplified, shortens update time, and greatly facilitate the dimension of equipment Shield reduces the workload of maintenance personnel.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention All any modification, equivalent and improvement made within refreshing and principle etc., should all be included in the protection scope of the present invention.

Claims (8)

  1. A kind of 1. method upgraded to sqlite3 type embedded databases, which is characterized in that including:
    The loading of upgrade application software and again starting device are completed in equipment;
    The version number of source database in the version number of target database and the device memory in the upgrade application software is read, Judge whether the version number of the target database is consistent with the version number of the source database;
    If inconsistent, the source database is backed up, and calls the upgrade application software embedding and the target The upgrading configuration of the version numbers match of the version number of database and the source database, according to the upgrading configuration The source database in the device memory is upgraded;
    Upgrading is carried out to the source database in the device memory according to the upgrading configuration to specifically include:
    The database structure of target database is obtained, according to the database structure of the target database and the upgrading configuration text Part inversely establishes the database structure of the source database;
    Memory headroom distribution is carried out using the database structure of the source database, to read legacy data table in the source database Data flow;
    The legacy data table is deleted, and new data table is created using the database structure of the target database;
    By the data stream recovery into the new data table, and according to the upgrading configuration to number in the new data table It is handled according to the position offset of stream, to generate target database.
  2. 2. the method upgraded as described in claim 1 to sqlite3 type embedded databases, which is characterized in that described Upgrading configuration includes the field change information of data structure in database structure in target database and source database, institute Stating field change information includes:It is long to delete field, addition field, modification field name, modification field type and modification field Degree.
  3. 3. the method upgraded as claimed in claim 2 to sqlite3 type embedded databases, which is characterized in that described Upgrading configuration in the form of xml document form together with the upgrade application Software package, and it is described upgrading configuration text Each escalation target in part is stored as a unit in the form of chained list, so as to described in the basis during database upgrade Linked list order performs the escalation target in the upgrading configuration.
  4. 4. the method upgraded as claimed in claim 3 to sqlite3 type embedded databases, which is characterized in that described The position offset of data flow in the new data table is handled according to the upgrading configuration, to generate target database tool Body includes:
    It is stored if the escalation target is searched to obtain field to be deleted to delete field, to the data flow according to position Target position, delete at the target position store information, and re-start data bit offset;
    If the escalation target is addition field, the data flow is searched to obtain field to be added according to position is added Add position, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field;
    If the escalation target is modification field name, without processing;
    If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated, and The data flow at the field location to be modified is deleted, then carries out field addition, and calculates number at new addition field location According to the position offset of stream, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and at the newly position of addition field Write default value;
    If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write silent Recognize value.
  5. 5. a kind of system upgraded to sqlite3 type embedded databases, which is characterized in that including:
    Application software upgrade module, for completing the loading of upgrade application software and again starting device in equipment;
    Judgment module, for reading in the upgrade application software source number in the version number of target database and the device memory According to the version number in storehouse, judge whether the version number of the target database is consistent with the version number of the source database;
    If database upgrade module for inconsistent, backs up the source database, and calls the upgrade application soft The upgrading configuration of the version numbers match for the version number and source database with the target database that part embeds, root The source database in the device memory is upgraded according to the upgrading configuration;
    The database upgrade module includes:
    Database structure inversely establishes unit, for obtaining the database structure of target database, according to the target database Database structure and the upgrading configuration inversely establish the database structure of the source database;
    Data flow acquiring unit, for carrying out memory headroom distribution using the database structure of the source database, to read State the data flow of legacy data table in source database;
    New data table creating unit for deleting the legacy data table, and is created using the database structure of the target database Build new data table;
    Data flow position migration processing unit, for by the data stream recovery into the new data table, and according to the upgrading Configuration file handles the position offset of data flow in the new data table, to generate target database.
  6. 6. the system upgraded as claimed in claim 5 to sqlite3 type embedded databases, which is characterized in that described Upgrading configuration includes the field change information of data structure in database structure in target database and source database, institute Stating field change information includes:It is long to delete field, addition field, modification field name, modification field type and modification field Degree.
  7. 7. the system upgraded as claimed in claim 6 to sqlite3 type embedded databases, which is characterized in that described Upgrading configuration in the form of xml document form together with the upgrade application Software package, and it is described upgrading configuration text Each escalation target in part is stored as a unit in the form of chained list, so as to described in the basis during database upgrade Linked list order performs the escalation target in the upgrading configuration.
  8. 8. the system upgraded as claimed in claim 7 to sqlite3 type embedded databases, which is characterized in that described Data flow position migration processing unit is specifically used for:
    It is stored if the escalation target is searched to obtain field to be deleted to delete field, to the data flow according to position Target position, delete at the target position store information, and re-start data bit offset;
    If the escalation target is addition field, the data flow is searched to obtain field to be added according to position is added Add position, corresponding field length is added at the point of addition, and the data of acquiescence are assigned to newly added field;
    If the escalation target is modification field name, without processing;
    If the escalation target is modification field type, the position offset of data flow at field location to be modified is calculated, and The data flow at the field location to be modified is deleted, then carries out field addition, and calculates number at new addition field location According to the position offset of stream, mathematic interpolation is carried out to two position offsets, to be deviated into line position, and at the newly position of addition field Write default value;
    If the escalation target is modification field length, the position offset of data flow is carried out according to length to be changed, and is write silent Recognize value.
CN201510585070.2A 2015-09-15 2015-09-15 A kind of method and system upgraded to sqlite3 type embedded databases Expired - Fee Related 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 CN105224361A (en) 2016-01-06
CN105224361B true CN105224361B (en) 2018-05-25

Family

ID=54993353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510585070.2A Expired - Fee Related 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)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224361B (en) * 2015-09-15 2018-05-25 华讯方舟科技有限公司 A kind of method and system upgraded to sqlite3 type embedded databases
CN108614868B (en) * 2018-04-16 2021-09-17 北京酷我科技有限公司 Automatic database upgrading 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
CN111143348A (en) * 2019-11-25 2020-05-12 三盟科技股份有限公司 Data translation method, system, computer device and readable storage medium
CN112486546A (en) * 2020-12-18 2021-03-12 上海中通吉网络技术有限公司 SQLITE database upgrading method, device, terminal and system
CN112711432B (en) * 2020-12-31 2023-04-07 北京安博通科技股份有限公司 Feature library upgrading method and device for network security equipment
CN112783549A (en) * 2021-01-08 2021-05-11 东风汽车股份有限公司 Method for upgrading data version number of automobile electric control element

Citations (7)

* 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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9767110B2 (en) * 2012-06-14 2017-09-19 Ntrepid Corporation Case data visualization application
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 (7)

* 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

Also Published As

Publication number Publication date
WO2017045491A1 (en) 2017-03-23
CN105224361A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN105224361B (en) A kind of method and system upgraded to sqlite3 type embedded databases
US11531535B2 (en) Firmware upgrade method and apparatus, and terminal
CN103942058B (en) A kind of EMBEDDED AVIONICS method for upgrading software and system
CN106302753A (en) The method and system of client-side program incremental update
CN110224878A (en) Gateway configures update method, device and server
CN103106138B (en) The method that test case is synchronous with test script and device
US20160124739A1 (en) Minimizing Image Copying During Partition Updates
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN103428242A (en) Method, device and system for increment synchronization
CN106528071B (en) The choosing method and device of object code
EP2988226A1 (en) Electronic document data updating method and device
JP5237661B2 (en) File synchronization apparatus, file synchronization method, and file synchronization program
WO2016202000A1 (en) Differential rollback upgrading method and apparatus
CN104866391A (en) Terminal information backup method and apparatus based on incremental information system
WO2020010724A1 (en) Front-end static resource management method, apparatus, computer device and storage medium
CN105677256A (en) Virtual disk system based on local caching and scheduling method
CN110209420A (en) A kind of method and device updating bootstrap loader
CN103761095B (en) Method for generating universal upgrade file head data information
CN101727503A (en) Method for establishing disk file system
CN106709066A (en) Data synchronization method and device
CN109462661B (en) Data synchronization method and device, computer equipment and storage medium
US20170141922A1 (en) Incremental upgrade method and system for file
CN105718468A (en) Method and device for building ODS layer of data warehouse
CN105302789A (en) Editing method of health information shared document template buffer storage
CN106775802B (en) Method and system for quickly updating mass small files

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

Inventor after: Fan Wei

Inventor after: Zhang Cong

Inventor after: Fan Congming

Inventor after: Zhao Shukai

Inventor before: Fan Wei

Inventor before: Zhang Cong

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20210630

Granted publication date: 20180525

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20230421

Granted publication date: 20180525

TR01 Transfer of patent right
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.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180525