CN102662995B - A kind of method that quick position mobile phone application data upgrades - Google Patents

A kind of method that quick position mobile phone application data upgrades Download PDF

Info

Publication number
CN102662995B
CN102662995B CN201210067758.8A CN201210067758A CN102662995B CN 102662995 B CN102662995 B CN 102662995B CN 201210067758 A CN201210067758 A CN 201210067758A CN 102662995 B CN102662995 B CN 102662995B
Authority
CN
China
Prior art keywords
data
monitoring
tables
field
state
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.)
Active
Application number
CN201210067758.8A
Other languages
Chinese (zh)
Other versions
CN102662995A (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.)
Borqs Beijing Ltd.
Original Assignee
BORQS BEIJING 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 BORQS BEIJING Ltd filed Critical BORQS BEIJING Ltd
Priority to CN201210067758.8A priority Critical patent/CN102662995B/en
Publication of CN102662995A publication Critical patent/CN102662995A/en
Application granted granted Critical
Publication of CN102662995B publication Critical patent/CN102662995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The method that quick position mobile phone application data upgrades, comprises the following steps: the field selecting Monitoring Data table and monitoring, creates base table, and determines the tables of data that Data Update occurs; The state of tables of data after upgrading and the data mode of base table record are compared, determines the record of Data Update; That records above-mentioned Data Update is recorded to database.Adopt method of the present invention, can upgrade by Real-time Monitoring Data, determine the data occurring to upgrade, and the application that notice needs.

Description

A kind of method that quick position mobile phone application data upgrades
Technical field
The present invention relates to database technical field, particularly relate to the localization method of the Data Update of database.
Background technology
In prior art, find that the means that smart mobile phone application data upgrades mainly contain: the Trigger mechanism of Observer Pattern (android Observer) and application data base table.
Observer Pattern is called again Publish-subscribe (Publish/Subscribe) pattern, Model-View (Model/View) pattern, source-audiomonitor (Source/Listener) pattern or subordinate (Dependents) pattern.Observer Pattern defines a kind of dependence of one-to-many, allows multiple observer's object monitor some subject simultaneously.When this subject changes in state, all observer's objects can be notified, enable them automatically upgrade oneself.
The Trigger mechanism of application data base table, it is closely connected with table, sets up, a part for visual tabulation based on table.It can not be called by explicit, and after user creates trigger, when the data in showing are inserted, delete or revised, trigger can run automatically.Trigger mechanism can make multiple different user keeping modifying under data integrity and conforming good environment operation.
Above-mentioned Observer Pattern, can only monitor table level, that is, can only determine which table there occurs change, can not navigate to which bar record and there occurs change by Observer.Trigger mechanism is when the change monitoring record, and excite treatment S QL to operate, application processing function is skipped in the change of data record, makes user cannot do further process to the change of application record.
Summary of the invention
In order to solve the deficiency that prior art exists, the object of the present invention is to provide a kind of method that quick position mobile phone application data upgrades, for the tables of data that will monitor, first base table is created to record the state before Data Update, then utilize Observer Pattern (android Observer) when Data Update, determine Data Update tables of data occurs, the state of the tables of data after comparison upgrades and the data mode of base table record, find out the record that both are inconsistent, determine the record of Data Update.
To achieve these goals, the method for a kind of rapid data classification provided by the invention, comprises the following steps:
1) select need the tables of data of monitoring and need the field of monitoring, create base table, then utilize Observer Pattern, when Data Update, determine Data Update tables of data occurs;
2) comparison upgrade after the state of tables of data and the data mode of base table record, find out both inconsistent records, determine the record of Data Update;
3) that records above-mentioned Data Update is recorded to database.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, and with content of the present invention together with embodiment, for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram upgraded according to quick position mobile phone application data of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Method of the present invention, for the tables of data that will monitor, record original state, based on Observer Pattern (android Observer) monitoring and measuring application data, when data variation, can determine to there occurs change to which tables of data of which application; Then, compare the tables of data state after change and original state, find out change, determine which bar record there occurs change.
Fig. 1 is the method flow diagram upgraded according to quick position mobile phone application data of the present invention, below with reference to Fig. 1, is described in detail the method that quick position mobile phone application data of the present invention upgrades:
First, in step 101, select want the tables of data at monitoring and measuring application data place and need the field of monitoring, and find out the field that can indicate and need monitoring field whether to change.These field values that Monitoring Data can be indicated whether to change are linked to be character string, and the cryptographic hash of calculating character string, according to these cryptographic hash, be recorded as the original state of Monitoring Data table, create base table; The main field of base table comprises: " _ id " (Monitoring Data table mark), " state_value " (state value), " uri " (tables of data of instruction monitoring), " recordId " (in tables of data of monitoring corresponding _ id).State value is the cryptographic hash of the monitoring field calculating according to Monitoring Data table.Here the field of tables of data and the monitoring of monitoring is selected to be need to select according to user, the tables of data record original state of scanning monitoring;
In step 102, when android Observer monitors Data Update, determine the tables of data of Data Update according to " uri ", the original state of contrast base table, finds out the physical record of data variation.
The methods contrasting two tables are: order that " recordId " successively decrease takes out data D1 from base table first to utilize " uri " press, and the order utilizing uri to successively decrease by " _ id " to be fetched data D2 from the tables of data of renewal.Then, get D1 successively, D2 record compares.
If a) " recordId " of D1 is greater than " _ the id " of D2, illustrate that the record that " _ id " in the Monitoring Data table that D2 is corresponding equals " recordId " is deleted.Get next record of D1, D2 records constant, compares next time.As shown in table 1, recordId > _ id, deletes _ id=6.
Table 1: data are deleted
(D1)recordId (D2) _id
9 9
8 8
6
5 5
4 4
If b) " recordId " of D1 is less than " _ the id " of D2, illustrate that this record in the Monitoring Data table that D2 is corresponding is the new record added.Get next record of D2, D1 records constant, compares next time.As shown in table 2, recordId < _ id, interpolation _ id=9.
Table 2: data are added
(D1)recordId (D2) _id
9
8 8
6 6
5 5
4 4
If c) " recordId " of D1 equals " _ the id " of D2, then calculate the cryptographic hash that the field of the monitoring of the tables of data of monitoring is corresponding, and " state_value " corresponding with base table compares, if two values are identical, represent that data do not upgrade, if different, illustrate that this record in the Monitoring Data table that D2 is corresponding have updated.Get next record of D1, D2, compare next time.As shown in table 3, when corresponding cryptographic hash is different, there is Data Update.
Table 3: Data Update
(D1)recordId (D2) _id
9 9
8 8
6 6
5 5
4 4
If d) there is no record in D1, in D2, also have record, illustrate that in D2, these records are all new interpolations.As shown in table 4, do not have record in D1, also have record in D2, these data corresponding in Monitoring Data table are new interpolations.
Table 4:
(D1)recordId (D2) _id
5
4
3
2
  1
