CN117290445A - Data processing method, device, equipment and medium applied to item data synchronization - Google Patents

Data processing method, device, equipment and medium applied to item data synchronization Download PDF

Info

Publication number
CN117290445A
CN117290445A CN202311266950.4A CN202311266950A CN117290445A CN 117290445 A CN117290445 A CN 117290445A CN 202311266950 A CN202311266950 A CN 202311266950A CN 117290445 A CN117290445 A CN 117290445A
Authority
CN
China
Prior art keywords
data
item
data table
processing method
synchronization
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
CN202311266950.4A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311266950.4A priority Critical patent/CN117290445A/en
Publication of CN117290445A publication Critical patent/CN117290445A/en
Pending legal-status Critical Current

Links

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
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/23Updating
    • G06F16/2358Change logging, detection, and notification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, device, equipment and medium applied to item data synchronization. Relates to the technical field of computers. The method comprises the following steps: determining a data synchronization task corresponding to a data update operation of a first data table in response to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes a data table which needs to be synchronously updated with the first data table; and calling a preset data processing method based on the field name of the item data needing to be synchronously updated, and updating the item data in the second data table to finish data synchronization. The method solves the problems of large code workload, low synchronization efficiency and poor flexibility of data synchronization in the prior art.

Description

Data processing method, device, equipment and medium applied to item data synchronization
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, apparatus, device, and medium for event data synchronization.
Background
In the event directory system, one of the basic requirements is that after the data in the directory table corresponding to the event directory is updated, the data in the implementation list needs to be synchronously updated. Since the transaction types of the transactions in the transaction directory system may not be the same, after the directory table of each transaction is updated, the data types and the data amounts of the data in the implementation list table that need to be updated synchronously are also different.
In the related art, a data update code corresponding to a certain data to be synchronously updated is written, that is, after determining a data source corresponding to the data to be synchronously updated, a data table in which the data to be synchronously updated is located, and an update field name corresponding to the data to be synchronously updated, a corresponding data update code is written to realize synchronous update of the data in the implementation list table.
However, this data synchronization update method results in a large amount of code writing workload, and lacks flexibility, which affects the efficiency of data synchronization update.
Disclosure of Invention
The application provides a data processing method, device, equipment and medium applied to item data synchronization, which are used for solving the problems of low data synchronization updating efficiency and poor flexibility caused by huge code workload when data synchronization updating is performed in the prior art.
In a first aspect, the present application provides a data processing method applied to transaction data synchronization, including:
determining a data synchronization task corresponding to a data update operation of a first data table in response to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes a data table which needs to be synchronously updated with the first data table;
and calling a preset data processing method based on the field name of the item data needing to be synchronously updated, and updating the item data in the second data table to finish data synchronization.
In one possible design, the determining, in response to a data update operation to a first data table, a data synchronization task corresponding to the data update operation includes:
Determining a transaction type corresponding to transaction data corresponding to a data update operation in response to the data update operation on the first data table; wherein the item type characterizes an item to which the updated item data pertains;
determining a data synchronization requirement matched with the item type; wherein the data synchronization requirement is used for determining the event data needing to be synchronously updated;
and determining a data synchronization task corresponding to the data updating operation based on the data synchronization requirement.
In one possible design, the determining, based on the data synchronization requirement, a data synchronization task corresponding to the data update operation includes:
determining item data which needs to be synchronously updated and corresponds to the data updating operation based on the data synchronization requirement;
establishing an association relationship among the item type, the first data table, the second data table and field names of the item data needing synchronous updating;
and determining the data synchronization task based on the association relation.
In one possible design, the calling a preset data processing method based on the field name of the item data needing to be synchronously updated includes:
Determining the data table names corresponding to the first data table and the second data table respectively;
based on the data table names, respectively instantiating object classes matched with the first data table and the second data table to obtain instantiated object classes;
and calling a preset data processing method under the instantiated object class based on the field name of the item data needing to be synchronously updated.
In one possible design, the data processing method includes a first processing method and a second processing method; the first processing method is used for acquiring the data content of the item data; the second processing method is used for adding data content to the item data; the step of calling a preset data processing method based on the field name of the item data needing to be synchronously updated to update the item data in the second data table comprises the following steps:
determining updated item data corresponding to the item data needing to be synchronously updated from the first data table based on the data synchronization task, and calling a first processing method under an instantiated object class corresponding to the first data table based on a field name of the updated item data to acquire data content of the updated item data;
And calling a second processing method under the instantiated object class corresponding to the second data table based on the field name of the item data needing to be synchronously updated, which is included by the data synchronization task, and updating the item data needing to be synchronously updated in the second data table based on the second processing method and the data content of the item data to be updated.
In one possible design, before determining a data synchronization task corresponding to a data update operation to a first data table in response to the data update operation, the method further includes:
in response to a transaction update operation on a target transaction, determining at least one first data table corresponding to the transaction update operation;
and based on the event updating operation, carrying out data updating on each first data table.
In one possible design, the method further comprises:
and under the condition that the number of the first data tables is a plurality of, updating the item data in the second data table corresponding to each first data table, and finishing data synchronization.
In a second aspect, the present application provides a data processing apparatus comprising:
a determining unit configured to determine a data synchronization task corresponding to a data update operation on a first data table in response to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes a data table which needs to be synchronously updated with the first data table;
And the synchronization unit is used for calling a preset data processing method based on the field name of the item data needing to be synchronously updated, updating the item data in the second data table and finishing data synchronization.
In one possible design, the determining unit is configured to:
determining a transaction type corresponding to transaction data corresponding to a data update operation in response to the data update operation on the first data table; wherein the item type characterizes an item to which the updated item data pertains;
determining a data synchronization requirement matched with the item type; wherein the data synchronization requirement is used for determining the event data needing to be synchronously updated;
and determining a data synchronization task corresponding to the data updating operation based on the data synchronization requirement.
In one possible design, the determining unit is configured to:
determining item data which needs to be synchronously updated and corresponds to the data updating operation based on the data synchronization requirement;
establishing an association relationship among the item type, the first data table, the second data table and field names of the item data needing synchronous updating;
And determining the data synchronization task based on the association relation.
In one possible design, the synchronization unit is used for:
determining the data table names corresponding to the first data table and the second data table respectively;
based on the data table names, respectively instantiating object classes matched with the first data table and the second data table to obtain instantiated object classes;
and calling a preset data processing method under the instantiated object class based on the field name of the item data needing to be synchronously updated.
In one possible design, the data processing method includes a first processing method and a second processing method; the first processing method is used for acquiring the data content of the item data; the second processing method is used for adding data content to the item data.
At this time, the synchronization unit is configured to:
determining updated item data corresponding to the item data needing to be synchronously updated from the first data table based on the data synchronization task, and calling a first processing method under an instantiated object class corresponding to the first data table based on a field name of the updated item data to acquire data content of the updated item data;
And calling a second processing method under the instantiated object class corresponding to the second data table based on the field name of the item data needing to be synchronously updated, which is included by the data synchronization task, and updating the item data needing to be synchronously updated in the second data table based on the second processing method and the data content of the item data to be updated.
In one possible design, the apparatus further comprises:
a data update module, configured to, before determining a data synchronization task corresponding to a data update operation in response to the data update operation on a first data table, determine at least one first data table corresponding to a transaction update operation for a target transaction in response to the transaction update operation for the target transaction;
and based on the event updating operation, carrying out data updating on each first data table.
In one possible design, the device is also for:
and under the condition that the number of the first data tables is a plurality of, updating the item data in the second data table corresponding to each first data table, and finishing data synchronization.
In a third aspect, embodiments of the present application provide a computer device, comprising: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the data processing method as described above in the first aspect and the various possible designs of the first aspect for transaction data synchronization.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored therein computer executable instructions that when executed by a processor implement a data processing method for item data synchronization as described in the first aspect and various possible designs of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements a data processing method for item data synchronization as described in the first aspect and various possible designs of the first aspect.
The data processing method, the device, the equipment and the medium applied to the event data synchronization can preset corresponding data synchronization tasks aiming at data updating operation under different types of first data tables, avoid direct operation on data, ensure the integrity and the readability of the data during the data synchronization, and avoid the phenomenon of data synchronization errors caused by coding errors. Meanwhile, the reusability and maintainability of the data synchronization task under the first data table of the same type are realized by configuring the data synchronization task, so that the situation that the code corresponding to the item data which needs to be synchronously updated is rewritten every time data update is avoided, the workload of staff is reduced, and the efficiency is improved. Then, a data synchronization task corresponding to the data update operation can be determined in response to the data update operation on the first data table, and a preset data processing method is called to update the item data in the second data table based on the field name of the item data needing to be synchronously updated, which is included in the data synchronization task, so that data synchronization is completed. According to the embodiment, the event data which needs to be synchronously updated in the data synchronous task can be updated by calling the preset data processing method, so that the data synchronous update codes corresponding to the event data which needs to be synchronously updated are prevented from being written, the code workload is greatly reduced, and the data synchronous processing is more flexible and efficient. In addition, through presetting the data synchronization task, the item data needing to be synchronously updated can be added or deleted at will according to the actual requirement, so that the expansibility of the data processing method is stronger, and the data synchronization requirement can be better met.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario diagram of a data processing method applied to item data synchronization according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data processing method applied to event data synchronization according to an embodiment of the present application;
FIG. 3 is a flowchart of another data processing method applied to transaction data synchronization according to an embodiment of the present disclosure;
fig. 4 is an application flow diagram of a data processing method applied to transaction data synchronization according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data processing apparatus for transaction data synchronization according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of another data processing apparatus for transaction data synchronization according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
In the technical scheme of the application, the processing of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the related information such as financial data or user data accords with the regulations of related laws and regulations and does not violate the popular regulations. User information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to herein are both information and data that is authorized by the user or is fully authorized by the parties, and the collection, use, and processing of relevant data requires compliance with relevant laws and regulations and standards, and is provided with corresponding operational portals for the user to choose authorization or denial.
The term "and/or" is used herein to describe only one relationship, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Term interpretation:
instantiation: class creation process of objects.
Fig. 1 is an application scenario diagram of a data processing method applied to transaction data synchronization according to an embodiment of the present application. As shown in fig. 1, the application scenario includes: an item catalog system front end 101, an item catalog table 102, and an item implementation inventory table 103. The transaction directory system front end 101 may receive an interactive operation from a user to update the transaction data in the transaction directory table 102, and at this time, after the transaction data in the transaction directory table 102 is updated, the transaction data in the transaction implementation list table 103 needs to be synchronously updated to ensure stable operation of the transaction directory system.
In the related art, after the event data in the event directory table 102 is updated, the corresponding event data in the event implementation list table 103 is updated mainly by writing the data update code, and in the case that the event data to be updated is more, this embodiment causes a large amount of workload of writing the code, and lacks flexibility, which affects the efficiency of data processing.
Aiming at the technical problems, the application provides the following technical conception: corresponding data updating contents are pre-configured for different types of matters, and corresponding data updating methods are written, so that after the change of the matter data in a catalog table (namely, a first data table) corresponding to the matter catalog is detected, the corresponding data updating methods are called according to the pre-configured data updating contents to realize the matter data synchronization between the catalog table and an implementation list table. Therefore, a large amount of code work can be avoided, and the problems of low synchronous updating efficiency and poor flexibility of the item data in the prior art are solved.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
It should be noted that, the data processing method applied to event data synchronization provided in the embodiment of the present application may be applied to an application scenario of data synchronization update under an event directory system, and may also be applied to an application scenario of data synchronization update under another service processing system.
Fig. 2 is a flow chart of a data processing method applied to transaction data synchronization according to an embodiment of the present application. As shown in fig. 2, the data processing method applied to transaction data synchronization includes:
s201, responding to the data updating operation of the first data table, and determining a data synchronization task corresponding to the data updating operation.
The data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes the data table that needs to be updated synchronously with the first data table.
In one example, a first data table is used to store transaction data in a transaction directory table.
In one example, for a certain item, the number of first data tables corresponding to the item may be plural.
For example, in the case where the transaction is a government transaction, the first data table corresponding to the transaction may be any one of the following: basic information table, result table, electronic form table, application material table, material attachment table, transaction situation table, transaction charge information table, etc.
The type of the first data table is not particularly limited, and the data table corresponding to the specific item is used.
In one example, after an event has been updated, i.e., a data update operation to the first data table is detected, at which point a data synchronization task corresponding to the data update operation may be determined.
At this time, the data synchronization task is used to determine the event data that needs to be updated synchronously in the second data table corresponding to the first data table, and at this time, the data synchronization task may include a field name of the event data that needs to be updated synchronously.
In one example, where the first data table stores the transaction data corresponding to the transaction directory table, the second data table may be understood as being used to store the transaction data corresponding to the transaction implementation list table.
S202, calling a preset data processing method based on field names of item data needing to be synchronously updated, and updating the item data in a second data table to complete data synchronization.
In one example, the preset data processing method may include a preset get method for acquiring data content of the item data and a preset set method for adding data content to the item data, that is, for updating data content of the item data.
At this time, during the process of the event data synchronization, the data content of the event data in the first data table may be acquired by the get method, and the data content of the event data in the second data table may be updated based on the data content of the event data in the first data table by the set method.
As can be seen from the above description, according to the embodiment of the present application, the corresponding data synchronization task may be preset in advance for the data update operation under the first data table of different types, so that direct operation on data is avoided, integrity and readability of data during data synchronization are ensured, and a data synchronization error phenomenon caused by a coding error is avoided. Meanwhile, the reusability and maintainability of the data synchronization task under the first data table of the same type are realized by configuring the data synchronization task, so that the situation that the code corresponding to the item data which needs to be synchronously updated is rewritten every time data update is avoided, the workload of staff is reduced, and the efficiency is improved. Then, a data synchronization task corresponding to the data update operation can be determined in response to the data update operation on the first data table, and a preset data processing method is called to update the item data in the second data table based on the field name of the item data needing to be synchronously updated, which is included in the data synchronization task, so that data synchronization is completed. According to the embodiment, the event data which needs to be synchronously updated in the data synchronous task can be updated by calling the preset data processing method, so that the data synchronous update codes corresponding to the event data which needs to be synchronously updated are prevented from being written, the code workload is greatly reduced, and the data synchronous processing is more flexible and efficient. In addition, through presetting the data synchronization task, the item data needing to be synchronously updated can be added or deleted at will according to the actual requirement, so that the expansibility of the data processing method is stronger, and the data synchronization requirement can be better met.
Fig. 3 is a flowchart of another data processing method applied to transaction data synchronization according to an embodiment of the present application. As shown in fig. 3, the data processing method applied to transaction data synchronization includes:
s301, determining a transaction type corresponding to transaction data corresponding to a data updating operation in response to the data updating operation on the first data table.
Wherein the transaction type characterizes the transaction to which the updated transaction data pertains.
In one example, if the data update operation of the first data table is used to update the item data corresponding to item 1, the item type corresponding to item data may be determined by the item type of item 1.
In one example, assume that the event catalog system is a government event catalog system, and the event type may be any of the following: the types of matters are not particularly limited, and the types of matters corresponding to the types of the processing matters included in the system to which the data processing method of data synchronization is applied are not particularly limited.
At this time, when it is determined that the item 1 belongs to the administrative approval item, it is possible to determine that the item type corresponding to the item data under the item 1 is an administrative approval type.
S302, determining the data synchronization requirement matched with the item type.
Wherein the data synchronization requirement is used to determine the transaction data that needs to be synchronously updated.
In one example, there may be different data synchronization requirements for different transaction types, where the corresponding data synchronization requirements may be set according to the different data synchronization requirements corresponding to the different transaction types.
According to the embodiment, the types of matters can be customized, and corresponding data synchronization requirements can be met, so that data synchronization is more accurate, and various data synchronization requirements can be met.
At this time, after determining the item type corresponding to the item data corresponding to the data update operation, the matching data synchronization requirement may be determined based on the item type.
In one example, assuming that, for item type a, in the case where item data 1 is updated by the first data table, the field name of item data 1 is assumed to be field name 1, the data synchronization requirement may be: and synchronously updating the event data corresponding to the field name 11 in the second data table, wherein the field name 1 and the field name 11 are the same or corresponding. Alternatively, the data synchronization requirement may be: and synchronously updating the item data corresponding to the field name 12 in the second data table and synchronously updating the item data corresponding to the field name 2 in the second data table, wherein the field name 1 and the field name 12 are the same or corresponding, and the field name 2 is a newly added field in the second data table.
According to the embodiment, the second data table can be flexibly updated according to the data synchronization requirement under the condition of updating the first data table, for example, fields in the second data table can be added or added, so that the data synchronization is more flexible and diversified, and the expandability is strong.
S303, determining the item data which needs to be synchronously updated and corresponds to the data updating operation based on the data synchronization requirement.
The transaction data requiring synchronous update is transaction data in the second data table.
In one example, after determining a field name of the transaction data requiring synchronous update corresponding to the data update operation based on the data synchronization requirement, the transaction data requiring synchronous update corresponding to the data update operation may be determined.
S304, establishing an association relationship among the item type, the first data table, the second data table and field names of item data needing synchronous updating.
S305, determining a data synchronization task based on the association relation.
In the above embodiment, the data synchronization task is formed by associating the field names of the item type, the first data table, the second data table and the item data to be synchronously updated, so that the relevant content related to the data synchronization can be clearly and clearly specified in the data synchronization task, and the accuracy of the data synchronization result obtained after the execution of the data synchronization task can be ensured.
In one example, after determining the data synchronization task, the field name of the item data that needs to be updated synchronously and is included in the data synchronization task may be based; and calling a preset data processing method, updating the item data in the second data table, and completing data synchronization, wherein the specific implementation process can be seen in the steps of S306-S309.
S306, determining the data table names corresponding to the first data table and the second data table respectively.
S307, based on the names of the data tables, the object classes matched with the first data table and the second data table are respectively instantiated, and the instantiated object classes are obtained.
In one example, corresponding object classes may be pre-set for both the first data table and the second data table. At this time, the object class matched with the first data table can be instantiated through the data table name of the first data table, so as to obtain the instantiated object class corresponding to the first data table. Similarly, the object class matched with the second data table can be instantiated through the data table name of the second data table, and the instantiated object class corresponding to the second data table is obtained.
S308, calling a preset data processing method under the instantiated object class based on the field name of the item data needing synchronous updating.
S309, based on a preset data processing method under the instantiated object class, the item data in the second data table is updated, and data synchronization is completed.
In one example, the preset data processing method may include a first processing method and a second processing method. The first processing method is used for acquiring the data content of the item data (i.e., the above-mentioned get method), and the second processing method is used for adding the data content to the item data (i.e., the above-mentioned get method).
At this time, the processes described in S308 to S309 described above may be implemented according to the following steps.
First, based on a data synchronization task, updated transaction data corresponding to transaction data requiring synchronization update may be determined from the first data table. For example, the updated transaction data may be determined from the first data table by determining a field name corresponding to the field name of the transaction data that needs to be updated synchronously.
Then, based on the field name of the updated item data, a first processing method (i.e., a get method) under the instantiated object class corresponding to the first data table is called, and the data content of the updated item data is acquired.
Then, a second processing method under the instantiated object class corresponding to the second data table may be called based on the field name of the item data to be updated, which is included in the data synchronization task, and at this time, the item data to be updated in the second data table may be updated based on the second processing method and the data content of the item data to be updated, so as to complete data synchronization.
In the above embodiment, the object class and the data processing method corresponding to each data table may be set first, and then, the corresponding data processing method is invoked by instantiating the object class, so as to realize data synchronization, and dynamic use of the object class and the data processing method may be realized.
In one example, S301 to S309 are one embodiment of performing transaction data synchronization on a single first data table and a corresponding second data table. The following describes a procedure of the data processing method applied to item data synchronization according to the present embodiment in conjunction with a specific application scenario.
In one example, it is assumed that the data processing method for item data synchronization provided in the present embodiment is applied to an item directory system, where at least one first data table corresponding to an item update operation may be determined in response to the item update operation for a target item in the item directory system, and then, based on the item update operation, data update may be performed for each first data table. The following is a brief description with reference to the accompanying drawings.
Fig. 4 is an application flow chart of a data processing method applied to transaction data synchronization according to an embodiment of the present application. As shown in fig. 4, when it is determined that the number of at least one first data table corresponding to the transaction update operation is plural, each first data table may be updated based on the transaction update operation.
Thereafter, the transaction data in the second data table corresponding to each first data table (i.e., the determined data synchronization task shown in fig. 4, and the data processing method is called) may be updated synchronously according to the steps described in S301 to S309, so as to complete data synchronization.
In one example, when it is determined that the number of at least one first data table corresponding to the event updating operation is plural, a corresponding data synchronization task list may be preset according to the event changing operation, where the data synchronization task list includes a plurality of data synchronization tasks, and each data synchronization task may include an event type, a data table name of the first data table, a data table name of the second data table, and a field name of event data that needs to be updated synchronously.
At this time, in the case of synchronously updating the transaction data in the second data table corresponding to each first data table, a data synchronization task matching the first data table (or the second data table) currently required to be updated in data synchronization may be determined from the data synchronization task list, and then, the corresponding data synchronization task is executed according to the steps described in S301 to S309, so as to complete the transaction data synchronization process for the transaction change operation.
According to the embodiment, a complete and comprehensive data synchronization process aiming at the matters under a certain event type can be constructed, so that the data synchronization is more convenient and quicker, and the data synchronization efficiency is improved.
In one example, when the first data table is a directory table and the second data table is an implementation list, after the implementation list completes data synchronization, a worker may process a transaction after updating based on the implementation list.
Fig. 5 is a schematic structural diagram of a data processing apparatus applied to event data synchronization according to an embodiment of the present application, and as shown in fig. 5, a data processing apparatus 500 applied to event data synchronization includes:
a determining unit 501 configured to determine, in response to a data update operation on the first data table, a data synchronization task corresponding to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes the data table that needs to be updated synchronously with the first data table.
And the synchronization unit 502 is configured to invoke a preset data processing method based on a field name of the transaction data that needs to be updated synchronously, update the transaction data in the second data table, and complete data synchronization.
Fig. 6 is a schematic structural diagram of another data processing apparatus applied to transaction data synchronization according to an embodiment of the present application, and as shown in fig. 6, a data processing apparatus 600 applied to transaction data synchronization includes:
a determining unit 601 for determining a data synchronization task corresponding to a data update operation in response to the data update operation on the first data table; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes the data table that needs to be updated synchronously with the first data table.
And the synchronization unit 602 is configured to invoke a preset data processing method based on a field name of the transaction data that needs to be updated synchronously, update the transaction data in the second data table, and complete data synchronization.
In one possible design, the determining unit 601 is configured to:
Determining a transaction type corresponding to transaction data corresponding to a data update operation in response to the data update operation on the first data table; wherein, the item type characterizes the item to which the updated item data belongs;
determining a data synchronization requirement matched with the item type; wherein, the data synchronization requirement is used for determining the event data which needs to be synchronously updated;
based on the data synchronization requirements, a data synchronization task corresponding to the data update operation is determined.
In one possible design, the determining unit 601 is configured to:
determining item data which needs to be synchronously updated and corresponds to data updating operation based on the data synchronization requirement;
establishing an incidence relation among field names of item types, a first data table, a second data table and item data needing synchronous updating;
based on the association, a data synchronization task is determined.
In one possible design, the synchronization unit 602 is configured to:
determining the names of data tables corresponding to the first data table and the second data table respectively;
based on the names of the data tables, respectively instantiating the object classes matched with the first data table and the second data table to obtain instantiated object classes;
And calling a preset data processing method under the instantiated object class based on the field name of the item data needing synchronous updating.
In one possible design, the data processing method includes a first processing method and a second processing method; the first processing method is used for acquiring the data content of the item data; the second processing method is used for adding data content to the transaction data.
At this time, the synchronization unit 602 is configured to:
determining the updated item data corresponding to item data needing to be synchronously updated from a first data table based on a data synchronization task, and calling a first processing method under an instantiated object class corresponding to the first data table based on a field name of the updated item data to acquire the data content of the updated item data;
and calling a second processing method under the instantiated object class corresponding to the second data table based on the field name of the item data needing to be synchronously updated, which is included by the data synchronization task, and updating the item data needing to be synchronously updated in the second data table based on the second processing method and the data content of the updated item data.
In one possible design, the apparatus further comprises:
A data update module 603, configured to determine, in response to a transaction update operation on a target transaction, at least one first data table corresponding to the transaction update operation before determining a data synchronization task corresponding to the data update operation in response to the data update operation on the first data table;
based on the transaction update operation, data update is performed for each first data table.
In one possible design, the device is also for:
and under the condition that the number of the first data tables is a plurality of, the item data in the second data table corresponding to each first data table is updated, and the data synchronization is completed.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. The modules may be processing elements that are individually set up, may be implemented as integrated in a chip of the above-described apparatus, or may be stored in a memory of the above-described apparatus in the form of program codes, and the functions of the above-described modules may be called and executed by a processing element of the above-described apparatus. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 7, the computer device 700 may include: a transceiver 701, a processor 702, a memory 703.
The processor 702 executes computer-executable instructions stored in the memory, causing the processor 702 to perform the aspects of the embodiments described above. The processor 702 may be a general-purpose processor including a central processing unit CPU, a network processor (network processor, NP), etc.; but may also be a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
The memory 703 is connected to the processor 702 via a system bus and communicates with each other, the memory 703 being arranged to store computer program instructions.
The transceiver 701 may be used to obtain a task to be run and configuration information for the task to be run.
The system bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The system bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). The memory may include random access memory (random access memory, RAM) and may also include non-volatile memory (non-volatile memory).
The computer device provided in the embodiment of the present application may be a terminal device in the above embodiment.
The embodiment of the application also provides a chip for running the instruction, which is used for executing the technical scheme of the data processing method applied to the event data synchronization in the embodiment.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions, and when the computer instructions run on a computer, the computer is caused to execute the technical scheme of the data processing method applied to item data synchronization in the embodiment.
The embodiment of the application also provides a computer program product, which comprises a computer program stored in a computer readable storage medium, wherein at least one processor can read the computer program from the computer readable storage medium, and the technical scheme of the data processing method applied to item data synchronization in the embodiment can be realized when the at least one processor executes the computer program.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some steps of the methods of the various embodiments of the present application.
It should be understood that the above processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). Of course, the processor and the storage medium may reside as discrete components in an electronic control unit or master control device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (11)

