Data processing method and device, equipment and storage medium

By configuring the data history version table for updates, the problem of long database update time and low efficiency caused by hard coding in existing technologies is solved, thus achieving efficient data history version management.

CN115292282BActive Publication Date: 2026-07-03CHINA CONSTRUCTION BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2022-08-03
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing technologies, managing historical versions of data requires technicians to design data structures themselves and use complex hard-coding methods for updates, resulting in long computer database updates and low operating efficiency.

Method used

Historical version updates are implemented through configuration. The data structure of the historical version table corresponds to the data structure of the business data table. The business data table is used to determine the entity class of the historical version, and the data of the historical version to be updated is determined based on the changed business data, thus avoiding complex operations of hard coding.

Benefits of technology

It simplifies the management process of historical data versions, reduces the time for computers to update databases, and improves operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115292282B_ABST
    Figure CN115292282B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and provides a data processing method, device, equipment and storage medium, wherein when business data is changed, a business data table corresponding to a business entity class of the business data is acquired; a history version table table name of the business data is determined according to the business data table; a history version entity class is determined according to the history version table table name; to-be-updated history version data is determined according to the business entity class and the history version entity class; and the history version table is updated according to the to-be-updated history version data, so that the updating of the history version is realized through configuration, the implementation mode is simple, and the efficiency of computer data processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology

[0002] In the era of big data, one of the important functions of a system is to store business data. As business data constantly changes, it is often necessary to view data at different points in time during business operations, that is, to view historical versions of business data. Managing historical versions of data has become an important requirement for the system.

[0003] Currently, to address the need to manage historical versions of data, backend developers need to design a separate data structure based on the business data's data structure to store historical versions of the data. When updating data in the computer's database, they also need to handle historical versions of the data separately through a relatively complex hard-coded method.

[0004] However, in existing technologies, historical data versions are stored by technicians designing their own data structures. When updating historical data versions in the database, it is necessary to process them separately through a relatively complex hard-coded method. This results in long computer database updates and low operating efficiency. Summary of the Invention

[0005] This application provides a data processing method, apparatus, device, and storage medium to solve the technical problems in the prior art where historical data versions are stored by technicians designing their own data structures, and when updating historical data versions in the database, they need to be processed separately through a relatively complex hard-coded method, resulting in long computer database updates and low operating efficiency.

[0006] In a first aspect, this application provides a data processing method, including:

[0007] When business data changes, retrieve the business data table corresponding to the business entity class of the business data.

[0008] Based on the business data table, determine the name of the historical version table of the business data;

[0009] Based on the table name of the historical version table of the business data, determine the entity class of the historical version;

[0010] Based on the business entity class and the historical version entity class, determine the historical version data to be updated;

[0011] Update the historical version table based on the historical version data to be updated.

[0012] Here, this application allows for the updating of historical versions through configuration when business data changes. The data structure of the historical version table corresponds to that of the business data table. The historical version entity class can be obtained from the business data, and the historical version data to be updated can be determined based on the changed business data, thus updating the historical version table in the database. The storage method of the historical version table is similar to that of the business data table, and it does not need to be stored separately. When business changes occur, there is no need to handle the historical version data separately through complex hard-coding methods. The updating of the historical version table in the database, i.e., the historical version data, can be achieved through configuration. The implementation method is simple, and compared with the hard-coding method, it reduces the time for the computer to update the database and improves the operating efficiency.

[0013] Optionally, determining the name of the historical version table of the business data based on the business data table includes:

[0014] Based on the data structure correspondence between the business data table, the preset business data table, and the historical version table, the name of the historical version table of the business data is determined.

[0015] In this application, the data structure correspondence between the business data table and the preset business data table and the historical version table can be determined in advance. Based on the correspondence between the data structure of the business data table and the preset business data table and the historical version table, the name of the historical version table can be determined through the business data table, thereby facilitating configuration.

[0016] Optionally, before determining the name of the historical version table of the business data based on the business data table, the method further includes:

[0017] Based on the newly added fields in the preset historical version, establish the data structure correspondence between the preset business data table and the historical version table. The newly added fields in the preset historical version include the business data identification number, the historical data creation time, the data table primary key, and the operation type.