If e) there is no record in D2, in D1 also have record, illustrate in D2 " _ id " equal " recordId " these records all delete.As shown in table 5, do not have record in D2, also have record in D1, these data corresponding in Monitoring Data table all delete.
Table 5:
(D1)recordId (D2) _id
9
8
6
5
4  
In step 103, that records above-mentioned change is recorded to database, for other application.
At present, on smart mobile phone, there is the change of a lot of application to some data of other application to be extremely concerned about, wish the change information obtaining these application.Such as, handset dialing needs the change knowing address book data, to be dialled by address list, needs the change knowing short message, knows which contact person contacts often, so that user the most easily finds these contact persons.Search for for another example, need the change knowing each application data, so that user search is to existing information, search less than non-existent information, etc.But currently can find that the means of other application change are also nowhere near, adopt the method that quick position mobile phone application data of the present invention upgrades, can upgrade by Real-time Monitoring Data, determine the data occurring to upgrade, and the application that notice needs.
One of ordinary skill in the art will appreciate that: the foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment to invention has been detailed description, for a person skilled in the art, it still can be modified to the technical scheme that foregoing embodiments is recorded, or carries out equivalent replacement to wherein portion of techniques feature.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (2)

1. a method for quick position mobile phone application data renewal, comprises the following steps:
1) select want the tables of data at monitoring and measuring application data place and need the field of monitoring, find out the field that can indicate and need monitoring field whether to change, these field values that Monitoring Data can be indicated whether to change are linked to be character string, and the cryptographic hash of calculating character string, according to these cryptographic hash, be recorded as the original state of Monitoring Data table, thus establishment base table, when utilizing Observer Pattern to monitor Data Update, according to the identifier needing the tables of data of monitoring, determine the tables of data of Data Update
Wherein, the described field of monitoring of selecting comprises: Monitoring Data table mark " _ id ", state value " state_value ", instruction Monitoring Data table " uri " and corresponding in Monitoring Data table _ id " recordId ";
2) data that order that " _ id " successively decrease is taken out from the tables of data upgraded are pressed in utilize " uri " to press order that " recordId " the successively decrease data of taking out from base table and utilization " uri ", compare successively, determine the record of Data Update,
Wherein, if " recordId " equals " _ id ", then calculate the cryptographic hash that the field of the monitoring of the tables of data of monitoring is corresponding, and " state_value " corresponding with base table compares;
3) that records above-mentioned Data Update is recorded to database.
2. the method for quick position mobile phone application data renewal according to claim 1, is characterized in that, described state value " state_value " is the cryptographic hash of the monitoring field calculating according to Monitoring Data table.
CN201210067758.8A 2012-03-15 2012-03-15 A kind of method that quick position mobile phone application data upgrades Active CN102662995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210067758.8A CN102662995B (en) 2012-03-15 2012-03-15 A kind of method that quick position mobile phone application data upgrades

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210067758.8A CN102662995B (en) 2012-03-15 2012-03-15 A kind of method that quick position mobile phone application data upgrades

