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

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

Info

Publication number
CN115292282A
CN115292282A CN202210925857.9A CN202210925857A CN115292282A CN 115292282 A CN115292282 A CN 115292282A CN 202210925857 A CN202210925857 A CN 202210925857A CN 115292282 A CN115292282 A CN 115292282A
Authority
CN
China
Prior art keywords
data
historical version
service data
entity class
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210925857.9A
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
Original Assignee
China Construction Bank Corp
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 filed Critical China Construction Bank Corp
Priority to CN202210925857.9A priority Critical patent/CN115292282A/en
Publication of CN115292282A publication Critical patent/CN115292282A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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

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)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of data processing, and provides a data processing method, a device, equipment and a storage medium, wherein when service data is changed, a service data table corresponding to a service entity class of the service data is acquired; determining a table name of a historical version of the business data according to the business data table; determining a historical version entity class according to the name of the historical version table of the service data; determining historical version data to be updated according to the business entity class and the historical version entity class; the historical version table is updated according to the historical version data to be updated, the historical version is updated through configuration, the implementation mode is simple, and the efficiency of computer data processing is improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In the big data era, one of the important functions of the system is to store business data, and with the continuous change of the business data, the data condition that nodes at different times need to be checked frequently occurs in the business development work, namely, the historical data version of the business data is checked. Management of historical versions of data becomes an important requirement of the system.
At present, for the requirement of managing the historical version of data, back-end development needs to separately design a data structure on the basis of the data structure of business data to store the historical version of data, and when updating the data in the database of a computer, the historical version of data needs to be separately processed in a more complex hard coding manner.
However, in the prior art, the data history version is stored by designing a data structure by a technician, and when the data history version in the database is updated, the data history version needs to be processed separately in a more complex hard coding mode, so that the time consumption for updating the database by a computer is long, and the operation efficiency is low.
Disclosure of Invention
The application provides a data processing method, a data processing device and a storage medium, so that the technical problems that in the prior art, a data history version is stored by a data structure designed by a technician, when the data history version in a database is updated, the data history version needs to be processed independently in a relatively complex hard coding mode, a computer is long in time consumption for updating the database, and the operation efficiency is low are solved.
In a first aspect, the present application provides a data processing method, including:
when the service data is changed, acquiring a service data table corresponding to a service entity class of the service data;
determining a table name of a historical version of the business data according to the business data table;
determining a historical version entity class according to the table name of the historical version of the service data;
determining historical version data to be updated according to the business entity class and the historical version entity class;
and updating the historical version table according to the historical version data to be updated.
Here, when service data is changed, the update of the historical version can be realized through configuration, the data structure of the historical version table has a corresponding relationship with the data structure of the service data table, the entity class of the historical version can be obtained through the service data, the historical version data to be updated is determined according to the changed service data, and the update of the historical version table in the database is realized.
Optionally, the determining, according to the service data table, a table name of a historical version of the service data includes:
and determining the name of the historical version table of the service data according to the corresponding relation between the service data table and the data structures of the preset service data table and the historical version table.
The method and the device can determine the corresponding relation of the business data table and the data structures of the preset business data table and the historical version table in advance, and can determine the name of the historical version table through the business data table according to the corresponding relation of the business data table and the data structures of the preset business data table and the historical version table, so that configuration can be achieved conveniently.
Optionally, before determining the table name of the historical version of the service data according to the service data table, the method further includes:
and establishing a data structure corresponding relation between a preset service data table and a historical version table according to the preset historical version newly added field, wherein the preset historical version newly added field comprises a service data identity identification number, historical data creation time, a data table main key and an operation type.
The data structure corresponding relation 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, the data historical version management can be achieved through configuration only by defining the data structure according to the data structure standard, and the data processing efficiency is improved.
Optionally, the determining a historical version entity class according to the name of the historical version table of the service data includes:
and instantiating the name of the historical version table of the service data to obtain a historical version entity class.
The historical version entity class is obtained by instantiating the historical version table name, and the historical data in the database can be conveniently inquired and updated according to the business entity class through the historical entity class.
Optionally, the determining historical version data to be updated according to the service entity class and the historical version entity class includes:
performing query processing in a database according to the service entity class, and determining a historical version entity class to be updated;
and determining the historical version data to be updated according to the entity class of the historical version to be updated and the newly added field of the preset historical version.
The method and the device can query in the database through the business entity class, thereby determining details of the business data which are not updated, obtaining the entity class of the historical version to be updated, assigning the entity class of the historical version to be updated through the preset newly added field of the historical version, obtaining the data of the historical version to be updated, updating the historical version table, automatically realizing configuration without hard coding, and improving the efficiency of data processing.
Optionally, after the updating the history version table according to the history version data to be updated, the method further includes:
and updating the service data table according to the historical version table.
Here, the service data table can be updated according to the historical version table, and the historical version table is updated to the database of the service data, so that the query of historical services is facilitated, and the user experience is improved.
Optionally, the obtaining of the service data table corresponding to the service entity class of the service data includes:
and acquiring a service data table corresponding to the service entity class of the service data through a reflection mechanism.
In a second aspect, the present application provides a data processing apparatus comprising:
the acquisition module is used for acquiring a service data table corresponding to a service entity class of the service data when the service data is changed;
the first determining module is used for determining the table name of the historical version of the business data according to the business data table;
the second determining module is used for determining the entity class of the historical version according to the table name of the historical version of the service data;
the third determining module is used for determining historical version data to be updated according to the business entity class and the historical version entity class;
and the first updating module updates the historical version table according to the historical version data to be updated.
Optionally, the first determining module is specifically configured to:
and determining the name of the historical version table of the service data according to the corresponding relation between the service data table and the data structures of the preset service data table and the historical version table.
Optionally, before the first determining module determines the name of the historical version table of the service data according to the correspondence between the service data table and the data structures of the preset service data table and the historical version table, the apparatus further includes:
the establishing module is used for establishing a data structure corresponding relation between a preset service data table and a historical version table according to a preset historical version newly added field, wherein the preset historical version newly added field comprises a service data identity identification number, historical data establishing time, a data table main key and an operation type.
Optionally, the second determining module is specifically configured to:
and instantiating the table name of the historical version of the service data to obtain an entity class of the historical version.
Optionally, the third determining module is specifically configured to:
performing query processing in a database according to the service entity class, and determining a historical version entity class to be updated;
and determining the historical version data to be updated according to the entity class of the historical version to be updated and the newly added field of the preset historical version.
Optionally, after the first updating module updates the history version table according to the history version data to be updated, the apparatus further includes:
and the second updating module is used for updating the service data table according to the historical version table.
Optionally, the obtaining module is specifically configured to:
and acquiring a service data table corresponding to the service entity class of the service data through a reflection mechanism.
In a third aspect, the present application provides a data processing apparatus comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes 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 various possible designs of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement a data processing method as set forth in the first aspect above and in various possible designs of the first aspect.
In a fifth aspect, the present invention provides a computer program product comprising a computer program which, when executed by a processor, carries out the data processing method of the first aspect as well as various possible designs of the first aspect.
The method can update the historical version through configuration when the business data is changed, the data structure of the historical version table and the data structure of the business data table have a corresponding relation, the entity class of the historical version can be obtained through the business data, the historical version data to be updated is determined according to the changed business data, the update of the historical version table in the database is realized, the storage mode of the historical version table of the data is similar to the data structure of the business data table and does not need to be stored independently, the historical version of the data does not need to be processed independently through a complex hard coding mode when the business is changed, the update of the historical version table, namely the historical version of the data in the database can be realized through configuration, the realization mode is simple, compared with the hard coding mode, the time for updating the database by a computer is reduced, and the operation efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of another data processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. The drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
The terms "first," "second," "third," and "fourth," if any, in the description and claims of this application and the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, terms in the embodiments of the present application are explained:
data history version: after the data is edited, the data before modification is used as a history version, which can be recorded, and the data history version is traced back in some service scenarios.
And (3) controlling the access authority of the history version data: for historical versions of data, access is allowed only by corresponding role authority under certain business scenarios, so that access authority control needs to be added to historical version data, and the historical versions corresponding to the data can be accessed only when a user has a corresponding authority role.
For the requirement of managing the historical version of the data, the back-end development needs to design the data structure separately on the basis of the data structure of the business data to save the historical version of the data. When the business data is subjected to the operation of adding, deleting and modifying, historical versions of the data need to be processed independently through a relatively complex hard coding mode, due to the fact that the capacities of developers are different, the design of data structures may be greatly different, performance and coding complexity are increased linearly, problems are prone to occurring when the historical versions of the data are processed through hard coding, when the historical versions of the data in the database are updated, the historical versions of the data need to be processed independently through the relatively complex hard coding mode, and the time consumed for updating the database by a computer is long, and the operation efficiency is low. There is a need for a configurable dialog operation based on a cured implementation that supports high performance to address this problem.
In order to solve the above problems, embodiments of the present application provide a data processing method, an apparatus, a device, and a storage medium, where the method, by designing a data structure according to a specification and inheriting a specified parent class in a data entity class at a back end, implements management of a historical version of data without adding an additional code, and implements updating of a historical version by configuration, where the data structure of a historical version table has a corresponding relationship with a data structure of a business data table, and the historical version entity class can be obtained through business data, and the historical version data to be updated is determined according to changed business data, thereby implementing updating of the historical version table in a database.
In the technical scheme of the application, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the related user data and other information all accord with the regulations of related laws and regulations and do not violate the good customs of the public order.
Optionally, fig. 1 is a schematic diagram of an architecture of a data processing system according to an embodiment of the present application. In fig. 1, the architecture includes at least one of a data acquisition device 101, a processing device 102, and a display device 103.
It should be understood that the illustrated architecture of the embodiments of the present application does not constitute a specific limitation on the architecture of a data processing system. In other possible embodiments of the present application, the foregoing architecture may include more or less components than those shown in the drawings, or combine some components, or split some components, or arrange different components, which may be determined according to practical application scenarios, and is not limited herein. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
In a specific implementation process, the data acquisition device 101 may include an input/output interface and may also include a communication interface, and the data acquisition device 101 may be connected to the processing device through the input/output interface or the communication interface.
The processing device 102 can implement historical version management of data by designing a data structure according to the specification and inheriting the specified parent class in the data entity class at the rear end without adding extra codes, update of the historical version is implemented by configuration, the data structure of the historical version table has a corresponding relation with the data structure of the business data table, the historical version entity class can be obtained through the business data, the historical version data to be updated is determined according to the changed business data, and update of the historical version table in the database is implemented.
The display device 103 may also be a touch display screen or a screen of a terminal device for receiving a user instruction while displaying the above-mentioned content to enable interaction with a user.
It should be understood that the processing device may be implemented by a processor reading instructions in a memory and executing the instructions, or may be implemented by a chip circuit.
In addition, the network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
The technical scheme of the application is described in detail by combining specific embodiments as follows:
optionally, fig. 2 is a schematic flow chart of a data processing method provided in the embodiment of the present application. The execution subject in the embodiment of the present application may be the processing device 102 in fig. 1, and the specific execution subject may be determined according to an actual application scenario. As shown in fig. 2, the method comprises the steps of:
s201: and when the service data is changed, acquiring a service data table corresponding to the service entity class of the service data.
Optionally, the service data table corresponding to the service entity class for obtaining the service data includes:
and acquiring a service data table corresponding to the service entity class of the service data through a reflection mechanism.
Optionally, the service data table corresponding to the service entity class may be obtained through a Java reflection mechanism.
S202: and determining the table name of the historical version of the service data according to the service data table.
Optionally, determining a table name of a historical version of the service data according to the service data table includes: and determining the name of the historical version table of the service data according to the corresponding relation between the service data table and the data structures of the preset service data table and the historical version table.
The embodiment of the application can predetermine the corresponding relationship between the service data table and the data structures of the preset service data table and the historical version table, and can determine the name of the historical version table through the service data table according to the corresponding relationship between the service data table and the data structures of the preset service data table and the historical version table, thereby facilitating the implementation of configuration.
Optionally, before determining the table name of the historical version of the business data according to the business data table, the method further includes: and establishing a data structure corresponding relation between a preset service data table and a historical version table according to the newly added field of the preset historical version.
The preset historical version newly added field comprises a service data identity identification number, historical data creation time, a data table main key and an operation type.
Here, in the embodiment of the present application, a data structure corresponding relationship between the service data table and the preset service data table and the historical version table is established in advance, a data structure of the historical version table is defined according to the service data table, and management of the historical version of the data through configuration can be implemented only by defining the data structure according to the data structure standard, so that the efficiency of data processing is improved.
In a possible implementation manner, the data structure standard definition is performed in advance, the data structure standard is defined, and the historical data version management through configuration can be realized only by defining the data structure according to the data structure standard. The standard is defined as follows:
based on the business data table, a historical version table of the business data is added, and exemplarily, the table name rule is as follows: and the name of the business data table + '_ history', according to the data structure standard, the name of the corresponding historical version table can be estimated according to the name of the business data table.
When the table fields of the data history version table are completely copied, the following fields are newly added:
a first field: the service data Identity identification number (ID) is associated with the ID of the service data table data, and is used for identifying which data of the current service data table corresponds to the historical version, and adding an index for the field, thereby improving the query efficiency.
A second field: the history data creation time (his _ create _ time) identifies when the piece of history data was created.
Field three: a data table primary key (his _ id), a data history version table primary key, and a piece of history version data is uniquely identified.
Field four: the operation type (operation _ type) for identifying the operation type of the service data when the historical version data becomes the historical data comprises the following steps: 1 (modified), 2 (deleted).
In a possible implementation, a service entity class needs to be predefined, specifically: defining an entity class name; adding entity class annotation in the entity class name, and identifying the table name of the database table corresponding to the entity class (for example @ table (value = busi _ data)); the data table fields used in the entity class are defined in the entity class.
In a possible implementation manner, a base parent class (BaseHisService) of the service class needs to be predefined, and the child class can provide interfaces for data history version related addition, deletion, modification, check and the like without writing codes.
Optionally, the interface includes a business data query interface (busiQuery), and business data meeting a query condition can be obtained by inputting the query condition.
Optionally, the interface includes a service data adding interface (busieinsert), and the service data to be added is transmitted, and the added service data is saved in the database.
Optionally, the interface includes a service data update interface (busuppdate), and the service data to be modified is transmitted: reversely deducing a historical version entity class according to the transmitted business entity class; inserting the current service data into a historical version table by using a historical version entity class, wherein busi _ ID of the historical version record = ID of the current service data; and updating data in the service data table according to the incoming data.
Optionally, the interface includes a service data deletion interface (busiDel), and the interface is configured to delete the incoming service data to be deleted: reversely deducing a historical version entity class according to the transmitted business entity class; using a historical version entity class to insert the current service data into a historical version table, wherein busi _ ID of the historical version record = ID of the current service data; and deleting data in the service data table according to the incoming data.
Optionally, the interface includes a business data deletion interface historical version query interface (busiHisQuery), and the business data historical version meeting the query condition can be obtained by inputting the query condition.
5. Business service class definition
In a possible implementation manner, the present application performs a service class definition in advance, inherits a basic service parent class, for example: public class Business extensions BaseHisService.
It is understood that the above names and implementations are only exemplary, and the specific implementations are not limited in the practical application.
S203: and determining the entity class of the historical version according to the table name of the historical version of the service data.
Optionally, determining the historical version entity class according to the name of the historical version table of the service data includes: and instantiating the table name of the historical version of the service data to obtain an entity class of the historical version.
Here, in the embodiment of the present application, the historical version entity class is obtained by instantiating the historical version table name, and the historical data in the database is conveniently queried and updated according to the business entity class through the historical entity class.
S204: and determining historical version data to be updated according to the business entity class and the historical version entity class.
S205: and updating the historical version table according to the historical version data to be updated.
Here, in the embodiment of the present application, when service data is changed, update of a history version may be implemented through configuration, where a data structure of a history version table has a corresponding relationship with a data structure of a service data table, a history version entity class may be obtained through the service data, and history version data to be updated is determined according to the changed service data, so as to implement update of the history version table in the database, where a storage manner of the history version table is similar to the data structure of the service data table, and separate storage is not needed, and when the service is changed, a complex hard coding manner is not needed to separately process the history version of the data, and update of the history version table, that is, the history version of the data in the database may be implemented through configuration.
Optionally, after updating the history version table according to the history version data to be updated, the method further includes: and updating the service data table according to the historical version table.
Here, the service data table can be updated according to the historical version table, and the historical version table is updated to the database of the service data, so that the query of the historical service is facilitated, and the user experience is improved.
In some embodiments, in the embodiment of the present application, historical version data to be updated is determined by a historical version table and a business entity class, and accordingly, fig. 3 is a schematic flow chart of another data processing method provided in the embodiment of the present application, as shown in fig. 3, the method includes:
s301: and when the service data is changed, acquiring a service data table corresponding to the service entity class of the service data.
S302: and determining the table name of the historical version of the service data according to the service data table.
S303: and determining the entity class of the historical version according to the table name of the historical version of the service data.
The implementation manner of steps S301 to S303 is similar to that of steps S201 to S203, and the embodiment of the present application is not limited in this respect.
S304: and performing query processing in the database according to the service entity class, and determining a historical version entity class to be updated.
Optionally, the current database may be queried to summarize the non-updated business data details according to the incoming business entity class.
Optionally, the non-updated business data detail data is copied to the historical version entity class.
S305: and determining the historical version data to be updated according to the entity class of the historical version to be updated and the newly added field of the preset historical version.
Optionally, the service data detail data which is not updated is assigned to the historical version entity class, and standard definition fields such as a service data ID, historical data creation time, operation type and the like are set.
The method and the device have the advantages that the function development of the historical data version can be realized by configuring and compiling a very small amount of codes, and the development efficiency is higher than that of a hard coding mode; the data history version function development is realized through configuration, the workload required for development is extremely small and standard, and the data accuracy of the computer is high.
S306: and updating the historical version table according to the historical version data to be updated.
Optionally, the historical version data is inserted into the historical version table.
According to the method and the device, the service entity class can be inquired in the database, so that the details of the service data which are not updated are determined, the entity class of the historical version to be updated is obtained, the assignment processing is carried out on the entity class of the historical version to be updated through the newly added field of the preset historical version, the historical version data to be updated are obtained, the updating of the historical version table is achieved, hard coding is not needed, configuration can be automatically achieved, and the data processing efficiency is improved.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, and as shown in fig. 4, the apparatus according to the embodiment of the present application includes: a first obtaining module 401, a first determining module 402, a second determining module 403, a third determining module 404 and a first updating module 405. The data processing device may be the processing device, the processor itself, or a chip or an integrated circuit that implements the functions of the processor. It should be noted here that the division of the first obtaining module 401, the first determining module 402, the second determining module 403, the third determining module 404, and the first updating module 405 is only a division of logical functions, and the two may be integrated physically or may be independent.
The acquisition module is used for acquiring a service data table corresponding to a service entity class of the service data when the service data is changed;
the first determining module is used for determining the table name of the historical version of the business data according to the business data table;
the second determining module is used for determining the entity class of the historical version according to the table name of the historical version of the service data;
the third determining module is used for determining historical version data to be updated according to the business entity class and the historical version entity class;
and the first updating module is used for updating the historical version table according to the historical version data to be updated.
Optionally, the first determining module is specifically configured to:
and determining the name of the historical version table of the service data according to the corresponding relation between the service data table and the data structures of the preset service data table and the historical version table.
Optionally, before the first determining module determines the name of the historical version table of the service data according to the correspondence between the service data table and the data structures of the preset service data table and the historical version table, the apparatus further includes:
and the establishing module is used for establishing a data structure corresponding relation between a preset service data table and a historical version table according to the preset historical version newly added field, wherein the preset historical version newly added field comprises a service data identity identification number, historical data creating time, a data table main key and an operation type.
Optionally, the second determining module is specifically configured to:
and instantiating the table name of the historical version of the service data to obtain an entity class of the historical version.
Optionally, the third determining module is specifically configured to:
performing query processing in a database according to the service entity class, and determining a historical version entity class to be updated;
and determining the historical version data to be updated according to the entity class of the historical version to be updated and the newly added field of the preset historical version.
Optionally, after the first updating module updates the history version table according to the history version data to be updated, the apparatus further includes:
and the second updating module is used for updating the service data table according to the historical version table.
Optionally, the obtaining module is specifically configured to:
and acquiring a service data table corresponding to the service entity class of the service data through a reflection mechanism.
In order to implement the foregoing embodiments, an embodiment of the present disclosure further provides a data processing device.
Referring to fig. 5, a schematic diagram of a data processing device 500 suitable for implementing an embodiment of the present disclosure is shown, where the data processing device 500 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The data processing apparatus shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the data processing apparatus 500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 501, which may 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. In the RAM 503, various programs and data necessary for the operation of the data processing apparatus 500 are also stored. The processing device 501, the ROM502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the data processing device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates a data processing apparatus 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the data processing apparatus; or may be separate and not assembled into the data processing apparatus.
The computer readable medium carries one or more programs which, when executed by the data processing apparatus, cause the data processing apparatus to perform the method shown in the embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first obtaining unit may also be described as a "unit obtaining at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The data processing device in the embodiment of the present application may be configured to execute the technical solutions in the method embodiments of the present application, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used for implementing the data processing method of any one of the foregoing items.
An embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program is used to implement the data processing method of any one of the foregoing items.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only a logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A data processing method, comprising:
when the service data is changed, acquiring a service data table corresponding to a service entity class of the service data;
determining a table name of a historical version of the business data according to the business data table;
determining a historical version entity class according to the table name of the historical version of the service data;
determining historical version data to be updated according to the business entity class and the historical version entity class;
and updating the historical version table according to the historical version data to be updated.
2. The method of claim 1, wherein determining the historical version table name of the business data according to the business data table comprises:
and determining the name of the historical version table of the service data according to the corresponding relation between the service data table and the data structures of the preset service data table and the historical version table.
3. The method according to claim 2, before said determining a table name of a historical version of said service data from said service data table, further comprising:
and establishing a data structure corresponding relation between a preset service data table and a historical version table according to the preset historical version newly added field, wherein the preset historical version newly added field comprises a service data identity identification number, historical data creation time, a data table main key and an operation type.
4. The method according to claim 1, wherein the determining a historical version entity class according to the service data historical version table name comprises:
and instantiating the name of the historical version table of the service data to obtain a historical version entity class.
5. The method of claim 1, wherein the determining historical version data to be updated according to the business entity class and the historical version entity class comprises:
performing query processing in a database according to the service entity class, and determining a historical version entity class to be updated;
and determining the historical version data to be updated according to the entity class of the historical version to be updated and the newly added field of the preset historical version.
6. The method according to any one of claims 1 to 5, further comprising, after said updating the history version table according to the history version data to be updated:
and updating the service data table according to the historical version table.
7. The method according to any one of claims 1 to 5, wherein the obtaining of the service data table corresponding to the service entity class of the service data includes:
and acquiring a service data table corresponding to the service entity class of the service data through a reflection mechanism.
8. A data processing apparatus, comprising:
the acquisition module is used for acquiring a service data table corresponding to a service entity class of the service data when the service data is changed;
the first determining module is used for determining the historical version table name of the business data according to the business data table;
the second determining module is used for determining the entity class of the historical version according to the table name of the historical version of the service data;
the third determining module is used for determining historical version data to be updated according to the business entity class and the historical version entity class;
and the first updating module updates the historical version table according to the historical version data to be updated.
9. A data processing apparatus, characterized by comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of claims 1 to 7.
10. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the data processing method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program realizes the method of any of claims 1 to 7 when executed by a processor.
CN202210925857.9A 2022-08-03 2022-08-03 Data processing method, device, equipment and storage medium Pending CN115292282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210925857.9A CN115292282A (en) 2022-08-03 2022-08-03 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210925857.9A CN115292282A (en) 2022-08-03 2022-08-03 Data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115292282A true CN115292282A (en) 2022-11-04

Family

ID=83826402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210925857.9A Pending CN115292282A (en) 2022-08-03 2022-08-03 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115292282A (en)

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN108388622B (en) API interface dynamic generation method and device, computer equipment and storage medium
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
CN110727869A (en) Page construction method and device
CN115344688B (en) Business data display method and device, electronic equipment and computer readable medium
CN113971037A (en) Application processing method and device, electronic equipment and storage medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN115292282A (en) Data processing method, device, equipment and storage medium
CN115495519A (en) Report data processing method and device
CN115408009A (en) Code file generation method, device, equipment and storage medium
CN114090124A (en) Data processing method, data processing device, computer equipment and storage medium
CN113918254A (en) Language text management method and device, storage medium and electronic equipment
CN113762702A (en) Workflow deployment method, device, computer system and readable storage medium
US20140244539A1 (en) Business process management, configuration and execution
CN110674224A (en) Entity data processing method, device, equipment and computer readable storage medium
CN112445820A (en) Data conversion method and device
CN116185412B (en) Data management method and device, electronic equipment and storage medium
CN112711400B (en) View processing method, device and storage medium
CN111209225B (en) Method, device, medium and electronic equipment for acquiring real address
CN110602737B (en) Regional removal identification method and device, computer equipment and storage medium
CN115794770A (en) Associated data management method and device, terminal and readable storage medium
CN117742671A (en) Dynamic generation method and system based on low-code design component and electronic equipment
CN117453415A (en) Data auditing method, device, equipment and storage medium
CN112486494A (en) File generation method and device, electronic equipment and computer readable storage medium
CN111984645A (en) Data processing method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination