Battery digital product passport generation system and method based on free process arrangement
By splitting the battery digital product passport generation process into programmable business nodes, dynamically adjusting the process configuration and using the state machine engine to drive transaction execution, the flexibility and data consistency issues of the traditional battery digital product passport generation process are solved, and efficient and flexible battery passport generation is achieved.
Patent Information
- Application Number
- CN202511061868.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-31
AI Technical Summary
The traditional battery digital product passport generation process is fixed and cannot be flexibly adjusted. The modification cost is high, there is a lack of fault tolerance mechanism, and data consistency is difficult to ensure.
The battery digital product passport generation process is split into multiple independent and programmable business nodes, the process configuration is dynamically modified, versioned snapshots are generated, transaction execution is driven by the state machine engine, and compensation operations are performed in case of failure to ensure data consistency.
It achieves flexibility and efficiency in the battery digital product passport generation process, supports hot updates without the need to restart the service, and ensures process robustness and data accuracy.
Smart Images

Figure CN120562854B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of battery digital product passport generation, and in particular relates to a battery digital product passport generation system and method based on free process arrangement. Background Art
[0002] As an important tool for battery life cycle management, the battery digital product passport records detailed information about the battery from production to scrapping, ensures data integrity and traceability, comprehensively monitors battery usage, improves battery management efficiency, and ensures battery safety and reliability. Therefore, the need to optimize the battery digital product passport generation system is becoming increasingly urgent.
[0003] The traditional battery digital product passport generation process is fixed, has a heavy framework, and cannot be flexibly adjusted. If you want to modify the passport generation process, you need to modify the code or configuration file and then restart the service for it to take effect. This is time-consuming, labor-intensive, and inefficient, with high development and deployment costs. Failure of a node in the serial process will cause the entire process to be interrupted. There is a lack of effective fault tolerance and compensation mechanisms, and data consistency is difficult to ensure. Summary of the Invention
[0004] The purpose of the present invention is to provide a battery digital product passport generation system and method based on free process arrangement, which can solve the problem of frequent changes in the battery passport generation process.
[0005] The technical solutions adopted by the present invention are as follows:
[0006] The battery digital product passport generation method based on free process orchestration includes:
[0007] Split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database;
[0008] Respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node;
[0009] Based on the current process configuration snapshot, execute the battery digital product passport production business logic in the order of business nodes;
[0010] When executing a process, a long transaction is split into multiple short transactions. A compensation node is bound to each short transaction based on the current process configuration, and the state machine engine drives transaction execution.
[0011] For business nodes that fail to execute, the opposite business logic operation is performed to restore the data status to the consistency state before the short transaction execution. The retained tasks are polled through scheduled tasks, the compensation node is called to advance the process, and the data consistency under the advancement process is verified until all business nodes are completed, generating a battery digital product passport that meets the requirements.
[0012] In a preferred solution, the steps of splitting the entire process of producing a digital battery product passport into multiple independently programmable business nodes, generating process configuration information and storing it in a preset database include:
[0013] The entire process of producing a digital battery product passport is broken down into nodes, forming business nodes including passport model building, data collection and access, report aggregation, setting disclosure, passport data push, and passport review;
[0014] Based on business requirements, a process configuration table consisting of various business nodes is constructed, defining the business node identifiers, business node execution sequence numbers, business node business logic descriptions, and dependencies between business nodes;
[0015] According to the dependency relationship between business nodes, set the trigger conditions and data transmission rules between nodes to generate the data flow path between business nodes;
[0016] Among them, when the process configuration table is not constructed according to business requirements, the battery digital product passport generation process configuration will be automatically initialized as the default configuration.
[0017] In a preferred solution, the step of responding to multi-role operation instructions, dynamically modifying process configuration information and generating versioned snapshots, and automatically synchronizing them to each business node includes:
[0018] Obtain the identity of the role issuing the operation instruction and perform permission verification. After passing the permission verification, perform compliance check on the operation instruction;
[0019] When an operation instruction violates the dependency relationship between business nodes, it is automatically rejected and recorded as a violation operation, and the timestamp and role information of the violation operation are also recorded simultaneously;
[0020] When the operation instruction meets the dependency relationship between business nodes, the process configuration table is updated according to the operation instruction, and a versioned snapshot with a timestamp is generated at the same time;
[0021] The updated versioned snapshot is broadcast to all business nodes. After receiving the update instructions, each business node adjusts its own execution logic.
[0022] In a preferred solution, the step of executing the battery digital product passport production business logic in the order of business nodes based on the current process configuration snapshot includes:
[0023] Load the current process configuration snapshot with version tag from the database to obtain the execution order and dependency relationships of business nodes;
[0024] Traverse the business nodes and perform differentiated operations on each business node based on pre-configured attributes;
[0025] Count the number of failures when performing differentiated operations on each business node, and trigger an exception handling mechanism when the number of failures reaches the preset upper limit. The exception handling mechanism includes skipping the current failed node, recording the failure log, pausing the process, and sending an alarm message;
[0026] After all business nodes are executed, the execution status of each business node is recorded to form a traceable execution log.
[0027] In a preferred solution, the step of performing differentiated operations on each service node according to pre-configured attributes includes:
[0028] Execute temporary data acquisition on the data collection node, and trigger the skip mechanism when the number of execution failures reaches the upper limit. When the execution succeeds, the temporary data is pushed to the next node;
[0029] Perform key business verification on the passport review node and trigger a retry mechanism when the number of execution failures reaches the upper limit. Record the audit log when the execution is successful and push the audit results to the next node;
[0030] Execute data aggregation on the report aggregation node, and trigger the pause mechanism when the number of execution failures reaches the failure limit. Generate a report file when the aggregation is successful, push the report file to the final node, and update the process status at the same time.
[0031] In a preferred solution, the steps of splitting a long transaction into multiple short transactions, binding a compensation node to each short transaction based on the current process configuration, and driving transaction execution by a state machine engine include:
[0032] Based on the dependencies of the business nodes in the current process configuration, the long transaction of generating a digital battery product passport is broken down into a serial short transaction chain. The data acquisition sub-transaction chain is from the data collection node to the report aggregation node, and the verification processing sub-transaction chain is from the report aggregation node to the passport review node.
[0033] Based on the node attributes, bind the compensation node for clearing cached data to the data collection node, bind the compensation node for resetting the approval status to the passport review node, and bind the compensation node for deleting intermediate files to the report aggregation node;
[0034] The state machine engine loads the state transition diagram that describes the dependencies of short transactions, drives the execution of each short transaction in sequence, and triggers the corresponding compensation node when any short transaction fails.
[0035] In a preferred solution, the step of performing the opposite service logic operation on the service node that failed to execute includes:
[0036] Call the clear cache compensation node to clear the temporary data cached by the data collection node and roll back the data version number;
[0037] Call the file deletion compensation node to delete the generated intermediate report file and restore the original data status;
[0038] Call the status reset compensation node to revoke the approval status mark;
[0039] After each compensation node operation is completed, the compensation log is automatically recorded and the process status is updated.
[0040] In a preferred solution, the steps of polling the stranded tasks through the scheduled tasks, calling the compensation node to advance the process, and verifying the data consistency under the advancement process include:
[0041] Through the preset distributed scheduling framework, the task status library is polled at preset time intervals to detect stranded tasks that have timed out.
[0042] When the system is first detained, the corresponding bound compensation node is called to perform a rollback operation;
[0043] In case of secondary delay, the cross-node compensation mechanism is triggered to roll back all business nodes of the current sub-transaction chain;
[0044] If the task is delayed three times, it will be marked as an abnormal task and an abnormal notification will be sent to the administrator;
[0045] After the compensation operation is completed, compare the database version number with the data version number after the compensation operation;
[0046] When the database version number is consistent with the data version number after the compensation operation, confirm the data consistency and update the task status;
[0047] When the database version number is inconsistent with the data after the compensation operation, the abnormal data is isolated, a repair task is generated, and the administrator is notified to intervene.
[0048] The present invention also provides a battery digital product passport generation system based on free process arrangement, using the above-mentioned battery digital product passport generation method based on free process arrangement, including:
[0049] The initialization module is used to split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database;
[0050] The process configuration module is used to respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node;
[0051] The business logic production module executes the battery digital product passport production business logic in the order of business nodes based on the current process configuration snapshot;
[0052] The process execution module is used to split long transactions into multiple short transactions when executing the process. Based on the current process configuration, a compensation node is bound to each short transaction, and the state machine engine drives the transaction execution.
[0053] The compensation module is used to perform the opposite business logic operation on the business node that failed to execute, restore the data status to the consistency state before the short transaction execution, and poll the stranded tasks through scheduled tasks, call the compensation node to advance the process, and verify the data consistency under the advancement process until all business nodes are completed, generating a battery digital product passport that meets the requirements.
[0054] The technical effects achieved by the present invention are:
[0055] The present invention sorts out the battery digital product passport generation process, clarifies each business node and its logical relationship, and splits lengthy functions into small services that can be freely combined and arranged. It dynamically defines business processes in various ways to meet the change needs of different groups of people. It supports a hot update mechanism and can freely integrate and implement the battery digital product passport generation process without restarting the service. It configures retry, rollback or termination strategies for different process nodes to ensure the robustness of the process and data accuracy. When the process is executed, long transactions are split into multiple short transactions, and customized state diagrams and compensation nodes are implemented. The transaction execution and rollback are driven by the state machine engine, the task status is checked regularly, the stranded tasks are promoted, and the data consistency is verified regularly to ensure efficient process execution and data reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a schematic flow chart of the method of the present invention;
[0057] Figure 2 It is a schematic diagram of the system modules of the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0060] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it constitute a separate or selective embodiment that is mutually exclusive of other embodiments.
[0061] See also Figure 1 As shown, the present invention provides a method for generating a battery digital product passport based on free process arrangement, comprising:
[0062] S1. Split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database;
[0063] In step S1, during the production process of the battery digital product passport, it is first necessary to clarify the functional positioning and business logic of each business node to ensure that each business node can operate independently and can be flexibly arranged according to the preset process configuration. The steps of splitting the entire process of producing the battery digital product passport into multiple independent and programmable business nodes, generating process configuration information and storing it in a preset database include:
[0064] The entire process of producing a digital battery product passport is broken down into nodes, forming business nodes including passport model building, data collection and access, report aggregation, setting disclosure, passport data push, and passport review;
[0065] Based on business requirements, a process configuration table consisting of various business nodes is constructed, defining the business node identifiers, business node execution sequence numbers, business node business logic descriptions, and dependencies between business nodes;
[0066] According to the dependency relationship between business nodes, set the trigger conditions and data transmission rules between nodes to generate the data flow path between business nodes;
[0067] Among them, when the process configuration table is not built according to business requirements, the battery digital product passport generation process configuration will be automatically initialized as the default configuration;
[0068] Specifically, in the process of making a battery digital product passport, the entire production process of the battery digital product passport will first be node-based, and each business node will assume different functions. For example, the passport model construction node is responsible for building the basic model of the battery digital product passport, the data collection access node is responsible for collecting and organizing the required data information, the report aggregation node is responsible for summarizing the data of each node to generate a report, the disclosure node is responsible for processing the disclosure settings of the passport information, the passport data push node is responsible for pushing the passport data to the relevant agencies, and the passport review node is responsible for the final review and confirmation of the passport information. The business nodes are arranged through the preset process configuration table to ensure that the production process of the battery digital product passport can be carried out according to It is carried out in the established logical order. During the specific operation, the business requirements will be clarified first, and then the functions of each business node will be defined according to the business requirements, and a process configuration table will be constructed. The process configuration table describes the identifier of each business node, the execution sequence number, the business logic description and the dependency relationship between nodes. Furthermore, according to the dependency relationship, the trigger conditions and data transmission rules between business nodes will be set to generate the data flow path between business nodes. However, in actual applications, there will still be process configuration tables that are not constructed according to business requirements. At this time, the battery digital product passport generation process configuration will be automatically initialized and used as the default configuration to ensure the standardization of the battery digital product passport production process.
[0069] S2. Respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node;
[0070] In step S2, when the process configuration information needs to be modified, the configuration of the business node is dynamically adjusted according to the permissions and requirements of different operation roles to generate a new process version snapshot and synchronize it to each node in real time to ensure the consistency and efficiency of the process. The steps of responding to multi-role operation instructions, dynamically modifying the process configuration information and generating a versioned snapshot, and automatically synchronizing it to each business node, include:
[0071] Obtain the identity of the role issuing the operation instruction and perform permission verification. After passing the permission verification, perform compliance check on the operation instruction;
[0072] When an operation instruction violates the dependency relationship between business nodes, it is automatically rejected and recorded as a violation operation, and the timestamp and role information of the violation operation are also recorded simultaneously;
[0073] When the operation instruction meets the dependency relationship between business nodes, the process configuration table is updated according to the operation instruction, and a versioned snapshot with a timestamp is generated at the same time;
[0074] Broadcast the updated versioned snapshot to all business nodes. After receiving the update instructions, each business node adjusts its execution logic.
[0075] Specifically, when modifying the process configuration information, it is first necessary to clarify the identity information of the person who issued the operation instruction and determine whether he or she has the corresponding operation authority. If not, a rejection instruction will be generated. If the identity verification is passed, the operation instruction will be further subject to compliance review to ensure that it does not violate the dependencies of the business nodes. If it is compliant, the process configuration table will be updated and a versioned snapshot with a timestamp will be generated. For example, authorized users can perform interface visualization operations to configure process changes on the PC management platform or mobile terminal. Operation and maintenance personnel can perform compensation tasks to modify the process on the scheduled task platform according to the set parameters to change the configuration process. Data engineers or developers can use graphical interface tools or scripts to modify and change the configuration process information. After different types of users modify the process, the operation change record will be recorded for easy backtracking, and then broadcast to each business node. After receiving it, other business nodes will synchronously adjust the execution logic to ensure real-time update and consistency of the process configuration, thereby achieving the collaboration of the battery digital product passport production process.
[0076] S3. Based on the current process configuration snapshot, execute the battery digital product passport production business logic in the order of business nodes;
[0077] In step S3, after the process configuration information is determined, the specific operations of producing the battery digital product passport will be executed in sequence according to the order of the business nodes, including data collection, information verification, image processing and other links, to ensure that each business node can perform the corresponding production tasks in accordance with the preset standards and specifications. Among them, based on the current process configuration snapshot, the steps of executing the battery digital product passport production business logic in the order of the business nodes include:
[0078] Load the current process configuration snapshot with version tag from the database to obtain the execution order and dependency relationships of business nodes;
[0079] Traverse the business nodes and perform differentiated operations on each business node based on pre-configured attributes;
[0080] Count the number of failures when performing differentiated operations on each business node, and trigger an exception handling mechanism when the number of failures reaches the preset upper limit. The exception handling mechanism includes skipping the current failed node, recording the failure log, pausing the process, and sending an alarm message;
[0081] After all business nodes are executed, the execution status of each business node is recorded to form a traceable execution log;
[0082] Specifically, after the process configuration information is modified, the process configuration snapshot that needs to be executed will be loaded from the database, and the execution order and dependency relationships of the business nodes will be parsed so that the process can be advanced step by step according to the established logic. In addition, the business nodes will be traversed and differentiated operations will be performed according to the pre-configured attributes to ensure that each business node can perform the corresponding production tasks according to the preset standards and specifications. At the same time, the number of failures when each business node performs differentiated operations will be counted, and when the number of failures reaches the preset upper limit, the exception handling mechanism will be triggered. Since the importance and relevance of different business nodes vary, the exception handling mechanism will determine the corresponding processing process according to the different business node types, thereby ensuring the overall stability of the process and the accuracy of the data, and finally forming the corresponding execution log for subsequent problem investigation and optimization adjustments.
[0083] It should be noted that the steps of performing differentiated operations on each service node according to pre-configured attributes include:
[0084] Execute temporary data acquisition on the data collection node, and trigger the skip mechanism when the number of execution failures reaches the upper limit. When the execution succeeds, the temporary data is pushed to the next node;
[0085] Perform key business verification on the passport review node and trigger a retry mechanism when the number of execution failures reaches the upper limit. Record the audit log when the execution is successful and push the audit results to the next node;
[0086] Execute data aggregation on the report aggregation node and trigger the pause mechanism when the number of execution failures reaches the upper limit. Generate a report file when the aggregation is successful and push the report file to the final node, while updating the process status;
[0087] When performing differentiated operations on each business node, the type of each business node is required first. Business nodes include data collection nodes, passport review nodes and report aggregation nodes. Data collection nodes are responsible for the acquisition and preliminary processing of temporary data to ensure the accuracy and timeliness of data sources. Passport review nodes are responsible for the verification and comparison of key information to ensure the authenticity and reliability of passport information. Report aggregation nodes are responsible for integrating data from each node into a complete report to ensure the comprehensiveness and consistency of the final output results. For data collection nodes, when the number of execution failures reaches the preset upper limit, the node will be automatically skipped and the failure details will be recorded to avoid It affects the overall process. When the execution is successful, the temporary data will be pushed to the next node to ensure the continuity of the data chain. For the passport review node, when the number of failures reaches the upper limit, the retry mechanism will be triggered, and a maximum of N retries (N≥3) will be made to ensure that the review process is correct. When the review is successful, the audit log will be recorded and the results will be pushed to ensure the rigor of the process. If the report aggregation node fails, the process will be suspended and will continue after the corresponding failure problem is resolved to ensure the integrity of the report. After the aggregation is successful, a report file will be generated, and the process status will be automatically updated. At the same time, the report file will be pushed to the final node to ensure the continuity of data flow.
[0088] S4. When executing the process, the long transaction is split into multiple short transactions. A compensation node is bound to each short transaction based on the current process configuration, and the state machine engine drives the transaction execution.
[0089] In step S4, when executing the production process of the battery digital product passport, the long transaction will be split into multiple short transactions, such as data collection, review, aggregation, etc., and each short transaction will be bound to a corresponding compensation node to ensure timely rollback and recovery when a certain link fails. The state machine engine will uniformly schedule and monitor to ensure the stability of the execution process. The steps of splitting the long transaction into multiple short transactions, binding a compensation node to each short transaction based on the current process configuration, and driving the transaction execution by the state machine engine include:
[0090] Based on the dependencies of the business nodes in the current process configuration, the long transaction of generating a digital battery product passport is broken down into a serial short transaction chain. The data acquisition sub-transaction chain is from the data collection node to the report aggregation node, and the verification processing sub-transaction chain is from the report aggregation node to the passport review node.
[0091] Based on the node attributes, bind the compensation node for clearing cached data to the data collection node, bind the compensation node for resetting the approval status to the passport review node, and bind the compensation node for deleting intermediate files to the report aggregation node;
[0092] The state machine engine loads the state transition diagram that describes the dependencies between short transactions, drives the execution of each short transaction in sequence, and triggers the corresponding compensation node when any short transaction fails.
[0093] Specifically, when splitting long transactions, the battery digital product passport generation long transaction is decomposed into serial short transaction chains according to the dependency relationship of the business nodes to ensure the logic of each link. Each short transaction corresponds to a specific business node operation in the process, such as "data collection transaction", "report aggregation transaction", "passport review transaction", etc. The input and output data, business logic and the relationship with the previous and next short transactions of each short transaction are clarified to ensure that each short transaction can be executed independently and has clear boundaries, and write their own compensation business implementation. Specifically, the service call process is defined through the state diagram, including the state transition relationship and trigger conditions of each short transaction, and the state diagram tools (such as YAML, PlantUML, etc., of course, can also be used for A custom state diagram tool is used to draw a state transition diagram of the entire battery digital product passport generation process, clarifying the short transaction represented by each state, the transition direction between states, and the conditions that need to be met during the transition. Then, based on the state diagram information, a state language definition file that conforms to the JSON (lightweight data exchange format) format specification is generated. This file is used as the core configuration file of the distributed transaction to guide the execution process of the entire distributed transaction. At the same time, the corresponding compensation node will be designed and configured next to each short transaction in the state diagram. The role of the compensation node is to execute the opposite business logic operation when the short transaction fails to execute or needs to be rolled back, so as to restore the data state to the consistency state before the short transaction is executed. For example, for the "data collection transaction" The compensation node can be a "data clearing transaction", which is used to clear the collected error data records when the data collection fails and rolls back. The compensation node for the "passport review transaction" can be an "audit status reset transaction", which is used to reset the passport review status to the unreviewed state, ensuring that the entire battery digital product passport generation process can achieve the final consistency of data through the compensation mechanism when an exception occurs. After that, the state machine engine will schedule the execution of each short transaction according to the state language definition file. First, the state machine engine is initialized and loaded, and a customized state machine engine is developed and deployed. The state machine engine is responsible for parsing and executing the JSON format state language definition file generated above. At startup, the state machine engine loads the JSON file and initially Initialize each state node, conversion relationship, and corresponding short transaction and compensation node information to build a state machine model, laying the foundation for subsequent process driving. After the battery digital product passport generation process is started, the state machine engine drives the execution of each short transaction in sequence according to the current state (the initial state is the first short transaction node), state conversion relationship and trigger conditions. During the execution of each short transaction, it follows its business logic, operates and processes the data, and feedbacks the execution result (success or failure) to the state machine engine after the execution is completed. The state machine engine determines whether the conditions for the next state transition are met based on the feedback result. If so, it drives the next short transaction to execute. Otherwise, it performs corresponding operations according to the pre-configured processing strategy.During the execution process, the state changes of business nodes are monitored in real time. When an exception occurs during the execution of a short transaction, the state machine engine immediately initiates the transaction rollback mechanism. Based on the pre-configured compensation node information, it reverses the compensation node operations corresponding to the successful node, gradually undoing the data changes made by the previously completed short transaction, and restoring the data state of the entire distributed transaction to its initial state, ensuring data consistency and integrity. Throughout the rollback process, the state machine engine strictly monitors the execution status of each compensation node and records the corresponding rollback log for subsequent troubleshooting and data analysis, ensuring data reliability in the battery digital product passport generation process under abnormal circumstances.
[0094] S5. For the business nodes that failed to execute, perform the opposite business logic operation to restore the data status to the consistency state before the short transaction was executed, and poll the stranded tasks through scheduled tasks, call the compensation node to advance the process, and verify the data consistency under the advancement process until all business nodes are completed, and generate a battery digital product passport that meets the requirements.
[0095] In step S5, during the execution of the process, the business nodes that failed to execute are marked, and the reverse business logic operation is performed to restore the data to the state before the short transaction is executed to ensure data consistency. In addition, the retained tasks are polled by timed tasks and the compensation nodes are called to advance the process. During this process, data consistency is verified to ensure the accuracy of the state of each node until all business nodes are successfully completed, and finally a battery digital product passport that meets the specifications is generated. The steps of performing the reverse business logic operation on the business nodes that failed to execute include:
[0096] Call the clear cache compensation node to clear the temporary data cached by the data collection node and roll back the data version number;
[0097] Call the file deletion compensation node to delete the generated intermediate report file and restore the original data status;
[0098] Call the status reset compensation node to revoke the approval status mark;
[0099] After each compensation node operation is completed, the compensation log is automatically recorded and the process status is updated.
[0100] Specifically, for different types of business nodes, the corresponding reverse business logic operation methods are also different. For data collection nodes, the reverse operation is to clear the temporary table and reset the collection mark. For file generation nodes, the reverse operation is to delete the file and restore the original data. For approval nodes, the reverse operation is to revoke the approval and reset the status, ensuring that each node can be accurately rolled back in the event of failure, ensuring the integrity of the process and the accuracy of the data. After each compensation node is executed, the compensation operation log will be automatically recorded and the process status will be updated in real time to ensure that the entire rollback process is traceable.
[0101] Secondly, the steps of polling the stranded tasks through scheduled tasks, calling the compensation node to advance the process, and verifying the data consistency under the advancement process include:
[0102] Through the preset distributed scheduling framework, the task status library is polled at preset time intervals to detect stranded tasks that have timed out.
[0103] When the system is first detained, the corresponding bound compensation node is called to perform a rollback operation;
[0104] In case of secondary delay, the cross-node compensation mechanism is triggered to roll back all business nodes of the current sub-transaction chain;
[0105] If the task is delayed three times, it will be marked as an abnormal task and an abnormal notification will be sent to the administrator;
[0106] After the compensation operation is completed, compare the database version number with the data version number after the compensation operation;
[0107] When the database version number is consistent with the data version number after the compensation operation, confirm the data consistency and update the task status;
[0108] When the database version number is inconsistent with the data after the compensation operation, the abnormal data is isolated, a repair task is generated, and the administrator is notified to intervene;
[0109] In this embodiment, during the execution of the process, the status of each node will be monitored in real time through a pre-set distributed scheduling framework. The distributed scheduling framework can be Zookeeper, Redis, etc., to ensure that anomalies are discovered and handled in a timely manner, such as polling every 5 minutes (specific settings are made according to actual needs). Through technical means such as task schedulers or timers, it is ensured that scheduled tasks can be accurately triggered at predetermined time intervals. When each scheduled task polling is triggered, a comprehensive check is performed on the ongoing battery digital product passport generation task. By querying the task status information stored in the database, the current link of each task, the execution progress, and whether there is any delay or timeout and incomplete situation are clarified. For tasks that have not been completed, according to business logic and process requirements, it is determined whether administrator intervention, resource allocation optimization, or rescheduling execution is required to push the task forward until the entire battery digital product passport generation process is successfully completed, thereby ensuring that all tasks can be completed as scheduled. It is completed according to the established business process and time requirements to further ensure the final consistency of the data. There are many possibilities for stranded tasks. For the first stranded task, the compensation node will be automatically triggered for a preliminary rollback. If it is stranded for the second time, the cross-node compensation mechanism will be started to fully roll back the sub-transaction chain. If it is stranded for the third time, it will be marked as abnormal and a notification will be sent to ensure that the problem is handled in a timely manner and the process runs stably. During the scheduled task polling process, in addition to checking the task status, the generated battery digital product passport data will be regularly verified for consistency. By comparing the passport information stored in the database with the data records generated by each business link, the integrity, accuracy and consistency of the data are checked. For example, whether the basic information of the passport is consistent with the collected data source, whether the review status is consistent with the actual business processing results, etc. If data inconsistency is found, the data correction process will be triggered in time, and the data consistency will be restored by using backup data or re-executing related business links to ensure the accuracy of the battery digital product passport data.
[0110] See also Figure 2 The battery digital product passport generation system based on free process arrangement uses the above-mentioned battery digital product passport generation method based on free process arrangement, including:
[0111] The initialization module is used to split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database;
[0112] The process configuration module is used to respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node;
[0113] The business logic production module executes the battery digital product passport production business logic in the order of business nodes based on the current process configuration snapshot;
[0114] The process execution module is used to split long transactions into multiple short transactions when executing the process. Based on the current process configuration, a compensation node is bound to each short transaction, and the state machine engine drives the transaction execution.
[0115] The compensation module is used to perform the opposite business logic operation on the business node that failed to execute, restore the data status to the consistency state before the short transaction execution, and poll the stranded tasks through scheduled tasks, call the compensation node to advance the process, and verify the data consistency under the advancement process until all business nodes are completed, generating a battery digital product passport that meets the requirements.
[0116] In the above, the initialization module is responsible for splitting the entire process of battery digital product passport production into multiple independent and programmable business nodes, generating process configuration information and storing it in the preset database to ensure that the data transmission between each business node can be interconnected. The process configuration module is responsible for dynamically adjusting and optimizing the process path to ensure process flexibility and efficiency, and at the same time recording the historical version of each modification for easy traceability and rollback. The business logic production module accurately executes the business logic of each node based on the latest process configuration to ensure that the battery digital product passport is generated accurately. The process execution module ensures the stable advancement of the process through short transaction processing and compensation mechanism. The compensation module corrects anomalies in a timely manner to ensure data consistency and finally generates a battery digital product passport that meets the standards.
[0117] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0118] The foregoing is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained herein shall, unless otherwise specified or limited, be implemented in accordance with conventional means in the art.
Claims
1. A method for generating a battery digital product passport based on free process arrangement, characterized by: include: Split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database; Respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node; Based on the current process configuration snapshot, execute the battery digital product passport production business logic in the order of business nodes; When executing a process, a long transaction is split into multiple short transactions. A compensation node is bound to each short transaction based on the current process configuration, and the state machine engine drives transaction execution. For business nodes that fail to execute, the opposite business logic operation is performed to restore the data status to the consistency state before the short transaction execution. The system also polls the stranded tasks through scheduled tasks, calls the compensation node to advance the process, and verifies the data consistency under the advancement process until all business nodes are completed, generating a battery digital product passport that meets the requirements. The steps of splitting the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generating process configuration information and storing it in a preset database include: The entire process of producing a digital battery product passport is broken down into nodes, forming business nodes including passport model building, data collection and access, report aggregation, setting disclosure, passport data push, and passport review; Based on business requirements, a process configuration table consisting of various business nodes is constructed, defining the business node identifiers, business node execution sequence numbers, business node business logic descriptions, and dependencies between business nodes; According to the dependency relationship between business nodes, set the trigger conditions and data transmission rules between nodes to generate the data flow path between business nodes; Among them, when the process configuration table is not constructed according to business requirements, the battery digital product passport generation process configuration will be automatically initialized as the default configuration.
2. The method for generating a battery digital product passport based on free process arrangement according to claim 1 is characterized in that: The step of responding to multi-role operation instructions, dynamically modifying process configuration information and generating versioned snapshots, and automatically synchronizing them to each business node includes: Obtain the identity of the role issuing the operation instruction and perform permission verification. After passing the permission verification, perform compliance check on the operation instruction; When an operation instruction violates the dependency relationship between business nodes, it is automatically rejected and recorded as a violation operation, and the timestamp and role information of the violation operation are also recorded simultaneously; When the operation instruction meets the dependency relationship between business nodes, the process configuration table is updated according to the operation instruction, and a versioned snapshot with a timestamp is generated at the same time; The updated versioned snapshot is broadcast to all business nodes. After receiving the update instructions, each business node adjusts its own execution logic.
3. The method for generating a battery digital product passport based on free process arrangement according to claim 1 is characterized in that: The steps of executing the battery digital product passport production business logic in the order of business nodes based on the current process configuration snapshot include: Load the current process configuration snapshot with version tag from the database to obtain the execution order and dependency relationships of business nodes; Traverse the business nodes and perform differentiated operations on each business node based on pre-configured attributes; Count the number of failures when performing differentiated operations on each business node, and trigger an exception handling mechanism when the number of failures reaches the preset upper limit. The exception handling mechanism includes skipping the current failed node, recording the failure log, pausing the process, and sending an alarm message; After all business nodes are executed, the execution status of each business node is recorded to form a traceable execution log.
4. The method for generating a battery digital product passport based on free process arrangement according to claim 3 is characterized in that: The step of performing differentiated operations on each service node according to pre-configured attributes includes: Execute temporary data acquisition on the data collection node, and trigger the skip mechanism when the number of execution failures reaches the upper limit. When the execution succeeds, the temporary data is pushed to the next node; Perform key business verification on the passport review node and trigger a retry mechanism when the number of execution failures reaches the upper limit. Record the audit log when the execution is successful and push the audit results to the next node; Execute data aggregation on the report aggregation node, and trigger the pause mechanism when the number of execution failures reaches the failure limit. Generate a report file when the aggregation is successful, push the report file to the final node, and update the process status at the same time.
5. The method for generating a battery digital product passport based on free process arrangement according to claim 1 is characterized in that: The steps of splitting a long transaction into multiple short transactions, binding a compensation node to each short transaction based on the current process configuration, and driving transaction execution by a state machine engine include: Based on the dependencies of the business nodes in the current process configuration, the long transaction of generating a digital battery product passport is broken down into a serial short transaction chain. The data acquisition sub-transaction chain is from the data collection node to the report aggregation node, and the verification processing sub-transaction chain is from the report aggregation node to the passport review node. Based on the node attributes, bind the compensation node for clearing cached data to the data collection node, bind the compensation node for resetting the approval status to the passport review node, and bind the compensation node for deleting intermediate files to the report aggregation node; The state machine engine loads the state transition diagram that describes the dependencies of short transactions, drives the execution of each short transaction in sequence, and triggers the corresponding compensation node when any short transaction fails.
6. The method for generating a battery digital product passport based on free process arrangement according to claim 1 is characterized in that: The step of performing the opposite business logic operation on the business node that failed to execute includes: Call the clear cache compensation node to clear the temporary data cached by the data collection node and roll back the data version number; Call the file deletion compensation node to delete the generated intermediate report file and restore the original data status; Call the status reset compensation node to revoke the approval status mark; After each compensation node operation is completed, the compensation log is automatically recorded and the process status is updated.
7. The method for generating a battery digital product passport based on free process arrangement according to claim 1, characterized in that: The steps of polling the stranded tasks through the scheduled tasks, calling the compensation node to advance the process, and verifying the data consistency under the advancement process include: Through the preset distributed scheduling framework, the task status library is polled at preset time intervals to detect stranded tasks that have timed out. When the system is first detained, the corresponding bound compensation node is called to perform a rollback operation; In case of secondary delay, the cross-node compensation mechanism is triggered to roll back all business nodes of the current sub-transaction chain; If the task is delayed three times, it will be marked as an abnormal task and an abnormal notification will be sent to the administrator; After the compensation operation is completed, compare the database version number with the data version number after the compensation operation; When the database version number is consistent with the data version number after the compensation operation, confirm the data consistency and update the task status; When the database version number is inconsistent with the data after the compensation operation, the abnormal data is isolated, a repair task is generated, and the administrator is notified to intervene.
8. The battery digital product passport generation system based on free process arrangement is characterized by: The method for generating a battery digital product passport based on free process orchestration according to any one of claims 1 to 7 comprises: The initialization module is used to split the entire process of producing a battery digital product passport into multiple independent and programmable business nodes, generate process configuration information and store it in a preset database; The process configuration module is used to respond to multi-role operation instructions, dynamically modify process configuration information and generate versioned snapshots, which are automatically synchronized to each business node; The business logic production module executes the battery digital product passport production business logic in the order of business nodes based on the current process configuration snapshot; The process execution module is used to split long transactions into multiple short transactions when executing the process. Based on the current process configuration, a compensation node is bound to each short transaction, and the state machine engine drives the transaction execution. The compensation module is used to perform the opposite business logic operation on the business node that failed to execute, restore the data status to the consistency state before the short transaction execution, and poll the stranded tasks through scheduled tasks, call the compensation node to advance the process, and verify the data consistency under the advancement process until all business nodes are completed, generating a battery digital product passport that meets the requirements.
Citation Information
Patent Citations
Distributed long transaction processing method and device
CN116126481A