Publications (2)

Publication Number Publication Date
CN102662995A CN102662995A (en) 2012-09-12
CN102662995B true CN102662995B (en) 2015-09-30

Family

ID=46772486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210067758.8A Active CN102662995B (en) 2012-03-15 2012-03-15 A kind of method that quick position mobile phone application data upgrades

Country Status (1)

Country Link
CN (1) CN102662995B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539520A (en) * 2014-12-27 2015-04-22 宁波江东远通计算机有限公司 Message sending management method and device
CN106850307B (en) * 2017-02-21 2020-07-07 青岛海信移动通信技术股份有限公司 Attribute information processing method and device
CN107368513B (en) * 2017-04-25 2020-08-14 阿里巴巴集团控股有限公司 Method and device for updating client database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (en) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 Dynamic monitoring system and method for data base list update
CN101192214A (en) * 2006-11-27 2008-06-04 中兴通讯股份有限公司 Processing method for EMS memory data-base content variation real time notification task
CN101202934A (en) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 Device for processing internal storage data base content variety real-time informing business
CN102289433A (en) * 2010-06-18 2011-12-21 中兴通讯股份有限公司 Method and device for realizing function of database trigger

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053982B (en) * 2009-11-02 2017-03-01 阿里巴巴集团控股有限公司 A kind of database information management method and equipment
CN102073824B (en) * 2011-01-12 2014-06-04 深圳昂楷科技有限公司 Method for generating and updating unique identifier of encrypted document

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1673972A (en) * 2004-08-04 2005-09-28 上海宝信软件股份有限公司 Dynamic monitoring system and method for data base list update
CN101192214A (en) * 2006-11-27 2008-06-04 中兴通讯股份有限公司 Processing method for EMS memory data-base content variation real time notification task
CN101202934A (en) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 Device for processing internal storage data base content variety real-time informing business
CN102289433A (en) * 2010-06-18 2011-12-21 中兴通讯股份有限公司 Method and device for realizing function of database trigger

Also Published As

Publication number Publication date
CN102662995A (en) 2012-09-12

Similar Documents

Publication Publication Date Title
JP6419319B2 (en) Synchronize shared folders and files
CN103402194B (en) A kind of method recommending software when software upgrading and realize the system of the method
US20120185454A1 (en) Method and device for accessing file resources
CN107977396B (en) Method and device for updating data table of KeyValue database
CN110413282B (en) Redundant resource processing method, device, equipment and storage medium
US10650085B2 (en) Providing interactive preview of content within communication
JP2009104229A (en) Input check device and input check method
CN103186660B (en) Information source selection system, information source system of selection
CN113301203B (en) Method and device for updating historical information data based on address book
CN102662995B (en) A kind of method that quick position mobile phone application data upgrades
CN104881454A (en) Updating method and system of parameter
CN105915636B (en) A kind of synchronous method and device of contact information
US9824163B2 (en) Method and apparatus for providing a search tool in connection with address management
CN102171696B (en) The generation method and apparatus of customization data
KR101588375B1 (en) Method and system for managing database
CN105843809B (en) Data processing method and device
CN107949830A (en) It will be forwarded to the relevant information of activity from source electronic device with electronic device
KR20120105281A (en) Method for generating electronic appliance identifier and managing information by using the electronic appliance identifier
CN107220792A (en) A kind of storage management method and system
US9621424B2 (en) Providing a common interface for accessing and presenting component configuration settings
CN112837107A (en) Cross-platform commodity recommendation method and device and computer equipment
CN107463618B (en) Index creating method and device
CN109658276A (en) Approaches to IM, device, storage medium and the electronic equipment of social networks
CN109918439A (en) Method of data synchronization and its loop detecting method and relevant apparatus of application
CN114911759A (en) File connection method, device, terminal equipment 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
ASS Succession or assignment of patent right

Owner name: BORQS COMMUNICATION TECHNOLOGY (BEIJING) CO., LTD.

Free format text: FORMER OWNER: BEIJING BORQS SOFTWARE TECHNOLOGY CO., LTD.

Effective date: 20131203

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

Free format text: CORRECT: ADDRESS; FROM: 100102 CHAOYANG, BEIJING TO: 100015 CHAOYANG, BEIJING

TA01 Transfer of patent application right

Effective date of registration: 20131203

Address after: 100015, B23A, Hengtong business garden, No. 10, Jiuxianqiao Road, Beijing, Chaoyang District

Applicant after: Borqs Beijing Ltd.

Address before: 100102 D building, building 9, South Central Road, Chaoyang District, Wangjing, Beijing, Wangjing

Applicant before: Beijing Borqs Software Technology Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant