Data flow transfer control method and system based on state machine and electronic seal fusion

CN123014945APending Publication Date: 2026-10-30GUIZHOU-CLOUD BIG DATA IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611395283.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]然而现有技术方案存在以下不足:签章与流程耦合深度不足,签章节点与流程推进之间仅为单向调用关系,流程引擎不检查签章状态即允许继续推进,且缺乏多环节、多主体连续签章的流程编排能力;流程引擎与电子印章相互独立,两者之间的交互是调用式的而非融合式的,流程状态与签章状态不同步,签章完成不作为流程推进的刚性约束;评审文件版本管理粗放,缺乏版本间的继承关系标识和完整性验证机制,审计时难以追溯版本演进路径

Benefits of technology

[0034]1、本发明通过评审流程迁移势能函数将签章完成度与环节耗时统一量化评估,配合动态阈值的自动调节,使流程管控既通过签章合规熵值等于1的硬性约束保持合规底线,又通过时效惩罚项避免项目长期滞留。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014945A_ABST
    Figure CN123014945A_ABST
Patent Text Reader

Abstract

The application discloses a data flow control method and system based on state machine and electronic signature fusion, and relates to the technical field of e-government.The method comprises the following steps: obtaining a current state node of a target review project, and constructing a signature compliance entropy value; triggering an external signature service to perform signature based on the current state node, obtaining a signature completion identifier, and updating the signature compliance entropy value; intercepting a state migration instruction, calculating a review process migration potential determined by a signature driving item and a time limit item; determining whether to perform migration based on a state migration decision model, updating the state node when the migration is allowed and the signature compliance entropy value and the review process migration potential both reach a threshold value, otherwise, blocking the migration process; and generating version chain node data and storing the data in a bound manner with signature authentication information.The application unifies the signature completion degree and the link time consumption into the review process migration potential, and realizes the migration determination by cooperating with the dynamic threshold value, thereby solving the problem that the process and the signature state are not synchronized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of e-government technology, specifically to a data flow control method and system based on the integration of state machines and electronic signatures. Background Technology

[0002] With the deepening of e-government construction, the review of provincial-level informatization projects involves multiple stages such as application, review, planning, procurement, implementation, and acceptance, and the participating entities include project applicants, project management units, and third-party review agencies.

[0003] However, existing technical solutions have the following shortcomings: insufficient coupling between signing and process; the relationship between signing nodes and process advancement is only one-way; the process engine allows progress to continue without checking the signing status; and it lacks the ability to orchestrate processes with continuous signing by multiple stages and entities; the process engine and electronic seal are independent of each other, and the interaction between the two is call-based rather than integrated; the process status and signing status are not synchronized; and signing completion is not a rigid constraint on process advancement; the version management of review documents is rudimentary, lacking inheritance relationship identification and integrity verification mechanisms between versions, making it difficult to trace the version evolution path during auditing.

[0004] Therefore, there is an urgent need for a review process control solution that can deeply integrate state machines and electronic signatures, so that the review status and signature status are synchronized in real time, continuous signing and closed-loop flow of multiple stages, and complete and traceable version chain. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a data flow control method and system based on the integration of state machine and electronic signature.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] The data flow control method based on the fusion of state machine and electronic signature includes the following steps:

[0008] Step S1: Obtain the current status node of the target review project and construct the signature compliance entropy value. The signature compliance entropy value is calculated based on the weighted completion degree of all required signature documents in the current status.

[0009] Step S2: Based on the current state node, trigger the external signing service to sign the target review project, obtain the signing completion identifier returned by the external signing service, and update the signing compliance entropy value according to the signing completion identifier.

[0010] Step S3: When a state transition instruction for the target review project is received, the state transition instruction is intercepted, and the review process transition potential energy of the target review project is calculated. The review process transition potential energy is determined by the signature driving item and the timeliness item. The signature driving item is positively correlated with the signature compliance entropy value, and the timeliness item is related to the dwell time in the current state.

[0011] Step S4: Determine whether to perform state transition based on the preset state transition decision model. When the transition is allowed, the signature compliance entropy value reaches the preset threshold, and the review process transition potential energy reaches the dynamic potential energy threshold, update the current state node to the target state node; otherwise, block the state transition process of the state machine.

[0012] Step S5: Based on the target status node, generate version chain node data for the target review project, and bind and store the version chain node data with the signature and authentication information.

[0013] Furthermore, in step S1, the calculation method for the signature compliance entropy value is as follows:

