CN102662995A - Method for quickly positioning data updating of mobile phone applications - Google Patents
Method for quickly positioning data updating of mobile phone applications Download PDFInfo
- Publication number
- CN102662995A CN102662995A CN2012100677588A CN201210067758A CN102662995A CN 102662995 A CN102662995 A CN 102662995A CN 2012100677588 A CN2012100677588 A CN 2012100677588A CN 201210067758 A CN201210067758 A CN 201210067758A CN 102662995 A CN102662995 A CN 102662995A
- Authority
- CN
- China
- Prior art keywords
- data
- data table
- record
- mobile phone
- monitoring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
一种快速定位手机应用数据更新的方法,包括以下步骤:选择监测数据表和监测的字段,创建基表,并确定发生数据更新的数据表;将发生更新后的数据表的状态和基表记录的数据状态进行比较,确定数据更新的记录;记录上述数据更新的记录到数据库。采用本发明的方法,可以实时监测数据更新,确定发生更新的数据,并通知需要的应用。
A method for rapidly locating mobile phone application data updates, comprising the following steps: selecting a monitoring data table and a field to be monitored, creating a base table, and determining the data table in which data updates occur; the state of the updated data table and the base table records Compare the data status of the data to determine the record of the data update; record the record of the above data update to the database. By adopting the method of the invention, data update can be monitored in real time, the updated data can be determined, and required applications can be notified.
Description
技术领域 technical field
本发明涉及数据库技术领域,尤其涉及数据库的数据更新的定位方法。 The invention relates to the technical field of databases, in particular to a positioning method for updating data of a database.
背景技术 Background technique
现有技术中,发现智能手机应用数据更新的手段主要有:观察者模式 (android Observer)和应用数据库表的Trigger机制。 In the prior art, the means for discovering the update of the application data of the smart phone mainly include: the observer mode (android Observer) and the Trigger mechanism of the application database table.
观察者模式又叫做发布-订阅(Publish/Subscribe)模式、模型-视图(Model/View)模式、源-监听器(Source/Listener)模式或从属者(Dependents)模式。观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象。这个主题对象在状态上发生变化时,会通知所有观察者对象,使它们能够自动更新自己。 The observer mode is also called the publish-subscribe (Publish/Subscribe) mode, the model-view (Model/View) mode, the source-listener (Source/Listener) mode or the slave (Dependents) mode. The Observer pattern defines a one-to-many dependency, allowing multiple observer objects to monitor a subject object at the same time. When the subject object changes in state, it notifies all observer objects, enabling them to automatically update themselves.
应用数据库表的Trigger机制,它与表紧密相连,基于表而建立,可视作表的一部分。它不能被显式调用,用户创建触发器后,当表中的数据发生插入、删除或修改时,触发器会自动运行。Trigger机制能够使得多个不同的用户能够在保持数据完整性和一致性的良好环境下进行修改操作。 Apply the Trigger mechanism of the database table, which is closely connected with the table, built based on the table, and can be regarded as a part of the table. It cannot be called explicitly. After the user creates a trigger, when the data in the table is inserted, deleted or modified, the trigger will run automatically. The Trigger mechanism enables multiple different users to perform modification operations in a good environment that maintains data integrity and consistency.
上述观察者模式,只能监测到表级,也就是说,通过Observer只能确定哪个表发生了变化,不能定位到哪条记录发生了变化。Trigger机制在监测到记录的变化时,激发处理SQL操作,数据记录的变化跳过应用处理程序,使得用户无法对应用记录变化做进一步的处理。 The observer mode mentioned above can only monitor the table level, that is to say, only which table has changed can be determined through Observer, and which record has changed cannot be located. When the Trigger mechanism detects the change of the record, it triggers the processing SQL operation, and the change of the data record skips the application processing program, so that the user cannot further process the change of the application record.
发明内容 Contents of the invention
为了解决现有技术存在的不足,本发明的目的在于提供一种快速定位手机应用数据更新的方法,对于要监测的数据表,首先创建基表以记录数据更新前的状态,然后利用观察者模式 (android Observer)在数据更新时,确定发生数据更新数据表,比对发生更新后的数据表的状态和基表记录的数据状态,找出两者不一致的记录,确定数据更新的记录。 In order to solve the deficiencies in the prior art, the purpose of the present invention is to provide a method for quickly locating mobile phone application data updates. For the data table to be monitored, first create a base table to record the state before the data update, and then use the observer mode (Android Observer) When data is updated, determine the data update data table, compare the state of the updated data table with the data state of the base table record, find out the inconsistent records, and determine the data update record.
为了实现上述目的,本发明提供的一种数据快速分类的方法,包括以下步骤: In order to achieve the above object, a method for fast data classification provided by the present invention comprises the following steps:
1)选择需要监测的数据表和需要监测的字段,创建基表,然后利用观察者模式,在数据更新时,确定发生数据更新数据表; 1) Select the data table to be monitored and the field to be monitored, create a base table, and then use the observer mode to determine the occurrence of data to update the data table when the data is updated;
2)比对发生更新后的数据表的状态和基表记录的数据状态,找出两者不一致的记录,确定数据更新的记录; 2) Compare the status of the updated data table with the data status of the base table records, find out the inconsistent records, and determine the data update records;
3)记录上述数据更新的记录到数据库。 3) Record the record of the above data update to the database.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。 Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention.
附图说明 Description of drawings
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,并与本发明的内容和实施例一起,用于解释本发明,并不构成对本发明的限制。在附图中: The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification, and together with the contents and embodiments of the present invention, are used to explain the present invention, and do not constitute a limitation to the present invention. In the attached picture:
图1为根据本发明的快速定位手机应用数据更新的方法流程图。 FIG. 1 is a flow chart of a method for quickly locating mobile phone application data update according to the present invention.
具体实施方式 Detailed ways
以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的实施例仅用于说明和解释本发明,并不用于限定本发明。 Preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.
本发明的方法,对于要监测的数据表,记录初始状态,基于观察者模式 (android Observer)监测应用数据,当数据变化时,可以确定到哪个应用的哪个数据表发生了变化;然后,比较变化后的数据表状态和初始状态,找出变化,确定哪条记录发生了变化。 The method of the present invention records the initial state of the data table to be monitored, and monitors the application data based on the observer mode (android Observer). When the data changes, it can be determined which data table of which application has changed; then, compare the changes After the state of the data table and the initial state, find out the changes and determine which record has changed.
图1为根据本发明的快速定位手机应用数据更新的方法流程图,下面将参考图1,对本发明的快速定位手机应用数据更新的方法进行详细描述: Fig. 1 is a flow chart of the method for updating the application data of the fast positioning mobile phone according to the present invention, and with reference to Fig. 1, the method for updating the application data of the fast positioning mobile phone of the present invention is described in detail:
首先,在步骤101,选择要监测应用数据所在的数据表和需要监测的字段,并找出可指示需要监测字段是否发生变化的字段。将这些可指示监测数据是否变化的字段值连成字符串,并计算字符串的哈希值,依据这些哈希值,记录为监测数据表的初始状态,创建基表;基表主要的字段包括:“_id”(监测数据表标识),“state_value”(状态值),“uri”(指示监测的数据表),“recordId” (在监测的数据表中对应的_id )。状态值是依据监测数据表的监测字段计算的哈希值。这里选择监测的数据表和监测的字段是根据用户需要进行选择,扫描监测的数据表记录初始状态;
First, in
在步骤102,当android Observer监测到数据更新时,依据“uri”确定数据更新的数据表,对比基表的初始状态,找出数据变化的具体记录。
In
对比两个表的方法是:首先利用“uri”按“recordId”递减的顺序从基表取出数据D1,利用uri按“_id”递减的顺序从更新的数据表取数据D2。 然后,依次取D1,D2记录进行比较。 The method of comparing the two tables is: first, use "uri" to fetch data D1 from the base table in descending order of "recordId", and use uri to fetch data D2 from the updated data table in descending order of "_id". Then, take D1 and D2 records in turn for comparison.
a) 如果D1的“recordId”大于D2的“_id”,说明D2 对应的监测数据表中 “_id”等于“recordId” 的记录已删除。取D1下一条记录,D2记录不变,进行下一次比较。如表1所示,recordId > _id,删_id = 6。 a) If the "recordId" of D1 is greater than the "_id" of D2, it means that the record with "_id" equal to "recordId" in the monitoring data table corresponding to D2 has been deleted. Take the next record in D1, keep the record in D2 unchanged, and perform the next comparison. As shown in Table 1, recordId > _id, delete _id = 6.
表1:数据删除 Table 1: Data removal
b) 如果D1的“recordId”小于 D2的“_id”,说明D2 对应的监测数据表中的这条记录是新添加的记录。取D2下一条记录,D1记录不变,进行下一次比较。如表2所示,recordId < _id , 添加_id=9。 b) If the "recordId" of D1 is smaller than the "_id" of D2, it means that the record in the monitoring data table corresponding to D2 is a newly added record. Take the next record in D2, keep the record in D1 unchanged, and perform the next comparison. As shown in Table 2, recordId < _id , add _id=9.
表2:数据添加 Table 2: Data addition
c) 如果D1的“recordId”等于 D2的“_id”,则计算监测的数据表的监测的字段对应的哈希值,并与基表中对应的“state_value”进行比较,如果两值相同,表示数据没有更新,若不同,说明D2 对应的监测数据表中的这条记录更新了。取D1、D2下一条记录,进行下一次比较。如表3所示,在对应哈希值不同时,有数据更新。 c) If the "recordId" of D1 is equal to the "_id" of D2, calculate the hash value corresponding to the monitored field of the monitored data table, and compare it with the corresponding "state_value" in the base table. If the two values are the same, it means The data is not updated. If it is different, it means that the record in the monitoring data table corresponding to D2 has been updated. Take the next record of D1 and D2 for the next comparison. As shown in Table 3, when the corresponding hash values are different, there is data update.
表3:数据更新 Table 3: Data update
d) 如果D1中没有记录,D2中还有记录,说明D2中这些记录都是新添加的。如表4所示,D1中没有记录,D2中还有记录,监测数据表中对应的这些数据是新添加的。 d) If there are no records in D1 and there are records in D2, it means that these records in D2 are newly added. As shown in Table 4, there are no records in D1, and there are records in D2, and the corresponding data in the monitoring data table are newly added.
表4: Table 4:
e) 如果D2中没有记录,D1中还有记录,说明D2中”_id”等于”recordId”的这些记录都删除了。如表5所示,D2中没有记录,D1中还有记录,监测数据表中对应的这些数据都删除了。 e) If there are no records in D2 and there are records in D1, it means that the records with "_id" equal to "recordId" in D2 are deleted. As shown in Table 5, there are no records in D2, and there are records in D1, and the corresponding data in the monitoring data table are all deleted.
表5: table 5:
在步骤103,记录上述变化的记录到数据库,供其它应用使用。
In
目前,在智能手机上,有很多应用对其它应用的某些数据的变化十分关心,希望得到这些应用的变化信息。比如,手机拨号需要知道通讯录数据的变化,以便通过通讯录拨号,需要知道短信息的变化,知道哪些联系人联系比较多,以便用户最容易找到这些联系人。 再比如搜索,需要知道各应用数据的变化,以便用户搜索到现有的信息,搜不到不存在的信息,等等。但当前能发现其它应用变化的手段还远远不够,采用本发明的快速定位手机应用数据更新的方法,能够实时监测数据更新,确定发生更新的数据,并通知需要的应用。 At present, on the smart phone, there are many applications that are very concerned about the changes of some data of other applications, and hope to obtain the change information of these applications. For example, mobile phone dialing needs to know the changes of the address book data in order to dial through the address book. It needs to know the changes of short messages and know which contacts have more contacts, so that users can find these contacts most easily. Another example is search, which needs to know the changes in the data of each application, so that users can search for existing information and not find information that does not exist, and so on. However, the current means of discovering other application changes is far from enough. Using the method for quickly locating mobile phone application data updates of the present invention can monitor data updates in real time, determine updated data, and notify required applications.
本领域普通技术人员可以理解:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Those of ordinary skill in the art can understand that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (5)
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 true CN102662995A (en) | 2012-09-12 |
| CN102662995B 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) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104539520A (en) * | 2014-12-27 | 2015-04-22 | 宁波江东远通计算机有限公司 | Message sending management method and device |
| CN106850307A (en) * | 2017-02-21 | 2017-06-13 | 青岛海信移动通信技术股份有限公司 | A kind of attribute information processing method and processing device |
| CN107368513A (en) * | 2017-04-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | The method and device of client database renewal |
Citations (6)
| 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 real-time notification of content changes in memory database |
| CN101202934A (en) * | 2006-12-13 | 2008-06-18 | 中兴通讯股份有限公司 | Processing device for real-time notification service of content changes in memory database |
| CN102053982A (en) * | 2009-11-02 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Method and equipment for managing database information |
| CN102073824A (en) * | 2011-01-12 | 2011-05-25 | 深圳昂楷科技有限公司 | Method for generating and updating unique identifier of encrypted document |
| CN102289433A (en) * | 2010-06-18 | 2011-12-21 | 中兴通讯股份有限公司 | Method and device for realizing function of database trigger |
-
2012
- 2012-03-15 CN CN201210067758.8A patent/CN102662995B/en active Active
Patent Citations (6)
| 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 real-time notification of content changes in memory database |
| CN101202934A (en) * | 2006-12-13 | 2008-06-18 | 中兴通讯股份有限公司 | Processing device for real-time notification service of content changes in memory database |
| CN102053982A (en) * | 2009-11-02 | 2011-05-11 | 阿里巴巴集团控股有限公司 | Method and equipment for managing database information |
| CN102289433A (en) * | 2010-06-18 | 2011-12-21 | 中兴通讯股份有限公司 | Method and device for realizing function of database trigger |
| CN102073824A (en) * | 2011-01-12 | 2011-05-25 | 深圳昂楷科技有限公司 | Method for generating and updating unique identifier of encrypted document |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104539520A (en) * | 2014-12-27 | 2015-04-22 | 宁波江东远通计算机有限公司 | Message sending management method and device |
| CN106850307A (en) * | 2017-02-21 | 2017-06-13 | 青岛海信移动通信技术股份有限公司 | A kind of attribute information processing method and processing device |
| CN106850307B (en) * | 2017-02-21 | 2020-07-07 | 青岛海信移动通信技术股份有限公司 | Attribute information processing method and device |
| CN107368513A (en) * | 2017-04-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | The method and device of client database renewal |
| CN107368513B (en) * | 2017-04-25 | 2020-08-14 | 阿里巴巴集团控股有限公司 | Method and device for updating client database |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102662995B (en) | 2015-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7200259B2 (en) | Data retention handling for data object stores | |
| US9183072B1 (en) | Error troubleshooting using a correlated knowledge base | |
| US10110536B2 (en) | System for managing event notifications to client devices | |
| US9031920B2 (en) | Objects in a storage environment for connected applications | |
| CN103500191B (en) | Flow table configuration, query and table item deleting method and device | |
| JP2017529625A (en) | Synchronize shared folders and files | |
| US8805777B2 (en) | Data record collapse and split functionality | |
| US20150301875A1 (en) | Persisting and managing application messages | |
| CN102982141A (en) | Method and device for realizing distributed database agent | |
| DE602007007820D1 (en) | METHOD AND DEVICE FOR DEBATING THE STORAGE OF USER DATA IN DIGITAL CELLULAR 3G TELECOMMUNICATIONS SYSTEMS | |
| CN106997369B (en) | Data cleaning method and device | |
| CN108491264A (en) | A Unified Resource Reclamation Management Method Applicable to Heterogeneous Clouds | |
| CN106031127A (en) | Method and device for the management of applications | |
| CN114036564B (en) | A method for constructing a derivative graph of private data | |
| CN113114734B (en) | Information processing method, device, equipment and storage medium | |
| CN100499482C (en) | A method for monitoring user behavior in network management system | |
| CN102662995B (en) | A kind of method that quick position mobile phone application data upgrades | |
| US9594762B2 (en) | Intelligent file management | |
| CN107368513B (en) | Method and device for updating client database | |
| CN107766488B (en) | Information query method, terminal, and computer-readable storage medium | |
| CN105915615A (en) | Method for displaying application information in mobile equipment and device thereof | |
| WO2019061944A1 (en) | Data security-based method for updating medical software, and server | |
| CN107193821A (en) | Monitoring method and system | |
| CN116010347A (en) | Resource updating method, device, system, electronic equipment and storage medium | |
| CN114595086A (en) | Anomaly detection method, device, 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 | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20250902 Address after: 100102 No. 33, Guangshunbei Street, Chaoyang District, Beijing Building 1, Compound 1 Unit 1, 6666 5th, 10th and 11th floors Patentee after: Xinbosi Technology (Beijing) Co.,Ltd. Country or region after: China Address before: 100015, B23A, Hengtong business garden, No. 10, Jiuxianqiao Road, Beijing, Chaoyang District Patentee before: BORQS BEIJING Ltd. Country or region before: China |
