CN114647698A - Data synchronization method and device and computer storage medium - Google Patents

Data synchronization method and device and computer storage medium Download PDF

Info

Publication number
CN114647698A
CN114647698A CN202210205137.5A CN202210205137A CN114647698A CN 114647698 A CN114647698 A CN 114647698A CN 202210205137 A CN202210205137 A CN 202210205137A CN 114647698 A CN114647698 A CN 114647698A
Authority
CN
China
Prior art keywords
data
service data
request
synchronization
service
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
CN202210205137.5A
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.)
Guangdong Planning and Designing Institute of Telecommunications Co Ltd
Original Assignee
Guangdong Planning and Designing Institute of Telecommunications 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 Guangdong Planning and Designing Institute of Telecommunications Co Ltd filed Critical Guangdong Planning and Designing Institute of Telecommunications Co Ltd
Priority to CN202210205137.5A priority Critical patent/CN114647698A/en
Publication of CN114647698A publication Critical patent/CN114647698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data synchronization method, a data synchronization device and a computer storage medium, wherein the method comprises the following steps: receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information; matching the request information with preset data version information to obtain a matching result, and determining service data corresponding to the data synchronization request according to the matching result; performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file; and generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier. Therefore, the method and the device can improve the accuracy of data synchronization and are beneficial to improving the efficiency of data synchronization.

Description

Data synchronization method and device and computer storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data synchronization method and apparatus, and a computer storage medium.
Background
In actual life, the computing capacity and the storage capacity of the mobile terminal are limited, and all application data cannot be stored, so that a large amount of data need to be exchanged when the mobile application program is used, it is not practical to acquire all data from a server when the mobile application program is used every time, a common and basic application data can be stored in a general mobile terminal, the running speed of the mobile application program is increased, and how to ensure that the application data on a plurality of mobile terminals are consistent becomes an important precondition for the correct running of the mobile application program.
At present, the lightweight devices usually use voice as input control or request corresponding resources, and then feed back to the user from the device end, the device information obtained by the user is prone to error, and the lightweight devices developed by different manufacturers have differences in protocols or data synchronization methods, which causes that normal data synchronization and information sharing cannot be performed between the devices, that is, the data synchronization accuracy of the existing scheme is low.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a data synchronization method and apparatus, which can facilitate to improve the accuracy of data synchronization and the efficiency of data synchronization.
In order to solve the above technical problem, a first aspect of the present invention discloses a data synchronization method, including:
receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information;
matching the request information with preset data version information to obtain a matching result, and determining service data corresponding to the data synchronization request according to the matching result;
performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file;
and generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier.
As an optional implementation manner, in the first aspect of the present invention, after receiving a data synchronization request sent by a synchronization terminal, performing request analysis on the data synchronization request to obtain request information, and before matching the request information with preset data version information to obtain a matching result and determining service data corresponding to the data synchronization request according to the matching result, the data synchronization method further includes:
acquiring the time information of the data synchronization request, and acquiring request log data in a preset time period before the time information;
inquiring whether the request log data contains a data synchronization request record which is the same as the data synchronization request or not based on the request log data and a preset time interval;
if yes, searching business data corresponding to the data synchronization request record, and taking the business data corresponding to the data synchronization request record as the business data corresponding to the data synchronization request;
if not, judging whether the request information meets a preset matching condition or not, and when the request information meets the preset matching condition, executing the step of matching the request information and preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result.
As an optional implementation manner, in the first aspect of the present invention, the matching the request information and the preset data version information to obtain a matching result, and determining, according to the matching result, service data corresponding to the data synchronization request includes:
analyzing the request information to obtain a data matching statement corresponding to the request information;
determining a data storage space matched with the request information according to the data matching statement and preset data version information, and determining the data storage space as a matching result;
inquiring service data corresponding to the data synchronization request according to the matching result;
and performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file, including:
determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain cleaned service data;
performing isolation strategy similarity calculation on the cleaned service data by adopting a preset strategy similarity function to obtain corresponding isolation strategy similarity;
performing data analysis on the isolation strategy similarity to determine a target isolation strategy corresponding to the service data;
and carrying out data isolation on the service data through the target isolation strategy to obtain a service data intermediate file.
As an optional implementation manner, in the first aspect of the present invention, after the data isolation is performed on the service data through the target isolation policy to obtain a service data intermediate file, the data synchronization method further includes:
performing data analysis on the service data intermediate file to obtain a service data type set, wherein the service data type set comprises at least one service data type;
determining an attribution right corresponding to each service data type, and determining an operation authority type corresponding to each service data type according to the attribution right corresponding to each service data type;
and respectively determining the business operation logic corresponding to each operation authority type to obtain an authority mapping relation table.
As an optional implementation manner, in the first aspect of the present invention, the generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier includes:
generating a data synchronization identifier according to the service data intermediate file, and converting the service data into target data in a preset data format according to the data synchronization identifier;
encrypting the target data to obtain encrypted data, and compressing the encrypted data to obtain compressed service data;
writing the compressed service data into a file stream to obtain a service data file;
judging whether the service data file meets preset transmission conditions or not;
when the service data file is judged to meet the preset transmission condition, transmitting the service data file to a target mobile terminal;
and when the service data file is judged not to meet the preset transmission condition, analyzing a target reason that the service data file does not meet the preset transmission condition, and executing operation matched with the target reason according to the target reason.
As an optional implementation manner, in the first aspect of the present invention, the performing, according to the target reason, an operation matching the target reason includes:
judging whether the target reason is used for indicating that the data quantity of the service data file is larger than a preset quantity threshold value or not, acquiring historical synchronization data when the target reason is judged to be used for indicating that the data quantity of the service data file is larger than the preset quantity threshold value, and judging whether the service data file comprises first service data which is the same as the historical synchronization data or not;
when the business data file is judged to comprise the first business data, deleting the first business data from the business data file, updating the business data file, and executing the step of judging whether the business data file meets the preset transmission condition;
when the first service data is not included in the service data file, analyzing the priority of all service data included in the service data file, deleting second service data with the priority lower than a preset priority threshold from the service data file, updating the service data file, and executing the step of judging whether the service data file meets the preset transmission condition.
As an optional implementation manner, in the first aspect of the present invention, after the generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier, the data synchronization method further includes:
receiving a data operation request sent by the synchronous terminal, performing authority analysis on the data operation request through the authority mapping relation table, and determining at least one target service operation logic corresponding to the service operation request;
and performing data operation processing on the data corresponding to the service operation request through each determined target service operation logic to obtain a data operation result, and transmitting the data operation result to the synchronous terminal.
A second aspect of the present invention discloses a data synchronization apparatus, comprising:
the receiving module is used for receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information;
the matching module is used for matching the request information with preset data version information to obtain a matching result, and determining service data corresponding to the data synchronization request according to the matching result;
the isolation module is used for carrying out data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file;
and the transmission module is used for generating a data synchronization identifier according to the service data intermediate file and transmitting the service data to the target mobile terminal according to the data synchronization identifier.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further comprises:
the acquisition module is used for receiving a data synchronization request sent by a synchronization terminal at the receiving module, performing request analysis on the data synchronization request to obtain request information, matching the request information with preset data version information at the matching module to obtain a matching result, acquiring time information of the data synchronization request before determining service data corresponding to the data synchronization request according to the matching result, and acquiring request log data in a preset time period before the time information;
the query module is used for querying whether the request log data contains a data synchronization request record which is the same as the data synchronization request or not based on the request log data and a preset time interval;
the query module is further configured to, when the request log data includes a data synchronization request record that is the same as the data synchronization request, search for service data corresponding to the data synchronization request record, and use the service data corresponding to the data synchronization request record as the service data corresponding to the data synchronization request;
and the judging module is used for judging whether the request information meets a preset matching condition when the request log data does not contain a data synchronization request record which is the same as the data synchronization request, triggering the matching module to execute the matching of the request information and preset data version information to obtain a matching result when the request information meets the preset matching condition, and determining the operation of the service data corresponding to the data synchronization request according to the matching result.
As an optional implementation manner, in the second aspect of the present invention, the matching module matches the request information and the preset data version information to obtain a matching result, and a manner of determining the service data corresponding to the data synchronization request according to the matching result specifically includes:
analyzing the request information to obtain a data matching statement corresponding to the request information;
determining a data storage space matched with the request information according to the data matching statement and preset data version information, and determining the data storage space as a matching result;
inquiring business data corresponding to the data synchronization request according to the matching result;
and the isolation module performs data isolation processing on the service data according to a preset data isolation instruction, and the mode of obtaining the service data intermediate file specifically comprises the following steps:
determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain cleaned service data;
performing isolation strategy similarity calculation on the cleaned service data by adopting a preset strategy similarity function to obtain corresponding isolation strategy similarity;
performing data analysis on the isolation strategy similarity to determine a target isolation strategy corresponding to the service data;
and carrying out data isolation on the service data through the target isolation strategy to obtain a service data intermediate file.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further comprises:
the analysis module is used for carrying out data analysis on the service data intermediate file after the isolation module carries out data isolation on the service data through the target isolation strategy to obtain a service data intermediate file, so as to obtain a service data type set, wherein the service data type set comprises at least one service data type;
the determining module is used for determining the attribution right corresponding to each service data type and determining the operation authority type corresponding to each service data type according to the attribution right corresponding to each service data type;
the determining module is further configured to determine a service operation logic corresponding to each operation permission type, and obtain a permission mapping relation table.
As an optional implementation manner, in the second aspect of the present invention, the manner in which the transmission module generates a data synchronization identifier according to the service data intermediate file, and transmits the service data to the target mobile terminal according to the data synchronization identifier specifically is:
generating a data synchronization identifier according to the service data intermediate file, and converting the service data into target data in a preset data format according to the data synchronization identifier;
encrypting the target data to obtain encrypted data, and compressing the encrypted data to obtain compressed service data;
writing the compressed service data into a file stream to obtain a service data file;
judging whether the service data file meets preset transmission conditions or not;
when the service data file is judged to meet the preset transmission condition, transmitting the service data file to a target mobile terminal;
and when the service data file is judged not to meet the preset transmission condition, analyzing a target reason that the service data file does not meet the preset transmission condition, and executing operation matched with the target reason according to the target reason.
As an optional implementation manner, in the second aspect of the present invention, the manner in which the transmission module executes, according to the target reason, an operation matched with the target reason is specifically:
judging whether the target reason is used for indicating that the data quantity of the service data file is larger than a preset quantity threshold value or not, acquiring historical synchronization data when the target reason is judged to be used for indicating that the data quantity of the service data file is larger than the preset quantity threshold value, and judging whether the service data file comprises first service data which is the same as the historical synchronization data or not;
when the business data file is judged to comprise the first business data, deleting the first business data from the business data file, updating the business data file, and executing the operation of judging whether the business data file meets the preset transmission condition;
when the first service data is not included in the service data file, analyzing the priority of all service data included in the service data file, deleting second service data of which the priority is lower than a preset priority threshold from the service data file, updating the service data file, and executing the operation of judging whether the service data file meets a preset transmission condition.
As an optional implementation manner, in the second aspect of the present invention, the receiving module is further configured to generate a data synchronization identifier according to the service data intermediate file, and receive a data operation request sent by the synchronization terminal after transmitting the service data to a target mobile terminal according to the data synchronization identifier;
the determining module is further configured to perform permission analysis on the data operation request through the permission mapping relation table, and determine at least one target service operation logic corresponding to the service operation request;
the transmission module is further configured to perform data operation processing on the data corresponding to the service operation request through each determined target service operation logic, obtain a data operation result, and transmit the data operation result to the synchronization terminal.
A third aspect of the present invention discloses another data synchronization apparatus, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the data synchronization method disclosed by the first aspect of the invention.
In a fourth aspect, the present invention discloses a computer-readable storage medium storing computer instructions for executing the data synchronization method disclosed in the first aspect of the present invention when the computer instructions are called.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a data synchronization request sent by a synchronization terminal is received, the data synchronization request is analyzed to obtain request information, the request information is matched with preset version information to obtain a matching result, business data corresponding to the data synchronization request is determined according to the matching result, data isolation processing is carried out on the business data according to a preset data isolation instruction to obtain a business data intermediate file, a data synchronization identifier is generated according to the business data intermediate file, and the business data is transmitted to a target mobile terminal according to data synchronization representation. Therefore, the method and the device can be beneficial to improving the accuracy of data synchronization and further can be beneficial to improving the efficiency of data synchronization.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data synchronization method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data synchronization method disclosed in the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of another data synchronization apparatus disclosed in the embodiment of the present invention;
fig. 5 is a schematic structural diagram of another data synchronization apparatus according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a data synchronization method and a data synchronization device, which can determine corresponding service data according to a data synchronization request, process the service data and transmit the service data to a target mobile terminal, and can be beneficial to improving the accuracy of data synchronization and further the efficiency of data synchronization. The following are detailed descriptions.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a data synchronization method according to an embodiment of the present invention. The data synchronization method described in fig. 1 may be applied to data synchronization, and may also be applied to a local server or a cloud server of data synchronization, which is not limited in the embodiment of the present invention. As shown in fig. 1, the data synchronization method may include the operations of:
101. and receiving a data synchronization request sent by the synchronization terminal, and performing request analysis on the data synchronization request to obtain request information.
In this embodiment of the present invention, optionally, the data synchronization request sent by the receiving synchronization terminal may be received periodically according to a preset time period, or may be received according to a receiving instruction, and the embodiment of the present invention is not limited.
In this embodiment of the present invention, optionally, the data synchronization request may include one or more of a terminal identifier of the synchronization terminal, a type of data synchronization, and a data type of data synchronization. Further optionally, the data synchronization request may further include one or more of a synchronization time when the synchronization terminal last performs data synchronization, and a terminal identifier of a mobile terminal performing data synchronization with the synchronization terminal. The type of data synchronization may be data full synchronization or data partial synchronization, where it should be noted that the data full synchronization is to synchronize all data corresponding to the data synchronization request to the target mobile terminal, and the data partial synchronization is to synchronize a data partial corresponding to the data synchronization request to the target mobile terminal.
In this embodiment of the present invention, optionally, the performing request analysis on the data synchronization request to obtain the request information may include: and extracting the request keywords in the data synchronization request, and analyzing the extracted request keywords to obtain the request information corresponding to the data synchronization request. Wherein, the request keyword may include one or more of a terminal identification keyword of the synchronization terminal and a data synchronization type keyword in the data synchronization request. Therefore, the accuracy of the obtained request information can be improved by performing request analysis on the data synchronization request, so that the accuracy of subsequently obtained service data can be improved, and the accuracy of data synchronization can be improved.
102. And matching the request information with the preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result.
In this embodiment of the present invention, optionally, the preset data version information may be preset data version information, where the data version information may include one or more of information of a transmission terminal corresponding to each data, information of a transmission terminal corresponding to each data type, identification information corresponding to each transmission terminal, verification information corresponding to each transmission terminal, and system information corresponding to each transmission terminal. It should be noted that the identification information corresponding to each transmission terminal may include one or more of a model and a version of the transmission terminal; the authentication information corresponding to each transmission terminal may include authentication passing information or authentication failing information; the system information corresponding to each transmission terminal may include one or more of system information used by the transmission terminal, total data capacity information, used capacity information, and remaining capacity information.
103. And carrying out data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file.
In this embodiment of the present invention, optionally, before performing data isolation processing on service data according to the preset data isolation instruction, the method may further include: and acquiring synchronization authority information of the synchronization terminal, judging whether the synchronization authority information meets a preset synchronization condition, and triggering and executing data isolation processing on the service data according to a preset data isolation instruction when the synchronization authority information meets the preset synchronization condition to obtain operation of a service data intermediate file. Therefore, the synchronization authority information of the synchronization terminal is obtained, whether the synchronization authority information meets the preset synchronization condition is judged, and the operation of carrying out data isolation processing on the service data according to the preset data isolation instruction to obtain the service data intermediate file is triggered and executed when the synchronization authority information meets the preset synchronization condition, so that the accuracy of obtaining the service data intermediate file can be improved, and the safety of obtaining the service data intermediate file can be improved.
104. And generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to the target mobile terminal according to the data synchronization identifier.
In this embodiment of the present invention, optionally, the data synchronization identifier may include one or more of a terminal identifier of the target mobile terminal, a storage space identifier of the target mobile terminal, and a data type identifier received by the target mobile terminal. Further optionally, the data synchronization identifier may further include a file identifier of the service data intermediate file. Therefore, by generating the data synchronization identifier and transmitting the service data to the target mobile terminal according to the data synchronization identifier, the service data can be transmitted to the corresponding target mobile terminal, the accuracy of data synchronization can be improved, and the safety of data synchronization can be improved.
It can be seen that, implementing the data synchronization method described in fig. 1 can receive and analyze a data synchronization request sent by a synchronization terminal to obtain request information, match the request information and preset data version information to obtain a matching result, determine service data corresponding to the data synchronization request according to the matching result, perform data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file, generate a data synchronization identifier according to the service data intermediate file, and transmit the service data to a target mobile terminal according to the data synchronization identifier, which can be beneficial to improving the accuracy of data synchronization, can be beneficial to improving the efficiency of data synchronization, and can be further beneficial to improving the security of data synchronization.
Example two
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a data synchronization method according to an embodiment of the present invention. The data synchronization method described in fig. 1 may be applied to data synchronization, and may also be applied to a local server or a cloud server for data synchronization, which is not limited in the embodiment of the present invention. As shown in fig. 2, the data synchronization method may include the operations of:
201. and receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information.
202. And acquiring the time information of the data synchronization request, and acquiring the request log data in a preset time period before the time information.
In the embodiment of the invention, the time information is the time when the received data synchronization request of the synchronization terminal carries out data synchronization. Optionally, the preset time period before the time information may be 1 minute, 5 minutes, or 10 minutes, which is not limited in the embodiment of the present invention. Therefore, by requesting the log data in the preset time period before the time information, the validity of the log data can be ensured, and the accuracy of whether the log data of the subsequent query request contains the data synchronization request record which is the same as the data synchronization request can be improved, so that the accuracy of obtaining the service data can be improved, and the accuracy of data synchronization can be improved.
In this embodiment of the present invention, optionally, the request log data includes all data request records in a past preset time period. Further optionally, the request log data may further include one or more of a synchronization terminal corresponding to each data request record, a synchronization terminal identifier corresponding to each data request record, a target mobile terminal identifier corresponding to each data request record, a synchronization data type corresponding to each data request record, a synchronization data quantity corresponding to each data request record, and a request synchronization time corresponding to each data request record within a preset time period in the past. Therefore, the accuracy of whether the subsequent query request log data contains the data synchronization request record which is the same as the data synchronization request can be improved by acquiring the request log data, so that the accuracy of searching the service data can be improved, and the accuracy of data synchronization can be improved.
203. And inquiring whether the request log data contains the same data synchronization request record as the data synchronization request or not based on the request log data and the preset time interval.
When the request log data contains the data synchronization request record which is the same as the data synchronization request, triggering to execute step 204; when the request log data does not contain the same data synchronization request record as the data synchronization request, step 205 is triggered to be executed.
In this embodiment of the present invention, optionally, the preset time interval may be 1 minute, 5 minutes, or 10 minutes, which is not limited in this embodiment of the present invention.
204. And searching the service data corresponding to the data synchronization request record, and taking the service data corresponding to the data synchronization request record as the service data corresponding to the data synchronization request.
In this embodiment of the present invention, optionally, the service data may include one or more of service data to be synchronized and synchronized service data. Further optionally, one or more of the service data type corresponding to the data synchronization request record and the data synchronization request storage space corresponding to the data synchronization request record are searched. Therefore, when the request log data is judged to contain the data synchronization request record which is the same as the data synchronization request, the business data corresponding to the data synchronization request record is searched, and the business data corresponding to the data synchronization request record is used as the business data corresponding to the data synchronization request, so that the efficiency of determining the business data can be improved, and the efficiency of data synchronization can be improved.
205. And judging whether the request information meets the preset matching condition.
In the embodiment of the present invention, optionally, the preset matching condition may include one or more of determining whether the request information is complete, determining whether preset violation information exists in the request information, and determining whether the request information meets a preset permission condition.
206. And when the request information is judged to meet the preset matching condition, matching the request information with the preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result.
207. And carrying out data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file.
208. And generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to the target mobile terminal according to the data synchronization identifier.
In the embodiment of the present invention, for other descriptions of step 201, step 206, and step 208, please refer to the detailed description of step 101 to step 104 in the first embodiment, which is not repeated herein.
It can be seen that, implementing the data synchronization method described in fig. 2 can receive and analyze a data synchronization request sent by a synchronization terminal to obtain request information, obtain time information of the data synchronization request, obtain request log data in a preset time period before the time information, query whether the request log data contains a data synchronization request record identical to the data synchronization request based on the request log data and a preset time interval, if so, take service data corresponding to the data synchronization request record as service data corresponding to the data synchronization request, if not, judge whether the request information meets a preset matching condition, if so, match the request information with preset data version information, determine service data corresponding to the data synchronization request according to a matching result, and perform data isolation processing on the service data according to a preset data isolation instruction, the service data intermediate file is obtained and the data synchronization identifier is generated, and the service data is transmitted to the target mobile terminal according to the data synchronization identifier, so that the accuracy of data synchronization can be improved, the efficiency of data synchronization can be improved, and the safety of data synchronization can be improved.
In an optional embodiment, the matching the request information and the preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result includes:
analyzing the request information to obtain a data matching statement corresponding to the request information;
determining a data storage space matched with the request information according to the data matching statement and preset data version information, and determining the data storage space as a matching result;
inquiring service data corresponding to the data synchronization request through the matching result;
and performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file, including:
determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain the cleaned service data;
performing isolation strategy similarity calculation on the cleaned service data by adopting a preset strategy similarity function to obtain corresponding isolation strategy similarity;
carrying out data analysis on the isolation strategy similarity to determine a target isolation strategy corresponding to the service data;
and carrying out data isolation on the service data through a target isolation strategy to obtain a service data intermediate file.
In this optional embodiment, optionally, determining the data storage space matching the request information according to the data matching statement and the preset data version information may include: and extracting matched data keywords between the data matching statement and preset data version information, and determining a storage space corresponding to the matched data keywords as a data storage space matched with the request information according to the extracted matched data keywords. Further optionally, one or more data storage spaces may be provided, and the embodiment of the present invention is not limited.
In this optional embodiment, optionally, determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain the cleaned service data may include: extracting a data synchronization request type in the data synchronization request, determining a data isolation instruction matched with the data synchronization request type according to the data synchronization request type, cleaning the service data according to the determined data isolation instruction, and deleting preset cleaning content included in the service data from the service data to obtain the cleaned service data. Therefore, the cleaned service data is obtained by determining the data isolation instruction and cleaning the service data, which is beneficial to improving the efficiency of obtaining the intermediate file of the service data and the efficiency of data synchronization.
In this optional embodiment, optionally, the determining, by performing data analysis on the isolation policy similarity, a target isolation policy corresponding to the service data includes: and analyzing the similarity of the isolation strategies, and determining the isolation strategy with the highest similarity of the isolation strategies as a target isolation strategy corresponding to the service data. The isolation policy similarity is the similarity between the service data and each isolation policy. Therefore, the target isolation strategy corresponding to the service data is determined by analyzing the similarity of the isolation strategies, so that the accuracy and the safety of the target isolation strategy can be improved, the accuracy and the safety of the service data intermediate file can be improved, and the accuracy and the safety of subsequent data synchronization can be improved.
It can be seen that implementing this alternative embodiment can parse the request message to obtain a data match statement, determining a data storage space matched with the request information according to the data matching statement and preset data version information, inquiring service data corresponding to the data synchronization request according to the data storage space, and determines a data isolation instruction according to the data synchronization request and cleans the service data, thereby determining a target isolation strategy corresponding to the service data, the data isolation of the service data according to the target isolation strategy to obtain the service data intermediate file can be beneficial to improving the efficiency and the accuracy of determining the service data and the efficiency and the accuracy of obtaining the service data intermediate file, therefore, the efficiency and the accuracy of data synchronization can be improved, and the safety of the data synchronization can be improved.
In another optional embodiment, after the data isolation is performed on the service data through the target isolation policy to obtain the service data intermediate file, the data synchronization method further includes:
performing data analysis on the service data intermediate file to obtain a service data type set, wherein the service data type set comprises at least one service data type;
determining the attribution right corresponding to each service data type, and determining the operation authority type corresponding to each service data type according to the attribution right corresponding to each service data type;
and respectively determining the business operation logic corresponding to each operation authority type to obtain an authority mapping relation table.
In this optional embodiment, optionally, performing data analysis on the service data intermediate file to obtain a service data type set, may include: analyzing the data type of the service data included in the service data intermediate file, taking the service data belonging to the same data type as one service data type, summarizing all the service data types, and obtaining a service data type set. Therefore, the service data type set is obtained by analyzing the service data intermediate file, the accuracy of obtaining the service data type set can be improved, the accuracy and the efficiency of subsequently determining the operation authority type corresponding to each service data type can be improved, and the accuracy and the efficiency of obtaining the authority mapping relation table can be improved.
In this optional embodiment, optionally, the authority mapping relationship table may include one or more of a terminal with operation authority corresponding to each operation authority type, a terminal identifier with operation authority corresponding to each operation authority type, and a data type that can be received by the terminal with operation authority corresponding to each operation authority type.
Therefore, by implementing the optional embodiment, data analysis can be performed on the service data intermediate file to obtain a service data type set, the attribution right corresponding to each service data type is determined, the corresponding operation permission type is determined according to the attribution right, and the permission mapping relation table is obtained according to the service operation logic corresponding to each operation permission type.
In another optional embodiment, generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to the target mobile terminal according to the data synchronization identifier includes:
generating a data synchronization identifier according to the service data intermediate file, and converting the service data into target data in a preset data format according to the data synchronization identifier;
encrypting the target data to obtain encrypted data, and compressing the encrypted data to obtain compressed service data;
writing the compressed service data into a file stream to obtain a service data file;
judging whether the service data file meets the preset transmission condition or not;
when the service data file is judged to meet the preset transmission condition, transmitting the service data file to a target mobile terminal;
and when the service data file is judged not to meet the preset transmission condition, analyzing the target reason that the service data file does not meet the preset transmission condition, and executing operation matched with the target reason according to the target reason.
In this optional embodiment, optionally, the data synchronization identifier may include: the data synchronization method comprises one or more of the number of data for data synchronization, the type of data for data synchronization, the data storage space for data synchronization, and the identification of the data storage space for data synchronization. Further optionally, the preset transmission condition may include one or more of determining whether the service data file is complete, determining whether the service data file includes preset special data, and determining whether the number of the service data types included in the service data file satisfies a preset number condition.
Therefore, the implementation of the alternative embodiment can generate the data synchronization identifier according to the intermediate file of the service data, convert the service data into the target data with the preset format according to the data synchronization identifier, encrypt the target data to obtain encrypted data, compress the encrypted data to obtain compressed service data, write the compressed service data into the file stream to obtain the service data file, determine whether the service data file meets the preset transmission condition, transmit the service data file to the target mobile terminal only when the preset transmission condition is met, convert the service data into the target data according to the data synchronization identifier, can be beneficial to improving the accuracy of obtaining the service data file, and can be beneficial to improving the accuracy of data synchronization, and can be beneficial to improving the security of obtaining the service data file by encrypting the data, the safety of data synchronization can be improved, the compressed service data can be obtained by compressing the encrypted data, the efficiency of obtaining the service data file can be improved, and the efficiency of data synchronization can be improved.
In yet another alternative embodiment, performing an operation matching the target reason according to the target reason includes:
judging whether the target reason is used for indicating that the data quantity of the business data file is larger than a preset quantity threshold value or not, acquiring historical synchronization data when the target reason is judged to be used for indicating that the data quantity of the business data file is larger than the preset quantity threshold value, and judging whether the business data file comprises first business data which are the same as the historical synchronization data or not;
when the business data file is judged to comprise the first business data, deleting the first business data from the business data file, updating the business data file, and executing the step of judging whether the business data file meets the preset transmission condition;
when the first service data is not included in the service data file, analyzing the priority of all service data included in the service data file, deleting the second service data with the priority lower than a preset priority threshold from the service data file, updating the service data file, and executing the step of judging whether the service data file meets the preset transmission condition.
In this optional embodiment, it should be noted that the first service data is deleted from the service data file, and the service data file is updated, where the updated service data file is the service data file obtained by deleting the first service data from the service data file. Therefore, the first service data is deleted from the service data file and the service data file is updated, which is beneficial to saving the data capacity of the storage space and improving the efficiency of data synchronization.
In this optional embodiment, optionally, the priority of the service data may include one or more of a size of the service data and a type of the service data.
In this optional embodiment, further optionally, when the target reason is used to indicate that the data type of the service data file does not satisfy the preset type condition, analyzing the data type of the service data file into a type reason satisfying the preset type condition, and making a processing scheme matched with the type reason. For example, when the target reason is used to indicate that the data type of the service data file is a picture and the preset type condition is a document, the type reason is determined to be different in type, and the processing scheme is determined to feed back the data type difference to the synchronization terminal, so that the synchronization terminal synchronizes the data matched with the data type.
It can be seen that, when the data quantity of the service data file is greater than the preset quantity threshold, the optional embodiment may be implemented to obtain the historical synchronization data, determine whether the service data file includes the first service data that is the same as the historical synchronization data, when the determination result is yes, delete the first service data from the service data file and update the service data file, when the determination result is no, analyze the priorities of all service data included in the service data file, delete the second service data with a lower priority from the service data file, and update the service data file, which may be beneficial to saving the data capacity of the storage space and may be beneficial to improving the efficiency of data synchronization.
In another optional embodiment, after generating the data synchronization identifier according to the service data intermediate file, and transmitting the service data to the target mobile terminal according to the data synchronization identifier, the data synchronization method further includes:
receiving a data operation request sent by a synchronous terminal, carrying out authority analysis on the data operation request through an authority mapping relation table, and determining at least one target service operation logic corresponding to the service operation request;
and performing data operation processing on the data corresponding to the service operation request through each determined target service operation logic to obtain a data operation result, and transmitting the data operation result to the synchronous terminal.
In this optional embodiment, the data operation request may optionally include one or more of a data delete request, a data change request, and a data add request. Further optionally, it is determined whether the data operation request meets a preset request condition, and when it is determined that the data operation request meets the preset request condition, performing permission analysis on the data operation request through a permission mapping relation table to determine an operation of at least one target service operation logic corresponding to the service operation request. Therefore, by judging whether the data operation request meets the preset request condition or not, the accuracy of determining the target business operation logic can be improved, and the accuracy of performing data operation processing on the data corresponding to the business operation request can be improved.
In this optional embodiment, optionally, one or more target service operation logics corresponding to the service operation request may be provided, which is not limited in the embodiment of the present invention. It should be noted that, when a plurality of target service operation logics corresponding to the service operation request are provided, each target service operation logic is not mutually exclusive.
In this optional embodiment, it is further optional that, when the data operation result indicates that the data operation processing is completed, the data operation result is transmitted to the synchronization terminal; when the data operation result indicates that the data operation processing is not finished, analyzing the operation reason of the data operation processing which is not finished, making a solution matched with the operation reason, and transmitting one or more of the data operation result, the operation reason and the solution to the synchronous terminal. Therefore, the intelligence of the data processing operation can be improved, and the accuracy of the data processing operation can be improved.
Therefore, the optional embodiment can be implemented to receive the data operation request sent by the synchronization terminal and perform permission analysis to determine the target service operation logic, perform data operation processing on the corresponding data through the determined target service operation logic to obtain the data operation result, and transmit the data operation result to the synchronization terminal, so that the intelligence of processing operation on the data can be improved, and the accuracy of processing operation on the data can be improved.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention. As shown in fig. 3, the data synchronization apparatus may include:
the receiving module 301 is configured to receive a data synchronization request sent by a synchronization terminal, and perform request analysis on the data synchronization request to obtain request information.
And the matching module 302 is configured to match the request information with the preset data version information to obtain a matching result, and determine service data corresponding to the data synchronization request according to the matching result.
The isolation module 303 is configured to perform data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file.
And the transmission module 304 is configured to generate a data synchronization identifier according to the service data intermediate file, and transmit the service data to the target mobile terminal according to the data synchronization identifier.
It can be seen that, implementing the apparatus described in fig. 3 can receive and analyze a data synchronization request sent by a synchronization terminal to obtain request information, match the request information and preset data version information to obtain a matching result, determine service data corresponding to the data synchronization request according to the matching result, perform data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file, generate a data synchronization identifier according to the service data intermediate file, and transmit the service data to a target mobile terminal according to the data synchronization identifier, which can be beneficial to improving accuracy of data synchronization, can be beneficial to improving efficiency of data synchronization, and can be further beneficial to improving security of data synchronization.
In an alternative embodiment, as shown in fig. 4, the apparatus further comprises:
an obtaining module 305, configured to, after the receiving module 301 receives a data synchronization request sent by a synchronization terminal, perform request analysis on the data synchronization request to obtain request information, match the request information with preset data version information in the matching module 302 to obtain a matching result, obtain time information of the data synchronization request before determining service data corresponding to the data synchronization request according to the matching result, and obtain request log data in a preset time period before the time information.
And the query module 306 is configured to query whether the request log data contains a data synchronization request record that is the same as the data synchronization request based on the request log data and the preset time interval.
The query module 306 is further configured to, when the request log data includes a data synchronization request record that is the same as the data synchronization request, search for service data corresponding to the data synchronization request record, and use the service data corresponding to the data synchronization request record as the service data corresponding to the data synchronization request.
A determining module 307, configured to determine whether the request information meets a preset matching condition when the request log data does not include a data synchronization request record that is the same as the data synchronization request, and trigger the matching module 302 to perform an operation of matching the request information and the preset data version information when it is determined that the request information meets the preset matching condition, so as to obtain a matching result, and determine service data corresponding to the data synchronization request according to the matching result.
It can be seen that, the apparatus described in fig. 4 can receive and analyze a data synchronization request sent by a synchronization terminal to obtain request information, obtain time information of the data synchronization request, obtain request log data in a preset time period before the time information, query whether the request log data includes a data synchronization request record identical to the data synchronization request based on the request log data and a preset time interval, if so, take service data corresponding to the data synchronization request record as service data corresponding to the data synchronization request, if not, determine whether the request information meets a preset matching condition, if so, match the request information with preset data version information, determine service data corresponding to the data synchronization request according to a matching result, and perform data isolation processing on the service data according to a preset data isolation instruction, the service data intermediate file is obtained and the data synchronization identifier is generated, and the service data is transmitted to the target mobile terminal according to the data synchronization identifier, so that the accuracy of data synchronization can be improved, the efficiency of data synchronization can be improved, and the safety of data synchronization can be improved.
In an optional embodiment, the matching module 302 matches the request information with the preset data version information to obtain a matching result, and the mode of determining the service data corresponding to the data synchronization request according to the matching result specifically includes:
analyzing the request information to obtain a data matching statement corresponding to the request information;
determining a data storage space matched with the request information according to the data matching statement and preset data version information, and determining the data storage space as a matching result;
inquiring service data corresponding to the data synchronization request through the matching result;
and the isolation module 303 performs data isolation processing on the service data according to the preset data isolation instruction, and the manner of obtaining the service data intermediate file is specifically as follows:
determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain the cleaned service data;
performing isolation strategy similarity calculation on the cleaned service data by adopting a preset strategy similarity function to obtain corresponding isolation strategy similarity;
carrying out data analysis on the isolation strategy similarity to determine a target isolation strategy corresponding to the service data;
and carrying out data isolation on the service data through a target isolation strategy to obtain a service data intermediate file.
It can be seen that the apparatus described in fig. 4 can parse the request message to obtain the data matching statement, determining a data storage space matched with the request information according to the data matching statement and preset data version information, inquiring service data corresponding to the data synchronization request according to the data storage space, and determines a data isolation instruction according to the data synchronization request and cleans the service data so as to determine a target isolation strategy corresponding to the service data, the data isolation of the service data according to the target isolation strategy to obtain the service data intermediate file can be beneficial to improving the efficiency and the accuracy of determining the service data and the efficiency and the accuracy of obtaining the service data intermediate file, therefore, the efficiency and the accuracy of data synchronization can be improved, and the safety of the data synchronization can be improved.
In another alternative embodiment, as shown in fig. 4, the apparatus further comprises:
the analysis module 308 is configured to perform data isolation on the service data through the target isolation policy in the isolation module 303 to obtain a service data intermediate file, and then perform data analysis on the service data intermediate file to obtain a service data type set, where the service data type set includes at least one service data type.
The determining module 309 is configured to determine an attribution right corresponding to each service data type, and determine an operation permission type corresponding to each service data type according to the attribution right corresponding to each service data type.
The determining module 309 is further configured to determine the service operation logic corresponding to each operation permission type, so as to obtain a permission mapping relationship table.
It can be seen that, by implementing the apparatus described in fig. 4, data analysis can be performed on the service data intermediate file to obtain a service data type set, an attribution right corresponding to each service data type is determined, a corresponding operation permission type is determined according to the attribution right, and a permission mapping relation table is obtained according to a service operation logic corresponding to each operation permission type, which can be beneficial to improving the accuracy of obtaining the permission mapping relation table, and further, can be beneficial to improving the accuracy of data synchronization.
In yet another optional embodiment, the transmission module 304 generates a data synchronization identifier according to the service data intermediate file, and a manner of transmitting the service data to the target mobile terminal according to the data synchronization identifier is specifically as follows:
generating a data synchronization identifier according to the service data intermediate file, and converting the service data into target data in a preset data format according to the data synchronization identifier;
encrypting the target data to obtain encrypted data, and compressing the encrypted data to obtain compressed service data;
writing the compressed service data into a file stream to obtain a service data file;
judging whether the service data file meets the preset transmission condition or not;
when the service data file is judged to meet the preset transmission condition, transmitting the service data file to a target mobile terminal;
and when the service data file is judged not to meet the preset transmission condition, analyzing a target reason that the service data file does not meet the preset transmission condition, and executing operation matched with the target reason according to the target reason.
It can be seen that, the implementation of the apparatus described in fig. 4 can be beneficial to improving the accuracy of obtaining the service data file by converting the service data into the target data according to the data synchronization identifier, and thus can be beneficial to improving the accuracy of data synchronization, can be beneficial to improving the security of obtaining the service data file by encrypting the data, and can be beneficial to improving the security of data synchronization, and can be beneficial to improving the efficiency of obtaining the service data file by compressing the encrypted data to obtain the compressed service data, and thus can be beneficial to improving the efficiency of data synchronization.
In yet another alternative embodiment, the transmission module 304 performs the operation matching the target reason according to the target reason by:
judging whether the target reason is used for indicating that the data quantity of the business data file is larger than a preset quantity threshold value or not, acquiring historical synchronization data when the target reason is judged to be used for indicating that the data quantity of the business data file is larger than the preset quantity threshold value, and judging whether the business data file comprises first business data which are the same as the historical synchronization data or not;
when the business data file is judged to comprise the first business data, deleting the first business data from the business data file, updating the business data file, and executing the operation of judging whether the business data file meets the preset transmission condition;
when the first service data is not included in the service data file, analyzing the priority of all service data included in the service data file, deleting the second service data with the priority lower than a preset priority threshold from the service data file, updating the service data file, and executing the operation of judging whether the service data file meets the preset transmission condition.
It can be seen that, when the data quantity of the service data file is greater than the preset quantity threshold, the apparatus described in fig. 4 can obtain the historical synchronization data, determine whether the service data file includes the first service data that is the same as the historical synchronization data, when the determination result is yes, delete the first service data from the service data file and update the service data file, when the determination result is no, analyze the priorities of all the service data included in the service data file, delete the second service data with a lower priority from the service data file, and update the service data file, which can be beneficial to saving the data capacity of the storage space and can be beneficial to improving the efficiency of data synchronization.
In yet another optional embodiment, the receiving module 301 is further configured to generate a data synchronization identifier according to the service data intermediate file, and receive a data operation request sent by the synchronization terminal after transmitting the service data to the target mobile terminal according to the data synchronization identifier;
the determining module 309 is further configured to perform authority analysis on the data operation request through the authority mapping relationship table, and determine at least one target service operation logic corresponding to the service operation request;
the transmission module 304 is further configured to perform data operation processing on the data corresponding to the service operation request through each determined target service operation logic to obtain a data operation result, and transmit the data operation result to the synchronization terminal.
It can be seen that, the device described in fig. 4 can receive the data operation request sent by the synchronization terminal and perform permission analysis to determine the target service operation logic, perform data operation processing on the corresponding data through the determined target service operation logic to obtain a data operation result, and transmit the data operation result to the synchronization terminal, which can be beneficial to improving the intelligence of the data processing operation and the accuracy of the data processing operation.
Example four
Referring to fig. 5, fig. 5 is a schematic structural diagram of another data synchronization apparatus according to an embodiment of the present invention. As shown in fig. 5, the data synchronization apparatus may include:
a memory 401 storing executable program code;
a processor 402 coupled with the memory 401;
the processor 402 calls the executable program code stored in the memory 401 to execute the steps of the data synchronization method described in the first embodiment or the second embodiment of the present invention.
EXAMPLE five
The embodiment of the invention discloses a computer storage medium, which stores computer instructions, and the computer instructions are used for executing the steps in the data synchronization method described in the first embodiment or the second embodiment of the invention when being called.
EXAMPLE six
An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the data synchronization method described in the first embodiment or the second embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other disk memories, CD-ROMs, or other magnetic disks, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the data synchronization method and apparatus disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, which are only used for illustrating the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some 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 spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for synchronizing data, the method comprising:
receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information;
matching the request information with preset data version information to obtain a matching result, and determining service data corresponding to the data synchronization request according to the matching result;
performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file;
and generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier.
2. The data synchronization method according to claim 1, wherein after the receiving of the data synchronization request sent by the synchronization terminal, performing request parsing on the data synchronization request to obtain request information, and performing matching between the request information and preset data version information to obtain a matching result, and before determining service data corresponding to the data synchronization request according to the matching result, the data synchronization method further comprises:
acquiring the time information of the data synchronization request, and acquiring request log data in a preset time period before the time information;
inquiring whether the request log data contains a data synchronization request record which is the same as the data synchronization request or not based on the request log data and a preset time interval;
if yes, searching business data corresponding to the data synchronization request record, and taking the business data corresponding to the data synchronization request record as the business data corresponding to the data synchronization request;
if not, judging whether the request information meets a preset matching condition or not, and when the request information meets the preset matching condition, executing the step of matching the request information and preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result.
3. The data synchronization method according to claim 2, wherein the matching the request information and the preset data version information to obtain a matching result, and determining the service data corresponding to the data synchronization request according to the matching result comprises:
analyzing the request information to obtain a data matching statement corresponding to the request information;
determining a data storage space matched with the request information according to the data matching statement and preset data version information, and determining the data storage space as a matching result;
inquiring business data corresponding to the data synchronization request according to the matching result;
and performing data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file, including:
determining a data isolation instruction according to the data synchronization request, and performing data cleaning on the service data to obtain cleaned service data;
performing isolation strategy similarity calculation on the cleaned service data by adopting a preset strategy similarity function to obtain corresponding isolation strategy similarity;
performing data analysis on the isolation strategy similarity to determine a target isolation strategy corresponding to the service data;
and carrying out data isolation on the service data through the target isolation strategy to obtain a service data intermediate file.
4. The data synchronization method according to claim 3, wherein after the data isolation of the service data by the target isolation policy to obtain a service data intermediate file, the data synchronization method further comprises:
performing data analysis on the service data intermediate file to obtain a service data type set, wherein the service data type set comprises at least one service data type;
determining an attribution right corresponding to each service data type, and determining an operation authority type corresponding to each service data type according to the attribution right corresponding to each service data type;
and respectively determining the business operation logic corresponding to each operation authority type to obtain an authority mapping relation table.
5. The data synchronization method of claim 4, wherein the generating a data synchronization identifier according to the service data intermediate file, and transmitting the service data to a target mobile terminal according to the data synchronization identifier comprises:
generating a data synchronization identifier according to the service data intermediate file, and converting the service data into target data in a preset data format according to the data synchronization identifier;
encrypting the target data to obtain encrypted data, and compressing the encrypted data to obtain compressed service data;
writing the compressed service data into a file stream to obtain a service data file;
judging whether the service data file meets preset transmission conditions or not;
when the service data file is judged to meet the preset transmission condition, transmitting the service data file to a target mobile terminal;
and when the service data file is judged not to meet the preset transmission condition, analyzing a target reason that the service data file does not meet the preset transmission condition, and executing operation matched with the target reason according to the target reason.
6. The data synchronization method according to claim 5, wherein the performing, according to the target reason, the operation matched with the target reason comprises:
judging whether the target reason is used for indicating that the data quantity of the service data file is larger than a preset quantity threshold value or not, acquiring historical synchronization data when the target reason is judged to be used for indicating that the data quantity of the service data file is larger than the preset quantity threshold value, and judging whether the service data file comprises first service data which is the same as the historical synchronization data or not;
when the business data file is judged to comprise the first business data, deleting the first business data from the business data file, updating the business data file, and executing the step of judging whether the business data file meets the preset transmission condition;
when the first service data is not included in the service data file, analyzing the priority of all service data included in the service data file, deleting the second service data with the priority lower than a preset priority threshold from the service data file, updating the service data file, and executing the step of judging whether the service data file meets the preset transmission condition.
7. The data synchronization method according to claim 6, wherein after the generating of the data synchronization identifier according to the service data intermediate file and the transmitting of the service data to the target mobile terminal according to the data synchronization identifier, the data synchronization method further comprises:
receiving a data operation request sent by the synchronous terminal, performing authority analysis on the data operation request through the authority mapping relation table, and determining at least one target business operation logic corresponding to the business operation request;
and performing data operation processing on the data corresponding to the service operation request through each determined target service operation logic to obtain a data operation result, and transmitting the data operation result to the synchronous terminal.
8. A data synchronization apparatus, the apparatus comprising:
the receiving module is used for receiving a data synchronization request sent by a synchronization terminal, and performing request analysis on the data synchronization request to obtain request information;
the matching module is used for matching the request information with preset data version information to obtain a matching result, and determining service data corresponding to the data synchronization request according to the matching result;
the isolation module is used for carrying out data isolation processing on the service data according to a preset data isolation instruction to obtain a service data intermediate file;
and the transmission module is used for generating a data synchronization identifier according to the service data intermediate file and transmitting the service data to the target mobile terminal according to the data synchronization identifier.
9. A data synchronization apparatus, the apparatus comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform the data synchronization method of any of claims 1-7.
10. A computer-storable medium that stores computer instructions that, when invoked, perform a data synchronization method as claimed in any one of claims 1 to 7.
CN202210205137.5A 2022-03-02 2022-03-02 Data synchronization method and device and computer storage medium Pending CN114647698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210205137.5A CN114647698A (en) 2022-03-02 2022-03-02 Data synchronization method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210205137.5A CN114647698A (en) 2022-03-02 2022-03-02 Data synchronization method and device and computer storage medium

Publications (1)

Publication Number Publication Date
CN114647698A true CN114647698A (en) 2022-06-21

Family

ID=81994153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210205137.5A Pending CN114647698A (en) 2022-03-02 2022-03-02 Data synchronization method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN114647698A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115391827A (en) * 2022-10-28 2022-11-25 北京国电通网络技术有限公司 Log information storage method, apparatus, device, computer readable medium and product
CN116016491A (en) * 2022-12-26 2023-04-25 山东华方智联科技股份有限公司 Intelligent building design system and design method
CN116521622A (en) * 2023-06-30 2023-08-01 中邮消费金融有限公司 Method and system for automatically managing data based on data snapshot
CN116541448A (en) * 2023-05-10 2023-08-04 百应科技有限公司 Data integration processing method and device based on SaaS

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115391827A (en) * 2022-10-28 2022-11-25 北京国电通网络技术有限公司 Log information storage method, apparatus, device, computer readable medium and product
CN115391827B (en) * 2022-10-28 2023-01-17 北京国电通网络技术有限公司 Log information storage method, apparatus, device, computer readable medium and product
CN116016491A (en) * 2022-12-26 2023-04-25 山东华方智联科技股份有限公司 Intelligent building design system and design method
CN116016491B (en) * 2022-12-26 2023-09-05 山东华方智联科技股份有限公司 Intelligent building design system and design method
CN116541448A (en) * 2023-05-10 2023-08-04 百应科技有限公司 Data integration processing method and device based on SaaS
CN116541448B (en) * 2023-05-10 2023-12-08 汉友科技有限公司 Data integration processing method and device based on SaaS
CN116521622A (en) * 2023-06-30 2023-08-01 中邮消费金融有限公司 Method and system for automatically managing data based on data snapshot
CN116521622B (en) * 2023-06-30 2023-09-22 中邮消费金融有限公司 Method and system for automatically managing data based on data snapshot

Similar Documents

Publication Publication Date Title
CN114647698A (en) Data synchronization method and device and computer storage medium
CN107220142B (en) Method and device for executing data recovery operation
CN106936441B (en) Data compression method and device
CN113570466B (en) Transaction data processing method and device and readable storage medium
JP2020182214A (en) Verification system and method for cooperation of blockchain and off-chain device
CN112434039A (en) Data storage method, device, storage medium and electronic device
CN109145060B (en) Data processing method and device
CN111090268B (en) Data acquisition method and device based on thread division and data acquisition equipment
CN109947729B (en) Real-time data analysis method and device
CN111708794B (en) Data comparison method and device based on big data platform and computer equipment
CN110990365A (en) Data synchronization method, device, server and storage medium
CN112347192A (en) Data synchronization method, device, platform and readable medium
CN114398520A (en) Data retrieval method, system, device, electronic equipment and storage medium
CN114791927A (en) Data analysis method and device
CN115204889A (en) Text processing method and device, computer equipment and storage medium
WO2020000742A1 (en) Deduplication traffic recording method, device, server and storage medium
CN111343212B (en) Message processing method, device, equipment and storage medium
CN115033578A (en) Method for updating service data, related device and storage medium
CN112148920A (en) Data management method
CN111427917A (en) Search data processing method and related product
CN111046077A (en) Data acquisition method and device, storage medium and terminal
CN109558744B (en) Data processing method and system
CN116107801A (en) Transaction processing method and related product
CN114547182A (en) Personnel information synchronization method, terminal device and storage medium
CN114547184A (en) Personnel information synchronization method, terminal device and storage medium

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