A clinical study milestone multi-version consistency control method and system
By generating consistent fingerprints and cross-version mappings in the clinical research management system, the problem of consistency of milestone data across multiple versions was solved, achieving accurate data rebinding and reliable version switching, thus ensuring data integrity and consistency.
Patent Information
- Application Number
- CN202611447942.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
AI Technical Summary
In clinical research management systems, maintaining data consistency and integrity across multiple milestone versions is difficult, leading to mismatches in data citation relationships and inconsistent statuses, which affects the traceability and consistency of research data.
By generating baseline consistency fingerprints, verification consistency fingerprints, candidate consistency fingerprints, and post-implementation consistency fingerprints, data drift and anomalies are identified, cross-version mapping is established, and data rebinding and recalculation are achieved by separating temporary adjustment data fields from formal data fields, ensuring that version switching and updates are completed within the same database transaction.
It improves the consistency of multi-version data, reduces dangling references and erroneous associations, enhances the isolation and traceability of the version change process, reduces the risk of incomplete data, and improves the reliability of version switching.
Smart Images

Figure CN123182875A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of clinical research information management technology, and in particular to a method and system for controlling the consistency of multiple versions of clinical research milestones. Background Technology
[0002] As clinical research projects become increasingly information-driven, clinical research management systems are typically used to centrally manage project plans, research centers, milestones, project dates, payment arrangements, and related approvals. In existing clinical research management systems, project milestones typically describe the planned time, actual completion time, and corresponding status of different stages in the clinical research process, and can be linked to data such as the overall project date, research center dates, and payment milestones. When the research protocol, implementation plan, or project progress changes, the system usually modifies existing milestone data, copies existing milestone data to create a new version, or controls the effectiveness of the modified milestone data through an approval process. To preserve the project change process, some systems also use version numbers, historical records, operation logs, or data snapshots to record milestone data at different stages, and maintain the correspondence between various business data through database transactions, primary and foreign key relationships, or status fields.
[0003] However, when multiple milestone versions exist for the same clinical research project, the corresponding milestone details in different versions are usually recorded as independent data records with different primary keys. Related data such as project date records and payment milestone records may still retain references to the original milestone details. When a new milestone version is generated based on the original version and some milestones are adjusted, if only the field values in the new version are updated without simultaneously handling cross-version primary key changes, it can easily lead to related records still pointing to old version data, mismatched reference relationships between different versions, or inconsistent derivation dates with the currently effective version. Furthermore, the generation, modification, submission for approval, and final effectiveness of a milestone version typically take time, during which the currently effective data may change. If the version is switched directly after approval, it is difficult to confirm whether the data state determined at the time of approval is consistent with the actual data state at the time of effectiveness. In cases involving multiple milestone details and multiple related data tables, during the version switch process, some data may have been updated while some relationships have not yet been updated, thus affecting the consistency, completeness, and traceability of clinical research data.
[0004] Therefore, it is necessary to provide a consistency control technology that can be applied to multiple versions of clinical research milestones. Summary of the Invention
[0005] This application provides a method and system for controlling the consistency of multiple versions of clinical research milestones, so as to improve the consistency of data across multiple versions of clinical research milestones.
[0006] This application provides a method for controlling the consistency of multiple versions of clinical research milestones, including: obtaining the currently effective milestone version, project date records, and payment milestone records; generating a baseline consistency fingerprint based on the primary key of the milestone details, formal data fields, and milestone reference relationships between the project date records and payment milestone records; generating candidate consistency fingerprints, review consistency fingerprints, and post-effectiveness consistency fingerprints according to the same scope and rules; responding to a milestone change request, when there are no pending versions in the pending submission or approval status, copying the currently effective milestone version to generate a target draft milestone version, ensuring that the corresponding milestone details maintain the same milestone stability identifier and obtaining the target data primary key, and establishing a cross-version mapping between the source data primary key, the milestone stability identifier, and the target data primary key. The process involves writing the changed data into a temporary adjustment data field, rebinding the affected project date records and payment milestone records to the target data primary key using cross-version mapping, recalculating the affected project date records, and generating a candidate consistency fingerprint upon submission for approval. After approval, the current effective milestone version is locked within the same database transaction, a review consistency fingerprint is generated, and the unique correspondence between the target data primary key and the milestone stability identifier is verified. When the review consistency fingerprint matches the baseline consistency fingerprint and the verification passes, the temporary adjustment data field is migrated, the current effective milestone version is switched, and the project date records and payment milestone records are updated according to the rebinding and recalculation results. A post-effective consistency fingerprint is generated, and the database transaction is committed when it matches the candidate consistency fingerprint; otherwise, it is rolled back.
[0007] This application provides a multi-version consistency control system for clinical research milestones, comprising: an acquisition unit for acquiring the currently effective milestone version, project date records, and payment milestone records; generating a baseline consistency fingerprint based on the primary key of the milestone details, formal data fields, and milestone reference relationships between the project date records and payment milestone records; candidate consistency fingerprints, review consistency fingerprints, and post-effectiveness consistency fingerprints are all generated according to the same scope and rules; an establishment unit for responding to a milestone change request, copying the currently effective milestone version to generate a target draft milestone version when there are no pending versions in the submission or approval status, ensuring that the corresponding milestone details maintain the same milestone stability identifier and obtaining the target data primary key, and establishing a cross-version mapping between the source data primary key, the milestone stability identifier, and the target data primary key; and a writing unit. The system comprises four modules: a **temporary adjustment data field**, a **conformance fingerprint generation unit**, and a **conformance fingerprint submission unit**. The **temporary adjustment data field** is used to write changed data to a temporary adjustment data field, rebind affected project date records and payment milestone records to the target data primary key using cross-version mapping, recalculate affected project date records, and generate a candidate consistency fingerprint upon submission for approval. The **conformance fingerprint generation unit**, after approval, locks the currently effective milestone version within the same database transaction, generates a review consistency fingerprint, and verifies the unique correspondence between the target data primary key and the milestone stability identifier. When the review consistency fingerprint matches the baseline consistency fingerprint and passes verification, the temporary adjustment data field is migrated, the currently effective milestone version is switched, and the project date records and payment milestone records are updated according to the rebinding and recalculation results. The **submission unit** is used to generate a post-approval consistency fingerprint, submit the database transaction if it matches the candidate consistency fingerprint, and otherwise roll back.
[0008] The beneficial effects of this application mainly include: (1) By using the phased verification of baseline consistency fingerprint, review consistency fingerprint, candidate consistency fingerprint and post-effective consistency fingerprint, data drift and reference relationship anomalies during the approval period and version switching process can be identified, thereby improving the consistency of multi-version data. (2) By establishing cross-version mapping between the source data primary key and the target data primary key through milestone stability identifiers, accurate rebinding of project date records and payment milestone records after version replication can be achieved, reducing dangling references and incorrect associations. (3) By separating temporary adjustment data fields from formal data fields, the direct pollution of currently effective data by unapproved changes can be avoided, thereby improving the isolation and traceability of the version change process. (4) By completing review, version switching, related updates and final consistency verification in the same database transaction, and rolling back when verification fails, the risk of data incompleteness caused by partial updates can be reduced, thereby improving the reliability and stability of version switching. Attached Figure Description
[0009] Figure 1 This is a flowchart of a method for controlling the consistency of multiple versions of clinical research milestones provided in the first embodiment of this application.
[0010] Figure 2 This is a schematic diagram of the multi-version consistency control interface for clinical research milestones involved in the first embodiment of this application.
[0011] Figure 3 This is a schematic diagram of a clinical research milestone multi-version consistency control system provided in the second embodiment of this application. Detailed Implementation
[0012] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0013] The first embodiment of this application provides a method for controlling the consistency of multiple versions of clinical research milestones. Please refer to... Figure 1 This figure is a flowchart of the first embodiment of this application. The following is in conjunction with... Figure 1 The first embodiment of this application provides a detailed description of a method for controlling the consistency of multiple versions of clinical research milestones.
[0014] Step S101: Obtain the currently effective milestone version, project date record, and payment milestone record. Generate a baseline consistency fingerprint for the primary key of the milestone details, the formal data fields, and the milestone reference relationship between the project date record and the payment milestone record. The candidate consistency fingerprint, the review consistency fingerprint, and the post-effective consistency fingerprint are all generated according to the same range and rules.
[0015] In step S101, the currently effective milestone version, project date record, and payment milestone record of the clinical research project are first obtained. The currently effective milestone version refers to a milestone version that has completed the predetermined approval process and has been identified by the system as a currently valid data source. Historical versions, draft versions, and versions under approval can be saved within the same clinical research project, but only one milestone version can be marked as the currently effective milestone version at any given time. The system can determine this version based on the currently effective identifier and version status in the version master table.
[0016] The currently active milestone version includes multiple milestone details. Each milestone detail includes at least a data primary key, a milestone stability identifier, and a formal data field. The data primary key is used to uniquely identify a milestone detail in the current version within the database; milestone details in different versions have different data primary keys. The milestone stability identifier is used to identify logically corresponding milestones across different versions. It is independent of the physical storage location, row number, and data primary key of the database record and is inherited by the corresponding milestone detail when a milestone version is copied. Therefore, it can serve as an intermediary identifier for establishing correspondences between different versions. The formal data field stores currently valid milestone data and may include the planned start date, planned completion date, actual completion date, and milestone status.
[0017] The project date record is a project-level date record that is associated with one or more milestone details and is formed or updated based on the corresponding milestone data. The payment milestone record is a data record that is associated with milestone details and is used to record payment items corresponding to the corresponding milestone nodes. Both project date records and payment milestone records can establish milestone reference relationships through the data primary key of the referenced milestone details. The milestone reference relationship is used to indicate which milestone detail a project date record or payment milestone record specifically points to. For example, if the primary key of the referenced data stored in payment milestone record P301 is M102, then P301 pointing to M102 constitutes a milestone reference relationship.
[0018] After obtaining the above data, the primary keys and formal data fields of the milestone details in the currently effective milestone version, as well as the milestone reference relationships of project date records and payment milestone records, are normalized and a baseline consistency fingerprint is generated. The baseline consistency fingerprint is a fixed-length data identifier used to characterize the overall state of the data content and its downstream reference relationships in the currently effective milestone version when the fingerprint is generated. Specifically, the milestone details can first be sorted according to the milestone stability identifier, and then the primary keys and formal data fields can be arranged according to a predetermined field order. For project date records and payment milestone records, they can be sorted according to the record primary key, and their record primary keys and the data primary keys of the referenced milestone details can be recorded sequentially. After applying a unified normalized representation to dates, null values, strings, and numbers, the resulting data is serialized and processed using SHA-256, SHA-3, or other hash algorithms that can consistently produce the same results for the same input to obtain the baseline consistency fingerprint.
[0019] Including milestone references and the data content of the milestone details themselves in the consistency fingerprint is crucial because subsequent version replication will give the corresponding milestone details a new primary key. If project date records or payment milestone records still reference the primary key of the original version, even if the milestone field values in the new version are completely correct, downstream records may continue to point to the old version. Such anomalies are difficult to detect by simply checking the milestone detail content. Therefore, by including the primary key, formal data fields, and milestone references in the consistency fingerprint, cross-version rebinding results can be incorporated into subsequent consistency verification.
[0020] The four consistency fingerprints in this invention form two sets of independent comparison relationships. The baseline consistency fingerprint and the verification consistency fingerprint generated in subsequent steps both use the currently effective milestone version and its associated data, which serves as the source of the target draft milestone version, to determine whether the data content or referencing relationships of the source version have changed from the creation of the target draft milestone version to the completion of approval. The candidate consistency fingerprint and the post-effectiveness consistency fingerprint both use the target draft milestone version and its re-bound project date records and payment milestone records to determine whether the expected effective state determined at the time of submission for approval is consistent with the database state after the actual version switch. The baseline consistency fingerprint is compared only with the verification consistency fingerprint, and the candidate consistency fingerprint is compared only with the post-effectiveness consistency fingerprint; there is no cross-comparison between the two sets of fingerprints.
[0021] It is important to note that when generating candidate consistency fingerprints, the changed data in the target draft milestone version is still stored in temporary adjustment data fields and has not yet been migrated to the official data fields. Therefore, when processing the official data fields in the candidate consistency fingerprint, for fields that have changed, the candidate value mapped from the corresponding temporary adjustment data field is used as the expected value of the official data field; for fields that have not changed, the original value of the official data field continues to be used. Thus, the candidate consistency fingerprint represents the expected effective state that the target draft milestone version should achieve after approval and data migration, rather than the physical field state in the database that has not yet been migrated at the time of submission for approval. For example, if the original planned completion date for a certain milestone was June 10, 2026, and the adjustment date stored in the temporary adjustment data field was June 18, 2026, then when generating the candidate consistency fingerprint, June 18, 2026, is used as a candidate value for the official planned completion date in the calculation. After the adjustment date is moved to the official data field after it takes effect, the actual stored June 18, 2026, is used in the calculation of the consistency fingerprint after it takes effect, thus making the two definitely comparable.
[0022] Once the baseline consistency fingerprint is generated, it is persistently saved and associated with the target draft milestone version subsequently created based on this currently effective milestone version. Specifically, the baseline consistency fingerprint can be saved in the version master record corresponding to the target draft milestone version, or it can be saved in a separate consistency verification record, simultaneously recording the version identifier of the target draft milestone version and the version identifier of the currently effective milestone version from which it originates. Therefore, upon completion of subsequent approval processes, the initially generated baseline consistency fingerprint can be accurately retrieved based on the target draft milestone version and compared with the newly generated review consistency fingerprint.
[0023] Candidate consistency fingerprints, verification consistency fingerprints, and post-implementation consistency fingerprints are all generated using the same data range, normalization method, sorting method, serialization method, and hashing rules as the baseline consistency fingerprint. However, data is read for the corresponding versions based on the two sets of comparison relationships mentioned above. As an optional implementation, the data range of the consistency fingerprint can also include data fields in project date records and payment milestone records that are updated as milestones change, so that the project date recalculation result and other linked results are simultaneously subject to consistency verification. Alternatively, milestone details, project date records, and payment milestone records can be normalized and hashed separately to form detail fingerprints, project date fingerprints, and payment-related fingerprints. Then, an overall consistency fingerprint is generated based on each segment fingerprint, thereby further determining the data range where anomalies occur when the overall consistency check fails.
[0024] Step S102: In response to a milestone change request, if there are no pending versions in the pending submission or approval status, copy the currently effective milestone version to generate a target draft milestone version, so that the corresponding milestone details maintain the same milestone stability identifier and obtain the target data primary key, and establish a cross-version mapping of the source data primary key, the milestone stability identifier and the target data primary key.
[0025] In step S102, in response to a milestone change request, the system first determines whether there are any pending versions of the current clinical research project that are in a pending submission or approval state. The milestone change request refers to a request triggered by a user with the appropriate permissions or a preset business event, used to adjust one or more milestone details in the currently effective milestone version. A pending version refers to a milestone version that has been generated but has not yet completed the final approval process; a pending submission state indicates that the version has been created but has not yet entered the approval process, while an approval state indicates that the version has been submitted and is in the approval process.
[0026] The milestone stability identifier, as referred to in this invention, is an identifier used to uniquely identify the same logical milestone across different milestone versions within the same clinical research project. This identifier is independent of the physical storage order, row number, and primary key of the database record. It is generated when the milestone detail is first created, inherited by the corresponding milestone detail during subsequent version replication, and remains unchanged across milestone versions within the same clinical research project. It is not altered by version switching, field value modification, or database record reconstruction. Within the same clinical research project, different logical milestones possess different milestone stability identifiers. Therefore, this milestone stability identifier can serve both as the basis for deterministically ordering different milestone details in S101 and as an intermediary identifier for establishing cross-version correspondences in this step.
[0027] The system queries the milestone version records for a project based on the project identifier in the milestone change request. When there are pending versions in the "pending submission" or "approval" status, no new target draft milestone version is generated to avoid creating multiple independent branches awaiting activation for the same project. Information on existing pending versions can be returned for subsequent processing. If no such pending versions exist, the currently effective milestone version determined in S101 is used as the source version, and the target draft milestone version is copied and generated.
[0028] The target draft milestone version is an independent data version copied from the currently effective milestone version, used to carry this change, and not yet becoming the current effective version. When generating the target draft milestone version, a new version master record is created, recording information such as project identifier, source version identifier, target version identifier, version status, and creation time. Then, the milestone details from the currently effective milestone version are copied as new records belonging to the target draft milestone version. Therefore, the target draft milestone version and the currently effective milestone version are isolated from each other at the database record level; modifications to the draft version will not directly change the official data in the currently effective version.
[0029] The source version identifier indicates which currently active milestone version the target draft milestone version was based on. While the source version identifier identifies the source version, it does not reflect whether the milestone detail fields or downstream milestone references within that source version have been changed in situ subsequently. Therefore, when creating the target draft milestone version, the baseline consistency fingerprint generated in S101 is also associated and saved with the target draft milestone version. For example, the baseline consistency fingerprint can be saved in the version master record of the target draft milestone version, or in a separate verification record with the target version identifier as the association key. Thus, the source version identifier confirms the source version's identity, and the baseline consistency fingerprint confirms whether the data content and milestone references within the source version remain in the state they were in when the draft was generated; the two have different data consistency control functions.
[0030] In one implementation, the system generally does not allow direct modification of the official data in the currently effective milestone version, but requires changes to be made through the target draft milestone version. However, during actual system operation, changes may still occur in the data content or downstream reference relationships within the currently effective milestone version due to data correction, external system synchronization, cascading updates of other functional modules, maintenance repairs, or anomaly handling. Therefore, even if the source version identifier remains unchanged during the approval period, it cannot be concluded that the data status of the source version has not changed, and subsequent step S104 still requires verification using the baseline consistency fingerprint associated with the target draft milestone version.
[0031] When replicating milestone details, logically corresponding milestone details in the source version and the target draft milestone version maintain the same milestone stability identifier. However, the database assigns a new target data primary key to new records in the target draft milestone version. Here, the source data primary key is the data primary key of the corresponding milestone detail in the currently effective milestone version; the target data primary key is the data primary key of the corresponding milestone detail in the target draft milestone version. Both are used to uniquely locate the physical data records in the two versions, respectively.
[0032] For example, the "First Subject Enrollment" milestone in the currently effective milestone version has a milestone stability identifier MS-008, and its source data primary key is 10521. After copying the target draft milestone version, the corresponding "First Subject Enrollment" milestone continues to retain the milestone stability identifier MS-008, but acquires the target data primary key 20876. Therefore, the two records logically represent the same milestone, but at the database level, they belong to different physical records in different versions.
[0033] After replication is complete, the system establishes a cross-version mapping between the source data primary key, milestone stability identifier, and target data primary key. This cross-version mapping is a data structure describing the physical identity transformation relationship between milestone details in the source version and their corresponding milestone details in the target draft milestone version. Specifically, for each replicated milestone detail, the source version identifier, target version identifier, source data primary key, milestone stability identifier, and target data primary key can be stored. For example, the above record forms a cross-version mapping for "10521-MS-008-20876".
[0034] This cross-version mapping uses a milestone stability identifier as an intermediary, enabling the system to first determine the corresponding milestone stability identifier based on the source data primary key, and then locate the target data primary key in the target draft milestone version based on that milestone stability identifier, even when the downstream record only stores the source data primary key. Therefore, in subsequent step S103, this cross-version mapping can be used to convert the original reference relationship between project date records and payment milestone records pointing to the source version milestone details into a reference relationship pointing to the corresponding milestone details in the target draft milestone version.
[0035] When establishing cross-version mappings, the integrity of the mapping can be checked. For each milestone detail copied from the source version to the target draft milestone version, there should be one and only one identical milestone stability identifier, corresponding to a unique target data primary key. If multiple target data primary keys are found to correspond to the same milestone stability identifier, the target data primary key is duplicated, or the milestone detail to be copied is missing, the cross-version mapping is considered to have failed, and the target draft milestone version will not be included in the subsequent approval process.
[0036] Therefore, step S102 maintains the current effective milestone version while establishing a target draft milestone version that is physically isolated from it. A cross-version mapping from the source data primary key to the target data primary key is constructed through a milestone stability identifier that does not change with the version. At the same time, the source version identifier and the baseline consistency fingerprint are used to fix the identity and data status of the source version, respectively, providing a definite data foundation for subsequent rebinding of related records, source version drift detection during the approval period, and version consistency switching.
[0037] Furthermore, in response to a milestone change request, when there are no pending versions in a submit or approval state, the currently effective milestone version is copied to generate a target draft milestone version, ensuring that the corresponding milestone details maintain the same milestone stability identifier and obtain the target data primary key, establishing a cross-version mapping of the source data primary key, milestone stability identifier, and target data primary key, including: Extract the primary keys of all project date records, payment milestone records, and reference types corresponding to each source data primary key, and combine them with the corresponding milestone stability identifiers to form a full source reference list; copy the milestone details and obtain the target data primary key; for each downstream record in the full source reference list, establish a target reference shadow record separate from the formal reference field, and write the corresponding target data primary key and milestone stability identifier into the target reference shadow record; associate the full source reference list and the target reference shadow record with the same downstream record primary key and reference type to form a cross-version mapping base, where the source data primary key continues to serve as the formal reference of the currently effective version, and the target data primary key is only stored in the target reference shadow record; verify that each reference item in the full source reference list has a unique target reference shadow record, and that the same downstream record primary key and reference type do not correspond to different milestone stability identifiers; after verification, associate and save the cross-version mapping base with the target draft milestone version, for subsequent change writing stages to read the target reference shadow record therein, and use it as input to rebind project date records and payment milestone records to the target data primary key.
[0038] In one implementation, when generating a target draft milestone version by copying the current effective milestone version, in addition to establishing the correspondence between the source data primary key, the milestone stability identifier and the target data primary key, the downstream reference relationship in the current effective milestone version is also extracted simultaneously to form the full mapping base required for subsequent cross-version reference migration.
[0039] For each milestone detail in the currently effective milestone version, the project date record and payment milestone record are queried based on its source data primary key. This retrieves the primary keys and reference types of all downstream records referencing that source data primary key, and combines this with the corresponding milestone stability identifier to form a full source reference list. The reference type is used to distinguish different uses of the same downstream record for the milestone detail. Each reference item in the full source reference list includes at least the downstream record primary key, reference type, source data primary key, and milestone stability identifier. Here, "full" means that as long as the source data primary key currently referenced by the downstream record can be mapped to the target data primary key in the target version through cross-version mapping, it is included in the full source reference list, regardless of whether the fields of the milestone detail have changed.
[0040] After copying each milestone detail, the corresponding milestone detail inherits the original milestone stability identifier and obtains the target data primary key. For each downstream record in the full source reference list, a target reference shadow record is created, separate from the formal reference field. This target reference shadow record is used to save the reference status that the downstream record should adopt in the target version before the target draft milestone version officially takes effect. It includes at least the downstream record primary key, reference type, milestone stability identifier, and target data primary key, while the formal reference field in the currently effective version still points to the source data primary key.
[0041] This dual-state storage of reference relationships employs a corresponding processing method to the dual-state storage of the aforementioned milestone data fields. The formal data fields and temporary adjustment data fields are separated, allowing the target draft milestone version to form the data content to be effective without directly rewriting the currently valid data; the formal reference fields and target reference shadow records are separated, allowing downstream records to form the reference relationships to be effective without prematurely changing the currently valid references. Therefore, during the draft and approval stages, both the candidate states of data content and the candidate states of reference relationships coexist with the current effective state, and are subsequently migrated to the formal data fields and formal reference fields respectively in the same database transaction, ensuring consistent processing timing and atomicity for data content updates and reference relationship updates during version switching.
[0042] For example, payment milestone record P301 currently references source data primary key 10521, which corresponds to milestone stability identifier MS-008. After replication, the target data primary key of MS-008 is 20876. Therefore, the official reference of P301 remains 10521, and shadow records are created for record P301, payment reference type, MS-008, and the target reference 20876. During the approval process, normal business operations still access the currently effective version using 10521, while 20876 is only stored in the shadow record as an expected reference for the target version.
[0043] A cross-version mapping base is formed by associating the full list of source references and the shadow records of the target references with the same downstream record primary key and reference type. This cross-version mapping base simultaneously stores the source data primary key and the target data primary key of the same downstream reference before and after the version switch, and uses a milestone stability identifier to determine that the two belong to the same logical milestone.
[0044] It should be noted that the "rebinding using cross-version mapping" mentioned in the subsequent change writing phase does not mean recalculating or re-establishing a set of target reference relationships. Instead, it involves reading the target reference shadow records already formed in this step and determining the verified target data primary keys as candidate references for the corresponding downstream records. Therefore, this step is responsible for pre-building a full reference migration base during the version replication phase, and the subsequent change writing phase uses this base to form candidate states based on the changed data. For project date records, the scope that needs to be recalculated is still determined based on the actual data propagation relationships of the changes.
[0045] After the cross-version mapping base is formed, its completeness and uniqueness are verified. Each reference item in the full source reference list should have one and only one target reference shadow record with the same downstream record primary key, reference type, and milestone stability identifier; the same downstream record primary key and the same reference type should not correspond to different milestone stability identifiers. If a target reference shadow record is missing, it is considered an omission mapping; if the same reference corresponds to multiple different milestone stability identifiers, it is considered a conflict mapping.
[0046] For missing mappings, target reference shadow records can be automatically created based on the corresponding source references and cross-version mappings, and integrity checks can be re-executed. For conflicting mappings, the current target draft milestone version is stopped from proceeding to the next stage. The primary key, reference type, and related milestone stability identifier of the conflicting downstream record are recorded for data checking and correction. After correction, the cross-version mapping base is re-established and verified.
[0047] Considering that new project date or payment milestone records may be added between the creation and submission for approval of the target draft milestone version, if the new records still reference the source data primary key in the currently effective version, the newly added downstream references can be scanned again during the submission for approval. The target reference shadow records can be supplemented in the same way as described above, and the cross-version mapping base verification can be re-executed. If there are still references that should be migrated but are not covered by shadow records, they can be identified as missing references through the reference coverage results during subsequent actual version switching. This forms a control mechanism that combines preventative verification during the version replication phase with result-based verification during the version activation phase.
[0048] After successful verification, the cross-version mapping base is associated with and saved with the target draft milestone version, serving as the definitive input for subsequent candidate binding formation and formal reference migration. Thus, while the current effective version maintains its original formal reference relationships, the target draft milestone version already possesses an independent and fully verified target reference candidate state. This allows data content and reference relationships to be pre-built without polluting the current effective version, and then atomically activated during the final version switch.
[0049] Step S103: Write the changed data into the temporary adjustment data field, use cross-version mapping to rebind the affected project date records and payment milestone records to the target data primary key, recalculate the affected project date records, and generate a candidate consistency fingerprint when submitting for approval.
[0050] In step S103, after the target draft milestone version and cross-version mapping are established, the system receives change data for the target draft milestone version and writes the change data into the temporary adjustment data field of the corresponding milestone details. The temporary adjustment data field is a field corresponding to the official data field, used to temporarily store the data to be changed before the target draft milestone version is approved and becomes effective. The data stored therein does not directly replace the official data field before approval is granted and the version switch is completed. For official data fields that have not undergone changes, no corresponding temporary adjustment value needs to be set, and the data in the original official data field can continue to be used when determining candidate effective data.
[0051] For example, if the official planned completion date for a certain milestone detail in the target draft milestone version is June 10, 2026, and this change proposes to adjust that date to June 18, 2026, the system will still retain the official planned completion date of June 10, 2026, and write June 18, 2026 into the corresponding temporary adjustment data field. Therefore, before the target draft milestone version enters the approval process, the original data status and the proposed effective data status can be saved separately, preventing changed data that has not yet been approved from directly overwriting the official data that forms the basis for version replication.
[0052] Subsequently, the system utilizes the cross-version mapping established in S102 to handle the reference relationships between project date records and payment milestone records and milestone details. Since each corresponding milestone detail acquires a new target data primary key when the currently effective milestone version is copied to form the target draft milestone version, whether the reference relationship needs to be rebound does not depend on whether the data fields of the corresponding milestone detail have changed. Any milestone reference relationship currently stored in a project date record or payment milestone record that can be converted from the source data primary key to the target data primary key through cross-version mapping is included in the scope of reference relationship rebinding.
[0053] Specifically, the system reads the primary key of the source data stored in the project date record or payment milestone record, obtains the milestone stability identifier corresponding to the source data primary key according to the cross-version mapping, and then obtains the target data primary key corresponding to the same milestone stability identifier in the target draft milestone version. This forms a candidate reference relationship that the downstream record should adopt after the target draft milestone version takes effect. The rebinding refers to keeping the logical object represented by the project date record or payment milestone record itself unchanged, and only converting the milestone details it references from the physical data record in the source version to the corresponding physical data record in the target draft milestone version.
[0054] For example, payment milestone record P301 currently references source data primary key 10521. Based on the cross-version mapping "10521-MS-008-20876", the system determines that its candidate reference relationship should point to target data primary key 20876. Even if the planned date, actual date, and status fields corresponding to MS-008 have not changed in this change, as long as the corresponding record in the target draft milestone version has already obtained the target data primary key 20876, P301 still needs to complete the above rebinding. This avoids downstream records continuing to reference source data primary keys that already belong to historical versions after the target draft milestone version takes effect.
[0055] Candidate reference relationships can be stored independently before the official version switch. In one specific implementation, candidate reference fields corresponding to the official milestone reference fields can be set in the project date record and payment milestone record, respectively, and the target data primary key can be written into the candidate reference fields. In another implementation, a candidate association table can be established, using the version identifier of the target draft milestone version and the data primary key of the downstream record as the association key, and storing the data primary key, source data primary key, and target data primary key of the downstream record. Subsequently, S104 and S105 read the determined rebinding results from the candidate reference fields or candidate association table, and write the official reference relationship when the version switch conditions are met.
[0056] Unlike referential rebinding, whether a project date record needs to be recalculated depends on whether its data content is affected by the current change. Specifically, if the data value of a project date record is directly determined by the changed milestone details, or if its data generation rule's input set contains the changed milestone details, then that project date record is determined to need recalculation. For project date records that require primary key rebinding but whose calculation inputs and results are not affected by the current change, only referential rebinding is performed without recalculating their date values. Therefore, referential rebinding in this step is handled according to cross-version primary key changes, while the recalculation of project date records is handled according to the propagation scope of the changed data; the two use different judgment conditions.
[0057] For project date records that need to be recalculated, candidate date values are determined again using the candidate milestone data in the target draft milestone version as the corresponding input, following the original data generation rules for that project date record. For fields with temporarily adjusted data fields, the candidate values obtained by mapping the temporarily adjusted data fields are used; for fields that have not changed, the original values in their official data fields are used.
[0058] For example, a project phase end date is configured as the latest of three designated milestone completion dates. The original planned completion dates for these three milestones were June 10, 2026, June 20, 2026, and June 25, 2026, corresponding to a project phase end date of June 25, 2026. When the temporary adjusted planned completion date for the second milestone is set to July 5, 2026, the system replaces the original date of June 20, 2026 with July 5, 2026, and, combined with the other two unchanged milestone dates, re-determines the candidate project phase end date, resulting in July 5, 2026. Thus, the candidate values for the project date record reflect the expected data results after the target draft milestone version actually takes effect.
[0059] In one implementation, the data generation rules for project date records can be stored as configuration data, for example, specifying the earliest date, latest date, a specified milestone date, or a predetermined time interval based on a specified date. When generating candidate project dates, the data generation rules valid at the time of submission for approval are used. If these data generation rules change during subsequent approval processes, or if the actual data entry result deviates from the candidate result determined in this step due to database triggers, cascading update rules, or other data processing mechanisms during the formal migration process, then in step S105, the difference is identified by comparing the candidate consistency fingerprint with the consistency fingerprint after it takes effect.
[0060] When a user completes editing the target draft milestone version and submits a request for approval, the system solidifies the data state to be effective and generates a candidate consistency fingerprint. Choosing to generate a candidate consistency fingerprint at the time of submission ensures it corresponds to the final version content entering the approval process, rather than intermediate data that changes continuously during editing. After the candidate consistency fingerprint is generated, the target draft milestone version is generally no longer allowed to be directly edited. If the approval is withdrawn and the user re-enters the editing state, a new candidate consistency fingerprint is generated upon resubmission, and this regenerated fingerprint serves as the subsequent comparison benchmark.
[0061] Candidate consistency fingerprints are generated according to the data range and rules defined in S101. The calculation objects are the target draft milestone version and the candidate association states formed according to this step. For changed official data fields, the candidate value obtained by temporarily adjusting the data field mapping is used as the expected value of the official data field; for unchanged official data fields, the original value is used; for project date records and payment milestone records, their milestone reference relationships all use the re-bound target data primary key; for project date records that need to be recalculated, the recalculated candidate date value is used.
[0062] It should be noted that even to improve database write efficiency, during subsequent version switching, only necessary update operations are performed on records where the source data primary key and the target data primary key differ. The data range of the consistency fingerprint still covers all milestone reference relationships that should participate in the verification, as determined in S101, and is not narrowed due to the specific incremental write method used. This ensures that the candidate state and the actual effective state have the same verification boundary.
[0063] Therefore, step S103 not only saves the proposed modification data for the target draft milestone version, but also pre-completes the targetification of all downstream reference relationships that need to be migrated by using cross-version mapping, and recalculates the project date records affected by the data changes. When submitting for approval, it further solidifies the data content and reference relationships after the expected effective date of the target draft milestone version through candidate consistency fingerprints, thereby providing a definite comparison benchmark for the subsequent actual version switching results.
[0064] Furthermore, the step of writing changed data into a temporary adjustment data field, rebinding affected project date records and payment milestone records to the target data primary key using cross-version mapping, and recalculating affected project date records, generating candidate consistency fingerprints upon submission for approval, includes: writing changed data into a temporary adjustment data field, and recording the changed field identifiers and candidate values according to the milestone stability identifier to form a change description set; converting project date records and payment milestone records referencing the source data primary key to referencing the target data primary key according to the cross-version mapping, generating a candidate binding set containing the downstream record primary key, the milestone stability identifier, and the target data primary key. Starting with the milestone stability identifier in the change description set, the project date record that needs to be recalculated is determined step by step by generating dependencies along the pre-stored data of the project date record. Candidate project dates are generated using candidate values, and the milestone stability identifiers on which each candidate project date depends are recorded to form a candidate dependency set. Using the milestone stability identifier as a common key, the candidate binding set and the candidate dependency set are paired and verified. If there are references or dependencies that cannot be paired, the submission for approval is blocked. When the pairing verification is passed, the candidate field value, the candidate binding set, the candidate project date and its corresponding candidate dependency set are included in the candidate state, and a candidate consistency fingerprint is generated.
[0065] In one implementation, to further ensure consistency between data changes, cross-version reference migrations, and project date recalculations in the target draft milestone version, a change description set, a candidate binding set, and a candidate dependency set can be constructed before submission for approval, and the above data sets can be correlated and verified using milestone stability identifiers.
[0066] Upon receiving change data for the target draft milestone version, the change data is written to the corresponding temporary adjustment data fields. For each changed milestone detail, its milestone stability identifier, the changed field identifier, and the corresponding candidate value are recorded, forming a change description set. The field identifier is used to identify the changed formal data field. The candidate field value referred to in this document is the candidate value recorded in the change description set, which is the data value of the corresponding temporary adjustment data field to be migrated to the formal data field after the target draft milestone version takes effect.
[0067] For example, if the planned completion date corresponding to the milestone stability identifier MS-008 is changed from June 10, 2026 to June 18, 2026, a change description record is generated that includes MS-008, the planned completion date, and June 18, 2026, thereby determining the logical milestone and specific changed fields corresponding to this change.
[0068] Subsequently, the reference relationships between project date records and payment milestone records are processed according to the cross-version mapping. Downstream records referencing the source data primary key and having a corresponding target data primary key in the cross-version mapping are all identified as records to be rebound, regardless of whether the corresponding milestone detail data fields have changed. The system obtains the milestone stability identifier based on the source data primary key, then obtains the target data primary key through this identifier, converting the source reference relationship into a candidate reference relationship. The system records the downstream record primary key, the milestone stability identifier, and the target data primary key, forming a candidate binding set.
[0069] For example, if payment milestone record P301 references source data primary key 10521 and its cross-version mapping is "10521-MS-008-20876", then the candidate binding set includes records P301, MS-008, and 20876. Even if the field value of MS-008 has not changed in this version, P301 should still be included in the candidate binding set because its physical data primary key has changed from 10521 to 20876 after the version is copied. This avoids only rebinding milestones with changed fields and missing other reference relationships, preventing downstream records from continuing to point to the old version's milestone details after a version switch.
[0070] Based on this, the milestone stability markers in the change description set are used as the starting point for data change propagation. The project date records that need to be recalculated are determined level by level along the pre-stored data generation dependencies of the project date records. These data generation dependencies indicate which milestone data or other project date records are involved in determining the data value of a project date record. During propagation, already visited project date records are recorded; the same record is not repeatedly entered into the propagation process. If a dependency path is detected to redirect to a project date record already in the current propagation path, a circular dependency is determined, the generation of the current candidate state is stopped, and an exception message is output, thus ensuring that the step-by-step propagation has a definite termination condition.
[0071] For example, the date of D201 is determined by the later of the planned completion dates of MS-008 and MS-009, and D202 is determined based on D201. When MS-008 changes, D201 and D202 are subsequently identified as project date records that need to be recalculated. For project date records that need to be recalculated, the original formal data field values are replaced with the corresponding candidate field values, while unchanged fields continue to use their original values. Candidate project dates are obtained according to their data generation rules, and the milestone stability identifiers that this calculation directly or through hierarchical propagation depend on are recorded to form a candidate dependency set. If the project date record also has linked data fields that are included in the consistency fingerprint range, the corresponding candidate linked field values are determined according to the same data generation dependency relationship and included in the subsequent candidate states along with the candidate project dates.
[0072] After the candidate binding set and candidate dependency set are formed, pairing verification is performed using the milestone stability identifier as a common key. The pairing verification includes at least rebinding integrity verification and consistency verification between physical references and logical dependencies. Rebinding integrity verification is performed on all records that should be rebinded, checking whether each downstream record referencing the source data primary key and having a cross-version mapping has a target data primary key in the candidate binding set corresponding to its downstream record primary key and milestone stability identifier; if not, it is determined that an omission in rebinding has occurred.
[0073] For example, project date record D205 references milestone MS-010, whose fields have not changed. The primary keys for MS-010 in the source version and the target draft milestone version are 10600 and 20910, respectively. Even if MS-010 does not belong to the change description set, if no candidate binding records for D205, MS-010, and 20910 exist in the candidate binding set, D205 is determined to have been missed for rebinding and is prevented from being submitted for approval. This allows for the detection of old version references left behind due to only processing milestones with field changes before the actual version switch.
[0074] For dependencies in the candidate dependency set that indicate a project date record directly depends on a certain milestone detail, the system also checks whether there are candidate reference relationships in the candidate binding set corresponding to the same downstream record primary key and the same milestone stability identifier, and whether the target data primary key in the candidate reference relationship is the target data primary key determined by cross-version mapping. For reference relationships in the candidate binding set that actually participate in project date generation, the system reversely checks whether there is a dependency relationship between the same downstream record and the same milestone stability identifier in the candidate dependency set. Candidate binding relationships used only for payment association and not participating in project date generation are not subject to this reverse dependency check.
[0075] When all rebinding records have corresponding candidate binding records, all direct milestone dependencies in the candidate dependency set can match the candidate binding relationships under the same milestone stability identifier, and the candidate binding relationships generated by the project date can find the corresponding dependencies in the candidate dependency set, the pairing verification is deemed to have passed; otherwise, the pairing verification is deemed to have failed, and the target draft milestone version is prevented from being submitted for approval.
[0076] When the pairing verification passes, the candidate field value, the candidate reference relationship in the candidate binding set, the candidate project date, the candidate linkage field value, and the corresponding candidate dependency set are jointly determined as the candidate state, and a candidate consistency fingerprint is generated according to the aforementioned rules.
[0077] Therefore, the candidate binding set describes cross-version reference migration at the physical layer of the database, while the candidate dependency set describes logical dependency propagation at the application data computation layer. Both utilize the same milestone stability identifier to represent the logical milestones involved, thus forming a common cross-validation benchmark. Typically, database foreign keys are represented by physical data primary keys, while project date computation dependencies are represented by application-layer data generation rules; the two do not inherently possess a directly comparable unified identity. This implementation transforms both relationships into the same identifier space through a milestone stability identifier that remains unchanged across versions. This allows the system to simultaneously detect missed rebindings, erroneous rebindings, and inconsistencies between physical references and logical computation dependencies before version switching, and accordingly solidify the validated candidate effective state.
[0078] Furthermore, the process of using milestone stability identifiers as common keys to perform pairing verification on candidate binding sets and candidate dependency sets, and preventing submission for approval when there are unmatchable reference or dependency relationships, includes: using the date records of each candidate project as root nodes, expanding backward along the candidate dependency sets to the milestone stability identifiers, and recording the dependency field identifiers and levels of each dependency edge to form a logical dependency topology; based on cross-version mapping, replacing the milestone stability identifiers in the logical dependency topology one by one with the corresponding target data primary keys, and obtaining the downstream record primary keys corresponding to each target data primary key from the candidate binding sets to form a physical binding topology; and comparing the nodes layer by layer according to the same root node. The topology pairing results are obtained by mapping the node levels, branch numbers, dependency field identifiers, milestone stability identifiers, and target data primary keys of the logical dependency topology and the physical binding topology. When the topology pairing is successful, only the candidate field values corresponding to the target data primary key in the physical binding topology are read, and the project date is recalculated according to the dependency level of the physical binding topology to obtain the replay project date and the actual milestone stability identifier sequence. The replay project date and milestone stability identifier sequence are compared with the candidate project date and the milestone stability identifier sequence in the logical dependency topology, respectively. If any of them are inconsistent, the submission for approval is blocked. If they are all consistent, the pairing verification is deemed successful.
[0079] In one implementation, to verify whether the data generation dependencies declared by the candidate project dates are consistent with the physical reference relationships actually to be established in the target draft milestone version, after the candidate binding set and the candidate dependency set are formed, a logical dependency topology is constructed with each candidate project date record as the root node, and the logical dependency topology is converted into a physical binding topology based on the target data primary key. The pairing verification result is determined by topology comparison and project date replay.
[0080] The logical dependency topology is used to indicate which milestone details or other project date records are used to generate candidate project dates level by level. The root node is the candidate project date record, the intermediate nodes are the other project date records that participated in its generation, and the leaf nodes are the milestone details represented by milestone stability identifiers. Nodes are connected by dependency edges. Each dependency edge records at least the dependency field identifier and the level. The dependency field identifier uses the same field identifier system as the field identifiers in the change description set, and is used to determine the specific data fields that the upper-level node reads from the lower-level node, such as the planned completion date field or the actual completion date field, so that it is possible to determine whether the change propagates along the dependency relationship according to the field granularity. For example, if MS-008 only changes the actual completion date, and D201 only depends on the planned completion date of MS-008, it can be determined that the change does not propagate through this dependency edge, and there is no need to add D201 to the recalculation scope.
[0081] The system starts by expanding backwards from the direct dependencies of the root node, and continues expanding on nodes belonging to the project date record until it reaches the milestone stability marker. During the expansion process, it records the nodes that have been visited; if the current dependency path re-reaches a node that has already appeared in the path, it is determined that a circular dependency exists, the current verification is stopped, and the corresponding dependency node is output to avoid infinite loops.
[0082] For example, if D202 depends on the planned completion date of D201, and D201 in turn depends on the planned completion dates of MS-008 and MS-009, a logical dependency topology is formed with D202 as the root node, D201 as the intermediate node, and MS-008 and MS-009 as leaf nodes, and the field identifier and level of each dependent edge are recorded.
[0083] After the logical dependency topology is formed, based on the cross-version mapping, the milestone stability identifiers are converted into the corresponding target data primary keys in the target draft milestone version. Then, the candidate reference relationships between the corresponding project date records and the target data primary keys are obtained from the candidate binding set to form the physical binding topology. The logical dependency topology represents the application layer's declaration of "which fields should be obtained from which logical milestones for the candidate project date," and the physical binding topology represents the database layer's declaration of "which target data primary keys the candidate state is actually prepared to obtain these fields from."
[0084] In the example above, if MS-008 and MS-009 correspond to target data primary keys 20876 and 20877 respectively, then the candidate binding set of D201 should contain references from D201 to 20876 and from D201 to 20877 respectively, thus forming two physical binding branches. If only references from D201 to 20876 exist, the physical binding topology has only one branch at this layer, while the logical dependency topology has two branches. Since the number of branches is inconsistent, the topology pairing is determined to fail.
[0085] The system compares two topologies layer by layer, starting from the same root node. The comparison includes at least the node level, number of branches, dependency field identifiers, and the correspondence between milestone stability identifiers and the target data primary key. A topology pairing is considered successful only if every valid dependency edge in the logically dependent topology can find a corresponding target reference in the physically bound topology, and there are no physically bound branches that additionally change the scope of the computational input.
[0086] After topology pairing is successful, a replay computation is performed. This replay computation uses the same data generation rules as when forming candidate project dates, but the data acquisition paths differ. When forming candidate project dates, the computation input is obtained directly from candidate field values in the change description set and unchanged formal data fields, based on the candidate dependency set as the logical basis. During the replay computation, bypassing the physical binding topology to directly obtain the above input is prohibited. Instead, the target draft milestone details must be located along the established physical binding topology using the target data primary key, and then the candidate field values of the corresponding dependency fields are obtained. Thus, although the two computations use the same rules, they obtain input from the logical dependency path and the actual physical binding path respectively. When the two calculations point to the same logical milestone inconsistently, they can be identified through differences in the computation results or the objects involved in the computation.
[0087] For example, D201 takes the later of the planned completion dates of MS-008 and MS-009 according to the rules. When 20876 and 20877 in the physical binding topology obtain July 5, 2026 and June 25, 2026 respectively, the replay results in D201 being July 5, 2026. If one of the target data primary keys incorrectly corresponds to other milestones, even if the final date values happen to be the same, the logical milestones actually involved in the calculation may still be different.
[0088] Therefore, the milestone stability identifiers that actually participated in the calculation are also recorded during the replay process. Specifically, the corresponding milestone stability identifiers are obtained in reverse order based on the primary key of the target data actually accessed in the physically bound topology, and a sequence of milestone stability identifiers is formed in a pre-determined order. The pre-determined order can be sorted according to the dependency level, dependency field identifier, and milestone stability identifier in sequence to ensure that the candidate side and the replay side have a consistent serialization order; the actual database reading order is not used as the formal comparison order.
[0089] The system compares the replay project date with the candidate project date and the milestone stability identifier sequence actually used in the computation with the milestone stability identifier sequence corresponding to the logical dependency topology. If the topology structure is inconsistent, it indicates a missing, misaligned, or extra reference between the logical dependency registration and the physical binding construction. Anomalies can be located based on the corresponding root node, level, and dependency field identifiers. If the topology structure is consistent but the replay project date or stability identifier sequence is inconsistent, it indicates that the data source obtained along the actual target data primary key is inconsistent with the data source declared in the candidate computation. Binding or data retrieval anomalies can be further investigated based on the corresponding target data primary key and milestone stability identifiers. Submission for approval is blocked if any comparison fails; pairing verification is considered successful if all comparisons pass.
[0090] It should be noted that this implementation verifies the consistency between the candidate project date, its declared logical dependencies, and the physical binding relationships in the target version. In other words, it verifies whether the candidate project date is indeed based on the declared logical milestones, dependency fields, and dependency levels. Whether the data generation rules themselves conform to the business definition is not within the scope of this step's verification; their correctness can be ensured through rule configuration verification, testing, or other mechanisms.
[0091] Therefore, this implementation obtains the calculation input of the same candidate project date from the logical dependency side and the physical binding side respectively, and cross-validates the dependency topology, the logical milestones actually involved in the calculation and the final calculation result, so that the dependency source declared in the data generation is consistent with the data source actually prepared to be used after the version switch. This enables the identification of situations where the final date value is accidentally the same but the actual binding object is wrong, the dependency branch is missing, the dependency field is misaligned or the target data retrieval path is abnormal.
[0092] Step S104: After approval, lock the current effective milestone version in the same database transaction, generate a review consistency fingerprint and verify that the target data primary key and the milestone stability identifier are uniquely matched; when the review consistency fingerprint is consistent with the baseline consistency fingerprint and the verification is passed, migrate the temporarily adjusted data fields, switch the current effective milestone version, and update the project date record and payment milestone record according to the rebinding and recalculation results.
[0093] In step S104, after the target draft milestone version is approved, the system initiates a database transaction for version activation processing, and locks the currently effective milestone version and the key related data involved in this version switch within this database transaction. The locking refers to restricting other concurrent transactions from performing write operations that might change the consistency state of the currently effective milestone version, project date records, or payment milestone records before the current database transaction is committed or rolled back. Specifically, database row-level exclusive locks, version master record locks, or locking mechanisms with equivalent concurrency isolation can be used. During the approval period, the currently effective milestone version can still continuously provide normal query and related calculation services to other business modules. Necessary locking is only implemented during the short transaction of version switching in this step; therefore, it is not necessary to continuously lock the currently effective data throughout the entire approval cycle.
[0094] After locking is complete, the system rereads the currently effective milestone version, which serves as the source of the target draft milestone version, along with its associated project date records and payment milestone records. It then generates a review consistency fingerprint using the same data range and rules as when generating the baseline consistency fingerprint in S101. Both the review consistency fingerprint and the baseline consistency fingerprint are generated for the source version and are used to determine whether the data content and milestone reference relationships of the source version have changed from the creation of the target draft milestone version to the completion of approval.
[0095] The system compares the verification consistency fingerprint with the baseline consistency fingerprint associated with the target draft milestone version. If they are inconsistent, it indicates that the data baseline upon which the target draft milestone version is based has changed, and the system terminates the current version activation transaction without performing subsequent version switching. As one implementation method, the target draft milestone version can be marked as requiring baseline re-establishment, and the reason for the change in the source version status can be recorded. The system can then re-establish the target draft milestone version based on the currently effective milestone version, or re-determine the data baseline and re-enter the change and approval process. This avoids directly implementing version replacement based on outdated data.
[0096] For example, when creating the target draft milestone version, payment milestone record P301 references the source data primary key 10521, and this reference relationship has been included in the baseline consistency fingerprint. If, during the approval process, data correction or other module cascading processing changes the reference relationship of P301, even if the version identifier of the source version remains unchanged, the review consistency fingerprint will still change, thus identifying the situation where "the version identity has not changed, but the internal state of the version has drifted."
[0097] After the consistency fingerprint is verified, the system further verifies whether the target data primary key and the milestone stability identifier uniquely correspond. Specifically, according to the cross-version mapping formed in S102, each milestone stability identifier is checked one by one to see if it corresponds to only one target data primary key in the target draft milestone version, and whether the target data primary key actually belongs to the target draft milestone version. If the same milestone stability identifier corresponds to multiple target data primary keys, the target data primary key corresponds to an incorrect milestone stability identifier, the target record is missing, or the target record does not belong to the target draft milestone version, the mapping verification is determined to have failed, the current version activation transaction is terminated, and the exception information is recorded for subsequent data inspection and repair.
[0098] The mapping integrity check in S102 confirms that the cross-version mapping was correctly formed when the target draft milestone version was created, while the unique correspondence verification in this step confirms that the cross-version mapping remains valid after the editing and approval cycle. Therefore, the two verifications target the data status at different points in time to prevent the original cross-version mapping from becoming invalid due to detail additions / deletions, abnormal modifications, or data corruption during subsequent processing of the target draft milestone version.
[0099] When the verification consistency fingerprint matches the baseline consistency fingerprint, and the target data primary key uniquely corresponds to the milestone stability identifier, the system continues to perform version switching within the current database transaction. For fields with temporary adjustment data, the candidate values determined in S103 are written to the corresponding formal data fields; for fields without temporary adjustment data, the original formal data remains unchanged. After migration is complete, the corresponding temporary adjustment data can be marked as processed; when it is necessary to release temporary data storage space, the temporary adjustment data can also be further cleared. The clearing operation is also performed within the current database transaction, and the corresponding clearing operation is rolled back along with the transaction when the transaction is rolled back.
[0100] Subsequently, the system cancels the current effective flag for the source version and sets the target draft milestone version as the new current effective milestone version. Since both the source version status update and the target version status update are within the same database transaction, the intermediate state of "two current effective versions existing simultaneously" or "no current effective version" will not be exposed to the normal business read process before the transaction is finally committed.
[0101] The system simultaneously updates the project date record and payment milestone record according to the rebinding results determined in S103, converting their formal milestone reference relationships from the corresponding source data primary key to the target data primary key. For project date records that need to be recalculated, the candidate date values obtained in S103 are also written into the corresponding formal data fields. For project date records where the physical data primary key changes only due to version replication, but whose date values themselves are not affected by the changed data, only the reference relationship rebinding is performed without repeated recalculation.
[0102] For example, S103 has determined that both the project date record D201 and the payment milestone record P301 should be rebound from the source data primary key 10521 to the target data primary key 20876. At the same time, the candidate date of D201 has been recalculated from June 25, 2026 to July 5, 2026. In this step, the formal reference relationship between D201 and P301 in the current database transaction is updated to point to 20876, and the formal date of D201 is updated to July 5, 2026.
[0103] It should be noted that after the data writing is completed in this step, the database transaction is not yet committed. The version switch result at this time is a transient database state that can be completely revoked. The system then generates a consistency fingerprint after it takes effect according to S105 and compares this transient database state with the candidate state that has been fixed when submitted for approval in S103. Only when the final consistency verification passes will the version switch and related update results formed in this step be permanently committed; otherwise, the entire database transaction will be restored to the state before the version switch.
[0104] Step S105: Generate a consistent fingerprint after it takes effect. If the fingerprint matches the candidate consistent fingerprint, commit the database transaction; otherwise, roll back.
[0105] In step S105, after completing the migration of temporary adjustment data fields to formal data fields, the switching of the current effective milestone version, and the updating of project date records and payment milestone records in step S104, the system generates an effective consistency fingerprint before the current database transaction is committed. The effective consistency fingerprint is then compared with the candidate consistency fingerprint generated and solidified in step S103 when submitting for approval. Based on the comparison result, the system decides whether to commit or roll back the current database transaction.
[0106] The post-effectiveness consistency fingerprint is used to characterize the actual pending data state formed after the target draft milestone version has completed the actual data migration and relationship update according to step S104, but before the database transaction has been committed. Its calculation objects are the target version that has been switched to the new current effective milestone version, and the project date records and payment milestone records that have been updated in the current transaction. The post-effectiveness consistency fingerprint is generated according to the same data range, data normalization method, sorting method, serialization method, and hash rules as the candidate consistency fingerprint determined in step S101, thereby enabling a deterministic comparison between the expected effective state fixed at the time of approval and the actual database state.
[0107] In practice, the system rereads the milestone details from the target milestone version within the current database transaction, and also reads the updated project date records and payment milestone records. For milestone details, it reads the official data fields and target data primary keys after migration; for project date records and payment milestone records, it reads the actual target data primary key reference relationships; when the preset range of the consistency fingerprint also includes data fields linked to the milestone, it simultaneously reads the corresponding actual values written to the database, and then generates the effective consistency fingerprint according to the same rules as the candidate consistency fingerprints.
[0108] Candidate consistency fingerprints and post-effectiveness consistency fingerprints belong to the same set of comparison objects. The candidate consistency fingerprint represents the expected effective state of the target draft milestone version as determined in advance when submitted for approval, while the post-effectiveness consistency fingerprint represents the database state formed after the actual execution of formal field migration, version switching, association rebinding, and project date updates in step S104. Therefore, the comparison between the two is used to determine whether the data state determined to be formed at the time of approval is consistent with the data state actually written to the database, rather than to re-determine whether the source version has changed. Whether the source version state has drifted has already been determined through the baseline consistency fingerprint and the review consistency fingerprint in step S104.
[0109] For example, when submitting for approval, the target data primary key of the milestone stability identifier MS-008 in the target draft milestone version is 20876, and its planned completion date candidate value is June 18, 2026. The candidate reference relationships of project date record D201 and payment milestone record P301 both point to 20876, and the candidate project date of D201 is July 5, 2026. If, after the actual processing in step S104, the above-mentioned formal data fields, target data primary key reference relationships, and project dates are all the same as the candidate status, then the consistency fingerprint generated after effectiveness according to the same rules is consistent with the candidate consistency fingerprint.
[0110] If anomalies occur during the actual migration or update process, the two consistency fingerprints may differ. For example, a payment milestone record might be written to the wrong target data primary key due to an abnormal mapping; although a project date record has been rebounded, its actual date may differ from the candidate date determined in step S103 because the data generation rules changed during the approval period, or database triggers or cascading update rules altered the actual data storage result; or, for example, temporary adjustment data might not be correctly written to the formal data field during the migration process. All of these situations will cause the actual data content or milestone reference relationships to deviate from the candidate state, and will be identified by comparing the consistency fingerprint after it takes effect with the candidate consistency fingerprint.
[0111] When the consistency fingerprint matches the candidate consistency fingerprint, the system commits the current database transaction. After the transaction is committed, the target draft milestone version officially becomes the new currently effective milestone version, and the official field migration results, project date record update results, and payment milestone record rebinding results take effect simultaneously. Since the above data modifications are all within the same database transaction, normal business modules will not read the intermediate state where only some field migrations or partial relationship updates have been completed. Combined with step S104, which only implements necessary locking on the currently effective milestone version during the version switching transaction execution, the original currently effective milestone version can still continuously provide query and association calculation services throughout the entire approval cycle. Therefore, there is no need to set up a long-term lock or shutdown window to wait for the target draft milestone version approval to be completed.
[0112] When the consistency fingerprint after taking effect is inconsistent with the candidate consistency fingerprint, the system does not commit the current database transaction, but performs a transaction rollback. After the rollback, the formal data field migration, current effective identifier switching, project date record update, payment milestone record rebinding, and marking or clearing of temporary adjustment data performed in step S104 within the transaction are all restored to the state before the start of the transaction. Therefore, the original current effective milestone version remains valid, and the target draft milestone version will not become the current effective version with incomplete or incorrect data.
[0113] For consistency check failure information, it can be stored independently outside the current version switch transaction. For example, after the main transaction is rolled back, a consistency check failure record can be written through an independent database transaction. Alternatively, information such as the target version identifier, candidate consistency fingerprint, consistency fingerprint after effectiveness, failure time, and failure stage can be recorded through an independent log channel, message queue, or audit log module to avoid the failure record being rolled back along with this version switch transaction. If the aforementioned temporary adjustment data was cleared in step S104, this clearing operation is part of the current database transaction, and the corresponding temporary adjustment data will be restored when the transaction is rolled back, so it can still be used for subsequent anomaly analysis and reprocessing.
[0114] After a database transaction rollback, the subsequent status of the target draft milestone version can be determined based on the exception type. If the exception only occurred during formal field migration, relation rebinding, or database write operations, and the target draft milestone version itself and its approval result remain valid, the target draft milestone version can be restored or maintained in an approved but not yet effective state. After the cause of the exception is eliminated, steps S104 and S105 can be re-executed. If the exception indicates that the candidate data, relation, or approval object itself needs to be redefined, the target draft milestone version can be set to a state requiring resubmission for approval. After re-editing and generating a new candidate consistency fingerprint according to step S103, it can re-enter the approval process.
[0115] As a further implementation, when the overall consistency fingerprint comparison fails, segmented fingerprints can be used to locate the data range where the anomaly occurred. For example, the detail fingerprints corresponding to milestone details, the project date fingerprints corresponding to project date records, and the payment association fingerprints corresponding to payment milestone records can be compared separately. If only the payment association fingerprints differ, the rebinding process of the payment milestone records can be checked first; if the project date fingerprints differ, the recalculation result of the project date or the corresponding data generation rules can be checked. Segmented fingerprints are only used to assist in anomaly location and do not change the control logic of the overall consistency fingerprint in determining whether the current database transaction is committed or rolled back.
[0116] Therefore, step S105 performs a final consistency comparison between the candidate effective state pre-fixed during approval and the actual pending effective state formed in the database, and controls the commit or overall reversal of the version switching transaction based on the comparison result, so that the formal field migration, cross-version reference rebinding, project date update and the current effective version switch are effective as a complete data state, avoiding partial updates, incorrect references or abnormal derived data entering the formal effective state.
[0117] Furthermore, the generation of a consistent fingerprint after it takes effect, and the submission of a database transaction when it matches a candidate consistent fingerprint, and the rollback otherwise, includes: using the milestone stability identifier as an index, generating milestone node fingerprints for the target data primary keys and formal data fields of each milestone detail in the new currently effective milestone version, forming a node fingerprint table; reading the updated project date record and payment milestone record, determining the milestone stability identifier in reverse according to its target data primary key, and generating a reference proof record by combining the downstream record primary key, the target data primary key, and the corresponding milestone node fingerprint, forming a reference proof set; comparing the set of downstream records that should reference each milestone stability identifier in the candidate status fixed at the time of submission for approval with the actual set of downstream records in the reference proof set, generating a reference coverage result containing missing and redundant references; processing the node fingerprint table and the reference proof set in a determined order to generate a content root fingerprint and a reference root fingerprint, and reading the candidate content root fingerprint and candidate reference root fingerprint generated and saved in the same way at the time of submission for approval; submitting a database transaction when the content root fingerprint matches the candidate content root fingerprint, the reference root fingerprint matches the candidate reference root fingerprint, and the reference coverage result does not contain missing or redundant references, otherwise rolling back the database transaction.
[0118] In one implementation, to further verify whether the database status after the target draft milestone version completes the actual data migration and association rebinding is consistent with the candidate status fixed when submitting for approval, the data content of the milestone details, the downstream references that have been formed, and the downstream references that should be formed can be verified separately.
[0119] When the version switch is completed in step S104 but the database transaction has not yet been committed, milestone node fingerprints are generated for each milestone detail in the new currently effective milestone version, using the milestone stability identifier as an index. The milestone node fingerprint is used to characterize the combined state of the primary key and formal data fields of a target milestone detail. The range of formal data fields is consistent with the range of formal data fields used in the corresponding milestone detail when generating the candidate consistency fingerprint, ensuring that the candidate state and the actual effective state have the same data comparison boundary. After normalizing the target primary key and formal data fields according to a preset field order, hashing is performed to obtain the milestone node fingerprints corresponding to each milestone stability identifier, forming a node fingerprint table.
[0120] For example, if the target data primary key for MS-008 is 20876 and the official planned completion date is June 18, 2026, then a milestone node fingerprint for MS-008 can be generated based on 20876 and the corresponding official data fields. Because the node fingerprint table uses a stable milestone identifier that remains unchanged across versions as its index, rather than using a data primary key that changes after version replication, a definitive data object correspondence can be established between the candidate state and the actual effective state.
[0121] Subsequently, the updated project date records and payment milestone records are read, and the milestone stability identifier is determined in reverse based on the primary key of the target data actually written therein. Preferably, the milestone details in the new currently effective milestone version are directly queried, and the corresponding milestone stability identifier is obtained based on the actual target data primary key, making the reverse determination result independent of the previously established cross-version mapping; when it is confirmed that no anomalies have occurred in the cross-version mapping, the cross-version mapping can also be used for auxiliary queries. After obtaining the milestone stability identifier, the corresponding milestone node fingerprint is read from the node fingerprint table, and the downstream record primary key, milestone stability identifier, target data primary key, and corresponding milestone node fingerprint are combined to form a reference proof record, and all reference proof records form a reference proof set.
[0122] For example, payment milestone record P301 actually references 20876. A reverse lookup of the milestone details in the target version determines that 20876 corresponds to MS-008. Then, the node fingerprint H008 of MS-008 is obtained, thus forming a reference proof record containing P301, MS-008, 20876, and H008. Therefore, the reference proof not only indicates which physical record P301 points to, but also binds the logical identity and data content status of the referenced object to this reference relationship.
[0123] The downstream reference set that should be formed is obtained based on the candidate state fixed at the time of submission for approval, and bidirectionally compared with the actual reference set in the reference proof set to generate a reference coverage result. If the candidate state requires D201 to reference MS-008, but the relationship does not exist in the actual reference proof set, a missing reference is formed; if a relationship from P302 to MS-008 that is not defined in the candidate state actually exists, a redundant reference is formed.
[0124] This reference coverage result differs from database foreign key constraints. Database foreign keys are typically used to check if an existing reference points to a record in the database, but they cannot determine whether a reference should exist in the current target version, nor can they detect if a reference that should have been created has been omitted. Since historical milestone versions are usually retained, even if a downstream record still references the primary key of the source version after a version switch, the source record may still exist, and therefore the database foreign key validation will still pass, but the downstream record has been removed from the new, currently effective milestone version. This implementation uses the set of references fixed at the time of submission for approval as a benchmark, and performs a bidirectional comparison between it and the actual set of references, thereby identifying this situation where "database references are valid but cross-version reference status is incorrect."
[0125] The system processes the node fingerprint table according to the determined order of milestone stability identifiers to obtain the content root fingerprint, and processes the reference proof set according to the determined order of downstream record primary keys and milestone stability identifiers to obtain the reference root fingerprint. Correspondingly, the candidate content root fingerprint and candidate reference root fingerprint have already been generated and saved according to the fixed candidate status and the same rules when submitting for approval. This step directly reads the above candidate root fingerprints without recalculating them based on the draft data after approval.
[0126] It should be noted that although this implementation method can use a hierarchical hashing approach to form the root fingerprint, its hierarchical structure is not solely for improving the efficiency of large-scale data integrity verification. The node fingerprint table is organized with stable milestone identifiers that remain unchanged across versions, ensuring that the corresponding data can still be aligned even after the physical primary key changes following version replication. The reference proof record further embeds the node fingerprint of the referenced milestone, so that downstream references not only correspond to a target data primary key but also to the logical identity and content status of the referenced object. The content root fingerprint and reference root fingerprint aggregate the formal data status of the milestone and the cross-version reference status, respectively, thus corresponding to formal field migration anomalies and downstream rebinding anomalies. Therefore, data content verification and reference relationship verification are not simply segmented according to database tables or storage shards, but rather an interrelated verification structure is established based on their different roles in the milestone version switching process.
[0127] This implementation method serves a different purpose from the aforementioned pairing verification before submission for approval. The pairing verification before submission is used to determine whether the candidate state is self-consistent, i.e., whether the pre-built physical reference relationship and the project date calculation dependency correspond to the same logical milestone. This step, however, occurs after the actual data is written and is used to determine whether the actual state in the database completely and accurately implements the solidified candidate state. The former prevents candidate states with internal contradictions from entering the approval process, while the latter prevents correct candidate states from being incorrectly executed during the formal migration process.
[0128] When the content root fingerprint matches the candidate content root fingerprint, the reference root fingerprint matches the candidate reference root fingerprint, and the reference coverage result has no missing or redundant references, the database transaction is committed; if any condition is not met, the database transaction is rolled back. After rollback, the data range can be further located based on the anomaly type. For example, when the content root fingerprint matches but the reference root fingerprint does not, the actual reference proof record is compared with the candidate reference proof record saved when submitting for approval; if it is found that the milestone stability identifier in the actual reference record of P301 is MS-009, while the candidate reference proof record is MS-008, it can be determined that P301 has experienced an erroneous rebinding. When there is a content anomaly, the corresponding milestone details can be located based on the milestone stability identifier; when there is a reference anomaly or a coverage anomaly, the project date record or payment milestone record can be located based on the primary key of the downstream record, and the version switch is re-executed after the anomaly is eliminated.
[0129] Therefore, this implementation method uses milestone stability identifiers to establish a unified data identity space across versions, and verifies the target milestone content status, actual reference status, and expected reference integrity separately. This not only discovers migration errors and incorrect rebindings of formal data fields, but also identifies omissions and redundant rebindings that still exist in old version records and therefore cannot be detected by database foreign key constraints. This improves the integrity of data consistency verification and the ability to locate anomalies during multi-version switching.
[0130] Furthermore, the step of comparing the set of downstream records that should reference each milestone stability identifier in the candidate state fixed at the time of submission for approval with the actual set of downstream records in the reference proof set to generate a reference coverage result containing missing and redundant references includes: recording the maximum creation sequence number of the project date record and payment milestone record as the approval boundary at the time of submission for approval, and saving the primary key of the downstream record, the primary key of the source data, the milestone stability identifier, and the primary key of the target data corresponding to each reference relationship; matching the actual set of downstream records with the saved reference relationships to obtain missing records and new records; reading the formal reference of the missing record, where it still points to the primary key of the source data and the primary key of the source data... When the key uniquely corresponds to the target data primary key through the milestone stable identifier, a supplementary migration instruction is generated; otherwise, a misalignment marker is generated. The creation sequence number and formal reference of the newly added record are read. If the creation sequence number is greater than the corresponding approval boundary and the formal reference can uniquely determine the target data primary key through cross-version mapping, an approval period addition marker is generated; otherwise, an abnormal addition marker is generated. The supplementary migration instruction is executed in the current database transaction, and the reference proof set is regenerated. If there are still missing records or misalignment markers or abnormal addition markers after re-comparison, the process is rolled back. If there are approval period addition markers, the process is rolled back, and the target draft milestone version is set to a state requiring a new baseline; otherwise, a reference coverage result without missing or redundant references is generated.
[0131] In one implementation, to distinguish between missed migrations, misplaced references, and legitimate downstream records added during the approval process that actually occur during version switching, the maximum creation sequence number of the project date record and payment milestone record is recorded when the target draft milestone version is submitted for approval. This record serves as the approval boundary for the corresponding type of downstream record. The creation sequence number reflects the order in which records of the same type are created and can be an auto-incrementing database number, a sequence number, or other monotonically increasing identifier. The project date record and payment milestone record each define their respective approval boundaries to avoid interference between the sequence number spaces of different record types.
[0132] While determining the approval boundaries, the primary keys of downstream records, source data, milestone stability identifiers, and target data are saved for each reference relationship in the candidate state. Thus, the approval boundaries are used to determine the range of downstream records already existing when the candidate state is solidified, while the reference relationships are used to indicate which source data primary key the corresponding record should be migrated to and which target data primary key after the target draft milestone version takes effect.
[0133] When the actual version switch is completed but the database transaction has not yet been committed, the actual downstream records in the reference proof set are matched with the reference relationships saved during the submission for approval. Matching uses only the primary key and reference type of the downstream record as the matching key; the milestone stability identifier is not used as an initial matching condition but is used for identity determination after matching. In this way, if the same downstream record still exists but is incorrectly bound to another milestone stability identifier, it will not be simply split into a missing record and a new record, but can be further determined based on its actual formal reference to determine whether it is an omitted migration or a reference misalignment. If a reference relationship exists in the candidate state but there is no corresponding record in the reference proof set with the same primary key and reference type as the downstream record, it is determined to be a missing record; if a reference relationship exists in the reference proof set but there is no corresponding relationship with the same primary key and reference type as the downstream record in the candidate state, it is determined to be a new record.
[0134] For missing records, their current formal reference field is read. If the formal reference is still the source data primary key saved in the candidate state, and the source data primary key can be uniquely identified by a milestone stable identifier as the target data primary key saved in the candidate state, it indicates that the logical identity and migration target of the downstream record have not changed, only the actual migration action was missed, thus generating a supplementary migration instruction. The supplementary migration instruction includes at least the downstream record primary key, the source data primary key, and the target data primary key, and is used to update the formal reference from the source data primary key to the target data primary key within the current database transaction. If the formal reference of the missing record is no longer the saved source data primary key, or cannot uniquely correspond to the candidate target data primary key, a misalignment flag is generated, and automatic supplementary migration is not performed.
[0135] The supplementary migration is executed only once. After executing all supplementary migration instructions in the current database transaction, the system rereads the updated project date records and payment milestone records, and regenerates the reference proof set and reference root fingerprint as described above. The candidate reference root fingerprint represents the complete and expected reference state that has been fixed at the time of submission for approval. Therefore, if the previous inconsistency in the reference root fingerprint was only caused by a missed migration, the regenerated reference root fingerprint should be consistent with the candidate reference root fingerprint after the supplementary migration is completed correctly. If there are still missing records after re-comparison, or if the regenerated reference root fingerprint is still inconsistent with the candidate reference root fingerprint, the second round of supplementary migration will not be executed, and the current database transaction will be rolled back directly, so that the supplementary migration and review process can be completed in a limited number of steps.
[0136] For newly added records, their creation sequence number and formal reference are read. If the creation sequence number is greater than the approval boundary of the corresponding type, and the formal reference can uniquely identify the target data primary key through cross-version mapping, a new record during the approval period is generated. This mark indicates that the corresponding record was legally created after the candidate status was solidified. It does not indicate that the record itself has data anomalies, but rather that the data boundary covered by the original approval object is no longer consistent with the current actual data boundary.
[0137] For example, if the approval boundary of the project date record is 150 when submitting for approval, and a new record D151 is created during the approval period with a creation number of 151, referencing the source data primary key 10521 corresponding to MS-008; if 10521 can uniquely map to the target data primary key 20876, then D151 is identified as a new record added during the approval period. Since D151 did not exist when submitting for approval, its target reference relationship was not included in the original candidate state and the original approval content, therefore D151 cannot be directly merged into the already approved target version.
[0138] If the creation sequence number of the newly added record is not greater than the approval boundary, or its formal reference cannot uniquely identify the target data primary key, an abnormal addition flag will be generated. This situation indicates that the candidate status should have already included the record but it was omitted, or the actual reference of the newly added record itself has an abnormal identity, and the current version's activation process needs to be terminated.
[0139] When misalignment markers, abnormal addition markers, or missing records still exist after a migration, the current database transaction should be rolled back. For misalignment and abnormal addition markers, the primary key of the downstream record, the current formal reference, the primary key of the candidate source data, the milestone stability indicator, and the primary key of the candidate target data can be recorded for subsequent troubleshooting.
[0140] When no data anomalies are found, but new markers are added during the approval period, the current database transaction is rolled back, and the target draft milestone version is set to a "re-baseline" state. The "re-baseline" state means that the data boundaries of the current effective version have changed since the original candidate state was formed. It is necessary to re-acquire the current effective milestone version and its downstream records, update the corresponding cross-version references, re-form the candidate state, and resubmit for approval. This rollback is not due to data errors, but rather to prevent new references not covered by the original approval from being directly included in the approved version.
[0141] Only after the migration is completed and re-verified, and there are no longer any missing records, misaligned markers, abnormal addition markers, or approval period addition markers, and the regenerated reference root fingerprint is consistent with the candidate reference root fingerprint, will a reference coverage result without missing or redundant references be generated for subsequent database transaction commit judgment.
[0142] Therefore, this implementation method uses the approval boundary to distinguish between downstream records that existed before the candidate state was formed and downstream records added during the approval period. It also combines the cross-version correspondence between the source data primary key, milestone stability identifier and target data primary key to perform one-time supplementary migration, abnormal rollback or re-baseline processing on different reference differences. At the same time, it uses the reference root fingerprint after the supplementary migration to verify whether the actual reference state has been restored to the candidate state solidified at the time of submission for approval, so that the reference coverage result and subsequent database transaction control form a complete closed loop.
[0143] like Figure 2 As shown, this interface demonstrates the multi-version consistency control process for clinical research milestones. The top of the interface displays the currently effective milestone version V3 and the target draft milestone version V4, along with the approval status, indicating that the target draft milestone version has not yet directly replaced the currently effective version. The middle of the interface displays the baseline consistency fingerprint, candidate consistency fingerprint, review consistency fingerprint, and post-effectiveness consistency fingerprint, corresponding to the initial state of the source version, the candidate state upon submission for approval, the review status of the source version after approval, and the actual effective state after version switching, respectively. The milestone list displays the main milestone data and their status in the target draft milestone version, enabling version changes to be maintained independently without affecting the normal use of the currently effective version. The bottom of the interface shows the consistency control process, including copying and generating the draft version, rebinding or updating project date records and payment milestone records, submitting for approval and generating candidate consistency fingerprints, and completing version switching and post-effectiveness consistency verification within a database transaction. This interface provides a clear view of how the invention continuously controls version replication, candidate state solidification, relationship migration, approval review, and final transaction submission under the condition of multiple milestone versions coexisting. This reduces the risk of data mismatch, missing references, and partial updates during version switching.
[0144] In the above embodiments, a method for controlling the consistency of multiple versions of clinical research milestones is provided. Correspondingly, this application also provides a control system for the consistency of multiple versions of clinical research milestones. Please refer to... Figure 2 This is a schematic diagram of an embodiment of a multi-version consistency control system for clinical research milestones according to this application. Since this embodiment, namely the second embodiment, is basically similar to the method embodiment, it is described simply; relevant details can be found in the description of the method embodiment. The system embodiment described below is merely illustrative.
[0145] The second embodiment of this application provides a multi-version consistency control system for clinical research milestones, including: The acquisition unit 301 is used to acquire the currently effective milestone version, project date record, and payment milestone record. It generates a baseline consistency fingerprint based on the primary key of the milestone details, the formal data fields, and the milestone reference relationships between the project date record and the payment milestone record. Candidate consistency fingerprints, review consistency fingerprints, and post-effectiveness consistency fingerprints are all generated according to the same scope and rules. The creation unit 302, in response to a milestone change request, copies the currently effective milestone version to generate a target draft milestone version when there are no pending versions in the submission or approval status. This ensures that the corresponding milestone details maintain the same milestone stability identifier and obtains the target data primary key, establishing a cross-version mapping between the source data primary key, the milestone stability identifier, and the target data primary key. The writing unit 303 is used to write the changed data to the temporary... The system adjusts data fields in a timely manner, rebinds the affected project date records and payment milestone records to the target data primary key using cross-version mapping, and recalculates the affected project date records. A candidate consistency fingerprint is generated upon submission for approval. Generation unit 304, after approval, locks the currently effective milestone version within the same database transaction, generates a review consistency fingerprint, and verifies the unique correspondence between the target data primary key and the milestone stability identifier. When the review consistency fingerprint matches the baseline consistency fingerprint and passes verification, the system migrates the temporarily adjusted data fields, switches the currently effective milestone version, and updates the project date records and payment milestone records according to the rebinding and recalculation results. Submission unit 305 generates a post-effective consistency fingerprint and submits the database transaction when it matches the candidate consistency fingerprint; otherwise, it rolls back.
[0146] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A method for controlling the consistency of multiple versions of clinical research milestones, characterized in that, include: Retrieve the currently effective milestone version, project date record, and payment milestone record. Generate a baseline consistency fingerprint based on the primary key of the milestone details, the formal data fields, and the milestone reference relationship between the project date record and the payment milestone record. Candidate consistency fingerprints, review consistency fingerprints, and post-effective consistency fingerprints are all generated according to the same scope and rules. In response to a milestone change request, if there are no pending versions in the submission or approval status, the currently effective milestone version is copied to generate a target draft milestone version, ensuring that the corresponding milestone details maintain the same milestone stability identifier and obtain the target data primary key, and establishing a cross-version mapping of the source data primary key, milestone stability identifier, and target data primary key. Write the changed data into a temporary adjustment data field, use cross-version mapping to rebind the affected project date records and payment milestone records to the target data primary key, recalculate the affected project date records, and generate a candidate consistency fingerprint when submitting for approval. After approval, the current effective milestone version is locked in the same database transaction, a review consistency fingerprint is generated, and the target data primary key is verified to uniquely correspond to the milestone stability identifier. When the review consistency fingerprint is consistent with the baseline consistency fingerprint and the verification is passed, the temporary data fields are migrated, the current effective milestone version is switched, and the project date record and payment milestone record are updated according to the rebinding and recalculation results. Generate a consistent fingerprint after it takes effect. Commit the database transaction if it matches the candidate consistent fingerprint; otherwise, roll back.
2. The method for controlling the consistency of multiple versions of clinical research milestones according to claim 1, characterized in that, The process involves writing changed data into a temporary adjustment data field, rebinding affected project date records and payment milestone records to the target data primary key using cross-version mapping, recalculating affected project date records, and generating candidate consistency fingerprints upon submission for approval. This includes: Write the changed data into the temporary adjustment data field, and record the field identifiers and candidate values that have changed according to the milestone stability identifiers to form a set of change descriptions; Based on cross-version mapping, the project date records and payment milestone records referencing the source data primary key are converted into referencing the target data primary key, generating a candidate binding set containing the downstream record primary key, milestone stability identifier, and target data primary key; Starting with the milestone stability identifier in the change description set, the project date record that needs to be recalculated is determined step by step by generating dependencies along the pre-stored data of the project date record. Candidate project dates are generated using candidate values, and the milestone stability identifiers on which each candidate project date depends are recorded to form a candidate dependency set. Using milestone stability identifiers as common keys, the candidate binding set and candidate dependency set are paired and verified, and submission for approval is blocked when there are incompatible reference relationships or dependencies. When the pairing verification passes, the candidate field values, candidate binding sets, candidate project dates and their corresponding candidate dependency sets are included in the candidate state, and a candidate consistency fingerprint is generated.
3. The method for controlling the consistency of multiple versions of clinical research milestones according to claim 1, characterized in that, The process of generating a consistent fingerprint after it takes effect, and then committing the database transaction if it matches the candidate consistent fingerprint, otherwise rolling back, includes: Using the milestone stability identifier as an index, a milestone node fingerprint is generated for the target data primary key and formal data fields of each milestone detail in the new currently effective milestone version, forming a node fingerprint table; Read the updated project date record and payment milestone record, reverse the determination of the milestone stability identifier based on its target data primary key, and combine the downstream record primary key, target data primary key and corresponding milestone node fingerprint to generate a reference proof record, forming a reference proof set; Based on the set of downstream records that should reference each milestone stability identifier in the candidate status that is fixed at the time of submission for approval, compare them with the actual set of downstream records in the reference proof set to generate a reference coverage result that includes missing references and redundant references; The node fingerprint table and the reference proof set are processed in a determined order to generate the content root fingerprint and the reference root fingerprint, and the candidate content root fingerprint and the candidate reference root fingerprint generated and saved in the same way when submitting for approval are read. The database transaction is committed when the content root fingerprint matches the candidate content root fingerprint, the reference root fingerprint matches the candidate reference root fingerprint, and the reference coverage result has no missing or redundant references; otherwise, the database transaction is rolled back.
4. The method for controlling the consistency of multiple versions of clinical research milestones according to claim 1, characterized in that, In response to a milestone change request, if there are no pending versions in the submission or approval status, the currently effective milestone version is copied to generate a target draft milestone version. This ensures that the corresponding milestone details maintain the same milestone stability identifier and obtains the target data primary key. A cross-version mapping of the source data primary key, milestone stability identifier, and target data primary key is established, including: Extract the primary keys of all project date records, payment milestone records, and reference types corresponding to the primary key of each source data, and combine them with the corresponding milestone stability identifiers to form a full source reference list; Copy the milestone details and obtain the target data primary key. For each downstream record in the full source reference list, create a target reference shadow record that is separate from the formal reference field. Write the corresponding target data primary key and milestone stability identifier into the target reference shadow record. The full list of source references and the target reference shadow record are associated with the same downstream record primary key and reference type to form a cross-version mapping base, wherein the source data primary key continues to serve as the formal reference of the current effective version, and the target data primary key is only stored in the target reference shadow record; Verify that each reference item in the full source reference list has a unique target reference shadow record, and that the primary key and reference type of the same downstream record do not correspond to different milestone stability identifiers; After verification, the cross-version mapping base is associated with and saved with the target draft milestone version. This is used to read the target reference shadow record in the subsequent change writing phase and as input to rebind the project date record and payment milestone record to the target data primary key.
5. The method for controlling the consistency of multiple versions of clinical research milestones according to claim 2, characterized in that, The process of using milestone stability identifiers as common keys to perform pairing verification between candidate binding sets and candidate dependency sets, and preventing submission for approval when there are incompatible reference or dependency relationships, includes: Using the date records of each candidate project as the root node, expand backward along the candidate dependency set to the milestone stability identifier, and record the dependency field identifier and level of each dependency edge to form a logical dependency topology; Based on the cross-version mapping, the milestone stability identifiers in the logical dependency topology are replaced one by one with the corresponding target data primary keys, and the downstream record primary keys corresponding to each target data primary key are obtained from the candidate binding set to form the physical binding topology; By comparing the node levels, number of branches, dependency field identifiers, milestone stability identifiers, and the correspondence between the logical dependency topology and the physical binding topology with the target data primary key, based on the same root node, the topology pairing results are obtained. When the topology pairing is successful, only the candidate field values corresponding to the primary key of the target data in the physical binding topology are read, and the project date calculation is re-executed according to the dependency hierarchy of the physical binding topology to obtain the replay project date and the stable identifier sequence of milestones actually involved in the calculation. The replay project date and milestone stability identifier sequence are compared with the candidate project date and milestone stability identifier sequence in the logical dependency topology, respectively. If any of them are inconsistent, the submission for approval is blocked. If they are consistent, the pairing verification is deemed successful.
6. The method for controlling the consistency of multiple versions of clinical research milestones according to claim 3, characterized in that, The process of comparing the set of downstream records that should reference each milestone stability identifier in the candidate status fixed at the time of submission for approval with the actual set of downstream records in the reference proof set to generate a reference coverage result containing missing and redundant references includes: When submitting for approval, record the maximum creation sequence number of the project date record and the payment milestone record as the approval boundary, and save the primary key of the downstream record, the primary key of the source data, the milestone stability identifier and the primary key of the target data corresponding to each reference relationship; The actual downstream record set is matched with the saved reference relationships to obtain missing records and new records; Read the formal reference of the missing record. If it still points to the source data primary key and the source data primary key uniquely corresponds to the target data primary key through the milestone stable identifier, generate a migration instruction; otherwise, generate a misalignment mark. Read the creation sequence number and formal reference of the newly added record. If the creation sequence number is greater than the corresponding approval boundary and the formal reference can uniquely determine the target data primary key through cross-version mapping, generate an approval period addition mark; otherwise, generate an abnormal addition mark. Execute the migration instruction in the current database transaction and regenerate the reference proof set. If there are still missing records, misaligned markers, or abnormally added markers after re-comparison, roll back. If there are newly added markers during the approval period, roll back and set the target draft milestone version to the state that needs to be re-baselined. Otherwise, generate a reference coverage result with no missing or redundant references.
7. A multi-version consistency control system for clinical research milestones, characterized in that, include: The acquisition unit is used to acquire the currently effective milestone version, project date record, and payment milestone record. It generates a baseline consistency fingerprint based on the primary key of the milestone details, the formal data fields, and the milestone reference relationship between the project date record and the payment milestone record. The candidate consistency fingerprint, the review consistency fingerprint, and the post-effective consistency fingerprint are all generated according to the same range and rules. Establish a unit to respond to milestone change requests, and when there are no pending versions in the submission or approval status, copy the currently effective milestone version to generate a target draft milestone version, so that the corresponding milestone details maintain the same milestone stability identifier and obtain the target data primary key, and establish a cross-version mapping of source data primary key, milestone stability identifier and target data primary key; The write unit is used to write changed data to a temporary adjustment data field, rebind the affected project date records and payment milestone records to the target data primary key using cross-version mapping, recalculate the affected project date records, and generate a candidate consistency fingerprint when submitting for approval. The generation unit is used to lock the current effective milestone version in the same database transaction after approval, generate a review consistency fingerprint and verify that the target data primary key and the milestone stability identifier are uniquely matched; when the review consistency fingerprint is consistent with the baseline consistency fingerprint and the verification is passed, the temporary data fields are migrated, the current effective milestone version is switched, and the project date record and payment milestone record are updated according to the rebinding and recalculation results. The commit unit is used to generate a consistent fingerprint after it takes effect. It commits the database transaction when the fingerprint matches the candidate consistent fingerprint, otherwise it rolls back.