[0014] All review documents requiring signatures in the current state are assigned weight coefficients, with the sum of all weight coefficients being 1. These weight coefficients are determined by the legal validity level of each document and the importance of the review process. The weight coefficients of the documents that have been signed are summed to obtain the signature compliance entropy value. When the signature compliance entropy value is equal to 1, it indicates that all signatures have been completed and are legal. When the signature compliance entropy value is equal to 0, it indicates that all signatures have not been completed or that there are illegal signatures. The signature compliance entropy value is updated in real time and written to the in-memory database by the electronic signature service module after each signature operation.

[0015] Further, in step S2, triggering an external signature service to sign the target review project based on the current state node and obtaining the signature completion identifier returned by the external signature service specifically includes:

[0016] Generate signature request data containing a unique transaction identifier, and send the signature request data to the external signature service;

[0017] Receive the signing completion notification returned by the external signing service through the asynchronous callback interface, or send a status polling request to the external signing service at preset time intervals;

[0018] If the response data of the received signature completion notification or the status polling request contains a signed identifier, the signature completion identifier of the corresponding document is updated to the signed status, the signature compliance entropy value is recalculated, and the updated signature compliance entropy value is written to the memory database in real time.

[0019] Further, in step S3, the signature driving item is equal to the positive incentive coefficient of signature completion multiplied by the signature compliance entropy value; the timeliness item is equal to the direction configuration parameter multiplied by the timeliness coefficient and then multiplied by the natural logarithm function value, the input value of the natural logarithm function is 1 plus the normalized retention time ratio, the normalized retention time ratio is the retention time in the current state divided by the standard reference time corresponding to the current state; the direction configuration parameter takes the value of -1, 0 or +1, -1 means that retention will result in a penalty and block automatic migration, 0 means that the timeliness effect is ignored, and +1 means that retention will generate a push and accelerate automatic flow, the default value of the direction configuration parameter is -1.

[0020] Furthermore, in step S4, the dynamic potential energy threshold is dynamically calculated based on the current system load, and the specific calculation method is as follows:

[0021] The total number of projects currently under active review is counted, and the ratio of this number to the system design capacity is calculated as the load factor. The load factor is then mapped to a minimum threshold and a maximum threshold to obtain the dynamic potential energy threshold. The minimum threshold is 0.4, and the maximum threshold is 0.9. The dynamic potential energy threshold increases as the load factor increases.

[0022] Furthermore, in step S4, the determination process of the preset state transition decision model includes:

[0023] The system obtains three judgment factors: signature status matching degree, migration path legality, and operation permission validity. It then multiplies these factors, and determines that migration is allowed when the product result is 1, and not allowed when the product result is 0.

[0024] Further, in step S4, the method for determining the signature status matching degree is as follows: compare the current signature compliance entropy value with the target status required baseline value 1. When the signature compliance entropy value is equal to 1, the signature status matching degree is 1; otherwise, it is 0. The method for determining the migration path validity is as follows: query the preset state transition matrix to verify whether the migration path from the current state to the target state exists in the set of valid paths. If it exists, the migration path validity is 1; otherwise, it is 0. The method for determining the operation permission validity is as follows: verify whether the caller's identity credential has the permission to perform the migration operation in the current state. If it does, the operation permission validity is 1; otherwise, it is 0.

[0025] Further, in step S5, the version chain node data includes a version identifier, a parent version hash value, a current version hash value, a state transition path hash, and a signature certificate fingerprint; the binding and storage of the version chain node data with the signature authentication information specifically includes:

[0026] The hash value of the current version file content, the state transition path hash, the signature certificate fingerprint, and the parent version anchor hash value are concatenated and then the cross anchor hash value of the current version node is generated by cryptographic hash function operation.

[0027] The cross-anchored hash value is associated with the current version node data and stored to establish the inheritance relationship between the current version and the parent version, as well as the binding relationship between the current version and the electronic signature.

[0028] A data flow control system based on the fusion of state machines and electronic signatures, used to implement any one of the data flow control methods based on the fusion of state machines and electronic signatures, including:

[0029] The state transition engine is used to obtain the current state node of the target review project. When a state transition instruction for the target review project is received, the state transition instruction is intercepted, the review process transition potential energy is calculated, and a state transition decision model is used to determine whether to perform the state transition. When the transition is allowed, the current state node is updated to the target state node. When the transition is not allowed, the state transition process of the state machine is blocked.

[0030] The signature collaboration gateway is used to trigger an external signature service to sign the target review project based on the current status node, and to obtain the signature completion identifier returned by the external signature service.

[0031] The version management component is used to generate version chain node data of the target review project based on the target status node, and bind and store the version chain node data with the signature and authentication information.

[0032] Furthermore, the state transition engine and the signature collaboration gateway are deployed on independent microservice nodes; the state transition engine and the signature collaboration gateway perform authentication and data interaction through a service interface gateway; the service interface gateway is configured to authenticate the signature request data sent by the signature collaboration gateway, and forward it to the external signature service after successful authentication; the version management component and the state transition engine communicate asynchronously through a message queue.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] 1. This invention uses the transfer potential function of the review process to uniformly quantify and evaluate the completion of the signature and the time spent in each step. Combined with the automatic adjustment of dynamic thresholds, the process control maintains the compliance bottom line through the hard constraint that the signature compliance entropy value equals 1, and avoids the project from being delayed for a long time through time-sensitive penalties.

[0035] 2. This invention recursively binds the file content hash value, state transition path hash, signature certificate fingerprint, and parent version anchor hash value through a cross-anchoring hash function, forming a dual-chain cross-binding structure of state transition chain and signature operation chain. Combined with the multiplication verification of integrity measurement function, version chain tampering can be effectively detected, improving the objectivity and credibility of audit traceability.

[0036] 3. This invention enables the system to switch between compliance-first mode, neutral mode, and efficiency-first mode through directional configuration parameters. Combined with the independent horizontal scaling capability of each component under the microservice architecture, it can adapt to the process control needs of different types of review projects. Attached Figure Description

[0037] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0038] Figure 1 This is a flowchart illustrating an embodiment of the present invention;

[0039] Figure 2 This is a schematic diagram of the system modules in an embodiment of the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] like Figure 1 As shown, the data flow control method based on the fusion of state machine and electronic signature includes the following steps:

[0042] Step S1: Obtain the current status node of the target review project and construct the signature compliance entropy value. The signature compliance entropy value is calculated based on the weighted completion degree of all required signature documents in the current status.

[0043] Step S2: Based on the current state node, trigger the external signing service to sign the target review project, obtain the signing completion identifier returned by the external signing service, and update the signing compliance entropy value according to the signing completion identifier.

[0044] Step S3: When a state transition instruction for the target review project is received, the state transition instruction is intercepted, and the review process transition potential energy of the target review project is calculated. The review process transition potential energy is determined by the signature driving item and the timeliness item. The signature driving item is positively correlated with the signature compliance entropy value, and the timeliness item is related to the dwell time in the current state.

[0045] Step S4: Determine whether to perform state transition based on the preset state transition decision model. When the transition is allowed, the signature compliance entropy value reaches the preset threshold, and the review process transition potential energy reaches the dynamic potential energy threshold, update the current state node to the target state node; otherwise, block the state transition process of the state machine.

[0046] Step S5: Based on the target status node, generate version chain node data for the target review project, and bind and store the version chain node data with the signature and authentication information.

[0047] The state machine engine maintains the state context of each review project in real time during runtime. When a project enters a certain review stage, the system automatically reads its current state node. This invention extends the review state to a composite state that includes a signature dimension, recording the signature compliance entropy value simultaneously with the business process.

[0048] The state machine engine maintains the business semantic state of the project in real time through an in-memory database. The defined review status set contains eight states: Pending Review, Submitted for Review, Task Confirmed, Under Review, Pending Approval, Pending Reply, Reply Received, and Completed. When the project status changes, the state machine engine atomically updates the status records in the in-memory database and synchronously persists them to the relational database, ensuring millisecond-level response times for status reads and data consistency across service calls.

[0049] Maintain a signature compliance entropy value for each project, ranging from 0 to 1. This value is used to characterize the overall completion and legality of all necessary signature actions in the current state. When the signature compliance entropy value is equal to 1, it means that all signatures have been completed and are legal. When it is equal to 0, it means that it has not been completed or that there are illegal signatures.

[0050] The specific calculation method for the signature compliance entropy value is as follows: assign different weight coefficients to all necessary signed documents according to their legal validity level, and then sum the weights of the signed documents. The specific formula is:

[0051]

[0052] in, This represents the signature compliance entropy value, used to quantify the overall degree of completion of the signature process in the current state of the review process. This indicates the total number of signed documents required in the current state. This represents the summation index variable, used to iterate through all documents requiring signature in the current state. This represents the signature weight coefficient for the k-th document, ranging from 0.1 to 0.5. It is determined by the document's legal validity and the importance of the review process, and the sum of all weight coefficients must equal 1 to ensure normalization of the signature compliance entropy value. In a standard review scenario, when all four types of documents require signatures, the weight coefficients are 0.20 for the submission letter, 0.25 for the task book, 0.35 for the review report, and 0.20 for the reply letter, with a sum of 1. This indicates the completion of the signing of the kth document. The value is 0 or 1. A value of 1 indicates that the document has been electronically signed and verified as valid by the seal platform. A value of 0 indicates that the document has not been signed or the signing verification has failed.

[0053] The signature compliance entropy value is updated in real time and written to the in-memory database by the electronic signature service module after each signature operation is completed, so that it can be quickly read during subsequent state transition determination.

[0054] When the state machine engine recognizes that the current state node belongs to a preset node requiring signature, the system automatically generates a signature request and sends it to an external signature service, without requiring manual initiation by the user. Nodes requiring signature include four stages: pending submission, task confirmation, review, and pending reply, corresponding to the signature operations of four types of documents: submission letter, task book, review report, and reply letter, respectively.

[0055] The signature request includes a unique transaction identifier, the hash value of the document to be signed, the identity information of the signing entity, and a callback address. The unique transaction identifier, generated using a UUID or the Snowflake algorithm, is a globally unique string of 32 or 64 bits in length, used throughout the entire signature interaction lifecycle to ensure accurate matching of each document's signature request and corresponding signature result in high-concurrency scenarios. After sending the signature request to the provincial information center's unified electronic seal platform, the system does not block and wait for a response. Instead, it uses an asynchronous mode for state synchronization to accommodate the uncertain response time caused by the complex cryptographic operations involved in electronic signature services.

[0056] After sending a request, the system registers an asynchronous callback interface. Once the external signing service completes the signing operation, it proactively pushes a signing completion notification to this callback interface. Simultaneously, the system is configured with a timed polling task that proactively queries the external signing service for signing progress at preset intervals, carrying a unique transaction identifier. This serves as a fallback mechanism in case the callback is lost. When signing completion is confirmed via either callback or polling, the system updates the signing completion identifier of the corresponding document to "signed," recalculates the signing compliance entropy value, and writes the updated value to the in-memory database in real time.

[0057] When the system receives an instruction to advance a project from its current state node to the next, it does not immediately execute the state change. Instead, it first intercepts the instruction through a pre-defined interceptor. This interceptor, implemented using aspect-oriented programming (AOP), is deployed at the execution boundary of the business logic layer. When the business layer receives a state change request, the request is first captured by the interceptor, rather than directly entering the state machine's core engine. Based on the unique project identifier carried in the request, the interceptor reads the current signature compliance entropy value, elapsed duration, and current state from the in-memory database in real time.

[0058] After obtaining the above data, the system calculates the potential energy of the review process at the current moment, incorporating both the completion rate of signatures and the time consumed in each step into a continuous quantitative model. The specific formula for the potential energy of the review process is as follows:

[0059]

[0060] in, This represents the migration potential of the review process, used to quantify the urgency of a project moving from its current state to the next state at any given moment. A higher value indicates that the project is more likely to migrate, while a lower value indicates that the project should remain in its current state. This is a positive incentive coefficient representing the degree of completion of the signature, ranging from 0.5 to 1.5, with a default value of 1.0. It is used to map the weighted sum of signatures to the positive contribution of potential energy. This parameter represents the direction configuration parameter, with values ​​of -1, 0, or +1. It controls the system's response to dwell time. A value of -1 indicates a compliance-first mode, where dwell time incurs penalties and blocks automatic migration; this is suitable for compliance review projects. A value of 0 indicates a neutral mode, ignoring timeliness and determining migration solely based on signature completion. A value of +1 indicates an efficiency-first mode, where dwell time generates momentum and accelerates automatic workflow; this is suitable for time-sensitive projects. The system default value is -1. This represents the time-efficiency coefficient, ranging from 0.3 to 1.0, with a default value of 0.5. It is used to control the impact of residence time on potential energy. This indicates the duration the project has been in its current state, accumulated from the moment the state was entered, and precisely calculated from the difference in system timestamps. The standard reference duration corresponding to the current status is pre-configured by the government administration department in the system. The standard reference duration is different for different statuses. For example, the pending review status is 24 hours, which is 1 working day; the submitted review status is 48 hours, which is 2 working days; and the review status is 120 hours, which is 5 working days. The calculation results of the review process migration potential will be cached for use in status migration determination.

[0061] After completing the potential energy calculation, the interceptor performs the final state transition determination, using a dual verification mechanism of rigid preconditions and potential energy threshold conditions. The rigid precondition is that the signature compliance entropy value must reach the maximum value, and the potential energy threshold condition is that the transition potential energy must reach the dynamic threshold.

[0062] The complete formula for the judgment criteria is as follows:

[0063]

[0064] in, This indicates a migration permission flag, with a value of 0 or 1. A value of 1 indicates that the state machine is allowed to perform the migration, while a value of 0 indicates that the migration is blocked and the reason for the block is recorded. The signature compliance entropy value must reach the maximum value of 1, meaning that all signature documents required by the current state have been completed and are legal and valid. This represents the dynamic potential energy threshold, with a value ranging from 0.4 to 0.9. The specific formula is as follows:

[0065]

[0066] in, This represents the minimum dynamic threshold, with a value of 0.4, characterizing the lowest migration threshold under light system load. This represents the maximum value of the dynamic threshold, which is 0.9, and characterizes the highest migration threshold when the system is overloaded. This indicates the total number of projects currently under active review, representing the current workload level of the system. This indicates the system's design capacity, which is the maximum number of active projects the system can simultaneously support while ensuring normal response speed.

[0067] After the rigid precondition of signing compliance entropy value equals 1 and the potential energy threshold condition of the review process migration reaches the dynamic potential energy threshold, the state machine engine still needs to verify whether this migration meets the preset state migration rules. A complete set of predefined review states is defined, including eight core states: Pending Submission (representing the review task has been created and awaiting the generation of the submission letter); Submitted (representing the submission letter has been signed and issued and awaiting receipt by the review agency); Task Confirmation (representing the review agency has received the task and the task book is awaiting signature); Review in Progress (representing the task book has been signed and the pre-review and comprehensive review are in progress); Pending Review (representing the review report has been submitted and awaiting signature and review by the Big Data Bureau); Pending Reply (representing the review has been passed and awaiting the generation of the reply letter); Reply Issued (representing the reply letter has been signed and issued); Completed (representing the project reserve entry is complete). Each state migration is bound to a trigger action and has preconditions, as shown in Table 1.

[0068] Table 1:

[0069]

[0070] After the state transition rules pass the verification, the interceptor further verifies the three core dimensions of the judgment process. The specific formula for the comprehensive judgment model is as follows:

[0071]

[0072] in, Indicates starting from the current state node Migrate to the target state node The migration allowance value can be either 0 or 1. A value of 1 indicates that migration is allowed, while a value of 0 indicates that migration is blocked. This indicates the signature / signature status matching degree. The determination method is to compare the current signature / signature compliance entropy value with the target status's required baseline value of 1. When the signature / signature compliance entropy value equals 1, the value is 1; otherwise, the value is 0. This indicates the validity of the migration path. The determination method is to query a pre-set state transition matrix and verify whether the migration path from the current state to the target state exists in the set of valid paths. If it exists, the value is 1; otherwise, the value is 0. This indicates the validity of the operation permission. The determination method is to verify whether the caller's identity credentials have the permission to perform the migration operation in the current state. If they do, the value is 1; otherwise, the value is 0.

[0073] If any factor is 0, the migration allowance value is 0, and the state transition is blocked. Only when all three factors are 1 at the same time, the migration allowance value is 1, and the state transition can be executed. When the system determines that the transition is allowed, and the signature compliance entropy value reaches the preset threshold of 1, and the review process migration potential energy reaches the dynamic potential energy threshold, the system updates the current state node to the target state node. Otherwise, the system blocks the state transition process of the state machine.

[0074] After a state node is successfully updated, a new version chain node data is automatically generated, recording the file snapshot information corresponding to this state change. The version chain node data constructed by this invention includes five core fields: version identifier, parent version hash value, current version hash value, state migration path hash, and signature certificate fingerprint.

[0075] First, a unique version identifier is generated, using UUID to ensure global uniqueness. Then, the hash value of the binary content of the current review file is calculated, and the digital certificate serial number fingerprint of this signing operation is obtained from step S2.

[0076] After the state update is completed, the system synchronously records complete information about this state transition, including the start state, target state, operator ID that triggered the transition, precise timestamp of the transition, and the transition potential energy value at that time. Furthermore, the system updates the state transition path hash after each transition, calculated using the following formula:

[0077]

[0078] in, This represents the hash value of the state transition path after the nth state transition. The superscript n indicates the index of the nth node in the version chain. The hash value will be passed to the version management component for subsequent cross-anchoring. This represents a cryptographically secure hash function. It takes binary data of arbitrary length as input and outputs a fixed-length 256-bit hash value. It is collision-resistant and one-way. This represents the hash value of the previous state transition path. This represents the binary data concatenation operator. This indicates the starting state of this migration, i.e., the current state node being read. Indicates the target state for this migration. This indicates the precise timestamp of the migration that occurred.

[0079] After collecting all the information, the system generates the cross-anchor hash value for the current version node, using the following formula:

[0080]

[0081] in, This represents the cross-anchor hash value of the nth version node, which will be used as the parent anchor input when calculating the next version node. This represents the hash value of the binary content of the review file corresponding to the nth version, used to uniquely identify the file content. This represents the state transition path hash, which records the entire state transition history from the initial state to the generation of this version. The digital certificate serial number fingerprint indicating the execution of this signing operation is extracted from the signing information returned by the electronic seal platform and is used to accurately identify the specific signing entity. This represents the cross-anchor hash value of the previous version node, which is a random constant generated during system initialization for the initial version;

[0082] Each version node's hash value depends on the file content, historical state migration path, signature certificate fingerprint, and the previous version anchor, thus forming a dual-chain cross-binding of the state migration chain and the signature operation chain. Any subsequent modification in any dimension, whether it is tampering with the file content, deleting intermediate state migration records, replacing the signature certificate, or missing intermediate nodes in the version chain, will cause all subsequent anchor hash values ​​to change in a cascading manner.

[0083] The system writes all version chain node data into persistent storage, including a unique version identifier, semantic version number, hash value of the current version file content, state transition path hash, cross-anchor hash value, parent version anchor hash value, signature certificate fingerprint, modifier identifier, modification timestamp, and modification reason. The joint storage of the hash value of the current version file content and the signature certificate fingerprint establishes a dual binding relationship between file content and signature identity, effectively defending against typical tampering attacks.

[0084] When the project faces subsequent audits, the audit component invokes the version chain integrity verification function to perform end-to-end verification of all version nodes of the target project. The specific verification process is as follows: The system extracts the parent version hash value field from the current latest version chain node record, uses this value as an index to retrieve the corresponding parent version chain node record in the version management database, and performs a byte-level consistency comparison between the extracted parent version hash value and the parent version anchor hash value stored in the database. The specific formula for integrity measurement is:

[0085]

[0086] in, This represents the version chain integrity metric. A value of 1 indicates that the version chain is complete and trustworthy, while a value of 0 indicates that the version chain is abnormal. This represents the chain multiplication operator. This represents a version chain consisting of M version nodes. This represents the total number of version nodes in the version chain. This indicates the index of the version node currently being verified, with a value ranging from 2 to M. Verification begins from the second node, since the first node initially has no parent node. This represents the parent version anchor hash value recorded in the q-th version node, where the superscript indicates the parent node of the q-th node. This represents the anchor hash value actually stored in the (q-1)th version node retrieved from the database, with the superscript indicating the value of the (q-1)th node stored in the database. This represents a hash consistency comparison function that returns 1 if the two input values ​​are exactly the same, and 0 otherwise. This represents the signature certificate fingerprint recorded in the q-th version node, where the superscript indicates the q-th node. This function verifies the validity of the fingerprint for the signature certificate. It returns 1 if the digital certificate corresponding to the fingerprint is valid and has not been revoked at the time of signing, and 0 otherwise. The logical AND operator ensures that both hash consistency and certificate validity must be satisfied simultaneously.

[0087] When the integrity metric value is 0, the system automatically marks the audit traceability status of the project as abnormal and generates a detailed abnormal report. The report includes the specific version node index where the abnormality was first discovered, the abnormality type, hash inconsistency or invalid certificate, and the complete version chain backtracking path. The integrity metric value is 1 only when the verification result of all adjacent version pairs is 1, indicating that the version chain is complete and trustworthy.

[0088] A data flow control system based on the fusion of state machines and electronic signatures, used to implement any one of the data flow control methods based on the fusion of state machines and electronic signatures, including:

[0089] The state transition engine is used to obtain the current state node of the target review project. When a state transition instruction for the target review project is received, the state transition instruction is intercepted, the review process transition potential energy is calculated, and a state transition decision model is used to determine whether to perform the state transition. When the transition is allowed, the current state node is updated to the target state node. When the transition is not allowed, the state transition process of the state machine is blocked.

[0090] The signature collaboration gateway is used to trigger an external signature service to sign the target review project based on the current status node, and to obtain the signature completion identifier returned by the external signature service.

[0091] The version management component is used to generate version chain node data of the target review project based on the target status node, and bind and store the version chain node data with the signature and authentication information.

[0092] This invention adopts a microservice design in its physical deployment architecture. The state transition engine and the signature collaboration gateway are deployed on independent microservice nodes. The state transition engine is responsible for maintaining the state context of the target data object, performing state transition judgments and atomic state updates. It is the core scheduling hub of the entire system. The signature collaboration gateway acts as an adaptation layer and buffer layer between the internal system and external heterogeneous signature services. It is responsible for managing the lifecycle of signature requests, including generating unique transaction identifiers, handling asynchronous callback notifications, executing state polling tasks, and caching signature result files. It shields the differences in API protocols between different electronic signature service providers through a standardized adapter.

[0093] The state transition engine and the signature collaboration gateway communicate and exchange data through the service interface gateway. The service interface gateway integrates identity authentication, supports two verification methods: JWT tokens and mTLS certificates, as well as permission verification, flow control, and circuit breaker degradation functions. It authenticates the signature request data sent by the signature collaboration gateway and forwards it to the external signature service only after successful authentication, effectively preventing unauthorized access.

[0094] The version management component is deployed independently and is used to generate version chain node data based on the target state node, and bind and store the version chain node data with signature authentication information. The version management component communicates asynchronously with the state transition engine through a message queue. After completing the state transition, the state transition engine sends a version generation message. The version management component consumes the message and then performs hash calculation and persistent storage of the version node. This asynchronous and decoupled design ensures that the time-consuming operation of version storage does not affect the response speed of the main process.

[0095] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0096] The examples described herein are merely preferred embodiments of the invention and are not intended to limit the concept and scope of the invention. Any modifications and improvements made by those skilled in the art to the technical solutions of the invention without departing from the design concept of the invention should fall within the protection scope of the invention.

Claims

1. A data flow control method based on the fusion of state machine and electronic signature, characterized in that, Includes the following steps: Step S1: Obtain the current status node of the target review project and construct the signature compliance entropy value. The signature compliance entropy value is calculated based on the weighted completion degree of all required signature documents in the current status. Step S2: Based on the current state node, trigger the external signing service to sign the target review project, obtain the signing completion identifier returned by the external signing service, and update the signing compliance entropy value according to the signing completion identifier. Step S3: When a state transition instruction for the target review project is received, the state transition instruction is intercepted, and the review process transition potential energy of the target review project is calculated. The review process transition potential energy is determined by the signature driving item and the timeliness item. The signature driving item is positively correlated with the signature compliance entropy value, and the timeliness item is related to the dwell time in the current state. Step S4: Determine whether to perform state transition based on the preset state transition decision model. When the transition is allowed, the signature compliance entropy value reaches the preset threshold, and the review process transition potential energy reaches the dynamic potential energy threshold, update the current state node to the target state node. Otherwise, block the state transition process of the state machine; Step S5: Based on the target status node, generate version chain node data for the target review project, and bind and store the version chain node data with the signature and authentication information.

2. The method according to claim 1, characterized in that, In step S1, the calculation method for the signature compliance entropy value is as follows: Assign weight coefficients to all review documents that require signatures in the current state, with the sum of all weight coefficients being 1. The weight coefficients are determined by the legal validity level of each document and the importance of the review process. The weight coefficients of the signed documents are summed to obtain the signature compliance entropy value. When the signature compliance entropy value is equal to 1, it means that all signatures have been completed and are legal. When the signature compliance entropy value is equal to 0, it means that all signatures have not been completed or there are illegal signatures. The signature compliance entropy value is updated in real time and written to the memory database by the electronic signature service module after each signature operation is completed.

3. The method according to claim 2, characterized in that, In step S2, triggering an external signature service to sign the target review project based on the current state node and obtaining the signature completion identifier returned by the external signature service specifically includes: Generate signature request data containing a unique transaction identifier, and send the signature request data to the external signature service; Receive the signing completion notification returned by the external signing service through the asynchronous callback interface, or send a status polling request to the external signing service at preset time intervals; If the response data of the received signature completion notification or the status polling request contains a signed identifier, the signature completion identifier of the corresponding document is updated to the signed status, the signature compliance entropy value is recalculated, and the updated signature compliance entropy value is written to the memory database in real time.

4. The method according to claim 3, characterized in that, In step S3, the signature driving item is equal to the positive incentive coefficient of signature completion multiplied by the signature compliance entropy value; the timeliness item is equal to the direction configuration parameter multiplied by the timeliness coefficient and then multiplied by the natural logarithm function value, the input value of the natural logarithm function is 1 plus the normalized retention time ratio, the normalized retention time ratio is the retention time in the current state divided by the standard reference time corresponding to the current state; the direction configuration parameter takes the value of -1, 0 or +1, -1 means that retention will result in a penalty and block automatic migration, 0 means that the timeliness effect is ignored, and +1 means that retention will generate a push and accelerate automatic flow, the default value of the direction configuration parameter is -1.

5. The method according to claim 4, characterized in that, In step S4, the dynamic potential energy threshold is dynamically calculated based on the current system load, and the specific calculation method is as follows: The total number of projects currently under active review is counted, and the ratio of this number to the system design capacity is calculated as the load factor. The load factor is then mapped to a minimum threshold and a maximum threshold to obtain the dynamic potential energy threshold. The minimum threshold is 0.4, and the maximum threshold is 0.

9. The dynamic potential energy threshold increases as the load factor increases.

6. The method according to claim 5, characterized in that, In step S4, the determination process of the preset state transition decision model includes: The system obtains three judgment factors: signature status matching degree, migration path legality, and operation permission validity. It then multiplies these factors, and determines that migration is allowed when the product result is 1, and not allowed when the product result is 0.

7. The method according to claim 6, characterized in that, In step S4, the method for determining the signature status matching degree is as follows: compare the current signature compliance entropy value with the target status required baseline value 1. When the signature compliance entropy value is equal to 1, the signature status matching degree is 1; otherwise, it is 0. The method for determining the migration path validity is as follows: query the preset state transition matrix to verify whether the migration path from the current state to the target state exists in the set of valid paths. If it exists, the migration path validity is 1; otherwise, it is 0. The method for determining the operation permission validity is as follows: verify whether the caller's identity credential has the permission to perform the migration operation in the current state. If it does, the operation permission validity is 1; otherwise, it is 0.

8. The method according to claim 7, characterized in that, In step S5, the version chain node data includes a version identifier, a parent version hash value, a current version hash value, a state transition path hash, and a signature certificate fingerprint; the binding and storage of the version chain node data with the signature authentication information specifically includes: The hash value of the current version file content, the state transition path hash, the signature certificate fingerprint, and the parent version anchor hash value are concatenated and then the cross anchor hash value of the current version node is generated by cryptographic hash function operation. The cross-anchored hash value is associated with the current version node data and stored to establish the inheritance relationship between the current version and the parent version, as well as the binding relationship between the current version and the electronic signature.

9. A data flow control system based on the fusion of state machine and electronic signature, used to implement the data flow control method based on the fusion of state machine and electronic signature as described in any one of claims 1-8, characterized in that, include: The state transition engine is used to obtain the current state node of the target review project. When a state transition instruction for the target review project is received, the state transition instruction is intercepted, the review process transition potential energy is calculated, and a state transition decision model is used to determine whether to perform the state transition. When the transition is allowed, the current state node is updated to the target state node. When the transition is not allowed, the state transition process of the state machine is blocked. The signature collaboration gateway is used to trigger an external signature service to sign the target review project based on the current status node, and to obtain the signature completion identifier returned by the external signature service. The version management component is used to generate version chain node data of the target review project based on the target status node, and bind and store the version chain node data with the signature and authentication information.

10. The system according to claim 9, characterized in that, The state transition engine and the signature collaboration gateway are deployed on independent microservice nodes; the state transition engine and the signature collaboration gateway communicate and exchange data through a service interface gateway. The service interface gateway is configured to authenticate the signature request data sent by the signature collaboration gateway, and forward it to the external signature service after successful authentication; the version management component and the state transition engine communicate asynchronously through a message queue.