CN115982192A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115982192A
CN115982192A CN202310061086.8A CN202310061086A CN115982192A CN 115982192 A CN115982192 A CN 115982192A CN 202310061086 A CN202310061086 A CN 202310061086A CN 115982192 A CN115982192 A CN 115982192A
Authority
CN
China
Prior art keywords
data
data set
commonly
held
local terminal
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.)
Pending
Application number
CN202310061086.8A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202310061086.8A priority Critical patent/CN115982192A/en
Publication of CN115982192A publication Critical patent/CN115982192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a data processing method, a data processing device, electronic equipment and a storage medium, and relates to the technical field of data processing, wherein the method comprises the following steps: detecting that the data of the local terminal is changed; judging whether the changed data meet preset conditions or not according to the change; and if so, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal. The data set is divided into the commonly held data set and the non-commonly held data set, so that when the data set is updated, part of data of the local terminal is preferentially processed, all data of the local terminal only needs to be processed under individual conditions, and the efficiency of data processing is greatly improved while timely and synchronous updating of the data of the local terminal is ensured.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for data processing, an electronic device, and a storage medium.
Background
At present, in order to ensure the synchronization of data of two parties in business cooperation, after a data set of one party is changed, the data stored in a local terminal needs to be updated in time, and the data of the other party also needs to be updated in time, the data change time of one party is uncontrollable, so the data change time of the two parties is difficult to align, in the process, the data of the two parties needs to be updated in real time based on a privacy request mode, so that the synchronization of the data of the two parties can be ensured under the condition of ensuring the data privacy.
In the privacy committing process, each piece of data to be compared needs to be processed by the keys of both parties respectively, and after the processing is finished by the keys of both parties respectively, the comparison operation can be performed on the data. In the prior art, both data are stored in only one data set, and the data set usually has a large data size, so when one data set is changed, all the changed data need to be compared with all the data in the other data set, and obviously, the comparison takes much time. The privacy delivery process consumes much time, and any party cannot update data in time.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, an apparatus, an electronic device, and a storage medium, so as to improve data processing efficiency and implement timely update of a data set. The specific technical scheme is as follows:
according to a first aspect of the embodiments of the present invention, there is provided a data processing method, which is applied to one end of data synchronization where a data set is changed, and a data set stored at a local end includes a commonly-held data set and a non-commonly-held data set, the method including:
detecting that the data of the local terminal is changed;
judging whether the changed data meets a preset condition or not according to the change;
and if so, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal.
In one possible embodiment, the change is an add operation;
when the change adding operation is performed, the determining whether the changed data meets a preset condition includes:
judging whether the added first data meet a first preset condition, wherein the first preset condition is that the first data exist in a non-commonly held data set of a local terminal; or the first data does not exist in the co-holding data set and the non-co-holding data set of the local terminal;
when the first preset condition is met, the step of updating the data in the commonly-held data set and/or the non-commonly-held data set of the local end comprises the following steps:
sending a comparison request of first data to an opposite terminal; the comparison request is used for enabling the opposite terminal to compare the first data with each data in the data set stored by the opposite terminal to obtain result information;
and updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal in response to the result information sent by the opposite terminal.
In a possible implementation manner, the result information is that the first data is data held by both ends;
if the first data exists in the non-commonly-held data set of the local end, the updating the data in the commonly-held data set and/or the non-commonly-held data set of the local end includes:
adding the first data into a common holding data set of the local terminal, deleting the first data from a non-common holding data set of the local terminal, and obtaining an updated data set;
if the first data does not exist in the commonly-held data set and the non-commonly-held data set of the local terminal, the updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal includes:
adding the first data into a commonly held data set of a local terminal to obtain an updated data set;
the result information is that the first data is not data held by both ends together;
if the first data does not exist in the commonly-held data set and the non-commonly-held data set of the local terminal, the updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal includes:
and adding the first data into the non-commonly held data set of the local terminal to obtain an updated data set.
In one possible implementation, the change is a delete operation;
when the change deletion operation is performed, the determining whether the changed data meets a preset condition includes:
judging whether the deleted second data meet a second preset condition, wherein the second preset condition is that the second data exist in a commonly-held data set of a local terminal; or the second data exists in a non-commonly held data set of the local end;
when the second preset condition is met, the step of updating the data in the commonly-held data set and/or the non-commonly-held data set of the local end comprises the following steps:
if the second data exists in the co-holding data set of the local terminal, directly deleting the second data from the co-holding data set of the local terminal to obtain an updated data set;
and if the second data exists in the non-commonly-held data set of the local terminal, directly deleting the second data from the non-commonly-held data set of the local terminal to obtain an updated data set.
In a possible implementation manner, when the second preset condition is met, before the step of updating the data in the co-owned data set and/or the non-co-owned data set of the local end, the method further includes:
sending a comparison request of second data to the opposite terminal;
and after receiving result information sent by the opposite end, executing the step of updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
According to a second aspect of the embodiments of the present invention, there is provided a data processing method, applied to one of two ends of data synchronization, at which a comparison request is received, and a data set stored by a local end includes a commonly-held data set and a non-commonly-held data set, the method including:
receiving a comparison request, identifying a change operation and change data indicated in the comparison request;
comparing the changed data with a data set stored at the local terminal to obtain result information;
when the result information indicates that the data are the data commonly held by the two ends, updating the data in the commonly held data set and/or the non-commonly held data set of the local end;
and feeding back the result information to the end sending the comparison request.
In a possible implementation, the change operation is an add operation, and the changed data is first data;
the comparing the change data with the data set stored at the local end comprises: comparing the first data with data in a non-commonly-held data set stored by a local terminal;
the updating the data in the co-owned data set and/or the non-co-owned data set of the local end comprises:
and adding the first data into the commonly held data set of the local terminal, and deleting the first data from the non-commonly held data set of the local terminal to obtain an updated data set.
In a possible implementation, the change operation is a delete operation, and the change data is second data;
the comparing the change data with the data set stored at the local end comprises: comparing the second data with data in a co-owned data set stored by a local terminal;
the updating the data in the co-owned data set and/or the non-co-owned data set of the local end comprises:
and deleting the second data from the commonly held data set of the local terminal, and adding the second data into the non-commonly held data set of the local terminal to obtain an updated data set.
According to a third aspect of the embodiments of the present invention, there is provided an apparatus for data processing, which is applied to one end of data synchronization where a data set is changed, and a data set stored at a local end includes a commonly-held data set and a non-commonly-held data set, the apparatus including:
the change detection module is used for detecting that the data of the local terminal is changed;
the condition judgment module is used for judging whether the changed data meet preset conditions or not according to the change;
and the data updating module is used for updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal if the data is satisfied.
In a possible implementation manner, the change detection module is specifically configured to detect a data change addition operation of the local end;
the condition judging module comprises:
a first data judgment sub-module, configured to judge whether the added first data meets a first preset condition when the change is an add operation, where the first preset condition is that the first data exists in a non-commonly-held data set at a local end; or the first data does not exist in the co-holding data set and the non-co-holding data set of the local terminal;
the data update module comprises:
the first data comparison request sending submodule is used for sending a comparison request of first data to the opposite terminal when the first preset condition is met; the comparison request is used for enabling the opposite terminal to compare the first data with each data in the data set stored by the opposite terminal to obtain result information;
and the first data updating submodule is used for responding to the result information sent by the opposite terminal and updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal.
In a possible implementation manner, the first data updating sub-module is specifically configured to:
if the first data exists in the non-commonly-held data set of the local terminal and the result information is that the first data is commonly held by two ends, adding the first data into the commonly-held data set of the local terminal, and deleting the first data from the non-commonly-held data set of the local terminal to obtain an updated data set;
if the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information is that the first data is commonly held data at two ends, adding the first data into the commonly held data set of the local terminal to obtain an updated data set;
and if the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information is that the first data is not the data commonly held by the two terminals, adding the first data into the non-commonly held data set of the local terminal to obtain an updated data set.
In a possible implementation manner, the change detection module is specifically configured to detect that a data change of the local end is a deletion operation;
the condition judgment module comprises:
a second data determining submodule, configured to determine whether the deleted second data meets a second preset condition when the change is the deletion operation, where the second preset condition is that the second data exists in a co-owned data set of the local terminal; or the second data exists in a non-commonly held data set of the local end;
the data update module comprises:
the second data updating submodule is used for directly deleting the second data from the commonly held data set of the local end to obtain an updated data set if the second data exists in the commonly held data set of the local end; and if the second data exists in the non-commonly-held data set of the local terminal, directly deleting the second data from the non-commonly-held data set of the local terminal to obtain an updated data set.
In a possible embodiment, the apparatus further comprises:
a second data comparison request sending module, configured to send a comparison request of second data to the peer end before the step of updating data in the commonly-held data set and/or the non-commonly-held data set of the peer end when the second preset condition is met; and after receiving result information sent by the opposite end, executing the step of updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
According to a fourth aspect of the embodiments of the present invention, there is provided an apparatus for data processing, which is applied to one of two ends of data synchronization at which a comparison request is received, and a data set stored at a local end includes a commonly-held data set and a non-commonly-held data set, the apparatus including:
a request receiving module for receiving a comparison request, identifying a change operation and change data indicated in the comparison request;
the data comparison module is used for comparing the changed data with a data set stored at the local terminal to obtain result information;
the data updating module is used for updating data in the commonly held data set and/or the non-commonly held data set of the local terminal when the result information indicates that the data are data commonly held by the two terminals;
and the result information sending module is used for feeding back the result information to the end which sends the comparison request.
In a possible implementation, the change operation is an add operation, and the changed data is first data;
the data comparison module comprises:
the first data comparison sub-module is used for comparing the first data with data in a locally stored non-commonly held data set;
the data update module comprises:
and the first data updating module is used for adding the first data into the commonly held data set of the local terminal and deleting the first data from the non-commonly held data set of the local terminal to obtain an updated data set when the result information shows that the first data is the data commonly held by the two terminals after the first data is compared with the data in the non-commonly held data set stored by the local terminal.
In a possible implementation, the change operation is a delete operation, and the change data is second data;
the data comparison module comprises:
the second data comparison submodule is used for comparing the second data with data in a common holding data set stored at the local terminal;
the data update module comprises:
and the second data updating module is used for deleting the second data from the commonly-held data set of the local terminal and adding the second data into the non-commonly-held data set of the local terminal to obtain an updated data set when the result information shows that the second data is the data commonly held by the two terminals after the second data is compared with the data in the commonly-held data set stored by the local terminal.
According to a fifth aspect of the embodiments of the present invention, there is provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing any of the method steps of the data processing method of the first aspect when executing a program stored in the memory.
According to a sixth aspect of the embodiments of the present invention, there is provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing any of the method steps of the data processing method of the second aspect when executing a program stored in the memory.
According to a seventh aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements any one of the method steps of the data processing method of the first aspect.
According to an eighth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements any one of the method steps of the data processing method of the second aspect.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a data processing method, a data processing device, electronic equipment and a storage medium, wherein the data processing method is applied to one end of two ends of data synchronization, in which data sets are changed, the data sets stored at the local end comprise a commonly-held data set and a non-commonly-held data set, and the method detects that the data at the local end are changed; judging whether the changed data meets a preset condition or not according to the change; and if so, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal. The data set is divided into the commonly held data set and the non-commonly held data set, so that when the data set is updated, part of data of the local terminal is preferentially processed, all data of the local terminal only needs to be processed under individual conditions, and the efficiency of data processing is greatly improved while timely and synchronous updating of the data of the local terminal is ensured.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a first data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a second method for processing data according to an embodiment of the present invention;
FIG. 3 is a flowchart of a third method for processing data according to an embodiment of the present invention;
FIG. 4 is a flowchart of a fourth method for processing data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a first data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second data processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a first electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a second electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In the embodiment of the invention, the two parties needing data synchronization are called two ends, and all data held by each end is called a data set.
In the embodiment of the invention, the data sets held by each end are divided into commonly held data sets and non-commonly held data sets in advance. Intersection data of the held data sets at the two ends are stored in the commonly held data set, and the intersection data are identical data obtained by comparing the held data sets at the two ends; the non-commonly held data sets store non-intersection data of the held data sets at the two ends, and the non-intersection data is non-identical data obtained by comparing the held data sets at the two ends.
The comparison is realized by a privacy intersection method, the privacy intersection method is characterized in that the intersection of data sets held by two parties or multiple parties is solved on the premise of protecting the privacy of multiple parties, and the privacy intersection method does not reveal the content and information except the intersection of any party while solving the intersection. Therefore, in the present invention, the process of "comparing" the data at both ends is substantially a process of comparing the data of both ends without revealing the data of both ends.
Of course, the present invention does not limit the obtaining manner of the commonly held data set and the non-commonly held data set pre-stored at both ends performing data synchronization, and any possible manner may be applied to the present invention. For example, the first generation of the commonly-held data set and the non-commonly-held data set by the home terminal performing data synchronization may be performed by performing privacy intersection on all data in the data set of the home terminal and all data at the other end performing data synchronization to obtain an intersection result set, then taking data belonging to the intersection result set of the home terminal as the commonly-held data set of the home terminal, and taking the remaining other data of the home terminal as the non-commonly-held data set of the home terminal; the other end, which performs data synchronization, generates its commonly-owned data set and non-commonly-owned data set in the same manner. For another example, directly obtained data commonly held by both ends is stored in each end as a commonly held data set, and directly obtained data not commonly held by both ends is stored in each end as a non-commonly held data set, where each end may be various types of terminals, such as a desktop computer, a notebook computer, a smart phone, and the like.
The two ends needing data synchronization can be two parties carrying out service cooperation.
According to a first aspect of the embodiment of the present invention, refer to fig. 1, which is a flowchart of a first method for data processing according to the embodiment of the present invention. The embodiment is applied to one end of data sets that are changed in two ends of data synchronization, where the data sets stored at the end include a commonly-held data set and a non-commonly-held data set, and the method shown in fig. 1 specifically includes:
and S110, detecting that the data of the local terminal is changed.
The data processing method provided by the embodiment of the invention can be executed by a server and a user terminal, and specifically can be executed by a desktop computer, a notebook computer, a smart phone, a smart tablet and the like.
The two ends of the data synchronization can be any two ends needing data synchronization. In one example, the two ends are two parties that collaborate on the service.
The local stored data set stores any data that needs to be synchronized with the other end authentication. In one example, the data set may store local information related to the user, such as a mobile phone number, an identification number, a device ID, and the like of the user.
The change of the data of the local terminal can be adding one or more data, deleting one or more data, or modifying one or more data sets. In fact, the process of "modifying" is a combination of "deleting" + "adding", and modifying one data is to delete one data and add one data, so the present application only describes "adding" and "deleting" in detail, and does not describe "modifying" in detail, which can be regarded as performing the process of "adding" and "deleting" once respectively.
And S120, judging whether the changed data meets the preset conditions or not according to the change.
If the change is adding data, judging whether the added data meets a first preset condition; if the change is deleting the data, judging whether the deleted data meets a second preset condition; if the change is the modification of the data, corresponding to the modification operation, judging whether the deleted data corresponding to the modification operation meets a second preset condition, and judging whether the added data corresponding to the modification operation meets a first preset condition.
And S130, if so, updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal.
In the embodiment of the invention, the data set is divided into the commonly held data set and the non-commonly held data set, so that when the data set is updated, part of data of the local terminal is preferentially processed, and all data of the local terminal only needs to be processed under individual conditions, thereby ensuring timely synchronous updating of the data of the local terminal and greatly improving the efficiency of data processing.
In one possible implementation, referring to fig. 2, when the change in the embodiment shown in fig. 1 is an add operation, step S120 shown in fig. 1 may include:
s1201, when the adding operation is changed, judging whether the added first data meet a first preset condition, wherein the first preset condition is that the first data exist in a non-commonly-held data set of a local terminal; alternatively, the first data does not exist in the co-owned data set and the non-co-owned data set of the local end.
Step S130 shown in fig. 1 may include:
s1301, when a first preset condition is met, a comparison request of first data is sent to an opposite terminal; the comparison request is used for enabling the opposite terminal to compare the first data with each data in the data set stored by the opposite terminal to obtain result information;
s1302, updating the data in the co-owned data set and/or the non-co-owned data set of the local terminal in response to the result information sent by the opposite terminal.
In this embodiment, the change is an add operation, and the change in the data may be an add of the first data. The first data is determined according to the change condition of the actual data of the home terminal, in one example, when the home terminal detects that a bound mobile phone number is newly added to a user, the change means that the mobile phone number to be bound by the user is newly added, and the first data is the mobile phone number newly bound by the user. Of course, in one change, only one item of information may be changed, for example, a newly bound mobile phone number is added, or two or more items of information may be changed, for example, a newly bound mobile phone number and an identity card number are added.
When the first preset condition is: when the first data exists in the non-commonly held data set of the local terminal, it indicates that the first data is data whose data is different from the data compared by the opposite terminal before, and at this time, the data set of the opposite terminal may have been changed, and a comparison request of the first data needs to be sent to the opposite terminal. For example, if the change is to add data a, and it is determined that data a exists in the non-commonly-owned dataset of the local peer, and the data a satisfies the first preset condition, it indicates that data a is data whose data is different from that compared after the comparison between the local peer and the peer, and a comparison request for data a needs to be sent to the peer.
When the first preset condition is: when the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal, the first data is the newly added data, at this time, the first data needs to be compared with the data set of the opposite terminal to judge whether the first data is the data commonly held by the two terminals, and therefore the data set of the local terminal is updated according to the judgment result. For example, if the change is to add data B, and it is determined that data B does not exist in the shared data set and the non-shared data set of the local terminal, indicating that data B is newly added data, it is necessary to send a comparison request for data B to the opposite terminal.
The comparison request in the present invention is actually a privacy request, and the data comparison is performed in a privacy request manner, that is, the data of both parties are compared without revealing the data in the data sets held by both parties.
The result information may be that the first data is data held by both ends, or that the first data is not data held by both ends. When the opposite terminal compares the first data with each data in the data set stored by the opposite terminal, if the compared data are the same, the first data are data held by both terminals; if the comparison data are not the same, namely the comparison data are different, the first data are not the data held by both ends together.
And when the first data exists in the non-commonly-held data set of the local terminal and the result information is that the first data is the data commonly held by the two terminals, updating the data in the commonly-held data set and the non-commonly-held data set of the local terminal.
In addition, when the first data exists in the non-commonly-owned data set of the local terminal and the result information indicates that the first data is not data commonly owned by both terminals, the first data should be added to the non-commonly-owned data set.
And when the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information is that the first data is the data commonly held by the two terminals, updating the data in the commonly held data set of the local terminal.
And when the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information is that the first data is not the data commonly held by the two terminals, updating the data in the non-commonly held data set of the local terminal.
In addition, if the first data does not satisfy the first preset condition, that is, the first data exists in the commonly-held data set of the local terminal, which indicates that the first data is the data whose data are compared to be the same, at this time, it is not necessary to send a comparison request to the opposite terminal, and since the first data already exists in the commonly-held data set, it is also not necessary to add the data to the commonly-held data set.
In the embodiment of the present invention, the local end stores two data sets, that is, a commonly-held data set and a non-commonly-held data set, and only when the first data meets a first preset condition, the comparison request of the first data is sent to the opposite end, that is, only when the first data exists in the non-commonly-held data set of the local end, or does not exist in the commonly-held data set and the non-commonly-held data set of the local end, data comparison is required, instead of performing comparison processing after each data set is changed, so that the number of comparison times is greatly reduced. In the comparison process, all data does not need to be compared every time, so that the single comparison time is greatly shortened, the data processing efficiency is improved, and the data set is updated in time. The invention effectively reduces the time for comparing data and improves the efficiency, thereby meeting the system requirement of real-time intersection. Because the intersection time is greatly saved, the model statistics and the related calculation of the data can be supported in real time, and the timely synchronization of the data at the two ends can be ensured.
In one possible implementation, the result information is that the first data is data held by both ends together;
if the first data exists in the non-commonly-held data set of the local terminal, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal, including:
adding the first data into the commonly held data set of the local terminal, and deleting the first data from the non-commonly held data set of the local terminal to obtain an updated data set;
if the first data does not exist in the commonly-held data set and the non-commonly-held data set of the local terminal, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal, including:
adding the first data into a commonly held data set of the local terminal to obtain an updated data set;
the result information is that the first data is not data which is commonly held by two ends;
if the first data does not exist in the co-owned data set and the non-co-owned data set of the local end, updating the data in the co-owned data set and/or the non-co-owned data set of the local end, including:
and adding the first data into the non-commonly held data set of the local terminal to obtain an updated data set.
In one example, the data a exists in the non-commonly-held data set of the local end, and the result information sent by the opposite end is that the data a is data commonly held by both ends, and in this case, the description data a is data whose data are the same after comparison, so the update operation is: and deleting the data a from the non-commonly-held data set of the local terminal and adding the data a into the commonly-held data set of the local terminal.
In one example, the data b does not exist in the commonly-owned data set and the non-commonly-owned data set of the local terminal, which indicates that the data b is brand-new data compared with the data in the local terminal data set, and when the result information sent by the opposite terminal indicates that the data b is data commonly owned by both terminals, the data b is compared and compared to obtain the same data, so the update operation is: and adding the data b into the commonly held data set of the local terminal.
In one example, the data c does not exist in the commonly held data set and the non-commonly held data set of the local end, the result information sent by the opposite end is that the data c is commonly held by both ends, and the description data c is data with different data compared after comparison, so the updating operation is as follows: and adding the data c into the non-commonly held data set of the local end.
In the embodiment of the invention, the data set of the local terminal is updated in real time based on the first preset condition and the result information which are met by the first data, so that the data set can be updated in time, and the data accuracy of the data set is ensured.
In a possible implementation manner, referring to fig. 3, when the change in the embodiment shown in fig. 1 is a deletion operation, step S120 shown in fig. 1 may include:
s1202, when the deletion operation is changed, judging whether the deleted second data meets a second preset condition, wherein the second preset condition is that the second data exists in a commonly-held data set of the local terminal; alternatively, the second data exists in a non-commonly held dataset of the local end.
Step S130 shown in fig. 1 may include:
s1303, when a second preset condition is met, if second data exists in the commonly-held data set of the local terminal, directly deleting the second data from the commonly-held data set of the local terminal to obtain an updated data set; and if the second data exists in the non-commonly-held data set of the local terminal, directly deleting the second data from the non-commonly-held data set of the local terminal to obtain an updated data set.
In this embodiment, the change is a delete operation, and the change of the data may be a delete of the second data. The second data is determined according to a change condition of the actual data of the home terminal, in one example, when the home terminal detects that a certain user account is logged off, the change means to delete an existing account that the user logs off, and the second data is the existing account that the user wants to log off. Of course, in one change, only one item of information may be changed, for example, the existing mobile phone number may be deleted, or two or more items of information may be changed, for example, the existing mobile phone number and the identification number may be deleted.
In one example, the change is deletion of data C, and if the change is deletion of data, it is determined that the data C is deleted from data already existing at the local end, and it is determined whether the data C exists in the co-owned data set or the non-co-owned data set at the local end; if the data C is judged to exist in the commonly held data set of the local terminal, directly deleting the data C from the commonly held data set of the local terminal; and if the data C is judged to exist in the non-commonly-owned data set of the local terminal, directly deleting the data C from the commonly-owned data set of the local terminal.
In the embodiment of the invention, because the local terminal stores two data sets, namely a commonly-held data set and a non-commonly-held data set, and the second data is deleted from the data set in which the second data exists by judging whether the second data exists in the commonly-held data set or the non-commonly-held data set of the local terminal, the updating operation only updates part of the data sets of the local terminal and ensures the accurate deletion of the second data, thereby ensuring the timely and accurate updating of the data sets of the local terminal.
In a possible implementation manner, when the second preset condition is met, before the step of updating the data in the co-owned data set and/or the non-co-owned data set of the local end, the method may further include: sending a comparison request of second data to the opposite terminal; and after receiving result information sent by the opposite end, executing the step of updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
Whether the result information is that the second data is the data which both ends hold together or the second data is not the data which both ends hold together, the execution of the following steps is not influenced.
In this embodiment, before deleting the second data, by sending a comparison request of the second data to the opposite end, whether the second data is the commonly held data is confirmed again, and then the second data is deleted from the data set, so that robustness in the data updating process is improved.
In addition, if the change is to modify data, the step corresponding to the change to the add operation and the step corresponding to the delete operation are both executed, and in one example, when the home terminal detects that a certain user changes a bound mobile phone number, the "change" includes: and deleting the previously bound mobile phone number and the newly added and changed mobile phone number, wherein the added first data is the mobile phone number newly bound by the user, and the deleted second data is the mobile phone number previously bound by the user, so that the data set stored at the local terminal is updated.
According to a second aspect of the embodiment of the present invention, referring to fig. 4, the embodiment is applied to one of two ends of data synchronization, where the one end receives a comparison request, and the data set stored by the local end includes a commonly-held data set and a non-commonly-held data set.
The method shown in fig. 4 may specifically include:
s410, receiving the comparison request, and identifying the change operation and the change data indicated in the comparison request.
The compare request may come from the side where the data change occurred. The change operation in the request can be a deletion operation, and the change data is defined as first data corresponding to the deletion operation; the change operation in the request may also be a delete operation, and the changed data is defined as second data corresponding to the delete operation, where the first data and the second data are the same data or different data.
And S420, comparing the changed data with the data set stored in the local terminal to obtain result information.
And S430, when the result information indicates that the data are the data commonly held by the two ends, updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
And S440, feeding back result information to the end sending the comparison request.
In the embodiment of the invention, after receiving the comparison request, the changed data is compared with the data set stored at the local terminal of the local terminal, and the result information is obtained and fed back to the opposite terminal (the terminal sending the comparison request), so that the real-time interaction of the information of the two parties is realized, the two parties can update the stored data sets of the two parties according to the result information fed back in real time, and the real-time synchronization of the data sets is realized.
In addition, if the result information indicates that the data is not data held by both ends, the data in the end receiving the comparison request does not need to be updated.
In the data synchronization process of the two ends, if no abnormality occurs, the data stored in the commonly held data sets of the two ends should be kept consistent, in this case, the first data may be compared with only the non-commonly held data set of the local end, and the second data may be compared with only the commonly held data set of the local end. However, if an abnormality occurs, for example, an interruption occurs in the information transmission process, so that the data of one end is not updated, and the data sets of the two ends are not consistent, in this case, the first data or the second data may be compared with the commonly-held data set and the non-commonly-held data set that have been stored by the local end, so as to ensure the accuracy of the comparison result.
In one possible implementation, the change operation is an add operation, and the change data is first data; the comparing the changed data with the data set stored in the local terminal includes: comparing the first data with data in a non-commonly-held data set stored by a local terminal;
the updating of the data in the co-owned data set and/or the non-co-owned data set of the local end includes:
and adding the first data into the commonly held data set of the local terminal, deleting the first data from the non-commonly held data set of the local terminal, and obtaining an updated data set.
In the embodiment of the invention, when the first data is compared with the data in the non-commonly-held data set stored in the local terminal and the result information shows that the first data is the data commonly held by the two terminals, the commonly-held data set and the non-commonly-held data set of the local terminal are updated in time, so that data redundancy is not caused, and the data accuracy of the data sets is further ensured.
In one possible implementation, the change operation is a delete operation, and the change data is the second data; the comparing the changed data with the data set stored in the local terminal comprises: comparing the second data with data in the common holding data set stored by the local terminal;
the updating of the data in the co-owned data set and/or the non-co-owned data set of the local end includes:
and deleting the second data from the commonly held data set of the local terminal, and adding the second data into the non-commonly held data set of the local terminal to obtain an updated data set.
In the embodiment of the invention, when the second data is compared with the data in the commonly-held data set stored at the local terminal and the result information indicates that the second data is the data commonly held at the two terminals, the second data is deleted at the opposite terminal, so that the second data which is not the data commonly held at the two terminals is deleted from the commonly-held data set in time and is added into the non-commonly-held data set, thereby ensuring the timely update of the commonly-held data set and the non-commonly-held data set at the local terminal and further ensuring the data accuracy of the data set.
In the process of two-party or multi-party cooperation, the data in the data set can be user information, the data in the commonly held data set can represent users commonly owned by two parties or multiple parties of cooperation, the data in the non-commonly held data set can represent users owned by a single party in cooperation, and due to the clearly distinguished common user and single user, any party in cooperation can share the single user information in the non-commonly held data set owned by the user to other parties in cooperation, or recommend services of the cooperation party for the user according to service cooperation, so that the user can know the services of the cooperation party to solve the service requirements of the user, and meanwhile, the cooperation party can also obtain more new users, thereby realizing multi-party win-win cooperation.
The following describes a process of data processing with a specific example:
the method comprises the steps of splitting a data set stored in a data set Block A into two data sets Block M and Block P, wherein the Block M stores the same data obtained by comparing the data sets at two ends, and the Block P stores different data obtained by comparing the data sets at two ends, namely the data obtained by removing the Block M from the Block A. The sum of the data volumes of BlockM and BlockP is the sum of all data sets at the local end, i.e. the total amount of the original data set BlockA.
When detecting that the data M needs to be added, the local terminal judges whether the data M meets a first preset condition, namely whether the data M exists in Block M or not, or whether the data M does not exist in Block M and Block P or not. When the data M is checked to exist in the Block M or the check data M does not exist in the Block M and the Block P, a comparison request of the data M is sent to a remote end.
And if the data M exists in the local blockP and the received result information indicates that the data M is data commonly held by the two ends, adding the data M to the blockM and deleting the data M from the blockP.
And if the data M does not exist in the Block M and the Block P and the received result information indicates that the data M is data held by both ends, adding the data M to the Block M.
And if the data M does not exist in the Block M and the Block P and the received result information indicates that the data M is not the data held by both ends, adding the data M to the Block P.
In addition, if the data M exists in the blockap and the result information indicates that the data M is not data held by both ends, the data set does not need to be updated.
The remote end, as the end receiving the comparison request, also splits the data set stored in one data set peer block a into two data sets peer block m and peer block p, where the peer block m stores the same data obtained by comparing the data sets at the two ends, and the peer block p stores different data obtained by comparing the data sets at the two ends, that is, the data obtained by removing the peer block m from the peer block a. The sum of the data volumes of the peer block m and the peer block p is the sum of all the data sets at the end, that is, the total volume of the original data set peer block a.
And after receiving the comparison request for adding the data M, the remote end compares the data M with the data in the peer Block P to obtain result information, and if the result information indicates that the data M is data which is commonly held by the two ends, the remote end adds the data M to the peer Block M, removes the data M from the peer Block P, and feeds back the result information to the end sending the comparison request.
Detecting that the data of the local terminal is changed, judging whether the data M exists in Block M or Block P when detecting that the data M needs to be deleted, and removing the data M from the Block M when judging that the data M exists in the Block M; and when judging that the data M exists in the Block P, removing the data M from the Block P. Or when detecting that the data M needs to be deleted, sending a comparison request for deleting the data M to a remote end, and then removing the data M from the existing data set BlockM or BlockP.
And after receiving the comparison request for deleting the data M, the remote end compares the data M with the data in the peer Block M, and if the result information indicates that the data M is commonly held by the two ends, the remote end adds the data M to the peer Block P and removes the data M from the peer Block M.
In the embodiment of the invention, according to the detected change of the data set, the two ends update the respective data sets of the two ends, thereby realizing the real-time synchronization of the data sets and ensuring the accuracy of the data sets.
According to a third aspect of the embodiments of the present invention, there is provided an apparatus for data processing, which is applied to one end of data synchronization where a data set is changed, and a data set stored at a local end includes a commonly-held data set and a non-commonly-held data set, and with reference to fig. 5, the apparatus includes:
a change detection module 51, configured to detect that data of the local terminal is changed;
a condition determining module 52, configured to determine whether the changed data meets a preset condition according to the change;
and the data updating module 53 is configured to update data in the co-owned data set and/or the non-co-owned data set of the local end if the data is satisfied.
In a possible implementation manner, the change detection module is specifically configured to detect a data change addition operation of the local end;
the condition judgment module comprises:
a first data judgment sub-module, configured to judge whether the added first data meets a first preset condition when the change is an add operation, where the first preset condition is that the first data exists in a non-commonly-held data set at a local end; or the first data does not exist in the co-holding data set and the non-co-holding data set of the local terminal;
the data update module comprises:
the first data comparison request sending submodule is used for sending a comparison request of first data to the opposite terminal when the first preset condition is met; the comparison request is used for enabling the opposite terminal to compare the first data with each data in the data set stored by the opposite terminal to obtain result information;
and the first data updating submodule is used for responding to the result information sent by the opposite terminal and updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal.
In one possible implementation, the result information includes: the first data is data held by both ends together or the first data is not data held by both ends together;
the first data update sub-module is specifically configured to:
if the first data exists in the non-commonly-held data set of the local terminal and the result information indicates that the first data is commonly held by two terminals, adding the first data into the commonly-held data set of the local terminal, and deleting the first data from the non-commonly-held data set of the local terminal to obtain an updated data set;
if the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information is that the first data is commonly held data at two ends, adding the first data into the commonly held data set of the local terminal to obtain an updated data set;
and if the first data does not exist in the commonly held data set and the non-commonly held data set of the local terminal and the result information indicates that the first data is not the data commonly held by the two terminals, adding the first data into the non-commonly held data set of the local terminal to obtain an updated data set.
In a possible implementation manner, the change detection module is specifically configured to detect a change operation of data of a local terminal to a delete operation;
the condition judgment module comprises:
a second data determining sub-module, configured to determine whether the deleted second data meets a second preset condition when the change is the deletion operation, where the second preset condition is that the second data exists in a co-owned dataset of the local end; or the second data exists in a non-commonly held data set of the local end;
the data update module comprises:
the second data updating submodule is used for directly deleting the second data from the commonly held data set of the local end to obtain an updated data set if the second data exists in the commonly held data set of the local end; and if the second data exists in the non-commonly-held data set of the local terminal, directly deleting the second data from the non-commonly-held data set of the local terminal to obtain an updated data set.
In one possible embodiment, the apparatus further comprises:
a second data comparison request sending module, configured to send a comparison request for second data to the peer end before the step of updating data in the commonly-held data set and/or the non-commonly-held data set of the peer end when the second preset condition is met; and after receiving result information sent by the opposite end, executing the step of updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
According to a fourth aspect of the embodiments of the present invention, there is provided an apparatus for data processing, which is applied to one of two ends of data synchronization at which a comparison request is received, and a data set stored by a local end includes a commonly-held data set and a non-commonly-held data set, and referring to fig. 6, the apparatus includes:
a request receiving module 61 for receiving a comparison request, identifying a change operation indicated in the comparison request and change data;
a data comparison module 62, configured to compare the changed data with a data set already stored in the local terminal to obtain result information;
the data updating module 63 is configured to update data in the commonly held data set and/or the non-commonly held data set of the local end when the result information indicates that the data is data commonly held by the two ends;
and a result information sending module 64, configured to feed back the result information to the end that sends the comparison request.
In a possible implementation, the change operation is an add operation, and the change data is first data;
the data comparison module comprises:
the first data comparison submodule is used for comparing the first data with data in a non-commonly held data set stored at the local terminal;
the data update module comprises:
and the first data updating module is used for adding the first data into the commonly held data set of the local terminal and deleting the first data from the non-commonly held data set of the local terminal to obtain an updated data set when the result information shows that the first data is the data commonly held by the two terminals after the first data is compared with the data in the non-commonly held data set stored by the local terminal.
In a possible implementation, the change operation is a delete operation, and the change data is second data;
the data comparison module comprises:
the second data comparison submodule is used for comparing the second data with data in a common holding data set stored at the local terminal;
the data update module comprises:
and the second data updating module is used for deleting the second data from the commonly-held data set of the local terminal and adding the second data into the non-commonly-held data set of the local terminal to obtain an updated data set when the second data is compared with the data in the commonly-held data set stored by the local terminal and the result information indicates that the second data is commonly-held data at both ends.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, which may include: the system comprises a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72 and the memory 73 are communicated with each other through the communication bus 74;
a memory 73, which may be used to store computer programs;
the processor 71 may be configured to execute the program stored in the memory 73 to implement any of the data processing methods of the first aspect.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which may include: the system comprises a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 are communicated with each other through the communication bus 84;
a memory 83, which may be used to store computer programs;
the processor 81 may be configured to execute the program stored in the memory 83 to implement the data processing method according to any one of the second aspect.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In a further embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for data processing of the first aspect in any of the above embodiments.
In a further embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for processing data of the second aspect in any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of data processing of any of the first aspects of the embodiments described above.
In a further embodiment of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of data processing of any of the second aspects of the embodiments described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A method of data processing, wherein the method is applied to one end of data synchronization where a data set is changed, and the data set stored at the local end includes a commonly-held data set and a non-commonly-held data set, the method comprising:
detecting that the data of the local terminal is changed;
judging whether the changed data meets a preset condition or not according to the change;
and if so, updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal.
2. The method of claim 1,
the change-to-add operation;
when the change adding operation is performed, the determining whether the changed data meets a preset condition includes:
judging whether the added first data meet a first preset condition, wherein the first preset condition is that the first data exist in a non-commonly held data set of a local terminal; or the first data does not exist in the co-holding data set and the non-co-holding data set of the local terminal;
when the first preset condition is met, the step of updating the data in the commonly-held data set and/or the non-commonly-held data set of the local end comprises the following steps:
sending a comparison request of first data to an opposite terminal; the comparison request is used for enabling the opposite terminal to compare the first data with each data in the data set stored by the opposite terminal to obtain result information;
and updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal in response to the result information sent by the opposite terminal.
3. The method according to claim 2, wherein the result information is that the first data is data held in common by both ends;
if the first data exists in the non-commonly-held data set of the local end, the updating data in the commonly-held data set and/or the non-commonly-held data set of the local end includes:
adding the first data into a common holding data set of the local terminal, and deleting the first data from a non-common holding data set of the local terminal to obtain an updated data set;
if the first data does not exist in the commonly-held data set and the non-commonly-held data set of the local terminal, the updating the data in the commonly-held data set and/or the non-commonly-held data set of the local terminal includes:
adding the first data into a commonly held data set of a local terminal to obtain an updated data set;
the result information is that the first data is not data which is commonly held by two ends;
if the first data does not exist in the co-owned data set and the non-co-owned data set of the local end, the updating data in the co-owned data set and/or the non-co-owned data set of the local end includes:
and adding the first data into the non-commonly held data set of the local terminal to obtain an updated data set.
4. The method of claim 1,
the change to delete operation;
when the change deletion operation is performed, the determining whether the changed data meets a preset condition includes:
judging whether the deleted second data meet a second preset condition, wherein the second preset condition is that the second data exist in a commonly-held data set of a local terminal; or the second data exists in a non-commonly held data set of the local end;
when the second preset condition is met, the step of updating the data in the commonly-held data set and/or the non-commonly-held data set of the local end comprises the following steps:
if the second data exists in the co-holding data set of the local terminal, directly deleting the second data from the co-holding data set of the local terminal to obtain an updated data set;
and if the second data exists in the non-commonly-held data set of the local terminal, directly deleting the second data from the non-commonly-held data set of the local terminal to obtain an updated data set.
5. The method according to claim 4, wherein when the second preset condition is satisfied, before the step of updating the data in the co-owned data set and/or the non-co-owned data set of the local end, the method further comprises:
sending a comparison request of second data to the opposite terminal;
and after receiving result information sent by the opposite end, executing the step of updating the data in the commonly held data set and/or the non-commonly held data set of the local end.
6. A method for data processing, wherein the method is applied to one of two ends of data synchronization, at which a comparison request is received, and a data set stored at a local end includes a commonly-held data set and a non-commonly-held data set, and the method includes:
receiving a comparison request, identifying a change operation and change data indicated in the comparison request;
comparing the changed data with a data set stored at the local terminal to obtain result information;
when the result information indicates that the data are the data commonly held by the two ends, updating the data in the commonly held data set and/or the non-commonly held data set of the local end;
and feeding back the result information to the end sending the comparison request.
7. The method of claim 6,
the change operation is an addition operation, and the change data is first data;
the comparing the change data with the data set stored at the local end comprises: comparing the first data with data in a locally stored non-commonly held data set;
the updating of the data in the co-owned data set and/or the non-co-owned data set of the local end comprises:
and adding the first data into the commonly held data set of the local terminal, deleting the first data from the non-commonly held data set of the local terminal, and obtaining an updated data set.
8. The method of claim 6,
the change operation is a deletion operation, and the change data is second data;
the comparing the change data with the locally stored data set includes: comparing the second data with data in a co-owned data set stored by a local terminal;
the updating the data in the co-owned data set and/or the non-co-owned data set of the local end comprises:
and deleting the second data from the commonly held data set of the local terminal, and adding the second data into the non-commonly held data set of the local terminal to obtain an updated data set.
9. An apparatus for data processing, wherein one of two ends of data synchronization is applied to the end where a change occurs in a data set, and the locally stored data sets include a commonly-held data set and a non-commonly-held data set, the apparatus comprising:
the change detection module is used for detecting that the data of the local terminal is changed;
the condition judgment module is used for judging whether the changed data meet preset conditions or not according to the change;
and the data updating module is used for updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal if the requirements are met.
10. An apparatus for data processing, wherein the apparatus is applied to one of two ends of data synchronization, where a comparison request is received, and the locally stored data sets include a commonly-held data set and a non-commonly-held data set, the apparatus comprising:
a request receiving module for receiving a comparison request, identifying a change operation and change data indicated in the comparison request;
the data comparison module is used for comparing the changed data with a data set stored at the local terminal to obtain result information;
the data updating module is used for updating the data in the commonly held data set and/or the non-commonly held data set of the local terminal when the result information indicates that the data are commonly held by the two terminals;
and the result information sending module is used for feeding back the result information to the end which sends the comparison request.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 6 to 8 when executing a program stored in the memory.
13. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 6-8.
CN202310061086.8A 2023-01-20 2023-01-20 Data processing method and device, electronic equipment and storage medium Pending CN115982192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310061086.8A CN115982192A (en) 2023-01-20 2023-01-20 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310061086.8A CN115982192A (en) 2023-01-20 2023-01-20 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115982192A true CN115982192A (en) 2023-04-18

