A data processing method and computing device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-08-11
AI Technical Summary
但是,目前的操作记录方案仅记录数据操作的元数据(如操作人、操作时间等),当出现误操作、数据被篡改、系统异常等情况导致数据错误时,无法实现对比不同版本业务系统的数据变化情况,也无法实现数据的精准回滚,这样会降低业务系统的运行稳定性
Smart Images

Figure CN122547864A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing device technology, and in particular to a data processing method and a computing device. Background Technology
[0002] In the information age, business software systems (business systems) are widely used in various core business scenarios such as finance, healthcare, and enterprise management. As the core asset for business operations, the data in business systems directly affects the stable operation of the system and business continuity in terms of security, traceability, and fault tolerance.
[0003] To ensure compliance and troubleshootability of data operations, most business systems are designed with operation logging functionality to record critical operations such as adding, modifying, and deleting data. However, current operation logging solutions only record metadata about the data operation (such as the operator and operation time). When data errors occur due to accidental operations, data tampering, or system anomalies, it is impossible to compare data changes across different versions of the business system or to perform accurate data rollback. This reduces the operational stability of the business system. Summary of the Invention
[0004] This application provides a data processing method and computing device. The method can effectively record the original data before the business system performs data operations, which facilitates version analysis and / or data rollback of the business system.
[0005] In a first aspect, embodiments of this application provide a data processing method, comprising: intercepting a data operation request to a business system and extracting metadata of the data operation request; the data operation request is used to operate a business data object in the business system; before the business system responds to the data operation request, obtaining the original data of the business data object from the business system; storing the metadata as an index to the original data in a target database; the target database is used to perform version analysis on the business system and / or to perform data rollback on the business system.
[0006] In the data processing method provided in this application embodiment, the computing device can intercept data operation requests to the business system. These requests are used to manipulate business data objects within the business system, and metadata is extracted based on the data operation requests. Furthermore, before the business system responds to the data operation request, the original data of the business data object is obtained from the business system. Finally, the metadata is stored in the target database as an index to the original data. By intercepting data operation requests and extracting the original data before data operations from the business system, the original data before each data operation by the business system is recorded. When data errors occur in the business system, this original data can serve as the basis for version analysis or data rollback, ensuring the operational stability of the business system.
[0007] One possible implementation involves obtaining the raw data of a business data object from the business system, including: obtaining the raw data of the business data object through an AOP (Aspect-Oriented Programming) pointcut configured in the business system. These steps provide a concrete implementation method for obtaining raw data, improving the feasibility of this solution. Furthermore, by employing AOP technology, the purpose of this application can be achieved without modifying the core business code of the business system, ensuring the operational stability of the business system.
[0008] Another possible implementation involves storing metadata as an index to the raw data in the target database. This includes: storing the raw data as files in the file system and generating filenames; and associating the metadata with the filenames and storing them in the target database. This solution separates and binds the metadata and raw data, thus balancing query efficiency (database queries) with storage costs (file system storing large amounts of data), providing data support for subsequent version analysis and data rollback.
[0009] Another possible implementation involves storing the original data as a file in the file system. This includes: serializing the original data to obtain sequential data; and storing the sequential data as a file in the file system. Serialization effectively compresses the size of the original data, and storing the sequential data in the file system saves storage space and alleviates the storage pressure on the file system, making it more suitable for scenarios with large amounts of data.
[0010] In another possible implementation, the above method further includes: obtaining the entity class name of the business data object from the business system; associating the entity class name with metadata and storing it in the target database; and using the entity class name to restore the sequence data to the original data. It should be understood that since the sequence data is data without explicit structure, when restoring it to the original data, the data structure of the business data object (including field names, data types, attributes, etc.) must also be determined, and the data structure is defined through the class attributes of the entity class name. Therefore, the computing device obtains the entity class name of the business data object and associates it with the target database to ensure the accurate restoration of the original data subsequently.
[0011] In another possible implementation, the above method further includes: obtaining the operation method of the business data object from the business system; associating the operation method with metadata and storing it in the target database; and using the operation method to perform data rollback on the business system. It should be understood that the operation method is key to achieving data rollback. Through the above steps, there is no need to manually write commands, and the native operation methods in the business system are reused, ensuring the consistency of the rollback operation.
[0012] Another possible implementation includes: receiving analysis instructions; the analysis instructions include metadata for data operation requests of different versions of business data objects; for data operation requests of different versions, retrieving corresponding raw data from the target database based on the metadata; comparing the fields of the raw data of different versions and outputting data analysis results; the data analysis results are used to indicate the field differences of business data objects of different versions. Through the above steps, a specific implementation flow for version analysis is provided, ensuring the feasibility of this solution.
[0013] In another possible implementation, the target database stores the entity class names of the business data objects and the filenames of the original data of the business data objects in the file system. The corresponding original data is retrieved from the target database based on the metadata, including: retrieving the corresponding filenames and entity class names from the target database based on the metadata; retrieving sequence data from the file system based on the filenames; obtaining the data structure of the business data objects through class reflection based on the entity class names; and generating the original data based on the data structure and sequence data. These steps provide a specific implementation process for restoring data, ensuring the feasibility of this solution.
[0014] In another possible implementation, the target database stores the operation methods of business data objects and the filenames of the original data of the business data objects in the file system. The method further includes: receiving a data rollback instruction, which includes metadata of the version to be rolled back; retrieving the corresponding filename and operation method from the target database based on the metadata of the version to be rolled back; retrieving the corresponding original data from the file system based on the filename; and modifying the business data object based on the operation method and the original data to perform data rollback on the business system. Through the above steps, a specific implementation flow for version analysis is provided, ensuring the feasibility of this solution.
[0015] Secondly, embodiments of this application provide a data processing apparatus, which includes one or more functional modules for implementing the data processing method described in the first aspect above.
[0016] Thirdly, embodiments of this application provide a computing device including a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computing device to implement the method described in the first aspect.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium comprising: computer software instructions; when the computer software instructions are executed in a computing device, they cause the computing device to implement the method described in the first aspect.
[0018] Fifthly, embodiments of this application provide a computer program product that, when run on a computing device, causes the computing device to execute the steps of the method related to the first aspect described above, so as to implement the method of the first aspect described above.
[0019] The beneficial effects of the second to fifth aspects mentioned above can be referred to the corresponding description of the first aspect, and will not be repeated here. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the composition of a computing device provided in an embodiment of this application; Figure 2 A schematic diagram illustrating the composition of a version management platform provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the composition of a data processing module provided in an embodiment of this application; Figure 4 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 5 A flowchart illustrating another data processing method provided in an embodiment of this application; Figure 6A flowchart illustrating another data processing method provided in an embodiment of this application; Figure 7 A schematic diagram illustrating a complete process provided for an embodiment of this application; Figure 8 This is a schematic diagram of the composition of a data processing device provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] It should be noted that in the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0023] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0024] The following is a brief explanation of the technical terms used in the embodiments of this application: 1. Java: An object-oriented programming language characterized by its simplicity, robustness, security, platform independence, multithreading, and high performance. Java is widely used in enterprise application development, mobile application development, web development, big data processing, and other fields.
[0025] 2. Java Class Reflection: This is a mechanism in the Java language that allows Java programs to dynamically obtain information about classes at runtime and to manipulate class attributes and methods. Through class reflection, the structure and behavior of classes can be inspected and modified at runtime without needing prior knowledge of the specific details of those classes.
[0026] 3. Aspect-oriented programming (AOP) is a programming paradigm that aims to improve the modularity of code. Its core is to extract common cross-cutting logic (such as logging, permissions, transactions, monitoring, etc.) scattered in various business logics of the program, encapsulate them into independent "aspects", and then "weave" them into the execution flow of the target business method through specific rules, thereby decoupling these common cross-cutting logics from the core business code.
[0027] This application provides a data processing method that can effectively acquire and record the original data before the business system performs data operations, facilitating version analysis and / or data rollback of the business system.
[0028] In some implementations, the computing device can intercept data operation requests to the business system, which are used to manipulate business data objects within the system, and extract metadata based on these requests. Furthermore, before the business system responds to the data operation request, the device retrieves the original data of the business data object from the business system. Finally, the metadata is stored in the target database as an index to the original data. By intercepting data operation requests and extracting the original data prior to data operations from the business system, the device records the original data before each data operation performed by the business system. When data errors occur in the business system, this original data can serve as the basis for version analysis or data rollback, ensuring the operational stability of the business system.
[0029] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0030] The technical solutions provided in this application can be applied to computing devices. For example, the computing device can be a server or a terminal device. This application does not specifically limit the type of computing device.
[0031] The server can be a single physical or logical server, or it can consist of two or more physical or logical servers that share different responsibilities and work together to achieve the various functions of the server.
[0032] When the computing device is specifically a server, in terms of form, the server can be a blade server, a high-density server, a rack server, or a full-rack server; in terms of function, the server can be a general-purpose server, a graphics processing unit (GPU) server, an artificial intelligence (AI) server, etc.
[0033] When the computing device is specifically a terminal device, the terminal device may include PDAs, ultra-mobile personal computers (UMPCs), tablets, laptops, netbooks, desktop computers, all-in-ones, etc.
[0034] The following section uses a computing device as a server as an example to introduce its system architecture. Figure 1 This is a schematic diagram illustrating the composition of a computing device provided in an embodiment of this application. Figure 1 As shown, the computing device may include a processor 101 and a memory 102; the memory 102 stores instructions executable by the processor 101; when the processor 101 is configured to execute instructions, the computing device performs the data processing method of the embodiments of this application.
[0035] In some implementations, a version management platform (software program) is deployed in the computing device. The computing device executes the data processing methods described in the embodiments of this application by running the version management platform.
[0036] In some implementations, the version management platform can communicate with the business system to manage its versions. The business system and the version management platform can be deployed on the same computing device or on different computing devices; this application does not impose specific limitations on this.
[0037] In addition, the computing device can also communicate with the display device to display the operation interface of the version management platform to the user. The user can perform version analysis of the business system or perform data rollback through the display device.
[0038] Figure 2 This is a schematic diagram illustrating the composition of a version management platform provided in an embodiment of this application. Figure 2 As shown, it includes a data processing module 201, a data storage module 202, and a data analysis module 203.
[0039] The data processing module 201 has an interception function, which is used to intercept data operation requests to the business system, generate a unique identifier (requestId) for this operation, and extract basic information (such as operator, operation type, etc.) from the data operation request, and use the unique identifier and basic information as the metadata of this operation.
[0040] The data processing module 201 also features AOP aspect functionality, which is used to insert custom logic at specific nodes (such as before execution, after execution, and in case of exceptions) when a method is executed in the business system. This allows for the extension of new functionality to the method without affecting the core business code of the business system. In this embodiment, the data processing module uses AOP aspect functionality to enter the business system to obtain the original data of the business object (i.e., the data before it was modified) from the business system.
[0041] The data processing module 201 also has a serialization function, which processes the raw data into serial numbers to obtain sequence data (e.g., a binary sequence), and stores it in the file system of the data storage module 202 in the form of a file (e.g., a binary file). At the same time, the file name is bound to the aforementioned generated metadata and stored in the target database (e.g., a relational database) of the data storage module 202.
[0042] The data analysis module 203 can be used for version analysis and / or data rollback of the business system. Specifically, the data analysis module 203 restores the original data from the data storage module 202 through deserialization and reflection-like functions, performs difference analysis on the original data of different versions, and displays the difference analysis results to the user, thereby realizing the version analysis function. In addition, the data analysis module 203 overwrites the current data of the business system with the original data of the target version selected by the user, thereby realizing the data rollback function.
[0043] Figure 3 This is a schematic diagram illustrating the composition of a data processing module provided in an embodiment of this application. Figure 3 As shown, the data processing module includes an interceptor 301 and an AOP aspect 302. The AOP aspect 302 specifically includes a before-notification module 3021 and a after-notification module 3022. The workflow of the data processing module is as follows: After a user initiates a data operation request, the interceptor 301 intercepts the request, extracts basic information, and provides basic data support for subsequent AOP processing.
[0044] After the interceptor processes the request, it enters the pre-notification phase of the AOP aspect. The pre-notification module 3021 first automatically generates a unique identifier for this request (such as requestId) and binds it to the corresponding operation type (such as add / modify / delete). At the same time, it integrates the basic information obtained by the interceptor to obtain metadata and temporarily stores this metadata in the context of the AOP aspect (to ensure that it can be reused in subsequent post-notification phases).
[0045] Upon entering the AOP post-notification phase, the post-notification module 3022 retrieves temporarily stored metadata from the context, obtains the original data of the business data object from the business system, serializes the business object data into a binary file, and stores it in the file system. Simultaneously, it generates the filename of this binary file as a unique identifier (docId) to associate the metadata with the original data.
[0046] After the post-notification module 3022 completes file storage, it associates the generated unique identifier (filename) with the metadata temporarily stored by the pre-notification module 3021 to form a complete log record, which is then written to the database for data storage.
[0047] It should be noted that the system architecture and application 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 system 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.
[0048] Figure 4 This is a schematic flowchart illustrating a data processing method provided in an embodiment of this application. Exemplarily, the data processing method provided in this embodiment can be applied to... Figure 1 In the computing device shown, in other words, it can be used... Figure 1 The computing device executes the method; specifically, the method can be executed by the processor of the computing device.
[0049] like Figure 4 As shown, the data processing method provided in this application embodiment may include the following steps: S401. Intercept data operation requests to the business system and extract the metadata of the data operation requests.
[0050] Data operation requests are used to manipulate business data objects within a business system. These business data objects are collections of data to be manipulated, such as data tables.
[0051] In this embodiment, after a user initiates and submits a data operation (such as adding, modifying, deleting, or batch operations) in the business system, the business system generates a data operation request. The computing device can intercept this data operation request, parse it, and extract its metadata.
[0052] For example, after a user initiates and submits a data operation, the data operation request enters the system processing chain (such as a Hypertext Transfer Protocol (HTTP) request, an internal service call, etc.). The computing device can use an application-layer interceptor component or a gateway interceptor component to intercept the data operation request in the system processing chain in order to extract metadata.
[0053] In some implementations, a data operation request may include at least one of the following: operator, operation time, operation type (add, delete, modify), and business type (related to the specific business scenario, such as placing an order for a product, listing a product, etc.).
[0054] In some implementations, the computing device can generate a unique identifier (requestId) for the data operation request, which serves as a global tracking identifier for this operation and is saved as metadata along with the operator, operation time, and other information extracted from the aforementioned data request. For example, the computing device can use a universally unique identifier (UUID) to generate the unique identifier.
[0055] It should be understood that by generating unique identifiers, scattered data can be linked together in distributed or multi-step operation scenarios, ensuring that the change records of all data corresponding to a single data operation can be fully traced, thereby guaranteeing data consistency and integrity.
[0056] It should be noted that, in this embodiment of the application, each data operation performed by the business system can be considered a version change. The metadata of this data operation can be used as the version number of the current version, facilitating subsequent retrieval of relevant data for the corresponding version.
[0057] Optionally, the computing device can also configure labels (such as "stable version before launch" and "fault-fixed version") for different versions of metadata and raw data based on user input, so that users can intuitively understand the purpose of different versions of data.
[0058] S402. Before the business system responds to the data operation request, obtain the original data of the business data object from the business system.
[0059] In related technologies, when a business system makes a data operation request, the business system's logs typically record the metadata of the data operation request or the latest value after the data operation, lacking complete records of the original data before the data operation and the data changes. To address this issue, in this embodiment, the computing device can obtain the original data of the business data object from the business system before the business system responds to the data operation request, ensuring that subsequent version analysis or / or data rollback of the business system can be performed based on the original data.
[0060] In some possible implementations, S402 above can be specifically implemented as: obtaining the original data of the business data object through the AOP point of entry configured in the business system.
[0061] As mentioned earlier, AOP technology can insert custom logic at specific nodes in the execution of methods in a business system (such as before execution, after execution, or in case of exceptions) to manage method calls without affecting the core business code of the business system. In this embodiment, the AOP pointcut can be set before the execution of the data manipulation method, and its function is to read the original data of the business data object.
[0062] It should be understood that traditional operation logging solutions often employ hard-coding (such as directly embedding logging code within business methods), resulting in high coupling, intrusion into business logic, and increased development and maintenance costs. Alternatively, they record request-level information through a single interceptor, failing to connect to details at the data operation level, leading to coarse-grained recording. This solution combines AOP and request interception technologies, allowing attention not only to the request level but also to the data operation level. This enables the acquisition of raw data from the business system without modifying its core code, supporting subsequent version analysis and data backtracking. Furthermore, when adding a new business module, only the AOP pointcut needs to be configured for that module, without refactoring the entire business system code, resulting in strong scalability.
[0063] Furthermore, related technologies often employ third-party middleware (such as message queues) to implement operation logging. This approach not only increases system deployment costs, operational complexity, and resource consumption, but also risks incomplete or delayed operation logs due to middleware availability issues (such as server downtime or message loss), thus affecting the accuracy of the logs. Simultaneously, the introduction of third-party components increases system coupling, reducing the overall architecture's stability and scalability. This solution, through AOP technology, decouples the operation from the core business code of the business system, without affecting the system's operational stability. Additionally, AOP technology consumes fewer resources, reducing system deployment costs and operational complexity.
[0064] S403. Store the metadata as an index to the original data in the target database.
[0065] The target database is used for version analysis of the business system and / or data rollback of the business system.
[0066] After acquiring the raw data and metadata, the computing device can use the metadata as an index to the raw data and store it in the target database. This allows subsequent data analysis processes to retrieve the corresponding raw data based on the metadata for version analysis or data rollback procedures.
[0067] For example, the target database can be a relational database.
[0068] In one possible implementation, the above S403 can be specifically implemented as S4031-S4032 as follows: S4031. Store the raw data in the file system as a file and generate the file name.
[0069] File systems can be used to store large amounts of data. Storing raw data in a file system can reduce the storage pressure and data read / write (IO) pressure on the database.
[0070] In some implementations, S4031 can be specifically implemented as follows: serializing the original data to obtain sequence data; and storing the sequence data in the form of a file to the file system.
[0071] For example, sequence data can be binary sequences. Serialization can effectively compress the size of the original data, allowing training data to be stored in the file system, thus saving storage space and alleviating file system storage pressure, making it more suitable for scenarios with large amounts of data.
[0072] In some implementations, the file system can standardize the management of the files that store the original data, such as storing them in directories by date, business type, unique request identifier, etc., to ensure that the files are stored in an orderly manner and facilitate subsequent retrieval.
[0073] S4032. Associate the metadata with the filename and store it in the target database.
[0074] The computing device obtains the filename of the raw data in the file system, and then associates the metadata with the filename and stores it in the target database.
[0075] It should be understood that storing all data (including metadata and raw data) in a database would put a heavy burden on the database and affect query efficiency. Storing all data in a file system would lack structured indexes, making data retrieval difficult and hindering quick data location. This solution separates and binds metadata and raw data, balancing query efficiency (database queries) with storage costs (file system storing large amounts of data), providing data support for subsequent version analysis and data rollback. The dual storage serves as a backup for each other; even if the database experiences temporary failures, records can be recovered through data association in the file system, reducing the risk of data loss.
[0076] In some implementations, the computing device further performs the following steps: step a1, obtaining the entity class name of the business data object from the business system; step a2, associating the entity class name with metadata and storing it in the target database. The entity class name is used to restore the sequence data to the original data.
[0077] It should be noted that the computing device can obtain the entity class name of the business data object based on class reflection. Since sequence data is data without explicit structure, when restoring it to the original data, the data structure of the business data object (including field names, data types, attributes, etc.) must also be determined. This data structure is defined through the class attributes of the entity class name. Therefore, the computing device obtains the entity class name of the business data object and stores it in the target database, ensuring the accurate restoration of the original data.
[0078] Furthermore, considering the differences in data structures of business data objects across different business systems, this application embodiment obtains the data structure of the current business system in real time through entity class names and class reflection mechanisms. This ensures the compatibility of this solution with various new business systems, eliminating the need for repeated development of adaptation code and reducing system maintenance costs.
[0079] In some implementations, the computing device further performs the following steps: step b1, obtaining the operation method of the business data object from the business system; step b2, associating the operation method with metadata and storing it in the target database. The operation method is used to perform data rollback on the business system.
[0080] It should be noted that the computing device can obtain the operation methods corresponding to the business data object based on a reflection-like mechanism. These operation methods can include interfaces and operation methods, which are crucial for data rollback. By invoking these operation methods, the computing device can modify the business data object. Therefore, the computing device obtains the operation methods corresponding to the business data object and stores them in the target database, ensuring technical support for subsequent data rollback. This method eliminates the need for manually writing commands and reuses native operation methods from the business system, ensuring consistency during rollback operations.
[0081] The following describes the version analysis process using specific examples. Figure 5 As shown, the computing device also performs the following: S501, Receive analysis command.
[0082] The analysis instructions include metadata for data operation requests for different versions of business data objects.
[0083] Users can send analysis commands to computing devices through terminal devices. The analysis commands include metadata for different versions of data operation requests.
[0084] For example, users can enter different unique identifiers (requestId), different operators, or different time ranges to query different versions of the original data based on the unique identifier, operator, etc.
[0085] S502. For data operation requests of different versions, retrieve the corresponding raw data from the target database based on the metadata.
[0086] For a data operation request for a specific version, the computing device can obtain the corresponding filename from the target database and the corresponding raw data from the file system based on the metadata.
[0087] In some implementations, the target database stores the entity class name of the business data object and the filename of the original data of the business data object in the file system. The above S502 can be specifically implemented as follows: S5021. Based on the metadata, retrieve the corresponding file name and entity class name from the target database; S5022. Obtain sequence data from the file system according to the file name; S5023. Based on the entity class name, the data structure of the business data object is obtained through class reflection; S5024. Generate the original data based on the data structure and sequence data.
[0088] Regarding S5021-S5024 above, since the original data has undergone serialization and is stored in the file system as a file, when retrieving data, the computing device obtains the corresponding filename and entity class name from the database based on the metadata, and further retrieves the sequence data from the file system based on the filename. As mentioned earlier, since the sequence data is data without explicit structure, in order to ensure accurate reconstruction of the original data of the business data object, the computing device uses class reflection to resolve the data structure of the business data object based on the entity class name, that is, to determine the fields, data types, and nesting relationships between fields included in the business data object, and then performs deserialization processing on the sequence data, concatenating it based on the data structure to recover the original data.
[0089] S503. Compare the fields of the original data from different versions and output the data analysis results.
[0090] The data analysis results are used to indicate the field differences between different versions of business data objects.
[0091] After acquiring metadata from different versions, the computing device can automatically traverse all fields (including nested fields and collection fields) of the business data object, determine the field differences by comparing the numerical differences of the same fields in different versions, and output the data analysis results.
[0092] For example, field differences can be categorized into field modification, field addition, and field deletion. For instance, field modification: Version 2 changes the order amount from 100 yuan to 200 yuan compared to Version 1. Field addition: Version 2 adds a "tag" field compared to Version 1. Field deletion: Version 2 deletes the "user status" field compared to Version 1.
[0093] For example, data analysis results can be displayed to users in a visual form through display devices, allowing users to intuitively understand the data changes in the business system.
[0094] The data rollback process will be explained below with reference to specific embodiments. Figure 6 As shown, the computing device also performs the following: S601, Receive data rollback command.
[0095] The data rollback instruction includes the metadata of the version to be rolled back.
[0096] S602. Based on the metadata of the version to be rolled back, obtain the corresponding filename and operation method from the target database.
[0097] The target database stores the operation methods of business data objects, as well as the file names of the original data of the business data objects in the file system.
[0098] S603. Based on the file name, retrieve the corresponding raw data from the file system.
[0099] S604. Based on the operation method and original data, modify the business data object to perform data rollback on the business system.
[0100] Regarding S601-S604 above, users can send data rollback commands to the computing device via terminal devices. These commands include metadata about the data operation requests for the version to be rolled back. Upon receiving the data rollback command, the computing device can retrieve the corresponding filename from the target database and the corresponding original data from the file system based on the metadata of the version to be rolled back. Additionally, it retrieves the corresponding operation method from the target database and modifies the current value of the business data object using the original data according to the operation method, thereby performing data rollback on the business system.
[0101] Optionally, during data rollback, the computing device can determine the frequently queried or repeatedly rolled-back versions based on historical rollback records and push them to the user as recommended versions, thereby improving the user experience while enhancing the efficiency of data rollback.
[0102] Optionally, the computing device can also log relevant information about data rollback, such as the rollback time, the corresponding operator, and the specific content of the rollback, to ensure that the entire data rollback operation is traceable and meets audit compliance requirements.
[0103] Figure 7 This is a schematic diagram illustrating a complete process provided for an embodiment of this application. For example... Figure 7 As shown, the process is as follows: 1. The user inputs a data operation request. 2. The computing device intercepts the data operation request through an interceptor. 3. The computing device extracts metadata from the data operation request through a pre-notification module. 4. The computing device obtains the original data of the business data object from the business system through a post-notification module, and can also obtain entity class names, operation methods, etc. 5. The computing device serializes the original data and stores it in the file system, generating a filename. 6. The computing device associates the metadata with the filename and stores it in the target database. 7. When the computing device receives an analysis command, it reads the sequence data from the file system and the entity class name from the target database. 8. By deserializing the sequence data, the original data is restored through class reflection. 9. The computing device compares the differences between different versions of the original data. 10. Upon receiving a data rollback command, the computing device rolls back the data in the business system based on the original data.
[0104] In the data processing method provided in this application embodiment, the computing device can intercept data operation requests to the business system. These requests are used to manipulate business data objects within the business system, and metadata is extracted based on the data operation requests. Furthermore, before the business system responds to the data operation request, the original data of the business data object is obtained from the business system. Finally, the metadata is stored in the target database as an index to the original data. By intercepting data operation requests and extracting the original data before data operations from the business system, the original data before each data operation by the business system is recorded. When data errors occur in the business system, this original data can serve as the basis for version analysis or data rollback, ensuring the operational stability of the business system.
[0105] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0106] In an exemplary embodiment, this application also provides a data processing apparatus. This data processing apparatus may be the aforementioned computing device or a processor within the computing device. The data processing apparatus may include one or more functional modules for implementing the data processing methods of the above method embodiments.
[0107] For example, Figure 8 This is a schematic diagram illustrating the composition of a data processing apparatus provided in an embodiment of this application. Figure 8 As shown, the data processing device 800 includes: an interception module 801, an acquisition module 802, and a storage module 803. The interception module 801, the acquisition module 802, and the storage module 803 are interconnected.
[0108] The interception module 801 is used to intercept data operation requests to the business system and extract the metadata of the data operation requests; the data operation requests are used to operate on business data objects in the business system. The acquisition module 802 is used to acquire the original data of the business data object from the business system before the business system responds to the data operation request; Storage module 803 is used to store metadata as an index to the original data in the target database; the target database is used to perform version analysis on the business system and / or to perform data rollback on the business system.
[0109] Other optional implementation methods are described in the foregoing method embodiments.
[0110] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; for example, the related hardware can be a processor of a computing device. The program instructions can be stored in the above-described computer-readable storage medium, and when executed, they can implement the processes of the above method embodiments. The computer-readable storage medium can be memory. The above-described computer-readable storage medium can also be an external storage device, such as a hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Further, the above-described computer-readable storage medium can include both memory and external storage devices. The above-described computer-readable storage medium is used to store the above-described computer program instructions and other programs and data required for the above-described software package translation.
[0111] This application also provides a computer program product comprising a computer program that, when run on a computing device, causes the computing device to perform any of the data processing methods provided in the above embodiments.
[0112] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0113] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
[0114] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method, characterized by, The method includes: Intercept data operation requests to the business system and extract the metadata of the data operation requests; the data operation requests are used to operate on business data objects in the business system. Before the business system responds to the data operation request, the original data of the business data object is obtained from the business system; The metadata is used as an index to the original data and stored in the target database; the target database is used to perform version analysis on the business system and / or to perform data rollback on the business system.
2. The method of claim 1, wherein, The step of obtaining the original data of the business data object from the business system includes: The original data of the business data object is obtained by using the slice-oriented programming (AOP) pointcut configured in the business system.
3. The method according to claim 1 or 2, characterized in that, The step of storing the metadata as an index to the original data in the target database includes: The original data is stored in the file system as a file, and the file name is generated. The metadata is associated with the filename and stored in the target database.
4. The method of claim 3, wherein, The step of storing the original data in the form of files to the file system includes: The original data is serialized to obtain sequence data; The sequence data is stored in the file system as a file.
5. The method of claim 4, wherein, The method further includes: Obtain the entity class name of the business data object from the business system; The entity class name is associated with the metadata and stored in the target database; the entity class name is used to restore the sequence data to the original data.
6. The method according to any one of claims 2-5, characterized in that, The method further includes: The operation method for obtaining the business data object from the business system; The operation method is associated with the metadata and stored in the target database; the operation method is used to perform data rollback on the business system.
7. The method according to any one of claims 1 to 6, characterized in that, The method includes: Receive analysis instructions; the analysis instructions include metadata for data operation requests for different versions of the business data object; For different versions of data operation requests, the corresponding raw data is obtained from the target database based on the metadata. The data analysis results are output by comparing the fields of the original data in different versions; the data analysis results are used to indicate the field differences of the business data objects in different versions.
8. The method of claim 7, wherein, The target database stores the entity class name of the business data object, as well as the file name of the original data of the business data object in the file system; The step of obtaining the corresponding original data from the target database based on the metadata includes: Based on the metadata, obtain the corresponding file name and entity class name from the target database; Based on the filename, obtain sequence data from the file system; Based on the entity class name, the data structure of the business data object is obtained through class reflection. The original data is generated based on the data structure and the sequence data.
9. The method according to any one of claims 1 to 8, characterized in that, The target database stores the operation methods of the business data object and the filenames of the original data of the business data object in the file system; the method further includes: Receive a data rollback instruction, the data rollback instruction including metadata of the version to be rolled back; Based on the metadata of the version to be rolled back, obtain the corresponding filename and operation method from the target database; Based on the filename, retrieve the corresponding raw data from the file system; Based on the described operation method and the original data, the business data object is modified to perform data rollback on the business system.
10. A computing device, characterized in that, The computing device includes a processor and a memory; the processor is coupled to the memory. The memory is used to store computer instructions; The computer instructions are loaded and executed by the processor to enable the computing device to implement the data processing method as described in any one of claims 1-9.