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 PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000004048 modification Effects 0.000 claims description 39
- 238000012986 modification Methods 0.000 claims description 39
- 230000008859 change Effects 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 13
- 230000005012 migration Effects 0.000 claims description 6
- 238000013508 migration Methods 0.000 claims description 6
- 238000011084 recovery Methods 0.000 claims description 6
- 238000012423 maintenance Methods 0.000 abstract description 7
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000007792 addition Methods 0.000 description 31
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000007812 deficiency Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000013075 data extraction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000686 essence Substances 0.000 description 1
- 238000005194 fractionation Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program 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
Description
Claims (8)
- 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. 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. 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. 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. 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. 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. 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. 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.
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)
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)
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)
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 |
-
2015
- 2015-09-15 CN CN201510585070.2A patent/CN105224361B/en not_active Expired - Fee Related
-
2016
- 2016-08-03 WO PCT/CN2016/093106 patent/WO2017045491A1/en active Application Filing
Patent Citations (7)
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 |
---|---|
CN105224361A (en) | 2016-01-06 |
WO2017045491A1 (en) | 2017-03-23 |
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 | |
CN106528071B (en) | The choosing method and device of object code | |
CN109298873B (en) | System upgrading method and device | |
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 | |
WO2019041891A1 (en) | Method and device for generating upgrade package | |
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 | |
CN106155838A (en) | A kind of database back-up data restoration methods and device | |
CN110083372B (en) | Block chain data version upgrading method | |
CN109462661B (en) | Data synchronization method and device, computer equipment and storage medium | |
US20170141922A1 (en) | Incremental upgrade method and system for file | |
CN105302789A (en) | Editing method of health information shared document template buffer storage | |
CN111090701B (en) | Service request processing method, device, readable storage medium and computer equipment | |
CN113221507B (en) | Document editing operation synchronization method, computing device and storage medium |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180525 |