Family

ID=85960579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310061086.8A Pending CN115982192A (en) 2023-01-20 2023-01-20 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115982192A (en)

Similar Documents

Publication Publication Date Title
US10999721B2 (en) Communication identifier binding processing method and terminal
US9131341B2 (en) System and method for locating a mobile device
CN109618174B (en) Live broadcast data transmission method, device, system and storage medium
CN110895603B (en) Multi-system account information integration method and device
CN109491733B (en) Interface display method based on visualization and related equipment
CN112202633B (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN111064725A (en) Code zero intrusion interface verification method and device
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN111782456A (en) Anomaly detection method and device, computer equipment and storage medium
CN112437148B (en) Service request processing method and device, service server and system
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN109976828B (en) Method and device for configuring file
CN110727895B (en) Sensitive word sending method and device, electronic equipment and storage medium
CN115982192A (en) Data processing method and device, electronic equipment and storage medium
CN111767481A (en) Access processing method, device, equipment and storage medium
CN111752964A (en) Data processing method and device based on data interface
CN112559233B (en) Method, device, equipment and computer readable medium for identifying fault type
CN114185804A (en) Interface testing method and device and terminal equipment
CN113377682A (en) Service testing method and device
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN113434069A (en) Menu configuration method, device, equipment and storage medium
CN113872994A (en) Organization architecture synchronization method, device, computer equipment and storage medium
WO2022057595A1 (en) Marking information processing method and device, and storage medium
CN111163088B (en) Message processing method, system and device and electronic equipment

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