[go: up one dir, main page]

CN107547683B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN107547683B
CN107547683B CN201710681229.XA CN201710681229A CN107547683B CN 107547683 B CN107547683 B CN 107547683B CN 201710681229 A CN201710681229 A CN 201710681229A CN 107547683 B CN107547683 B CN 107547683B
Authority
CN
China
Prior art keywords
address book
mode
book data
cache partition
preset cache
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
CN201710681229.XA
Other languages
Chinese (zh)
Other versions
CN107547683A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201710681229.XA priority Critical patent/CN107547683B/en
Publication of CN107547683A publication Critical patent/CN107547683A/en
Application granted granted Critical
Publication of CN107547683B publication Critical patent/CN107547683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a data processing method and a data processing device, wherein the data processing method comprises the following steps: storing first address book data corresponding to the first mode to a preset cache partition; and updating second address book data corresponding to a second mode according to the first address book data stored in the preset cache partition. According to the method and the device, the address list data can be synchronized among different modes, and the user experience is improved.

Description

Data processing method and device
Technical Field
The present application relates to communications technologies, and in particular, to a data processing method and apparatus.
Background
With the rapid development of mobile communication technology, the application field of mobile terminals is also wider and wider. The mobile internet is formed along with the development and integration of mobile communication technology and internet technology, and has become a great development direction in the field of information communication. Compared with the traditional internet, the mobile internet can be used anytime and anywhere, and can access the internet and use services in the movement. The mobile office is one of typical core applications of the current mobile internet business, and the mobile office also gets rid of the limitation of office on fixed equipment in fixed places, provides great convenience for users, enables the office to be free and easy, and enables the users to efficiently and quickly work no matter what kind of emergency condition the users are.
As mobile office technology matures, more and more enterprises and public institutions have generated a strong interest in supporting mobile office terminals. In consideration of convenience of use and user acceptance, it is often required that the terminal can operate in a plurality of modes. In order to ensure the safety of data among the modes and avoid leakage, the data among different modes are completely isolated. It may be difficult to use data from one mode for another.
The address book data used in different modes usually does not need to be kept secret, and the method is particularly important for realizing the synchronization and other processing among different modes of the address book data.
Disclosure of Invention
The application provides a data processing method and device, so that address book data synchronization among different modes is achieved, and user experience is improved.
The application provides a data processing method, which comprises the following steps:
storing first address book data corresponding to the first mode to a preset cache partition;
and updating second address book data corresponding to a second mode according to the first address book data stored in the preset cache partition.
Optionally, in the method, the storing the first address book data corresponding to the first mode in the preset cache partition includes:
storing part or all of first address book data corresponding to the first mode to the preset cache partition;
the updating of the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition includes:
and adding all the first address book data stored in the preset cache partition to a second address book corresponding to the second mode.
Optionally, in the method, the storing the first address book data corresponding to the first mode in the preset cache partition includes:
when the first address book data corresponding to the first mode is monitored to change, the changed first address book data is stored in the preset cache partition;
the updating of the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition includes:
and updating second address book data corresponding to the second mode according to the changed first address book data stored in the preset cache partition.
Optionally, in the method, when it is monitored that the first address book data corresponding to the first mode changes, the changed first address book data is stored in a preset cache partition, where the method includes:
when the first address book data corresponding to the first mode is monitored to change, the changed first address book data is stored in the preset cache partition, and a zone bit is added to the changed first address book data.
Optionally, in the method described above, the updating, according to the changed first address book data stored in the preset cache partition, second address book data corresponding to the second mode includes:
and reading the zone bit of the changed first address book data stored in the preset cache partition, and updating second address book data corresponding to the second mode according to the zone bit.
Optionally, in the method as described above, the updating, according to the flag bit, the second communication record data corresponding to the second mode includes:
when the flag bit of the changed first address book data in the preset cache partition is a deletion flag bit, deleting the changed first address book data from a second address book corresponding to the second mode;
when the flag bit of the changed first address book data in the preset cache partition is an added flag bit, adding the changed first address book data to a second address book corresponding to the second mode;
and when the flag bit of the changed first address book data in the preset cache partition is a modification flag bit, updating the changed first address book data to corresponding data of a second address book corresponding to the second mode.
The present application also provides a data processing apparatus, including:
the storage module is used for storing the first address book data corresponding to the first mode to a preset cache partition;
and the updating module is used for updating second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition.
Optionally, in the apparatus as described above, the storage module is specifically configured to store a part of or all of the first address book data corresponding to the first mode in the preset cache partition;
and the updating module is used for adding all the first address book data stored in the preset cache partition to the second address book corresponding to the second mode.
Optionally, in the above apparatus, the storage module is specifically configured to store the changed first address book data to the preset cache partition when it is monitored that the first address book data corresponding to the first mode changes;
the updating module is specifically configured to update second address book data corresponding to the second mode according to the changed first address book data in the preset cache partition.
Optionally, in the apparatus described above, the update module is specifically configured to, when it is monitored that the first address book data corresponding to the first mode changes, store the changed first address book data in the preset cache partition, and add a flag bit to the changed first address book data.
The application provides a data processing method and device, and the first address book data corresponding to a first mode are stored in a preset cache partition, and second address book data corresponding to a second mode are updated according to the first address book data stored in the preset cache partition, so that address book data synchronization among different modes is realized, and user experience is improved.
Drawings
Fig. 1 is a first flowchart of a data processing method provided in the present application;
fig. 2 is a second flowchart of a data processing method provided in the present application;
fig. 3 is a flow chart of a data processing method provided in the present application;
fig. 4 is a fourth flowchart of a data processing method provided in the present application;
fig. 5 is a fifth flowchart of a data processing method provided in the present application;
fig. 6 is a sixth flowchart of a data processing method provided in the present application;
fig. 7 is a seventh flowchart of a data processing method provided in the present application;
FIG. 8 is a schematic structural diagram of a data processing apparatus provided in the present application;
fig. 9 is a schematic structural diagram of a mobile terminal provided in the present application.
Detailed Description
The data processing method, the data processing device and the mobile terminal are applicable to mobile terminals with various different working modes. For example, in a mobile terminal integrated with office technology, the plurality of different operating modes may include, for example: a personal mode and an office mode. In the personal mode, a user can use the mobile terminal daily, such as WeChat, webpage browsing and the like; in the office mode, only the APPlication (APP for short) related to work can be used, and in the office mode, the terminal cannot directly access data in the personal mode, cannot be connected with an external network, and can only be connected with a work intranet (such as a police intranet) for working, so that data confidentiality among different work modes is ensured.
The data processing method of the present application is explained below with reference to a plurality of examples.
Fig. 1 is a first flowchart of a data processing method provided in the present application. The data processing method may be implemented by a data processing apparatus, which may be integrated in the mobile terminal by means of software and/or hardware. As shown in fig. 1, the method may include:
s101, storing the first address book data corresponding to the first mode to a preset cache partition.
In a mobile terminal having a plurality of operation modes, each operation mode may have an address book, in which address book data in the operation mode is stored. The first mode may be any of a plurality of operating modes. The first address book data corresponding to the first mode may be address book data stored in the first address book corresponding to the first mode. Taking a mobile terminal for integrated mobile office as an example, the first mode may be, for example, a personal mode or an office mode.
The predetermined cache partition may be located in a memory of the mobile terminal, such as a cache memory (cache). The preset cache partition may also be referred to as a preset cache partition. The preset cache partition may be a public storage area in the mobile terminal in different modes, and the preset cache partition may be accessible to the processor of the mobile terminal in different modes.
For each mode, there may be one data table (table) in the preset cache partition. Taking two modes as an example, the preset cache partition may include: and two data tables, wherein the data table corresponding to the first mode can be represented as table1, and the data table corresponding to the second mode can be represented as table 2.
Therefore, for the first address book data corresponding to the first mode, the method can store the first address book data corresponding to the first mode into the data table corresponding to the first mode in the preset cache partition.
In the S101, in the first mode, first address book data corresponding to the first mode may be acquired from the first address book corresponding to the first mode, and the first address book data corresponding to the first mode is stored in a preset cache partition, so that caching of the first address book data corresponding to the first mode is realized.
It should be noted that, in the method, part or all of the first address book data corresponding to the first mode may be stored in the preset cache partition.
For example, for the first synchronization of the address book data, all or part of the first address book data corresponding to the first mode may be stored in the preset cache partition; for the non-initial synchronization of the address book data, such as the synchronization after the update operation, the changed first address book data in the first address book corresponding to the first mode, such as the updated part of the first address book data, may be stored in the preset cache partition.
And S102, updating second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition.
The second mode may be a different mode in the mobile terminal than the first mode. For example, if the first mode is the personal mode, the second mode is the office mode; if the first mode is an office mode, the second mode may be a personal mode.
The S102 may update the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition when the first mode is switched to the second mode. The mode switching of the mobile terminal can be switched to another mode after receiving a mode switching instruction, or automatically switched to another mode after the working time of one mode is greater than or equal to the preset time length.
The second address book data corresponding to the second mode can be stored in the second address book corresponding to the second mode. By executing S102, second address book data corresponding to the second mode can be updated according to the first address book data corresponding to the first mode stored in the preset cache partition, so that the second address book corresponding to the second mode stores both the second address book data corresponding to the second mode and the first address book data corresponding to the first mode, thereby realizing synchronization of the address book data between the first mode and the second mode.
According to the data processing method, the first address book data corresponding to the first mode can be stored to the preset cache partition, the second address book data corresponding to the second mode can be updated according to the address book data stored in the preset cache partition, synchronization of the address book data among different modes is achieved on the basis that data isolation exists among different modes, the use of the address book data among different modes is facilitated on the basis that data security among the modes is guaranteed, and user experience is improved.
On the basis of the method, the application also provides a data processing method in the scene of first synchronization of the address book data. Fig. 2 is a second flowchart of a data processing method provided in the present application. As shown in fig. 2, in the method shown in fig. 1, the step of storing the first address book data corresponding to the first mode in the preset cache partition in S101 may include:
s201, storing a part or all of the first address book data corresponding to the first mode to the preset cache partition.
The part of the first address book data corresponding to the first mode may include, for example: in the address book data corresponding to the first mode, the address book data with the use frequency greater than or equal to the preset threshold value or the address book data meeting the preset rule are used.
As shown above, in S102, updating the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition may include:
s202, add all the first address book data stored in the preset cache partition to the second address book corresponding to the second mode.
For the first synchronization scenario of the address book data, the second address book corresponding to the second mode only includes the second address book data corresponding to the second mode, but does not include the first address book data corresponding to the first mode.
For the first synchronization of the address book data, the first address book data corresponding to the first mode can be cached in the following various ways. Fig. 3 is a flowchart of a data processing method provided in the present application. In an implementation manner, in the method as described above, before storing part or all of the first address book database corresponding to the first mode in the preset cache partition in S201, the method may further include:
s301, judging whether the number of all the first address book data corresponding to the first mode is larger than or equal to a preset threshold value.
In this embodiment, the synchronization status identifier of the preset cache partition may be determined first, and if the synchronization status identifier of the preset cache partition is an empty identifier, the number of all the first address book data corresponding to the first mode is determined, and then, by comparing the number of all the first address book data corresponding to the first mode with the preset threshold, whether the number of all the first address book data corresponding to the first mode is greater than or equal to the preset threshold is determined.
As described above, the storing of the part or all of the first address book database corresponding to the first mode in the preset cache partition in S201 may include:
s302, if the number of all the first address book data corresponding to the first mode is greater than or equal to a preset threshold, storing a part or all of the first address book data corresponding to the first mode to the preset cache partition.
When the number of all the first address book data corresponding to the first mode is greater than or equal to the preset threshold, part or all of the first address book data corresponding to the first mode may be stored to the preset cache partition, such as table1 in the preset cache partition, one by one. The preset threshold may be, for example, a preset integer value, such as 10.
In another implementation manner, in the above method, the storing, in S201, part or all of the first address book data corresponding to the first mode in the preset cache partition may include:
s303, if the number of all the first address book data corresponding to the first mode is smaller than the preset threshold, determining whether there is a batch increase in the first address book data corresponding to the first mode within a preset time period.
S304, if there is a batch increase in the first address book data corresponding to the first mode within the preset time period, storing part or all of the first address book data corresponding to the first mode in the preset cache partition.
In this embodiment, when the number of all the first address book data corresponding to the first mode is smaller than the preset threshold, the first address book corresponding to the first mode may be monitored within a preset time period to determine whether the first address book data corresponding to the first mode increases in batch within the preset time period. If there is a batch increase in the first address book data corresponding to the first mode within the preset time period, after the first address book corresponding to the first mode is updated, part or all of the first address book data corresponding to the first mode may be stored in the preset cache partition, such as table1 in the preset cache partition. The batch increase may be that the number of the added address book data in the first address book corresponding to the first mode is greater than or equal to a preset number.
The embodiment provides multiple implementation modes, the first synchronization of the address book data among different modes can be realized on the basis of data isolation among different modes, the use of the address book data among different modes is facilitated on the basis of ensuring the data security among the modes, and the user experience is improved.
Aiming at the non-primary synchronization of the address book data, the application also provides a data processing method. Fig. 4 is a fourth flowchart of a data processing method provided in the present application. As shown in fig. 4, in the method shown in fig. 1, the step of storing the first address book data corresponding to the first mode in the preset cache partition in S101 may include:
s401, when it is monitored that the first address book data corresponding to the first mode changes, the changed first address book data is stored in the preset cache partition.
After the first synchronization, the method may further monitor an update operation of the first address book corresponding to the first mode to monitor a change of data of the first address book corresponding to the first mode. When detecting that the first address book data corresponding to the first mode changes, only the changed first address book data in the first address book corresponding to the first mode may be stored in the preset cache partition.
For the non-initial synchronization of the address book data, the method may determine the synchronization status identifier of the preset cache partition when receiving an update operation instruction for the first address book corresponding to the first mode. If the synchronization status identifier of the preset cache partition is an empty identifier, updating the first address book data corresponding to the first mode according to the updating operation instruction, so that the first address book data corresponding to the first mode has changed. If the synchronization status identifier of the preset cache partition is a non-empty identifier, the first address book data corresponding to the first mode is updated, so that the changed first address book data is further stored into the preset cache partition one by one on the basis that the changed first address book data exists in the first address book corresponding to the first mode, such as table1 in the preset cache partition.
As shown above, in S102, updating the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition may include:
s402, updating the second address book data corresponding to the second mode according to the changed first address book data stored in the preset cache partition.
The update operation corresponding to the first address book in the first mode may include a plurality of different types of update operations, so that the changed first address book data has a plurality of change types. And updating the second address book data corresponding to the second mode in a corresponding mode aiming at the first address book data with different change types.
Optionally, as shown above, when it is monitored that the first address book data corresponding to the first mode changes in S401, storing the changed first address book data in the preset cache partition may include:
when detecting and monitoring that the first address book data corresponding to the first mode changes, storing the changed first address book data to the preset cache partition, and adding a flag bit to the changed first address book data.
The flag bit can be used to indicate the changed type of the changed first address book data.
The flag bit can be a deletion flag bit for identifying deletion of the changed first address book data; the flag bit can also be an adding flag bit for identifying the first address book data added with the change; the flag bit may also be a modification flag bit for identifying the first address book data that modifies the change.
Optionally, as shown above, in S402, updating the second directory data corresponding to the second mode according to the changed first directory data stored in the preset cache partition may include:
and reading the flag bit of the changed first address book data stored in the preset cache partition, and updating second address book data corresponding to the second mode according to the flag bit.
Optionally, in the method shown above, updating the second communication record data corresponding to the second mode according to the flag bit may include:
when the flag bit of the changed first address book data in the preset cache partition is a deletion flag bit, deleting the changed first address book data from the second address book corresponding to the second mode;
when the flag bit of the changed first address book data in the preset cache partition is an added flag bit, adding the changed first address book data to a second address book corresponding to the second mode;
and when the flag bit of the changed first address book data in the preset cache partition is a modification flag bit, updating the changed first address book data to corresponding data of a second address book corresponding to the second mode.
Specifically, for non-initial synchronization of the address book data, when the read flag bit of the changed first address book data in the preset cache partition is a deletion flag bit, it may be determined that the change type of the changed first address book data is deleted, and therefore, the changed first address book data may be deleted from the second address book corresponding to the second mode, so that when the address book data is deleted from the first address book corresponding to the first mode, the corresponding address book data is also deleted from the second address book corresponding to the second mode.
When the read flag bit of the changed first address book data in the preset cache partition is an added flag bit, it is determined that the change type of the changed first address book data is added, and therefore, the changed first address book data can be added to the second address book corresponding to the second mode, so that under the condition that the address book data is added to the first address book corresponding to the first mode, the corresponding address book data is also added to the second address book corresponding to the second mode.
When the read flag bit of the changed first address book data in the preset cache partition is the modification flag bit, the change type of the changed first address book data can be determined to be modified, so that the changed first address book data can be updated to the second address book corresponding to the second mode, that is, the corresponding data in the second address book corresponding to the second mode is modified to the changed first address book data, and under the condition that the address book data in the first address book corresponding to the first mode is modified, the corresponding address book data in the second address book corresponding to the second mode is also modified.
It should be noted that when the read flag bit of the changed first address book data in the preset cache partition is a deletion flag bit or a modification flag bit, Identification (ID) information of the changed first address book is also determined, address book data corresponding to the identification information in the second address book corresponding to the second mode is determined according to the identification information, and then the address book data corresponding to the identification information is deleted or modified.
The embodiment provides multiple implementation modes, non-primary synchronization of address book data among different modes can be realized on the basis of data isolation among different modes, convenience is brought to use of the address book data among different modes on the basis of ensuring data security among the modes, and user experience is improved.
Optionally, on the basis of the method described above, the present application further provides a data processing method. Fig. 5 is a fifth flowchart of a data processing method provided in the present application. As shown in fig. 5, before the method updates the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition in the method S102 shown in fig. 1, the method may further include:
s501, if the synchronization status identifier of the preset cache partition is the synchronization preparation identifier or the synchronization incomplete identifier, determining a status of each piece of first address book data stored in the preset cache partition.
The synchronization status flag may be a null flag, a synchronization preparation flag, a synchronization incomplete flag, or a synchronization complete flag. The empty identifier may be used to indicate that address book data is not stored in the preset cache partition. The synchronization preparation flag may be used to indicate that the stored address book data is ready in the preset cache partition, that is, the first address book data is stored in the preset cache partition. The synchronization incomplete identifier may be used to indicate that, in the preset cache partition, a part of the stored first address book data has been updated to the second address book corresponding to the second mode, and another part of the first address book data has not been updated to the second address book corresponding to the second mode. The synchronization completion flag may be used to indicate that all the stored first address book data in the preset cache partition has been updated to the second address book corresponding to the second mode.
The Null flag may be denoted as Null, the synchronization preparation flag may be denoted as Ready, the synchronization incomplete flag may be denoted as unfinished, and the synchronization complete flag may be denoted as finish.
In the step S501, a state flag corresponding to each piece of first address book data stored in the preset cache partition may be determined, and a state of each piece of first address book data is determined. The status flag corresponding to each first address book data may be located in a predetermined field, such as an extension field, in the predetermined cache partition. The status of each first address book data can be used to indicate whether each first address book data is updated to the second address book corresponding to the second mode.
The status of each first address book data may be a non-sent status or a sent status.
The unsent state can be used to indicate that each piece of first address book data has not been updated from the preset cache partition to the second address book corresponding to the second mode; the sent status may be used to indicate that each piece of the first address book data has been updated from the predetermined cache partition to the second address book corresponding to the second mode. The unsent state may be denoted as unsent and the sent state may be denoted as send.
Correspondingly, as shown above, in S102, updating the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition may include:
s502, updating the second address book data corresponding to the second mode according to the first address book data corresponding to the unsent status stored in the preset cache partition.
Therefore, in the method, the second address book data corresponding to the second mode can be updated according to the first address book data corresponding to the unsent state stored in the preset cache partition, so that the first address book data corresponding to the unsent state is updated to the second address book corresponding to the second mode. The first address book data corresponding to the sent state indicates that the first address book data corresponding to the sent state is updated to the second address book corresponding to the second mode, so that the method does not need to process the first address book data corresponding to the sent state.
The sent state can be used for indicating that each piece of first address book data is updated from the preset cache partition to the second address book corresponding to the second mode, so that the method can update the state of the first address book data corresponding to the unsent state in the preset cache partition from the unsent state to the sent state after the second address book data corresponding to the second mode is updated according to the first address book data corresponding to the unsent state.
Optionally, on the basis of the method shown in fig. 5, the method may further include:
s503, if all the first address book data corresponding to the unsent state in the preset cache partition is updated to the second address book corresponding to the second mode, setting the synchronization status identifier of the preset cache partition as the synchronization completion identifier.
When all the first address book data corresponding to the unsent state in the preset cache partition is updated to the second address book corresponding to the second mode, it can be determined that the stored first address book data in the preset cache partition is updated, and therefore, in order to accurately identify the synchronization state of the preset cache partition, the synchronization state identification of the preset cache partition needs to be set as the synchronization completion identification.
And S504, deleting the first address book data stored in the preset cache partition.
In order to ensure reasonable utilization of the cache resources, the method can also delete the first address book data stored in the preset cache partition after the first address book data corresponding to all the unsent states are updated to the second address book corresponding to the second mode.
It should be noted that, whether the address book data is first synchronized or not, the method shown in fig. 5 may be used to process the address book data, so as to implement the address book data synchronization.
The data processing method provided in this embodiment can update, according to the synchronization status identifier of the preset cache partition and the status of each piece of first address book data, the first address book data corresponding to the unsent status in the preset cache partition to the second address book corresponding to the second mode when the synchronization status identifier of the preset cache partition is the synchronization preparation identifier or the synchronization unfinished identifier, which ensures that the first address book data stored in the preset cache partition is accurately updated to the second address book corresponding to the second mode, avoids repeated storage of data, and ensures the synchronization efficiency of data to the second address book corresponding to the second mode. Meanwhile, after the first address book data corresponding to all unsent states are updated in the second address book database, the first address book data stored in the preset cache partition are deleted, and reasonable utilization of cache resources can be guaranteed.
The application also provides a data processing method. The method can explain the first synchronization of the address book data through a specific example. Fig. 6 is a sixth flowchart of a data processing method provided in the present application. As shown in fig. 6, the method may include the following:
s601, in the first mode, determining a synchronization state identifier of a preset cache partition.
The first mode may be, for example, a personal mode.
S602, if the synchronization status flag is an empty flag in the first mode, determining whether the number of all the first address book data corresponding to the first mode is greater than or equal to a preset threshold.
The first mode is a personal mode, and the first address book can be an address book of the personal mode.
S603, if the number of all the first address book data corresponding to the first mode is greater than or equal to a preset threshold, storing all the first address book data corresponding to the first mode in the data table1 in the preset cache partition.
In the data table1, each piece of stored first address book data may have a status flag bit, which is used to record the sending status of each piece of first address book data stored in the preset cache partition.
S604, if the number of all the first communication data corresponding to the first mode is smaller than a preset threshold, determining whether the first address book data corresponding to the first mode is increased in batch within a preset time period.
S605, if there is a batch increase in the first address book data corresponding to the first mode within the preset time period, storing all the first address book data corresponding to the first mode into the data table1 in the preset cache partition.
S606, setting the state of each piece of first address book data stored in the data table1 of the preset cache partition as an unsent state, and setting the synchronization state identifier of the preset cache partition as a synchronization preparation identifier.
In the method, the state flag bit of each piece of first address book data stored in the preset cache partition may be set to a value corresponding to an unsent state, so that the state of each piece of first address book data is set to an unsent state.
S607, if the synchronization status flag is the synchronization preparation flag in the first mode, determining whether the first address book data corresponding to the first mode is stored in the data table1 of the preset cache partition.
S608, if the first address book data corresponding to the first mode is stored in the data table1 of the preset cache partition, determining whether the first address book data corresponding to the sending state is stored in the data table1 of the preset cache partition.
And S609, if the first address book data corresponding to the sending state is stored in the data table1 of the preset cache partition, setting the synchronization state identifier of the preset cache partition as a synchronization incomplete identifier.
If the first address book data corresponding to the sending state is stored in the data table1 of the preset cache partition, it can be determined that the address book data is not updated and completed when the previous mode is switched to the second mode, and therefore the synchronization state identifier of the preset cache partition can be set as the synchronization incomplete identifier.
S610, when the first mode is switched to the second mode, the synchronization state identifier of the preset cache partition is determined.
The first mode is an office mode, and the first address book corresponding to the first mode can be an address book corresponding to the office mode.
S611, if the synchronization status flag of the preset cache partition is the synchronization preparation flag or the synchronization incomplete flag in the second mode, adding the first address book data corresponding to the unsent status stored in the data table1 of the preset cache partition to the second address book corresponding to the second mode.
In the method, the first address book data corresponding to the stored unsent state in the data table1 of the preset cache partition can be added to the second address book corresponding to the second mode one by one, and the state of the first address book data in the data table1 of the preset cache partition can be set to be the sent state every time one first address book data is stored.
S612, when all the stored first address book data corresponding to the unsent state in the data table1 of the preset cache partition is added to the second address book corresponding to the second mode, setting the synchronization state identifier of the preset cache partition as a synchronization completion identifier, and deleting the first address book data stored in the data table1 of the preset cache partition.
The data processing method can store the first address book data corresponding to the first mode to the preset cache partition in the first mode, and when the first mode is switched to the second mode, all the first address book data stored in the preset cache partition are added to the second address book corresponding to the second mode, so that the address book data of the first mode are synchronized in the second mode. And under the condition that the synchronization state identifier of the preset cache partition is a synchronization preparation identifier or a synchronization unfinished identifier, adding the first address book data corresponding to the unsent state stored in the preset cache partition to the second address book corresponding to the second mode, ensuring that the first address book data stored in the preset cache partition is accurately added to the second address book corresponding to the second mode, avoiding repeated storage of data and ensuring the synchronization efficiency of the data to the second address book corresponding to the second mode. Meanwhile, after all the first address book data corresponding to the unsent state are added to the second address book corresponding to the second mode, the first address book data stored in the preset cache partition is deleted, and reasonable utilization of cache resources can be guaranteed.
The application also provides a data processing method. The method can explain the non-first synchronization of the address book data, namely the updated synchronization, through a specific example. Fig. 7 is a seventh flowchart of a data processing method provided in the present application. As shown in fig. 7, the method may include the following:
s701, in the first mode, after receiving an update operation instruction for the first address book corresponding to the first mode, determining a synchronization state identifier of a preset cache partition.
S702, if the synchronization status flag is empty in the first mode, updating, according to the update operation instruction, first address book data corresponding to the update operation instruction in the first address book corresponding to the first mode, so that the first address book data corresponding to the first mode changes.
S703, if the synchronization status indicates a synchronization ready identifier or a synchronization incomplete identifier in the first mode, updating, according to the update operation instruction, first address book data corresponding to the update operation instruction in the first address book corresponding to the first mode, so that the first address book data corresponding to the first mode changes.
S704, storing the changed first address book data to the data table1 of the preset cache partition, and adding a flag bit to the changed first address book data.
For each piece of changed first address book data stored in the data table1, a status flag bit may be added to record the sending status of each piece of changed first address book data stored in the preset cache partition. And adding a change type zone bit for each piece of changed first address book data, wherein the change type zone bit is used for recording the change type corresponding to each piece of changed first address book data stored in the preset cache partition.
S705, when the first mode is switched to the second mode, determining whether the data table1 corresponding to the first mode exists in the preset cache partition.
It should be noted that, before determining whether the data table1 corresponding to the first mode exists in the preset cache partition in S705, the synchronization status identifier of the preset cache partition is determined under the condition that the first mode needs to be switched to the second mode; if the synchronization status flag is the synchronization ready flag or the synchronization incomplete flag, the operation in S705 is executed to determine whether the data table1 corresponding to the first mode exists in the preset cache partition.
S706, if the data table1 corresponding to the first mode exists in the preset cache partition, reading the flag bit of the changed first address book data stored in the data table 1.
S707, if the changed flag bit of the changed first address book data corresponding to the non-sending state stored in the data table1 is the adding flag bit, adding the changed first address book data to the second address book corresponding to the second mode.
S708, if the flag bit of the changed first address book data corresponding to the stored unsent state in the data table1 is the deletion flag bit, deleting the changed first address book data from the second address book corresponding to the second mode.
S709, if the flag bit of the changed first address book data corresponding to the unsent state stored in the data table1 is the modified flag bit, updating the changed first address book data to the corresponding data of the second address book corresponding to the second mode.
S710, when all the changed first address book data corresponding to the unsent state in the data table1 of the preset cache partition is updated to the second address book corresponding to the second mode, setting the synchronization state identifier of the preset cache partition as a synchronization completion identifier, and deleting the changed first address book data stored in the data table1 of the preset cache partition.
The data processing method can store changed first address book data in first address book data corresponding to a first mode to the preset cache partition in the first mode, and update and store the changed first address book data stored in the preset cache partition to a second address book corresponding to a second mode when the first address book data is switched to the second mode, so that the corresponding address book data is synchronized in the second address book corresponding to the second mode after the first address book data corresponding to the first mode is changed. Meanwhile, after all the changed first address book data corresponding to the unsent state are updated to the second address book corresponding to the second mode, the changed first address book data stored in the preset cache partition is deleted, and reasonable utilization of cache resources can be further ensured.
The following embodiments of the present application describe a data processing apparatus and a mobile terminal that execute the data processing method shown in any one of fig. 1 to 6.
Fig. 8 is a schematic structural diagram of a data processing apparatus provided in the present application. The data processing apparatus may be integrated in the mobile terminal by means of software and/or hardware to perform the data processing method shown in any one of fig. 1 to 6. The data processing apparatus 800 may include:
the storage module 801 is configured to store the first address book data corresponding to the first mode in the preset cache partition.
The updating module 802 is configured to update the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition.
Optionally, the storage module 801 is specifically configured to store a part or all of the first address book data corresponding to the first mode to the preset cache partition.
The updating module 802 is specifically configured to add all the first address book data stored in the preset cache partition to the second address book corresponding to the second mode.
Optionally, the storage module 801 is specifically configured to, when it is detected that the first address book data corresponding to the first mode changes, store the changed first address book data into the preset cache partition.
The updating module 802 is specifically configured to update the second address book data corresponding to the second mode according to the changed first address book data stored in the preset cache partition.
Optionally, the storage module 801 is specifically configured to, when it is detected that the first address book data corresponding to the first mode changes, store the changed first address book data to the preset cache partition, and add a flag bit to the changed first address book data.
Optionally, the updating module 802 is specifically configured to read a flag bit of the changed first address book data stored in the preset cache partition, and update the second address book data corresponding to the second mode according to the flag bit.
Optionally, the updating module 802 is specifically configured to delete the changed first address book data from the second address book corresponding to the second mode when the flag bit of the changed first address book data in the preset cache partition is a deletion flag bit; or when the flag bit of the changed first address book data in the preset cache partition is an added flag bit, adding the changed first address book data to a second address book corresponding to the second mode; or when the flag bit of the changed first address book data in the preset cache partition is the modification flag bit, updating the changed first address book data to corresponding data of the second address book corresponding to the second mode.
Each data processing apparatus provided in the present application may execute the data processing method shown in any one of fig. 1 to fig. 6, and specific implementation processes and beneficial effects thereof are referred to above, and are not described herein again.
The application also provides a mobile terminal. Fig. 9 is a schematic structural diagram of a mobile terminal provided in the present application. The mobile terminal may perform the data processing method shown in any one of fig. 1 to 6. The mobile terminal 900 may include: a processor 901 and a memory 902; the processor 901 is connected to the memory 902.
A memory 902 for storing program instructions.
A processor 901, configured to call the program instruction to execute the data processing method shown in any one of fig. 1 to 6.
The mobile terminal provided in the present application may execute the data processing method shown in any one of fig. 1 to fig. 6, and the specific implementation process and beneficial effects thereof are referred to above, and are not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (5)