[0018] Here, this application pre-establishes the data structure correspondence between the business data table and the preset business data table and the historical version table. The data structure of the historical version table is defined according to the business data table. By simply defining the data structure according to the data structure standard, the historical version management of data can be achieved through configuration, which improves the efficiency of data processing.

[0019] Optionally, determining the historical version entity class based on the name of the historical version table of business data includes:

[0020] The name of the historical version table of the business data is instantiated to obtain the historical version entity class.

[0021] Here, this application obtains the historical version entity class by instantiating the historical version table name. The historical entity class facilitates querying and updating historical data in the database based on the business entity class.

[0022] Optionally, determining the historical version data to be updated based on the business entity class and the historical version entity class includes:

[0023] Based on the business entity class, a query is performed in the database to determine the historical version entity class to be updated;

[0024] Based on the entity class of the historical version to be updated and the preset new fields of the historical version, determine the historical version data to be updated.

[0025] Here, this application can query the database through the business entity class to determine the details of the business data that has not been updated, obtain the historical version entity class to be updated, and assign values ​​to the historical version entity class to be updated by pre-setting the newly added fields of the historical version, thereby obtaining the historical version data to be updated and realizing the update of the historical version table. No hard coding is required, and the configuration can be automatically implemented, which improves the efficiency of data processing.

[0026] Optionally, after updating the historical version table based on the historical version data to be updated, the method further includes:

[0027] Update the business data table based on the historical version table.

[0028] Here, this application can update the business data table based on the historical version table, and update the historical version table to the business data database, which facilitates the query of historical business and improves the user experience.

[0029] Optionally, the business data table corresponding to the business entity class that obtains the business data includes:

[0030] The business data table corresponding to the business entity class of the business data is obtained through reflection.

[0031] Secondly, this application provides a data processing apparatus, comprising:

[0032] The acquisition module is used to acquire the business data table corresponding to the business entity class of the business data when the business data changes.

[0033] The first determining module is used to determine the name of the historical version table of the business data based on the business data table;

[0034] The second determining module determines the historical version entity class based on the table name of the historical version table of the business data;

[0035] The third determining module determines the historical version data to be updated based on the business entity class and the historical version entity class.

[0036] The first update module updates the historical version table based on the historical version data to be updated.

[0037] Optionally, the first determining module is specifically used for:

[0038] Based on the data structure correspondence between the business data table, the preset business data table, and the historical version table, the name of the historical version table of the business data is determined.

[0039] Optionally, before the first determining module determines the name of the historical version table of the business data based on the data structure correspondence between the business data table and the preset business data table and the historical version table, the above-mentioned device further includes:

[0040] The module is used to establish a data structure correspondence between a preset business data table and a historical version table based on the fields added in the preset historical version. The fields added in the preset historical version include business data identification number, historical data creation time, data table primary key, and operation type.

[0041] Optionally, the second determining module is specifically used for:

[0042] The name of the historical version table of the business data is instantiated to obtain the historical version entity class.

[0043] Optionally, the third determining module is specifically used for:

[0044] Based on the business entity class, a query is performed in the database to determine the historical version entity class to be updated;

[0045] Based on the entity class of the historical version to be updated and the preset new fields of the historical version, determine the historical version data to be updated.

[0046] Optionally, after the first update module updates the historical version table based on the historical version data to be updated, the above-mentioned device further includes:

[0047] The second update module is used to update the business data table based on the historical version table.

[0048] Optionally, the acquisition module is specifically used for:

[0049] The business data table corresponding to the business entity class of the business data is obtained through reflection.

[0050] Thirdly, this application provides a data processing device, comprising: at least one processor and a memory;

[0051] The memory stores computer-executed instructions;

[0052] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the data processing method as described in the first aspect and various possible designs of the first aspect.

[0053] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the data processing method described in the first aspect and various possible designs of the first aspect.

[0054] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the data processing method described in the first aspect and various possible designs of the first aspect.

[0055] The data processing method, apparatus, device, and storage medium provided in this application allow for the updating of historical versions when business data changes. The data structure of the historical version table corresponds to that of the business data table. The historical version entity class can be obtained from the business data, and the historical version data to be updated can be determined based on the changed business data, thereby updating the historical version table in the database. The storage method of the historical version table is similar to that of the business data table, and it does not need to be stored separately. When business changes occur, there is no need to process the historical version data separately through complex hard-coding methods. The updating of the historical version table in the database, i.e., the historical version data, can be achieved through configuration. The implementation method is simple, and compared with the hard-coding method, it reduces the time for computer to update the database and improves operating efficiency. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This application provides a schematic diagram of a data processing system architecture.

[0058] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0059] Figure 3 A flowchart illustrating another data processing method provided in an embodiment of this application;

[0060] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0061] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application.

[0062] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0064] The terms “first,” “second,” “third,” and “fourth,” etc. (if present), in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0065] First, the terms used in the embodiments of this application will be explained:

[0066] Historical data versions: After data is edited, the data before the modification is recorded as a historical version. In certain business scenarios, historical data versions can be traced back. In this embodiment, the historical version entity class is the entity class of the historical data version, the historical version table is the database table of the historical data version, and the historical version data can be the data in the historical version table.

[0067] Access control for historical version data: In certain business scenarios, access to historical versions of data requires specific role permissions. Therefore, access control needs to be added to historical version data so that users with the corresponding permissions can only access the historical version of the data.

[0068] To address the need for managing historical versions of data, backend developers must design a separate data structure to store historical versions on top of the existing business data structure. While performing CRUD operations on business data, historical versions must be handled separately using complex hard-coded methods. Due to varying developer skill levels, data structure designs can differ significantly, leading to a sharp increase in both performance and coding complexity. Hard-coding historical version handling is prone to errors, and updating historical data in the database also requires complex hard-coded methods, resulting in time-consuming and inefficient database updates. A configurable solution based on a high-performance, fixed implementation is needed to address this issue.

[0069] To address the aforementioned issues, embodiments of this application provide a data processing method, apparatus, device, and storage medium. This method achieves historical version management without requiring additional code by designing a data structure according to specifications and inheriting a specified parent class from the backend data entity class. Historical version updates are implemented through configuration. The data structure of the historical version table corresponds to the data structure of the business data table. Historical version entity classes can be obtained from business data, and the historical version data to be updated can be determined based on the changed business data, thus updating the historical version table in the database.

[0070] The collection, storage, use, processing, transmission, provision, and disclosure of user data and other information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0071] Optional, Figure 1 This is a schematic diagram of a data processing system architecture provided in an embodiment of this application. Figure 1 In the above architecture, at least one of data acquisition device 101, processing device 102 and display device 103 is included.

[0072] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the architecture of a data processing system. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.

[0073] In the specific implementation process, the data acquisition device 101 may include an input / output interface or a communication interface, and the data acquisition device 101 can be connected to the processing device through the input / output interface or the communication interface.

[0074] Processing device 102 can manage historical versions of data without adding extra code by designing the data structure according to the specifications and inheriting the specified parent class in the backend data entity class. The historical version table can be updated through configuration. The data structure of the historical version table corresponds to the data structure of the business data table. The historical version entity class can be obtained through the business data, and the historical version data to be updated can be determined according to the changed business data, thereby realizing the update of the historical version table in the database.

[0075] The display device 103 can also be a touch screen or the screen of a terminal device, used to receive user commands while displaying the above-mentioned content, so as to realize interaction with the user.

[0076] It should be understood that the aforementioned processing device can be implemented by a processor reading instructions from memory and executing those instructions, or it can be implemented by a chip circuit.

[0077] Furthermore, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0078] The technical solution of this application will be described in detail below with reference to specific embodiments:

[0079] Optionally, Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The execution entity of this embodiment can be... Figure 1 The specific execution entity of the processing device 102 can be determined according to the actual application scenario. For example... Figure 2 As shown, the method includes the following steps:

[0080] S201: When business data changes, retrieve the business data table corresponding to the business entity class that contains the business data.

[0081] Optionally, the business data table corresponding to the business entity class that retrieves business data includes:

[0082] The business data table corresponding to the business entity class is obtained through reflection.

[0083] Alternatively, the business data table corresponding to the business entity class can be obtained through Java reflection.

[0084] S202: Determine the name of the historical version table of the business data based on the business data table.

[0085] Optionally, the name of the historical version table of business data is determined based on the business data table, including: determining the name of the historical version table of business data based on the data structure correspondence between the business data table and the preset business data table and the historical version table.

[0086] In this embodiment, the data structure correspondence between the business data table and the preset business data table and the historical version table can be determined in advance. Based on the correspondence between the data structure of the business data table and the preset business data table and the historical version table, the name of the historical version table can be determined through the business data table, thereby facilitating configuration.

[0087] Optionally, before determining the name of the historical version table of business data based on the business data table, the method further includes: establishing a data structure correspondence between the preset business data table and the historical version table based on the preset fields added in the historical version.

[0088] Among them, the newly added fields in the preset historical version include business data identification number, historical data creation time, data table primary key, and operation type.

[0089] Here, in this embodiment of the application, a data structure correspondence between the business data table and the preset business data table and the historical version table is established in advance. The data structure of the historical version table is defined according to the business data table. It is only necessary to define the data structure according to the data structure standard to realize the management of historical versions of data through configuration, thereby improving the efficiency of data processing.

[0090] In one possible implementation, this application predefines a data structure standard. By defining the data structure standard according to this standard, configuration-based historical version management can be achieved. The standard definition is as follows:

[0091] Based on the business data table, add a historical version table for the business data. As an example, the table name follows the rule: business data table name + '_history'. According to data structure standards, the name of the corresponding historical version table can be inferred from the business data table name.

[0092] While completely replicating the fields from the business data table, the following fields will be added to the historical data version table:

[0093] Field 1: Business Data Identity Document (ID), which is the ID of the associated business data table data. It is used to identify which record in the current business data table this historical version corresponds to. An index is added to this field to improve query efficiency.

[0094] Field 2: Historical data creation time (his_create_time), which indicates when this historical data was created.

[0095] Field 3: Primary key of the data table (his_id), the primary key of the historical version table, uniquely identifies a historical version of the data.

[0096] Field 4: Operation type (operate_type), which identifies the business data operation type when this historical version of data becomes historical data, including: 1 (modify) and 2 (delete).

[0097] In one possible implementation, it is necessary to predefine the business entity class, specifically: define the entity class name; add an entity class annotation to the entity class name to identify the database table name corresponding to the entity class (e.g., @tablename(value = busi_data)); and define the data table fields used in the entity class.

[0098] In one possible implementation, it is also necessary to predefine the base parent class (BaseHisService) of the service class, so that the subclasses can provide interfaces for adding, deleting, modifying and querying data related to historical versions without writing any code.

[0099] Optionally, the above interface includes a business data query interface (busiQuery), where business data that meets the query conditions can be obtained by passing in the query conditions.

[0100] Optionally, the above interface includes a business data addition interface (busiInsert), which takes in the business data to be added and saves the added business data to the database.

[0101] Optionally, the above interface includes a business data update interface (busiUpdate), which takes in the business data to be modified: it derives the historical version entity class from the input business entity class; it inserts the current business data into the historical version table using the historical version entity class, where the busi_id of the historical version record is equal to the ID of the current business data; and it updates the data in the business data table based on the input data.

[0102] Optionally, the above interface includes a business data deletion interface (busiDel), which takes the business data to be deleted as input, deduces the historical version entity class based on the input business entity class, inserts the current business data into the historical version table using the historical version entity class, and sets the busi_id of the historical version record to the ID of the current business data, and deletes the data in the business data table based on the input data.

[0103] Optionally, the above interfaces include a business data deletion interface and a historical version query interface (busiHisQuery), which can obtain the historical versions of business data that meet the query conditions by passing in the query conditions.

[0104] 5. Definition of Business Service Class

[0105] In one possible implementation, this application predefines business service classes that inherit from the base service parent class, for example: Public class BusiService extends BaseHisService.

[0106] It is understood that the above names and implementation methods are merely illustrative and are not limited to specific implementation methods in actual applications.

[0107] S203: Determine the entity class of the historical version based on the table name of the historical version of the business data.

[0108] Optionally, based on the name of the historical version table of business data, the historical version entity class is determined, including: instantiating the name of the historical version table of business data to obtain the historical version entity class.

[0109] Here, in this embodiment of the application, the historical version entity class is obtained by instantiating the historical version table name. The historical entity class facilitates the querying and updating of historical data in the database based on the business entity class.

[0110] S204: Determine the historical version data to be updated based on the business entity class and the historical version entity class.

[0111] S205: Update the historical version table based on the historical version data to be updated.

[0112] Here, in this embodiment of the application, when business data changes, the historical version can be updated through configuration. The data structure of the historical version table corresponds to the data structure of the business data table. The historical version entity class can be obtained from the business data, and the historical version data to be updated can be determined according to the changed business data, thereby updating the historical version table in the database. The data historical version table is stored in a similar way to the data structure of the business data table, and does not need to be stored separately. When business changes occur, there is no need to process the historical version of the data separately through complex hard-coding. The historical version table in the database, i.e., the historical version of the data, can be updated through configuration. The implementation method is simple. Compared with the hard-coding method, it reduces the time for the computer to update the database and improves the operating efficiency.

[0113] Optionally, after updating the historical version table based on the historical version data to be updated, the method further includes: updating the business data table based on the historical version table.

[0114] Here, in this embodiment of the application, the business data table can be updated according to the historical version table, and the historical version table can be updated to the business data database, which facilitates the query of historical business and improves the user experience.

[0115] In some embodiments, this application determines the historical version data to be updated through a historical version table and a business entity class. Correspondingly, Figure 3 A flowchart illustrating another data processing method provided in this application embodiment is shown below. Figure 3 As shown, the method includes:

[0116] S301: When business data changes, retrieve the business data table corresponding to the business entity class that holds the business data.

[0117] S302: Determine the name of the historical version table of the business data based on the business data table.

[0118] S303: Determine the historical version entity class based on the table name of the historical version table of business data.

[0119] The implementation methods of steps S301-S303 are similar to those of steps S201-S203, and no specific limitations are imposed on the embodiments of this application.

[0120] S304: Perform a query in the database based on the business entity class to determine the historical version entity class to be updated.

[0121] Optionally, you can query the details of business data that has not been updated in the current database summary, based on the business entity class passed in.

[0122] Optionally, the unupdated business data details can be copied to the historical version of the entity class.

[0123] S305: Determine the historical version data to be updated based on the entity class of the historical version to be updated and the newly added fields of the preset historical version.

[0124] Optionally, the unupdated business data details can be assigned to the historical version entity class, and standard defined fields such as business data ID, historical data creation time, and operation type can be set.

[0125] In this embodiment, the development of the data history version function can be achieved by configuring and writing a very small amount of code, which is more efficient than the hard-coding method. The development of the data history version function by configuration requires very little and is standardized, and the computer's data accuracy is high.

[0126] S306: Update the historical version table based on the historical version data to be updated.

[0127] Optionally, historical version data can be inserted into a historical version table.

[0128] This application embodiment can query the database through business entity classes to determine the details of business data that has not been updated, obtain the historical version entity class to be updated, and assign values ​​to the historical version entity class to be updated by pre-setting the newly added fields of the historical version, thereby obtaining the historical version data to be updated, realizing the update of the historical version table. No hard coding is required, and the configuration can be automatically implemented, improving the efficiency of data processing.

[0129] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application, as shown below. Figure 4 As shown, the apparatus in this embodiment includes: a first acquisition module 401, a first determination module 402, a second determination module 403, a third determination module 404, and a first update module 405. The data processing apparatus here can be the aforementioned processing apparatus, the processor itself, or a chip or integrated circuit that implements the functions of a processor. It should be noted that the division of the first acquisition module 401, the first determination module 402, the second determination module 403, the third determination module 404, and the first update module 405 is only a logical functional division; physically, they can be integrated or independent.

[0130] The acquisition module is used to acquire the business data table corresponding to the business entity class of the business data when the business data changes.

[0131] The first determination module is used to determine the name of the historical version table of the business data based on the business data table;

[0132] The second determination module determines the entity class of the historical version based on the table name of the historical version table of business data;

[0133] The third determination module determines the historical version data to be updated based on the business entity class and the historical version entity class.

[0134] The first update module updates the historical version table based on the historical version data to be updated.

[0135] Optionally, the first determining module is specifically used for:

[0136] Based on the data structure correspondence between the business data table, the preset business data table, and the historical version table, determine the name of the historical version table for the business data.

[0137] Optionally, before the first determining module determines the name of the historical version table of the business data based on the data structure correspondence between the business data table and the preset business data table and the historical version table, the above-mentioned device further includes:

[0138] The module is used to establish the data structure correspondence between the preset business data table and the historical version table based on the fields added in the preset historical version. The fields added in the preset historical version include the business data identification number, the historical data creation time, the primary key of the data table, and the operation type.

[0139] Optionally, the second determining module is specifically used for:

[0140] Instantiate the table name of the historical version table of business data to obtain the historical version entity class.

[0141] Optionally, the third determining module is specifically used for:

[0142] Based on the business entity class, perform a query in the database to determine the historical version entity class to be updated;

[0143] Based on the entity class of the historical version to be updated and the newly added fields of the preset historical version, determine the historical version data to be updated.

[0144] Optionally, after the first update module updates the historical version table based on the historical version data to be updated, the above-mentioned device further includes:

[0145] The second update module is used to update the business data table based on the historical version table.

[0146] Optionally, the acquisition module is specifically used for:

[0147] The business data table corresponding to the business entity class is obtained through reflection.

[0148] To implement the above embodiments, this disclosure also provides a data processing device.

[0149] refer to Figure 5The diagram illustrates a structural schematic of a data processing device 500 suitable for implementing embodiments of the present disclosure. The data processing device 500 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable multimedia players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The data processing device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0150] like Figure 5 As shown, the data processing device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the data processing device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0151] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows data processing device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 A data processing apparatus 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0152] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0153] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0154] The aforementioned computer-readable medium may be included in the aforementioned data processing device; or it may exist independently and not assembled into the data processing device.

[0155] The aforementioned computer-readable medium carries one or more programs, which, when executed by the data processing device, cause the data processing device to perform the method shown in the above embodiments.

[0156] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0158] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0159] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0160] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0161] The data processing device in this application embodiment can be used to execute the technical solutions in the above-described method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0162] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the above-described data processing methods.

[0163] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement any of the above-described data processing methods.

[0164] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0165] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0166] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0167] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A data processing method, characterized by, include: When business data changes, retrieve the business data table corresponding to the business entity class of the business data. Based on the fields added in the preset historical versions, establish the data structure correspondence between the preset business data table and the historical version table; The name of the historical version table of the business data is determined based on the data structure correspondence between the business data table, the preset business data table, and the historical version table. The name of the historical version table of the business data is instantiated to obtain the historical version entity class; Based on the business entity class, a query is performed in the database to determine the historical version entity class to be updated; Based on the entity class of the historical version to be updated and the preset new fields of the historical version, the data of the historical version to be updated is determined; the preset new fields of the historical version include business data identification number, historical data creation time, data table primary key and operation type; Update the historical version table based on the historical version data to be updated.

2. The method according to claim 1, characterized in that, After updating the historical version table based on the historical version data to be updated, the following steps are also included: Update the business data table based on the historical version table.

3. The method according to claim 1 or 2, characterized in that, The business data table corresponding to the business entity class that obtains the business data includes: The business data table corresponding to the business entity class of the business data is obtained through reflection.

4. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire the business data table corresponding to the business entity class of the business data when the business data changes. The module is used to establish the data structure correspondence between the preset business data table and the historical version table based on the fields added in the preset historical version. The first determining module is used to determine the name of the historical version table of the business data based on the data structure correspondence between the business data table and the preset business data table and the historical version table; The second determining module is used to instantiate the table name of the historical version table of the business data to obtain the historical version entity class; The third determination module is used to perform query processing in the database based on the business entity class to determine the historical version entity class to be updated; and to determine the historical version data to be updated based on the historical version entity class to be updated and the preset historical version added fields; the preset historical version added fields include business data identification number, historical data creation time, data table primary key and operation type; The first update module updates the historical version table based on the historical version data to be updated.

5. A data processing device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the data processing method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data processing method as described in any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 3.