1. A data processing method applied to transaction data synchronization, comprising:
determining a data synchronization task corresponding to a data update operation of a first data table in response to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes a data table which needs to be synchronously updated with the first data table;
and calling a preset data processing method based on the field name of the item data needing to be synchronously updated, and updating the item data in the second data table to finish data synchronization.
2. The method of claim 1, wherein the determining, in response to a data update operation to a first data table, a data synchronization task corresponding to the data update operation comprises:
determining a transaction type corresponding to transaction data corresponding to a data update operation in response to the data update operation on the first data table; wherein the item type characterizes an item to which the updated item data pertains;
Determining a data synchronization requirement matched with the item type; wherein the data synchronization requirement is used for determining the event data needing to be synchronously updated;
and determining a data synchronization task corresponding to the data updating operation based on the data synchronization requirement.
3. The method of claim 2, wherein the determining a data synchronization task corresponding to the data update operation based on the data synchronization requirement comprises:
determining item data which needs to be synchronously updated and corresponds to the data updating operation based on the data synchronization requirement;
establishing an association relationship among the item type, the first data table, the second data table and field names of the item data needing synchronous updating;
and determining the data synchronization task based on the association relation.
4. The method according to claim 2, wherein the calling a preset data processing method based on the field name of the transaction data requiring synchronous update includes:
determining the data table names corresponding to the first data table and the second data table respectively;
based on the data table names, respectively instantiating object classes matched with the first data table and the second data table to obtain instantiated object classes;
And calling a preset data processing method under the instantiated object class based on the field name of the item data needing to be synchronously updated.
5. The method of claim 4, wherein the data processing method comprises a first processing method and a second processing method; the first processing method is used for acquiring the data content of the item data; the second processing method is used for adding data content to the item data; the step of calling a preset data processing method based on the field name of the item data needing to be synchronously updated to update the item data in the second data table comprises the following steps:
determining updated item data corresponding to the item data needing to be synchronously updated from the first data table based on the data synchronization task, and calling a first processing method under an instantiated object class corresponding to the first data table based on a field name of the updated item data to acquire data content of the updated item data;
and calling a second processing method under the instantiated object class corresponding to the second data table based on the field name of the item data needing to be synchronously updated, which is included by the data synchronization task, and updating the item data needing to be synchronously updated in the second data table based on the second processing method and the data content of the item data to be updated.
6. The method of any of claims 1-5, wherein prior to determining a data synchronization task corresponding to a data update operation to a first data table in response to the data update operation, the method further comprises:
in response to a transaction update operation on a target transaction, determining at least one first data table corresponding to the transaction update operation;
and based on the event updating operation, carrying out data updating on each first data table.
7. The method of claim 6, wherein the method further comprises:
and under the condition that the number of the first data tables is a plurality of, updating the item data in the second data table corresponding to each first data table, and finishing data synchronization.
8. A data processing apparatus, comprising:
a determining unit configured to determine a data synchronization task corresponding to a data update operation on a first data table in response to the data update operation; the data synchronization task comprises a field name of item data needing to be synchronously updated; the field name of the item data needing synchronous update is the field name of the item data needing synchronous update in the second data table; the second data table characterizes a data table which needs to be synchronously updated with the first data table;
And the synchronization unit is used for calling a preset data processing method based on the field name of the item data needing to be synchronously updated, updating the item data in the second data table and finishing data synchronization.
9. A computer device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the data processing method of any one of claims 1-7 for application to transaction data synchronization.
10. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, which when executed by a processor, is configured to implement the data processing method for item data synchronization according to any one of claims 1 to 7.
11. A computer program product comprising a computer program which, when executed by a processor, implements a data processing method as claimed in any one of claims 1 to 7 for use in transactional data synchronisation.
CN202311266950.4A 2023-09-27 2023-09-27 Data processing method, device, equipment and medium applied to item data synchronization Pending CN117290445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311266950.4A CN117290445A (en) 2023-09-27 2023-09-27 Data processing method, device, equipment and medium applied to item data synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311266950.4A CN117290445A (en) 2023-09-27 2023-09-27 Data processing method, device, equipment and medium applied to item data synchronization

Publications (1)

Publication Number Publication Date
CN117290445A true CN117290445A (en) 2023-12-26

Family

ID=89258266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311266950.4A Pending CN117290445A (en) 2023-09-27 2023-09-27 Data processing method, device, equipment and medium applied to item data synchronization

Country Status (1)

Country Link
CN (1) CN117290445A (en)

Similar Documents

Publication Publication Date Title
CN110163572B (en) Chain code function processing method, device and equipment
CN112597153A (en) Data storage method and device based on block chain and storage medium
CN108415758B (en) Distributed transaction coordination method and device
CN113312259B (en) Interface testing method and device
CN110851207A (en) State transition management method and device, electronic equipment and computer readable storage medium
CN112199272A (en) Intelligent terminal testing method and device, terminal equipment and medium
CN115905040B (en) Counter processing method, graphics processor, device and storage medium
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN111352997A (en) Test environment verification method and system
CN111290961A (en) Interface test management method and device and terminal equipment
CN117290445A (en) Data processing method, device, equipment and medium applied to item data synchronization
CN116467085A (en) Task processing method, system, electronic device and storage medium
CN116049000A (en) Environment parameter configuration method, device, equipment, storage medium and product
CN112905381B (en) Method, device, equipment and medium for acquiring stack frame information in call stack
CN113760237A (en) Compiling address updating method and device, terminal equipment and readable storage medium
CN111078449B (en) Information processing method, information processing device and terminal equipment
CN111209283A (en) Data processing method and device
CN113779120A (en) Data query method, device, equipment and storage medium
CN112416444A (en) Board switching control method, device, equipment and medium
CN112286572A (en) Configuration method and device of business process
CN111737148A (en) Automatic regression testing method and device, computer equipment and storage medium
CN111414162B (en) Data processing method, device and equipment thereof
CN112766829A (en) Service processing method, device and equipment
CN116842084A (en) Data query method, device and storage medium in cloud environment
CN117251431A (en) Method, device, equipment and storage medium for processing business data in throwing account

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