1. A data processing method, comprising:
storing first address book data corresponding to the first mode to a preset cache partition;
updating second address book data corresponding to a second mode according to the first address book data stored in the preset cache partition;
wherein the first mode and the second mode are isolated from each other; the first mode is a personal mode, and the second mode is an office mode, or the first mode is an office mode and the second mode is a personal mode;
the storing the first address book data corresponding to the first mode to the preset cache partition includes:
when the first address book data corresponding to the first mode is monitored to change, storing the changed first address book data to the preset cache partition, and adding a zone bit to the changed first address book data;
the updating of the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition includes:
and reading the zone bit of the changed first address book data stored in the preset cache partition, and updating second address book data corresponding to the second mode according to the zone bit.
2. The method according to claim 1, wherein the storing the first address book data corresponding to the first mode into a preset cache partition comprises:
storing part or all of first address book data corresponding to the first mode to the preset cache partition;
the updating of the second address book data corresponding to the second mode according to the first address book data stored in the preset cache partition includes:
and adding all the first address book data stored in the preset cache partition to a second address book corresponding to the second mode.
3. The method according to claim 1, wherein the updating the second directory data corresponding to the second mode according to the flag bit comprises:
when the flag bit of the changed first address book data in the preset cache partition is a deletion flag bit, deleting the changed first address book data from a second address book corresponding to the second mode;
when the flag bit of the changed first address book data in the preset cache partition is an added flag bit, adding the changed first address book data to a second address book corresponding to the second mode;
and when the flag bit of the changed first address book data in the preset cache partition is a modification flag bit, updating the changed first address book data to corresponding data of a second address book corresponding to the second mode.
4. A data processing apparatus, comprising:
the storage module is used for storing the first address book data corresponding to the first mode to a preset cache partition;
the updating module is used for updating second address book data corresponding to a second mode according to the first address book data stored in the preset cache partition;
wherein the first mode and the second mode are isolated from each other; the first mode is a personal mode, and the second mode is an office mode, or the first mode is an office mode and the second mode is a personal mode;
the storage module is specifically configured to, when it is monitored that first address book data corresponding to the first mode changes, store the changed first address book data to the preset cache partition, and add a flag bit to the changed first address book data;
the updating module is specifically configured to read a flag bit of the changed first address book data stored in the preset cache partition, and update second address book data corresponding to the second mode according to the flag bit.
5. The apparatus of claim 4,
the storage module is specifically configured to store a part or all of the first address book data corresponding to the first mode to the preset cache partition;
and the updating module is specifically configured to add all the first address book data stored in the preset cache partition to the second address book corresponding to the second mode.
CN201710681229.XA 2017-08-10 2017-08-10 Data processing method and device Active CN107547683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710681229.XA CN107547683B (en) 2017-08-10 2017-08-10 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710681229.XA CN107547683B (en) 2017-08-10 2017-08-10 Data processing method and device

