Data archiving configuration method, data archiving method, data archiving system and data archiving equipment
By constructing class diagrams in the user interface and automatically generating data archiving schemes, the complex data archiving configuration problem in existing technologies is solved, achieving simplified operation and improved adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-27
AI Technical Summary
The existing data archiving configuration process is complex, requires users to understand database languages, has a high learning cost, and cannot effectively cope with complex business scenarios.
By constructing class diagrams between business models through the user interface, data archiving conditions are obtained, and archiving schemes are automatically generated. The operation level is the application level rather than the storage level, simplifying the configuration process.
It reduces the learning cost for users, simplifies the configuration process, better handles complex business scenarios, and improves the readability and maintainability of the configuration.
Smart Images

Figure CN121743331A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data archiving configuration method, data archiving method, system, and device. Background Technology
[0002] Data archiving refers to the process of migrating "long-term valuable but infrequently accessed" data within an enterprise from high-frequency access production storage (such as solid-state drives and hot storage layers) to low-cost, highly reliable dedicated storage media (such as tape libraries, cloud archiving storage, and Blu-ray storage) and managing it in a standardized manner. Its core is not "deleting useless data," but rather "efficiently preserving data with retention value," ensuring that this valuable data can be securely retrieved when needed (such as for compliance audits, historical queries, and business reuse), while simultaneously reducing production storage costs and improving the access performance of frequently accessed data.
[0003] In Java Web projects, data archiving typically involves partitioning tables in a relational database, migrating infrequently accessed data from the main table to the archive table, thereby improving read and write performance on the main table. However, current data archiving solutions configure operations at the storage level, requiring users to understand database languages, resulting in a high learning curve and making them ill-suited for complex business scenarios. Summary of the Invention
[0004] In view of this, it is necessary to provide a data archiving configuration method, data archiving method, system, and device to solve the problem of the complexity of the existing data archiving configuration process.
[0005] To address the aforementioned problems, in a first aspect, the present invention provides a data archiving configuration method, comprising: In response to user configuration operations on the relationships between business models through the user interface, a class diagram representing the relationships between the business models is constructed; wherein, different business models correspond to different business data; Obtain the data archiving conditions configured for the business model; An archiving scheme for the business model is generated based on the data archiving conditions and the class diagram.
[0006] In one possible implementation, the user interface includes at least one of the following: a model adding control, an expand control for models corresponding to the model, a model deleting control, a model selection control, a model alignment control, an archive scheme export control, a model archive order sorting control, and a model query control.
[0007] In one possible implementation, the step of constructing a class diagram representing the relationships between the business models in response to a user's configuration operation on the relationships between the business models through a user interface includes: In response to a user selecting the expand control after selecting a business model in the user interface, expandable sub-controls are displayed; the expandable sub-controls include at least one of the following: parent type expandable control, child type expandable control, associated type expandable control, referenced type expandable control, and referenced type expandable control; In response to the user's selection of a target, expand the sub-controls and use a class diagram to display the selected business model and the business models that have a target-related relationship with the selected business model.
[0008] In one possible implementation, generating the archiving scheme for the business model based on the data archiving conditions and the class diagram includes: In response to the user selecting the model archiving order sorting control in the user interface, the archiving order of the business models is generated; An archiving scheme for the business model is generated based on the archiving order, the data archiving conditions, and the class diagram.
[0009] In one possible implementation, obtaining the data archiving conditions configured for the business model includes: In response to the user selecting the business model, the archive information configuration interface of the selected business model is displayed; Obtain the archiving information input by the user through the archiving information configuration interface; the archiving information includes: data archiving conditions, whether the business model is archived, and the business model archiving order information; The step of generating an archiving scheme for the business model based on the data archiving conditions and the class diagram includes: An archiving scheme for the business model is generated based on the archived information and the class diagram.
[0010] Secondly, the present invention also provides a data archiving method, comprising: The business data is archived according to the archiving scheme generated by any of the above-described data archiving configuration methods.
[0011] In one possible implementation, archiving the business data includes: Locate the core business model in the archiving scheme; the core business model is a business model that is not referenced. The second data archiving conditions for other business models are determined based on the first data archiving conditions of the core business model; wherein, the other business models are business models in the archiving scheme that have a specified relationship with the core business model; the second data archiving conditions include the first data archiving conditions; The core business model is archived according to the first data archiving conditions, and the other business models are archived according to the second data archiving conditions.
[0012] In one possible implementation, when the other business model is configured with a third data archiving condition in relation to the core business model, and / or when the other business model is configured with a fourth data archiving condition, the second data archiving condition further includes the third data archiving condition, and / or the fourth data archiving condition.
[0013] Thirdly, the present invention also provides a data archiving system, including: A class diagram-based configuration scheme designer is used to construct a class diagram representing the relationships between business models in response to user configuration operations on the relationships between business models through a user interface; wherein different business models correspond to different business data; obtain the data archiving conditions configured for the business models; and generate an archiving scheme for the business models based on the data archiving conditions and the class diagram. The data archiving module is used to archive the business data according to the archiving scheme.
[0014] Fourthly, the present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a program; the processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the data archiving configuration method or data archiving method described in any of the above claims.
[0015] The beneficial effects of this invention are: Based on this invention, users can operate on the archiving configuration of business data through a user interface at the application level, rather than directly at the storage level, thus reducing the learning curve for users regarding archiving configuration methods. Furthermore, during the specific configuration process, after users configure the relationships between business models through the user interface, a class diagram representing these relationships is constructed. This effectively presents the relationships between business models, facilitating subsequent modifications and adjustments to the business models or model relationships within the class diagram, better addressing complex business scenarios. Then, the archiving conditions configured by the user for the business models are obtained, and an archiving scheme for the target business model is automatically generated based on these conditions and the class diagram, further simplifying the configuration process. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating an embodiment of the data archiving configuration method provided by the present invention; Figure 2 For the present invention Figure 1 A flowchart illustrating an embodiment of S102; Figure 3 A schematic diagram of a class provided by the present invention; Figure 4 A schematic diagram of a user interface provided by the present invention; Figure 5 A schematic diagram of an archive information configuration interface provided by the present invention; Figure 6 A flowchart illustrating an embodiment of the data archiving method provided by the present invention; Figure 7 A schematic diagram of the structure of an embodiment of the data archiving system provided by the present invention; Figure 8 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0019] In the description of the embodiments of this invention, unless otherwise stated, "a plurality of" means two or more. The terms "first," "second," etc., used in the embodiments of this invention are used to distinguish similar objects, and are not used to describe a specific order or sequence, nor to indicate or imply their relative importance or implicitly specify the number of indicated technical features. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, and the number of objects is not limited; for example, a first object can be one or more.
[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0021] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of the data archiving configuration method provided by the present invention, the method comprising: S101, in response to the user's configuration operation on the relationship between business models through the user interface, construct a class diagram representing the relationship between the business models; wherein, different business models correspond to different business data.
[0022] Users can configure the relationships between multiple business models under a business module. Then, the execution entity in this embodiment constructs a class diagram representing the relationships between the business models based on the user's configuration and visualizes the class diagram.
[0023] For example, a business module may include modules such as "Order Management," "Customer Management," and "Inventory Management." Taking the "Order Management" module as an example, it contains business models such as "Order," "Order Details," "Order Payment Records," and "Order Logistics Tracking." A business model can be understood as a "data container" that stores business data.
[0024] Class diagrams are the most fundamental and commonly used static structure diagrams in the Unified Modeling Language (UML). They are used to describe the structure of classes in a system, the relationships between classes, and the attributes and methods of classes. They are a core tool for object-oriented analysis and design. They not only visually represent the static architecture of a system but also provide direct reference for subsequent code implementation and database design.
[0025] This embodiment treats business models as classes and draws a class diagram based on the relationships between them. These relationships include references and associations, which are typical class-to-class relationships in a class diagram.
[0026] Among them, the reference relationship is a one-to-one relationship, meaning that a piece of data in a business model can only reference a piece of data in the referenced business model. When a business model is referenced by other business models, the business model is called the "referenced model", and the business model referencing it is called the "main model".
[0027] Association relationship: This is a one-to-many relationship, meaning that one piece of data in one business model needs to reference multiple pieces of data in another business model. The business model corresponding to the "one" in the association relationship is called the "primary model". For example... Figure 2 As shown, using "student-class" and "student-school uniform" as examples, the difference between referencing and associating relationships is illustrated.
[0028] S102, obtain the data archiving conditions configured for the business model.
[0029] Users can configure data archiving conditions for each business model individually through the user interface, or they can configure data archiving conditions only for some of the business models. This is because other business models may not require data archiving and may only be used to assist in building relationships between business models. For example, when building a class diagram, some relationships may be built on the parent class. In this case, the user only needs to archive the subclass data and related data; the parent class data does not need to be archived. Therefore, the parent class data is only used to expand the relationships. Alternatively, the data archiving conditions for other business models can be reused based on the relationships with the other business models and do not need to be configured separately.
[0030] Data archiving criteria are used to determine the scope of data that needs to be archived. For example, the data archiving criteria can be to archive only files created before September 2022.
[0031] S103, Generate an archiving scheme for the business model based on data archiving conditions and class diagrams.
[0032] The executing entity can automatically generate an archiving scheme for the business model based on the data archiving conditions and class diagram.
[0033] The archiving scheme can include the relevant configurations for each of the above business models, such as model relationships and data archiving conditions.
[0034] The data archiving configuration method provided in this embodiment can be applied to a data archiving configuration software system, which can run on a terminal device. The terminal device can be a tablet computer, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), mobile phone, etc. This embodiment does not impose any restrictions on the specific type of terminal device.
[0035] In summary, based on this embodiment, users can operate on the archiving configuration of business data through the user interface at the application level, rather than directly at the storage level, thus reducing the learning cost for users in understanding the archiving configuration method. Furthermore, during the specific configuration process, after users configure the relationships between business models through the user interface, a class diagram representing these relationships is constructed. This effectively presents the relationships between business models, facilitating subsequent modifications and adjustments to the business models or model relationships within the class diagram, better addressing complex business scenarios. Then, the archiving conditions configured by the user for the business models are obtained, and an archiving scheme for the target business model is automatically generated based on these conditions and the class diagram, further simplifying the configuration process.
[0036] In some embodiments of this invention, the lifecycle of associated data must be consistent with the data corresponding to the "one" in a one-to-many relationship; that is, "if it exists, it exists together; if it is destroyed, it is destroyed together." Furthermore, the association relationship must be recorded through an intermediate model, called an "association model." One association model belongs to only one main model; therefore, it is impossible to build association relationships with multiple business models. For example... Figure 3 The diagram shown illustrates a class diagram provided by this invention. Different models and their relationships are displayed differently in the generated class diagram to facilitate user differentiation and identification. Specifically: Standard model (tasks and documents, both belonging to the business model): Yellow rectangle with rounded corners; Related model: Yellow rectangle with right-angled border; Abstract model (corresponding to the abstract class in the class diagram): a purple rectangle with rounded corners; Interface model (corresponding to the interface class in the class diagram): a green rectangle with rounded corners; Relationship: Dashed hollow triangle arrow; Inheritance relationship: solid line hollow triangle arrow; Relationship: Solid line with a solid triangle arrow; Reference relationship: solid line with solid arrow; In this embodiment, when two business models are related, an association model is generated, and the two business models are connected through the association model. The association model can also be understood as a type of business model.
[0037] In some embodiments of the present invention, the user interface includes at least one of the following: a model adding control, a model expansion control corresponding to the model, a model deletion control, a model selection control, a model alignment control, an archiving scheme export control, a model archiving order sorting control, and a model query control.
[0038] Reference Figure 4The diagram illustrates a user interface, which includes controls such as a model addition control.
[0039] In this embodiment, the user interface provides a series of controls to offer basic operation functions such as creation, deletion, and query. The specific operations and functions are as follows: a) Add operation: Add the business model to the user interface to prepare for subsequent configuration.
[0040] b) Expand operation: After selecting a model (the model can include any of the business model, abstract model and interface model), you can expand its parent type, subtype, associated type, reference type, referenced type and implemented interface (all of which are typical relationships between classes in the class diagram).
[0041] c) Deletion operation: Delete business models that do not need to be retained (such as redundant business models automatically added by the expand operation). After a business model is deleted, its corresponding model relationships (lines pointing to the business model and lines derived from the business model) will be automatically deleted.
[0042] d) Selection operation: After clicking the model selection control, you can press and hold the left mouse button to select multiple models in the class diagram and perform alignment or deletion operations on the selected models.
[0043] e) Alignment operations: Supports horizontal and vertical alignment, making the layout of class diagrams more regular.
[0044] f) Export operation: Export the completed design and archived schematic diagrams as PNG format files for easy sharing and transmission.
[0045] g) Automatic sorting operation: If constraint validation is enabled in the archiving scheme, the archiving order is crucial. Manually setting the archiving order is not only tedious but also prone to errors. The "automatic sorting operation" can automatically generate the archiving order based on the relationships between business models.
[0046] h) Query operation: When the user interface contains multiple models, you can query by entering the model name. The matching model will be displayed in red for easy and quick location.
[0047] In this embodiment, users can quickly configure data archiving using the aforementioned controls.
[0048] In some embodiments of the present invention, S101 includes: In response to the user selecting an expansion control after selecting a business model in the user interface, expandable child controls are displayed; the expandable child controls include at least one of the following: parent type expandable control, child type expandable control, related type expandable control, referenced type expandable control, and referenced type expandable control; In response to the user selecting a target, expand the sub-controls, determine the business models that have a target relationship with the selected business model, and construct a class diagram representing the relationship between the business models.
[0049] For example, after a user selects business model A in a class diagram, they select the reference type expansion control (target expansion sub-control). The executing entity determines that business model A references business model B, and then adds business model B to the class diagram. Business model B and business model A are connected by a solid line with a solid arrow. The executing entity can determine the business model with a target relationship with business model A based on the dependencies of the business data corresponding to business model A, or based on the pre-configured relationships of business model A. The target relationship is determined by the target expansion sub-control.
[0050] In this embodiment, the expansion operation can quickly build model relationships, eliminating the need to add business models one by one through the add operation, thus improving the efficiency of data archiving configuration.
[0051] In some embodiments of the present invention, S103 includes: In response to the user selecting a model archiving order sorting control in the user interface, generate the archiving order of the business models; An archiving scheme for the business model is generated based on the archiving order, data archiving conditions, and class diagram.
[0052] In this embodiment, the archiving scheme also includes an archiving order.
[0053] In some embodiments of the present invention, S102 includes: In response to the user selecting a business model, the archive information configuration interface of the selected business model is displayed; Obtain the archiving information entered by the user through the archiving information configuration interface; the archiving information includes: data archiving conditions, whether the business model is archived, and the business model archiving order information; S103 includes: An archiving scheme for the business model is generated based on the archived information and class diagram.
[0054] In this embodiment, users can set the business model archiving order, whether the business model is archived, and the data archiving conditions of the business model through the archive information configuration interface.
[0055] Reference Figure 5 This diagram illustrates an archive information configuration interface. When the user selects... Figure 4 After adding "tasks" to the list, Figure 4The right side of the user interface displays the archiving information configuration interface for "To-Do Tasks". In the archiving information configuration interface, users can enter data archiving conditions (by clicking the "Task Transfer Task" control and then entering the information in the expanded transfer task configuration interface), whether the business model is archived, and the archiving order of the business models.
[0056] In some embodiments of the present invention, when a user configures the relationship between two models, if the relationship between the two models is a reference relationship or an association relationship, additional data archiving conditions can be configured for the association relationship. Specifically, if it is a reference relationship, additional data archiving conditions can be configured for the referenced model; if it is an association relationship, additional data archiving conditions can be configured for the associated model.
[0057] In some embodiments of the present invention, users can also configure information such as the archiving period of the archiving scheme, whether the scheme is enabled, and whether constraint verification is performed during archiving. Only enabled archiving schemes will archive data after the archiving period. If constraint verification is enabled, the archiving order of the business model needs to be verified during archiving. Alternatively, constraint verification can be omitted during archiving to improve archiving efficiency.
[0058] The present invention also provides a data archiving method, comprising: Archive the business data according to the archiving scheme generated by any of the above data archiving configuration methods.
[0059] In some embodiments of the present invention, reference is made to... Figure 6 The steps for archiving business data include: S601, the core business model in the positioning and archiving scheme; the core business model is a business model that is not referenced.
[0060] S602, determine the second data archiving conditions for other business models based on the first data archiving conditions of the core business model; wherein, other business models are business models in the archiving scheme that have a specified relationship with the core business model; the second data archiving conditions include the first data archiving conditions.
[0061] S603, archive the core business model according to the first data archiving condition, and archive other business models according to the second data archiving condition.
[0062] In this embodiment, data archiving conditions can be automatically generated for the business models referenced and associated by the core business model (main model) based on the data archiving conditions of the core business model, which greatly reduces the complexity of configuration and simplifies the data archiving operation.
[0063] In some embodiments of the present invention, when a third data archiving condition is configured in relation to the core business model, and / or when a fourth data archiving condition is configured in relation to the other business model, the second data archiving condition further includes the third data archiving condition, and / or the fourth data archiving condition.
[0064] Specifically, the calculation rules for the archived data set of the referenced model are as follows: The archived data set of the referenced model needs to be calculated and obtained through the reference relationship between the main model's archived data set and this model. First, obtain the data set of all referenced model objects referenced in the main model's archived data set. Then, filter according to the conditions configured in the relationship configuration between the main model and the referenced model (no filtering if not configured). Finally, filter according to the archived conditions configured in the referenced model itself (no filtering if not configured). Figure 3 Taking pending attachments and files as an example: Pending attachments reference files. The executing entity first obtains the archived data set of pending attachments [Pending Attachment 1, Pending Attachment 2, Pending Attachment 3]. These attachments reference file 1, file 2, and file 3 respectively, so the obtained set of referenced files is [file 1, file 2, file 3]. If the data archiving condition is configured on the reference relationship—only archive files created before September 2022—the executing entity will check the files in this set sequentially to see if they were created before September 2022 (no filtering is performed if no configuration condition is set). If only file 1 and file 2 meet the condition, the file set after the first filtering is [file 1, file 2]. If the business model corresponding to the file has a data archiving condition—only archive files that have not been modified within the last three months—the executing entity will check the files in the [file 1, file 2] set after the first filtering again to see if they have been modified within the last three months (no filtering is performed if no configuration condition is set). Finally, only file 1 meets the condition, so the final file archived set obtained through the relationship between pending attachments and files is [file 1]. If a business model is referenced by multiple business models, its archived data set is the union of the archived sets calculated for that business model and each master model.
[0065] The calculation rules for the archived data set of the associated model are as follows: The archived data set of the associated model needs to be obtained through the association relationship between the main model's archived data set and the model. First, obtain the set of other data related to each data point in the main model's archived data set. Then, filter according to the conditions configured in the relationship configuration between the main model and the associated model (no filtering if not configured). Finally, filter according to the archived conditions configured in the associated model itself (no filtering if not configured). Figure 3Taking to-do tasks and attachments as an example: Attachments are the association model of to-do tasks. One to-do task may be associated with multiple attachments. The executing entity first obtains the archived data set of to-do tasks [To-do Task 1, To-do Task 2, To-do Task 3], where To-do Task 1 is associated with [Attachment 1A, Attachment 1B], To-do Task 2 is associated with [Attachment 2A, Attachment 2B], and To-do Task 3 is associated with [Attachment 3A, Attachment 3B]. Thus, the obtained set of associated attachments is [Attachment 1A, Attachment 1B, Attachment 2A, Attachment 2B, Attachment 3A, Attachment 3B]. If the data archiving condition is configured on the association relationship—only archiving in 2022... For pending attachments created before September 2022, the executing entity will check each pending attachment in this set to see if it was created before September 2022 (no filtering will be performed if no configuration conditions are set). If only file 1 and file 2 meet the conditions, the file set after the first filtering will be [Pending Attachment 1A, Pending Attachment 3B]. If there are data archiving conditions on the association model, only pending attachments that have been reviewed will be archived. The system will check the pending attachments in the set [Pending Attachment 1A, Pending Attachment 3B] again to see if the pending attachments have been reviewed (no filtering will be performed if no configuration conditions are set). Finally, only pending attachment 3B meets the conditions, so the final data archive set of pending attachments will be [Pending Attachment 3B].
[0066] The method of the present invention consists of two parts: one part is to create a data archiving scheme, and the other part is to archive data based on the archiving scheme.
[0067] Creating a data archiving scheme can be achieved through a class diagram-based data archiving scheme designer. On the user side, the specific steps include: a) Create a new data archiving scheme.
[0068] b) Open the newly created archiving scheme and enter the design interface.
[0069] c) Add the core business model from the corresponding business module to the design interface using the "Add" operation.
[0070] d) Configure the associated or referenced models of the core model using a configuration class diagram: After selecting a model, the associated or referenced models are automatically added through the "Expand" operation; after expanding the associated and referenced models, the archiving order of the models is automatically generated through the "Automatic Sort" operation.
[0071] e) Select the core business model and configure the data archiving conditions in the archive information configuration interface on the right: In one example, the data archiving condition is configured as "archive the pending tasks with the status of 'completed'"; depending on the requirements, configure additional archiving conditions on the relationship between models.
[0072] f) Configure the data archiving cycle.
[0073] The operation process on the class diagram-based data archiving scheme designer side can be analogized to the user operation on the user side described above.
[0074] Archiving based on an archiving scheme can be achieved through the data archiving module. The data archiving module reads the configured archiving scheme and performs data archiving operations periodically. The data archiving module mainly includes three functions: Data archiving trigger function: All enabled archiving schemes are checked periodically through a background thread, and the archiving scheme is executed if the trigger period is reached.
[0075] Data archiving scheme execution function: Executes the archiving scheme that has reached the trigger period. The execution process is carried out in the background task and does not block the system main thread.
[0076] Data archiving log recording function: When executing the archiving scheme, logs are recorded for the archiving process of each model, which facilitates subsequent statistics and problem investigation.
[0077] The core steps of the data archiving solution execution function include: a) Read the archived scheme information and locate the core business model in the scheme (i.e. the model that is not referenced by other models).
[0078] b) Based on the archiving conditions of the core business model, automatically generate data archiving conditions for its associated and referenced models (the generated archiving conditions differ depending on whether the relationship is associated or referenced). Figure 2 Taking "To-Do Tasks" as an example: Simply configure the archiving condition "Status = Completed" on the To-Do Task model, and the archiving module will automatically archive completed To-Do Tasks and their associated attachments. If the storage database is a MySQL relational database, it will generate query condition SQL for the corresponding table of the model for subsequent data copying and deletion, as shown in the example below: To-do tasks: SELECT FROM TODOTASK WHERE STATE = 'Completed' Attachments to be done: SELECT FROM TODOATTACH SRC JOIN TODOTASK T ON T.ID = SRC.SOURCE_ID WHERE T.STATE = 'Completed' File: SELECT FROM FILE SRC JOIN TODOATTACH AT ON AT.RELATED_ID =SRC.ID JOIN TODOTASK T ON T.ID = AT.SOURCE_ID WHERE T.STATE = 'Completed' c) Perform data archiving operations for each business model in sequence.
[0079] d) Record archived logs for easy statistical analysis and error reporting.
[0080] The archiving execution details for a single business model include: a) Verify if the archive table corresponding to the model exists; if not, create it automatically.
[0081] b) Based on the archiving conditions of the model obtained from the parsing archiving scheme, generate and execute the database execution statement "copy data from the main table to the archive table"—that is, copy the row data in the main table that meets the archiving conditions and insert it into the archive table, with a maximum of 10,000 data rows copied at a time; after successful copying, update the archive log to facilitate re-execution if an archiving error occurs.
[0082] c) After successful data replication, delete the data in the main table that meets the archiving criteria. A maximum of 10,000 data entries can be deleted at a time.
[0083] In some embodiments of the present invention, the data archiving method further includes generating archived logs.
[0084] Archived logs are divided into solution archived logs and model archived logs. Each time a solution is archived, a solution archived log is generated for that solution, and a model archived log is generated for each model in the solution.
[0085] Archived Solution Log: Records the archived solution, archived status, archived start time, and archived end time. Archived status includes "Not Started," "Copying," "Deleted," and "Completed." "Partial Archived" indicates a failure during the archived process; the error stage (copying or deleting) needs to be determined by analyzing the model's archived log, and the problem can be fixed by combining the error information.
[0086] Model Archive Log: Records the archive log of the solution, the corresponding model, the archive status, the archive start time, the archive end time, the number of archived data entries, and archive exception information. The archive status includes "Not Started," "Copying," "Deleted," and "Completed," allowing you to track and troubleshoot issues through the status and exception information.
[0087] In summary, compared to current data archiving configuration solutions that directly manipulate the storage layer, the class diagram-based data archiving configuration solution of this invention is simple to use, has a low learning cost, high readability, high maintainability, and is suitable for complex business scenarios. These advantages are largely based on the class diagram configuration solution designer, as most technical and non-technical personnel in the project have studied class diagrams, and even those unfamiliar with them can learn quickly. Furthermore, the configuration process involves manipulating models, and archiving conditions can be configured using a conditional configuration interface, completely shielding the technical details of the storage layer, thus reducing the learning cost. The class diagram-based archiving configuration solution clearly presents the relationships between models, providing a clear view and facilitating subsequent modifications and adjustments. When configuring the archiving solution, generally only the archiving conditions of the main business model need to be configured. Based on the model relationships, the archiving module can automatically generate archiving conditions for models referenced and associated by the main model, greatly reducing the complexity of the configuration. Furthermore, model relationships can be quickly configured through expansion operations, further simplifying the configuration process.
[0088] Reference Figure 7 The diagram illustrates a structural schematic of an embodiment of the data archiving system provided by the present invention. The system 700 includes: The class diagram-based configuration scheme designer 701 is used to construct a class diagram representing the relationships between business models in response to user configuration operations on the relationships between business models through the user interface; wherein, different business models correspond to different business data; obtain the data archiving conditions configured for the business models; and generate the archiving scheme of the business models based on the data archiving conditions and the class diagram. The data archiving module 702 is used to archive business data according to the archiving scheme.
[0089] It should be noted that the implementation principles or processes of the above modules can be referred to the aforementioned implementation examples of the data archiving configuration method and data archiving method, and will not be elaborated here.
[0090] Reference Figure 8 The present invention illustrates an electronic device 800. The electronic device 800 includes a processor 801, a memory 802, and a display 803. Figure 8 Only some components of the electronic device 800 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0091] In some embodiments, processor 801 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 802 or process data, such as the data archiving configuration method or data archiving method of the present invention.
[0092] In some embodiments, processor 801 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 801 may be local or remote. In some embodiments, processor 801 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.
[0093] In some embodiments, memory 802 may be an internal storage unit of electronic device 800, such as a hard disk or memory of electronic device 800. In other embodiments, memory 802 may also be an external storage device of electronic device 800, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 800.
[0094] Furthermore, the memory 802 may include both internal storage units of the electronic device 800 and external storage devices. The memory 802 is used to store application software and various types of data installed on the electronic device 800.
[0095] In some embodiments, display 803 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 803 is used to display information from electronic device 800 and to display a visual user interface. Components 801-803 of electronic device 800 communicate with each other via a system bus.
[0096] In one embodiment, when processor 801 executes the data archiving configuration program in memory 802, the following steps may be performed: In response to user configuration operations on the relationships between business models through the user interface, a class diagram representing the relationships between business models is constructed; where different business models correspond to different business data. Obtain the data archiving conditions configured for the business model; An archiving scheme for the business model is generated based on the data archiving conditions and class diagram.
[0097] In one embodiment, when processor 801 executes a data archiving program in memory 802, the following steps may be performed: Archive business data according to the archiving scheme.
[0098] It should be understood that when the processor 801 executes the data archiving configuration program or data archiving program in the memory 802, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0099] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 800 mentioned. Electronic device 800 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 800 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0100] In one embodiment, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by the processor, implements the steps of any of the data archiving configuration methods or data archiving methods described above.
[0101] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0102] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A data archiving configuration method, characterized in that, include: In response to user configuration operations on the relationships between business models through the user interface, a class diagram representing the relationships between the business models is constructed; wherein, different business models correspond to different business data; Obtain the data archiving conditions configured for the business model; An archiving scheme for the business model is generated based on the data archiving conditions and the class diagram.
2. The data archiving configuration method according to claim 1, characterized in that, The user interface includes at least one of the following: a model adding control, an expand control for models that correspond to the model, a model deleting control, a model selection control, a model alignment control, an archive scheme export control, a model archive order sorting control, and a model query control.
3. The data archiving configuration method according to claim 2, characterized in that, The step of constructing a class diagram representing the relationships between business models in response to user configuration operations on the relationships between business models through the user interface includes: In response to a user selecting the expand control after selecting a business model in the user interface, expandable sub-controls are displayed; the expandable sub-controls include at least one of the following: parent type expandable control, child type expandable control, associated type expandable control, referenced type expandable control, and referenced type expandable control; In response to the user selecting a target, expand the sub-controls, determine the business models that have a target relationship with the selected business model, and construct a class diagram representing the relationship between the business models.
4. The data archiving configuration method according to claim 2, characterized in that, The step of generating the archiving scheme for the business model based on the data archiving conditions and the class diagram includes: In response to the user selecting the model archiving order sorting control in the user interface, the archiving order of the business models is generated; An archiving scheme for the business model is generated based on the archiving order, the data archiving conditions, and the class diagram.
5. The data archiving configuration method according to claim 1, characterized in that, The step of obtaining the data archiving conditions configured for the business model includes: In response to the user selecting the business model, the archive information configuration interface of the selected business model is displayed; Obtain the archiving information input by the user through the archiving information configuration interface; the archiving information includes: data archiving conditions, whether the business model is archived, and the business model archiving order information; The step of generating an archiving scheme for the business model based on the data archiving conditions and the class diagram includes: An archiving scheme for the business model is generated based on the archived information and the class diagram.
6. A data archiving method, characterized in that, include: The business data is archived using the archiving scheme generated by any one of the data archiving configuration methods according to claims 1 to 5.
7. The data archiving method according to claim 6, characterized in that, The archiving of the business data includes: Locate the core business model in the archiving scheme; the core business model is a business model that is not referenced. The second data archiving conditions for other business models are determined based on the first data archiving conditions of the core business model; wherein, the other business models are business models in the archiving scheme that have a specified relationship with the core business model; the second data archiving conditions include the first data archiving conditions; The core business model is archived according to the first data archiving conditions, and the other business models are archived according to the second data archiving conditions.
8. The data archiving method according to claim 7, characterized in that, When the other business model is configured with a third data archiving condition in relation to the core business model, and / or the other business model is configured with a fourth data archiving condition, the second data archiving condition further includes the third data archiving condition, and / or the fourth data archiving condition.
9. A data archiving system, characterized in that, include: A class diagram-based configuration scheme designer is used to construct a class diagram representing the relationships between business models in response to user configuration operations on the relationships between business models through a user interface; wherein different business models correspond to different business data; obtain the data archiving conditions configured for the business models; and generate an archiving scheme for the business models based on the data archiving conditions and the class diagram. The data archiving module is used to archive the business data according to the archiving scheme.
10. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the data archiving configuration method according to any one of claims 1 to 5, or to implement the steps in the data archiving method according to any one of claims 6 to 8.