Publications (2)

Publication Number Publication Date
CN107547683A CN107547683A (en) 2018-01-05
CN107547683B true CN107547683B (en) 2021-04-30

Family

ID=60970243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710681229.XA Active CN107547683B (en) 2017-08-10 2017-08-10 Data processing method and device

Country Status (1)

Country Link
CN (1) CN107547683B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989989A (en) * 2010-11-17 2011-03-23 中兴通讯股份有限公司 Method and system for synchronizing data of enterprise address book and personal address book
CN102469144A (en) * 2010-11-19 2012-05-23 中国电信股份有限公司 Method and system for realizing multisystem address-book data fusion
CN103944930A (en) * 2013-01-20 2014-07-23 上海博路信息技术有限公司 SNS address book
CN105812469A (en) * 2016-03-18 2016-07-27 周奇 Address book synchronization method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9449064B2 (en) * 2014-05-03 2016-09-20 Pinplanet Corporation System and method for dynamic and secure communication and synchronization of personal data records

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989989A (en) * 2010-11-17 2011-03-23 中兴通讯股份有限公司 Method and system for synchronizing data of enterprise address book and personal address book
CN102469144A (en) * 2010-11-19 2012-05-23 中国电信股份有限公司 Method and system for realizing multisystem address-book data fusion
CN103944930A (en) * 2013-01-20 2014-07-23 上海博路信息技术有限公司 SNS address book
CN105812469A (en) * 2016-03-18 2016-07-27 周奇 Address book synchronization method and device

Also Published As

Publication number Publication date
CN107547683A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN106171019B (en) Method, device, terminal and server for determining terminal roaming state
EP2965553A1 (en) Method and apparatus for multisim devices with embedded sim functionality
CN112052374B (en) A page display method a device(s) computer device and storage medium
EP3544344A1 (en) Operation mode switching method and user equipment
CN108509788B (en) Information sharing method and device, computer readable storage medium and terminal
WO2015010593A1 (en) Method and apparatus for displaying contact list
CN104735657A (en) Security terminal verification method, device and system and wireless access point binding method
WO2020139543A1 (en) 5g service compatible 4g sim
CN108781189B (en) A load balancing method and related equipment
CN107181624A (en) A kind of method for connecting network, electronic equipment and computer-readable storage medium
CN107547683B (en) Data processing method and device
CN107465538B (en) Internet of things terminal migration method and gateway
US20230300099A1 (en) Message communication method and storage medium storing program
CN103795845A (en) Historical interface access method, historical interface access device and mobile terminal
WO2023185810A1 (en) Ue route selection policy (ursp) determination method, user equipment, and network-side device
JP6937351B2 (en) Information provision system
CN116341508A (en) Dynamic configuration method and device for message template, computer equipment and storage medium
EP3592016A1 (en) Method and apparatus for selecting core network device
CN117479113A (en) Interactive methods, devices, equipment and storage media
CN110557750B (en) Information transmission method, gateway device, core network device and storage medium
CN107622076A (en) The data searching method and device of a kind of group member
CN110659309A (en) In-memory database communication method, device, server and storage medium
CN112307015B (en) Data updating method and related device
US12133147B2 (en) Message transfer apparatus and method, and computer-readable medium
KR101596588B1 (en) Method for moving data between terminals and apparatus for the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder