Method and apparatus for verifying inference process based on deployment change metadata

By mapping nodes and verifying contracts based on deployment change metadata, reorganizing runtime events into logical location windows, and utilizing random number protocols and verification rules, the problem of reliable verification after deployment changes in real-time interactive applications is solved, achieving an automated and rigorous verification process.

CN123070348APending Publication Date: 2026-11-10BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611576299.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-13
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies struggle to reliably verify the correctness of the inference process in real-time interactive applications after deployment changes, especially after changes such as node migration, multi-card splitting, and streaming chunking. Reasonable differences in output can easily be misjudged as failures, making it impossible to detect real faults such as data loss or out-of-order delivery.

Method used

By acquiring deployment change metadata of the reference inference pipeline and candidate inference pipeline of the real-time interactive application, a node mapping is established and a node-level verification contract is generated. The runtime events are reorganized into logical location windows, and consistency is verified using a random number derivation protocol. Verification is performed according to the verification conditions and comparison methods, and the verification status is output.

Benefits of technology

It enables automated verification of reasoning processes that are independent of physical deployment form and have reliable evidence, ensuring the quality assurance of deployment changes, preventing physical implementation differences from being misjudged as inequivalence, blocking false equivalence evidence, and providing verifiable quality assurance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070348A_ABST
    Figure CN123070348A_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for verifying the inference process based on deployment change metadata, belonging to the field of inference process verification technology. The method includes: acquiring a reference inference pipeline, candidate inference pipelines, and deployment change metadata; establishing node mappings based on the metadata to obtain mapped node groups, and generating node-level verification contracts containing normalization rules, verification conditions, and comparison methods; collecting runtime events carrying pairing identification information and reorganizing them into logical position windows to complete pairing; for mapped node groups containing random operations, first verifying the random number derivation protocol with a fixed test vector; if successful, deriving a deterministic random subflow to perform pairing; if unsuccessful, prohibiting pairing and invalidating the evidence; then performing constraint verification and comparison verification, outputting a pass, fail, or indeterminate state. The inference process verification method and apparatus based on deployment change metadata provided in this application can provide verifiable quality assurance for deployment changes in real-time interactive applications.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of inference process verification, and more particularly relates to an inference process verification method and device based on deployment change metadata. BACKGROUND

[0002] Real-time interactive applications such as voice interaction and digital people generally use an inference pipeline composed of cascaded models such as speech recognition, language models, speech synthesis and video generation, and run on a graphics processing unit (GPU) computing cluster. In order to reduce latency and improve throughput, deployment changes such as node migration, multi-card splitting and streaming block are required. However, such changes will change the physical block boundary, arrival order and random number consumption mode of the data, so that the output after the change has reasonable differences: element-by-element comparison is easy to misjudge reasonable differences as change failures, and only comparing the final semantics cannot find real faults such as data loss and out-of-order, so it is difficult to reliably verify whether the inference process after the change is correct. Therefore, how to reliably verify the inference process before and after the deployment change and provide verifiable quality assurance for the deployment change of real-time interactive applications has become a problem to be solved. SUMMARY

[0003] The purpose of the present application is to provide an inference process verification method and device based on deployment change metadata, which can provide verifiable quality assurance for the deployment change of real-time interactive applications.

[0004] The first aspect of the embodiment of the present application provides an inference process verification method based on deployment change metadata, comprising: obtaining a reference inference pipeline of a real-time interactive application, a candidate inference pipeline obtained by performing a deployment change on the reference inference pipeline, and deployment change metadata representing nodes affected by the deployment change and change content; establishing a mapping relationship between reference nodes of the reference inference pipeline and candidate nodes of the candidate inference pipeline based on the deployment change metadata, obtaining a mapping node group, and generating a node-level verification contract for each mapping node group, the node-level verification contract representing a normalization rule, a verification condition and a comparison method; collecting running events of the reference inference pipeline and the candidate inference pipeline, the running events carrying paired identification information representing the belonging request, node and logical position; reorganizing the running events with different physical splitting modes or arrival orders into respective logical position windows of the reference inference pipeline and the candidate inference pipeline according to the normalization rule, and pairing the logical position windows of the reference inference pipeline and the candidate inference pipeline based on the paired identification information; For a mapping node group containing random operations, a consistency check is performed on the random number derivation protocol based on a fixed test vector. If the check passes, a deterministic random subflow is derived for paired execution of the reference inference pipeline and the candidate inference pipeline. If the check fails, mapping node group pairing is prohibited, and the comparison evidence of the corresponding execution event is invalidated. For logical position windows that have completed pairing and whose comparison evidence has not been invalidated, perform constraint verification based on the verification conditions, perform comparison verification based on the comparison method, and output one of the three verification states: pass, fail, or cannot be determined.

[0005] A second aspect of this application provides an inference process verification apparatus based on deployment change metadata, comprising: The acquisition module is used to acquire the reference inference pipeline of the real-time interactive application, the candidate inference pipeline obtained by performing deployment changes on the reference inference pipeline, and the deployment change metadata representing the nodes affected by the deployment changes and the changed content. The contract generation module is used to establish a mapping relationship between the reference nodes of the reference inference pipeline and the candidate nodes of the candidate inference pipeline based on the deployment change metadata, obtain the mapping node group, and generate a node-level verification contract for each mapping node group. The node-level verification contract represents the normalization rules, verification conditions and comparison methods. The reassembly and pairing module is used to collect runtime events from the reference inference pipeline and the candidate inference pipeline. The runtime events carry pairing identification information that represents the request, node, and logical position of the pipeline. According to the normalization rules, the runtime events with different physical segmentation methods or arrival orders are reassembled into logical position windows for the reference inference pipeline and the candidate inference pipeline, respectively. The logical position windows of the reference inference pipeline are paired with the logical position windows of the candidate inference pipeline based on the pairing identification information. The random verification module is used to perform consistency verification on the random number derivation protocol based on a fixed test vector of the random number derivation protocol for mapping node groups containing random operations. When the verification passes, a deterministic random subflow is derived for paired execution of the reference inference pipeline and the candidate inference pipeline. When the verification fails, mapping node group pairing is prohibited and the comparison evidence of the corresponding execution event is invalidated. The first verification module is used to perform constraint verification based on the verification conditions and comparison verification based on the comparison method for logical position windows that have completed pairing and whose comparison evidence has not been set to invalid. It outputs one of three verification states: pass, fail, and cannot be determined.

[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described inference process verification method based on deployment change metadata.

[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described inference process verification method based on deployment change metadata.

[0008] The beneficial effects of the reasoning process verification method and apparatus based on deployment change metadata provided in this application are as follows: This application embodiment establishes node mapping and generates node-level verification contracts based on deployment change metadata, ensuring that verification rules directly correspond to deployment change content. It reorganizes physical blocks or runtime events with different arrival orders into logical location windows and completes pairing according to normalization rules, eliminating physical implementation differences before comparison and preventing misjudgment of block and scheduling differences as inequalities. For mapped node groups containing random operations, a fixed test vector is used to verify the random number derivation protocol before pairing. Only if it passes is a deterministic random subflow derived; otherwise, pairing is prohibited and comparison evidence is invalidated, preventing false equivalence evidence from entering the conclusion. Then, constraint verification and comparison verification are performed according to the verification conditions and comparison method, outputting one of three verification states, ensuring that insufficient evidence is presented independently rather than being forcibly binarized. In summary, this application embodiment achieves automated verification of the reasoning process that is independent of physical deployment form, has reliable evidence, and rigorous conclusions, providing verifiable quality assurance for deployment changes in real-time interactive applications. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A flowchart illustrating a method for verifying the inference process based on deployment change metadata, provided in an embodiment of this application; Figure 2 This is a schematic diagram of a multi-layered verification hierarchy provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the logical location alignment and minimal difference positioning in the sense of inclusion of streaming data provided in an embodiment of this application; Figure 4A structural block diagram of an inference process verification device based on deployment change metadata provided in an embodiment of this application; Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0011] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0013] Before providing a detailed description of this embodiment, the key technical terms involved in this claim will be explained.

[0014] A reference inference pipeline refers to the deployment form of the inference program that serves as the benchmark for technical behavior. It can be a serially executed version running on a single GPU or a validated existing deployment version. This embodiment uses a real-time digital human interaction service provided by a cloud platform as an example. The reference inference pipeline of this service sequentially executes speech recognition, language model inference, speech synthesis, and lip-sync video generation on a single GPU. A candidate inference pipeline refers to a deployment form to be validated obtained by performing deployment changes on the reference inference pipeline. Examples include splitting speech synthesis and video generation onto different GPUs, dividing the audio data block from 1024 sampling points into 256 sampling points, and adjusting the computational precision from FP32 to FP16.

[0015] Deployment changes refer to execution configuration adjustments that do not alter the semantics of the inference pipeline's functionality. These include node migration, multi-GPU splitting, pipeline parallelism, streaming chunking, precision transformation, compute kernel replacement, and dynamic batch processing. Deployment change types refer to the classification identifiers of each change in the deployment change metadata, such as node migration, multi-GPU splitting, streaming chunking, precision transformation, compute kernel replacement, parallel reduction, asynchronous transmission, and state transition. Deployment change metadata is structured data recording these changes. For example, it may record the change identifier, affected node range, change type, parameter values ​​before and after the change, and dependencies between changes in the form of a structured document.

[0016] Reference nodes and candidate nodes are computational units in the computation graphs of the reference inference pipeline and the candidate inference pipeline, respectively. The same-origin program region identifier is the basis for determining whether a reference node and a candidate node are of the same origin, and it represents the operator type and input / output range of the node. The mapping node group is a set of nodes consisting of corresponding reference nodes and candidate nodes established based on the deployment change metadata. The node mapping type refers to the cardinality type of the mapping relationship between reference nodes and candidate nodes, including one-to-one, one-to-many, and many-to-one. For example, a speech synthesis node on the reference side and two speech synthesis sub-nodes split from the candidate side constitute a one-to-many mapping node group.

[0017] A node-level verification contract is a set of executable verification rules generated for each mapping node group. It includes at least three parts: normalization rules, verification conditions, and comparison methods. The normalization rules specify how to normalize running data to the same logical location regardless of the physical segmentation method, and how to convert the output data on both sides to a preset unified comparison precision when the mapping node group involves precision transformation. The physical segmentation method refers to the boundaries and lengths of the data blocks into which the data is physically segmented during execution, such as segmenting an audio data block from 1024 sampling points into 256 sampling points. The arrival order refers to the order in which running events are collected. The logical location refers to the location identifier generated by the versioned rules, which is independent of how the data is physically segmented and arrived at. For example, audio data uses a left-closed, right-open interval composed of sampling point indices at a 16kHz sampling rate, video data uses a display timestamp, and text data uses a token sequence number. The verification condition refers to the hard conditions that must be strictly met, otherwise the data will be judged as failed. For example, the data shape must be consistent and the state version must be monotonically increasing. For mapping node groups involving precision transformation, the verification condition does not include the requirement for data type consistency. Data type differences are handled by the unified comparison precision conversion in the normalization rules. The comparison method refers to the quantization comparison method that allows for certain differences, such as normalized relative error or distribution distance.

[0018] Run events are data records collected at various nodes during pipeline operation. They carry paired identification information, which represents the request, node, and logical location to which the run event belongs, such as a triple consisting of a request identifier, a canonical node identifier, and a logical location range.

[0019] A logical location window is a data unit identified by a logical location after the runtime events are reorganized according to normalization rules.

[0020] Pairing refers to establishing a correspondence between the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline based on the pairing identification information; paired execution refers to the reference inference pipeline and the candidate inference pipeline actually performing operations on the paired logical position windows using the same deterministic random subflow. A random number derivation protocol is a set of rules for nodes to derive random numbers, including random operations. A fixed test vector is the preset input and expected output of the protocol, used to verify the consistency of implementations by both parties. A deterministic random substream is a sequence of random numbers derived according to the protocol that can be reproduced by both parties. A counter-type pseudo-random number generator is a generator that takes a key and a base counter as input, outputs blocks of random numbers, and uses parallel output positions within a single random number block as output channels. For example, a Philox4x32-10 generator uses this as an example. The number of output channels refers to the number of parallel output channels within a single random number block. The key is the generator's input key, the base counter is the generator's initial counter value, the random number block is a deterministic pseudo-random number sequence output by the generator in one operation, and the output channels are the parallel output positions within the random number block. The sample number refers to the number of samples within a logical position window. Comparative evidence refers to the basis for comparison formed based on runtime events to support conclusions of equivalence.

[0021] Constraint verification is verification based on verification conditions, comparison verification is verification based on comparison methods, and verification status includes three types: pass, fail, and cannot be determined.

[0022] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for verifying the inference process based on deployment change metadata, provided in one embodiment of this application. This method can be executed by an electronic device. The following description, using a multi-GPU deployment scenario of a real-time digital human interaction service, illustrates the method steps of this embodiment. The method may include: S101: Obtain the reference inference pipeline of the real-time interactive application, the candidate inference pipeline obtained by performing deployment changes on the reference inference pipeline, and the deployment change metadata representing the nodes affected by the deployment changes and the changed content.

[0023] In this embodiment, deployment change metadata is synchronously generated and written to the configuration storage by the deployment optimization component in the cluster when deployment changes are executed, and the verification controller pulls it from the configuration storage according to the version number.

[0024] For example, the metadata records three changes: the first is migrating the speech synthesis node from GPU0 to GPU1; the second is changing the audio data block length from 1024 sampling points to 256 sampling points; and the third is adjusting the computational precision of the language model inference from FP32 to FP16. Each change records the affected node range, the parameters before and after the change, and the dependencies on other changes. The verification controller simultaneously obtains computation graph descriptions of two pipelines (i.e., the reference inference pipeline and the candidate inference pipeline), including node names, operator types, input / output signatures, and connections between nodes.

[0025] S102: Based on the deployment change metadata, establish the mapping relationship between the reference nodes of the reference inference pipeline and the candidate nodes of the candidate inference pipeline to obtain the mapping node group, and generate a node-level verification contract for each mapping node group. The node-level verification contract represents the normalization rules, verification conditions and comparison methods.

[0026] In this embodiment, the verification controller parses the deployment change metadata and establishes mappings based on the node mapping type indicated by the metadata and the source program region identifier of each node (i.e., the combination of operator type and input / output range): speech recognition nodes and language model nodes have a one-to-one mapping; one speech synthesis node on the reference side corresponds to two child nodes obtained from the splitting of the candidate side, forming a one-to-many mapping node group. Subsequently, a node-level verification contract is generated for each mapping node group. The normalization rules, verification conditions, and comparison methods in the contract are configured according to the change characteristics involved in the node and are fixed along with the contract version number.

[0027] In one embodiment of this application, a mapping relationship is established between reference nodes of the reference inference pipeline and candidate nodes of the candidate inference pipeline based on deployment change metadata, resulting in a mapping node group, and a node-level verification contract is generated for each mapping node group, including: Based on the node mapping type indicated by the deployment change metadata and the same-source program region identifier of each node, establish the mapping relationship between the reference node and the candidate node to obtain the mapping node group. The same-source program region identifier represents the operator type and input / output range of the node. Based on the deployment change type indicated by the deployment change metadata, determine the nondeterministic category corresponding to each mapping node group. The nondeterministic category includes at least one of numerical nondeterminism, random nondeterminism, scheduling nondeterminism, and state nondeterminism. Based on the nondeterministic category, the normalization rules, verification conditions, and comparison methods corresponding to each mapping node group are determined, and node-level verification contracts are generated based on the normalization rules, verification conditions, and comparison methods.

[0028] In this embodiment, the nondeterministic category refers to the category in which deployment changes introduce differences in the running results, including numerical nondeterminism caused by changes in floating-point reduction order or computational precision, random nondeterminism caused by changes in random number consumption method, scheduling nondeterminism caused by changes in data block boundaries or arrival order, and state nondeterminism caused by changes in persistent state layout; the verification controller determines the nondeterministic category of each mapping node group one by one according to the correspondence between the deployment change type and the above categories.

[0029] In this embodiment, the verification controller maintains a version-frozen rule chain mapping table, which sequentially records the correspondence between deployment change types, nondeterministic categories, verification conditions, and comparison methods. When generating a node-level verification contract, this table is used for retrieval and execution. Specifically, for precision transformations (e.g., changing from FP32 to FP16) and parallel reduction changes, they are determined to be numerically nondeterministic. The verification condition is set to ensure that the shape and logical position of the output tensor are completely consistent. The normalization rule also includes raising the output data of the reference side and the candidate side to a preset unified comparison precision (e.g., the higher of FP64 or FP32). The comparison method uses the 95th percentile of the normalized relative error calculated under the unified comparison precision. The threshold is set to 1e-2, which is determined based on the hardware specifications of the target precision and after statistically analyzing the error distribution of one hundred known equivalent samples in a pre-experiment. For sampling and diffusion changes, they are determined to be random. For nondeterministic changes, the verification condition is set as passing the consistency check of the random number derivation protocol. The comparison method is set as a sample-by-sample comparison based on deterministic random substreams, downgrading to distributed comparison when pairing is not possible. For changes such as streaming block and asynchronous transmission, which are determined to be scheduling nondeterministic, the verification condition is set as the logical position window being complete, without overlapping conflicts, and without missing values ​​exceeding the lateness limit. The comparison method uses the cosine similarity of the output features, with a threshold of 0.98 set based on business acceptance experience. For changes such as state transition and cache layout, which are determined to be state nondeterministic, the verification condition is set as the state version monotonically increasing, and the state's effective length and write interval being consistent with the reference side. The generated contract, along with its version number, is bound and stored with the mapping node group. Subsequent verifications are all called according to the version number to ensure consistency in the recalculation caliber.

[0030] As can be seen from the above, this embodiment determines the nondeterministic category according to the change type and configures the normalization rules, verification conditions and comparison methods accordingly, so that the verification strength is precisely matched with the risk introduced by the change, avoiding the misjudgment of reasonable differences as deployment failure by element-by-element bit-level comparison; after the rule chain is frozen by version, the recalculation caliber of the same change remains consistent at any time, and the addition of a new change type only requires expanding the rules in the mapping table without modifying the verification process, which reduces the verification configuration cost and error probability under multi-type mixed deployment changes.

[0031] S103: Collect runtime events of the reference inference pipeline and candidate inference pipeline. The runtime events carry pairing identification information representing the request, node and logical position of the pipeline. According to the normalization rules, the runtime events with different physical segmentation methods or arrival orders are reorganized into logical position windows of the reference inference pipeline and candidate inference pipeline respectively. The logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline are paired based on the pairing identification information.

[0032] In this embodiment, event acquisition is achieved by injecting lightweight probes into the operator scheduling hook of the inference framework. Each running event records at least the request identifier (e.g., R-0001), the canonical node identifier, the logical location range, and the output data digest, and reports to the verification controller via the message bus within the node. During reassembly, the physical segmentation methods of the reference side and the candidate side are different. The physical data blocks [0,640), [640,1280) of the reference side and the physical data blocks [0,320), [320,960), [960,1280) of the candidate side are uniformly segmented and assigned to logical position windows W0=[0,320), W1=[320,640), W2=[640,960), W3=[960,1280) with a width of 320 sampling points. The difference in physical segmentation methods is thus eliminated. Then, using the pairing identification information as the key, the windows belonging to the same request, the same node, and the same logical position interval in the two pipelines are associated as sample pairs, that is, the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline are paired.

[0033] Please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the logical alignment and minimal difference positioning of streaming data in a sense, as provided in an embodiment of this application. Figure 3As shown in the upper part, the audio data of the reference inference pipeline is divided into physical data blocks [0, 640) and [640, 1280) with 640 sampling points. The candidate inference pipeline is divided into physical data blocks [0, 320), [320, 960), and [960, 1280) with 320 sampling points due to streaming block partitioning. The block boundaries and block lengths on both sides are different. During reassembly, physical data blocks that fall completely within a certain logical position window are directly assigned to that logical position window. For physical data blocks that span more than two logical position windows, ... The physical data blocks are sliced ​​according to their intersection with each logical location window and then assigned to the corresponding logical location windows. For example, the physical data block [320, 960) of the candidate inference pipeline intersects with logical location windows W1=[320, 640) and W2=[640, 960), and is therefore sliced ​​into [320, 640) and [640, 960) and assigned to W1 and W2 respectively. Similarly, the physical data block [0, 640) of the reference inference pipeline spans W0 and W1, and is similarly sliced ​​and assigned to W0 and W1 respectively.

[0034] S104: For a mapping node group containing random operations, perform a consistency check on the random number derivation protocol based on a fixed test vector of the random number derivation protocol; if the check passes, derive a deterministic random subflow for paired execution of the reference inference pipeline and the candidate inference pipeline; if the check fails, prohibit the pairing of mapping node groups and invalidate the comparison evidence of the corresponding execution events.

[0035] In this embodiment, the language model sampling nodes and diffusion-type video generation nodes belong to a mapping node group containing random operations. Before performing the pairing run, the verification controller requires both sides to independently recalculate the random number derivation protocol with a preset input specified by a fixed test vector, and compare the recalculation results with the expected output field by field; if all fields are consistent, the verification passes, and both sides derive the same deterministic random substream according to the protocol and perform the pairing run accordingly; if any field is inconsistent, the verification fails, and the mapping node group is prohibited from pairing under the current protocol version. The sample-by-sample comparison evidence of the corresponding run events collected previously and subsequently is invalidated to prevent unreliable random implementations from producing false equivalent conclusions.

[0036] In one embodiment of this application, deriving a deterministic random subflow for paired execution of a reference inference pipeline and a candidate inference pipeline includes: According to the field serialization rules specified in the node-level verification contract, the fields representing the logical location window and sample sequence number of the running event are serialized to obtain metadata messages; The metadata message is digested based on a preset seed to obtain digest data; The first and second non-overlapping fields in the summary data are mapped to the key and basic counter of a counter-type pseudo-random number generator, respectively. The counter-type pseudo-random number generator is characterized by taking the key and basic counter as input and outputting random number blocks, with the parallel output positions in a single random number block being the output channels. In the tensors processed by the paired runs of the reference inference pipeline and the candidate inference pipeline, the base counter is advanced according to the integer quotient of the linear index of the tensor elements and the number of output channels. With the key and the advanced base counter as input, a random number block is generated by a counter-type pseudo-random number generator. The output channel is selected from the random number block according to the remainder of the linear index and the number of output channels to obtain a deterministic random subflow.

[0037] In this embodiment, the field serialization rule refers to a unified encoding convention for converting fields involved in the derivation into byte strings; the metadata message is a byte string concatenated according to this rule; the preset seed is a fixed parameter used to derive random numbers, which is frozen with the contract version; the digest data is a byte string obtained after performing a digest calculation on the metadata message; the digest calculation is the process of calculating a cryptographic digest of the metadata message; and the linear index is the sequence number of the multidimensional tensor elements after being expanded in row-major order.

[0038] In this embodiment, the field serialization rules are as follows: the protocol version number occupies 1 byte; string fields are encoded in UTF-8 and prefixed with a 4-byte big-endian length; integer fields are encoded in fixed-length 8-byte big-endian; each field is concatenated sequentially according to the fixed order specified in the contract to obtain the metadata message. The fields involved in the concatenation represent the logical position window and sample sequence number to which the running event belongs, such as request identifier, specification node identifier, logical position range, and sample sequence number. The digest calculation uses a 32-byte preset seed as the key to calculate HMAC-SHA-256 on the metadata message; an alternative method is to concatenate the seed with a 4-byte prefix with the metadata message and then calculate SHA-256. Both methods are configured with their own independent fixed test vectors. Field segment mapping rules: bytes 1 to 8 in the digest data are mapped to the generator key using two big-endian 32-bit words, bytes 9 to 24 are mapped to the base counter using four big-endian 32-bit words, and the first and second field segments do not overlap to avoid correlation. In this embodiment, the generator performs ten rounds of transformation. The counter increments from the least significant word to the most significant word using unsigned 128-bit integers. The number of output channels is 4. For a tensor element with a row-major linear index of j, the basic counter is advanced by the integer quotient of the linear index and the number of output channels (i.e., floor(j / 4)). A random number block is generated using the key and the advanced basic counter as input. Then, an output channel is selected from this random number block according to the remainder of the linear index and the number of output channels (i.e., jmod4) to obtain the random number for that element. All the above parameters are written into the contract version and cannot be changed by the implementation side. They are also recalculated and confirmed using a fixed test vector before paired operation.

[0039] As can be seen from the above, this embodiment binds the pairing context to the generator's key and basic counter through unified field serialization, digest calculation, and non-overlapping field mapping, so that the same logical sample can obtain completely consistent random numbers under any physical execution order. The random operation thus has cross-deployment per-sample pairability. The protocol parameters are frozen with the contract version and verified in advance by fixed test vectors. Implementations in different languages ​​and on different hardware can also reproduce the results bit by bit, fundamentally eliminating the interference of differences in random number implementation on equivalence verification.

[0040] S105: For logical position windows that have completed pairing and whose comparison evidence has not been set to invalid, perform constraint verification according to the verification conditions, perform comparison verification according to the comparison method, and output one of the three verification states: pass, fail, or cannot be determined.

[0041] In this embodiment, constraint verification verifies hard conditions such as logical location integrity and state version consistency. Comparison verification quantifies the degree of difference between the outputs of the two windows according to the comparison method specified in the contract. The verification controller outputs a pass, fail, or cannot be determined based on the combined results of the two types of verifications, where "cannot be determined" indicates that the current evidence is insufficient.

[0042] As can be seen from the above, this embodiment establishes node mapping and generates node-level verification contracts based on deployment change metadata, ensuring that verification rules directly correspond to the deployment change content. It reorganizes physical blocks or runtime events with different arrival orders into logical location windows and completes pairing according to normalization rules, eliminating physical implementation differences before comparison and preventing misjudgment of block and scheduling differences as inequalities. For mapped node groups containing random operations, a fixed test vector is used to verify the random number derivation protocol before pairing; only if it passes is a deterministic random subflow derived; otherwise, pairing is prohibited and comparison evidence is invalidated, preventing false equivalence evidence from entering the conclusion. Then, constraint verification and comparison verification are performed according to the verification conditions and comparison methods, outputting one of three verification states, ensuring that insufficient evidence is presented independently rather than being forcibly binarized. In summary, this embodiment achieves automated verification of the reasoning process that is independent of physical deployment form, has reliable evidence, and rigorous conclusions, providing verifiable quality assurance for deployment changes in real-time interactive applications.

[0043] Please refer to Figure 2 , Figure 2 This is a schematic diagram of a multi-layered verification hierarchy provided in an embodiment of this application. For example... Figure 2 As shown, in this embodiment, the verification of the inference process is divided into three levels from bottom to top: node level, subgraph level, and end-to-end level. The verification controller starts at the node level by default, first performing low-cost hard constraint verification, and then gradually increasing the verification level according to the evidence. Node-level verification is performed on the logical location window within the mapped node group, including structure and dependency verification, numerical verification, and state verification. Among them, structure and dependency verification checks whether the data dependencies, state dependencies, and output mappings between nodes are maintained; numerical verification checks whether the tensor shapes are consistent and whether the normalized relative error calculated by the tensor elements under uniform comparison precision exceeds the relative error threshold specified by the node-level verification contract; state verification checks whether the state version is monotonically increasing and whether the effective length of the state and the write interval are consistent with the reference inference pipeline. Subgraph-level verification is performed on subgraphs consisting of multiple mapping node groups, including subgraph semantic verification and distribution comparison. Subgraph semantic verification compares semantic results such as output probabilities, the top K-item set, embedding features, audio spectrum, video perceptual features, and application invariants. Distribution comparison measures the overall distribution difference between the reference sample set and the candidate sample set. End-to-end verification is performed on the entire inference pipeline, including end-to-end temporal verification and cross-modal synchronization verification. End-to-end temporal verification checks end-to-end operational metrics such as first output time, consecutive output interval, dropout rate, repetition rate, out-of-order rate, jitter, and backpressure duration. Cross-modal synchronization verification checks whether the time offset between operational events corresponding to different modal data exceeds an offset threshold under a unified media clock.

[0044] In one embodiment of this application, after invalidating the comparison evidence of the corresponding runtime event, the method further includes: When the node-level verification contract allows for distributed comparison and the number of valid samples reaches the minimum number of samples specified by the node-level verification contract, the reference sample set corresponding to the reference inference pipeline and the candidate sample set corresponding to the candidate inference pipeline are obtained respectively. Among them, the valid samples represent the samples that meet the sample validity conditions specified by the node-level verification contract. The same normalization process is performed on the reference sample set and the candidate sample set, and a measure of the distribution difference between the normalized reference sample set and the normalized candidate sample set is calculated. The verification status corresponding to the mapping node group is determined based on the distribution difference metric.

[0045] In this embodiment, distribution comparison refers to a verification method that statistically compares the overall distribution of two sample sets without establishing a one-to-one correspondence between samples; the reference sample set and the candidate sample set are sets of output samples generated by two pipelines at corresponding nodes for the same batch of inputs; the minimum number of samples is the minimum number of valid samples required to ensure the reliability of the statistical conclusions; normalization refers to the standardization transformation to eliminate the influence of dimensions; and the distribution difference measure is a statistical quantity that quantifies the difference in distribution between two sets.

[0046] In this embodiment, the triggering conditions for distributed alignment are: the random number derivation protocol consistency check fails, causing the sample-by-sample comparison evidence to be invalidated; or the mapping node group cannot establish a stable correspondence due to the random consumption of dependent data on both sides; and the node-level verification contract allows distributed alignment. The verification controller drives two pipelines to run based on the pre-registered replay request set, collecting output features at each observation point to form a reference sample set and a candidate sample set, respectively. The minimum sample size is set to 32, a value derived from the power analysis of the pre-experiment: under the constraints of a significance level of 0.05 and a power of 0.8, the required sample size is estimated to be approximately 32 based on the statistical analysis of historical equivalent deployments. Valid samples must meet the following validity conditions: window integrity, not invalidated due to verification failure, and collected from the same running batch.

[0047] In this embodiment, the normalization process uses z-score standardization, which transforms both sets using the mean and standard deviation of the reference sample set to eliminate the influence of dimensions. The distribution difference measure uses the maximum mean difference with a Gaussian kernel. The kernel width is the median distance between sample pairs within the reference set, a common rule in statistical practice; Wasserstein distance can also be used. The difference threshold is set to 0.15, determined by statistically analyzing the distribution difference measures of known equivalent deployments within the past thirty days and taking the 95th quantile. If the distribution difference measure is below the difference threshold, the validation status is considered passed; if it is not below the difference threshold, the validation status is considered failed; if the number of valid samples is insufficient, the validation status is considered undetermined and supplementary sampling is triggered.

[0048] As can be seen from the above, in the case of failure of consistency verification or natural incompatibility of node groups, the distribution comparison provides a controlled fallback for verification: the same normalization process is used to eliminate the influence of dimensions, the distribution difference measure is used to replace the sample-by-sample comparison, and the minimum number of samples determined by the power analysis is used to ensure statistical reliability. This ensures that the difference in random number implementation will not be misjudged as deployment failure, nor will the verification be forced to be abandoned due to the failure of sample-by-sample evidence. This improves the applicability of the scheme to heterogeneous random number implementation, and the conclusion has a clear statistical confidence basis.

[0049] In one embodiment of this application, for logical position windows where pairing is complete and comparison evidence is not invalidated, constraint verification is performed based on verification conditions, comparison verification is performed based on comparison method, and one of three verification states—pass, fail, and cannot be determined—is output, including: The system checks whether there are missing or overlapping logical positions covered by the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline, and obtains the results of constraint verification. The constraint verification includes at least the verification of the integrity of logical positions and the verification of overlapping conflicts. If the result of constraint verification indicates that any constraint verification has failed, the output "Fail" should be prioritized. If there is no constraint verification failure and the integrity determination cannot be completed due to a missing logical position before the expiration of the late waiting time specified in the node-level verification contract, the output is "cannot be determined". If a logical position is still missing after the late waiting period has expired, the integrity verification is determined to have failed, and an error is output. If all constraint verifications pass, perform comparison verification according to the comparison method. If the result of the comparison verification meets the conditions specified by the comparison method, output "pass"; if the result of the comparison verification does not meet the conditions specified by the comparison method, output "fail"; if the number of samples for comparison verification does not reach the minimum number of samples specified by the node-level verification contract, output "cannot be determined".

[0050] In one embodiment of this application, the method further includes: If the output cannot be determined, perform a supplementary sampling operation or upgrade the verification level, and re-execute constraint verification and comparison verification based on the supplementary collected runtime events, and re-output the verification status.

[0051] In this embodiment, overlapping conflict refers to the situation where multiple running events cover the same logical location and it is impossible to determine a unique valid data; state version is the version number that increments with each commit of the node's persistent state; commit sequence number is a monotonically increasing count assigned by the acquisition side when a running event is reported; content digest is a cryptographic digest of the event payload, such as SHA-256; late arrival waiting time is the time limit set for waiting for delayed data; integrity determination is the process of judging whether there are no missing logical locations covered by the window; supplementary sampling operation refers to the operation of appending collected samples; verification level refers to the level of verification granularity, such as node level, subgraph level, and end-to-end level.

[0052] In this embodiment, when multiple runtime events from retransmissions or multiple replicas are received in the same logical location window, the verification controller first compares the status versions; the one with the higher version is the valid event. If the status versions are the same, the submission sequence number is compared; the one with the larger sequence number is the valid event. If both are the same, the content digest is compared; if the digests are inconsistent, it is determined that there is an overlap conflict, which constitutes a constraint verification failure and is output as "not passing". The late waiting time is set to 150ms, which is determined by statistically analyzing the cross-GPU transmission latency distribution within the cluster over the past 7 days. Its 99th percentile value is 120ms, and a 25% margin is added to obtain 150ms. Under the premise that there are no other constraint verification failures, if the late waiting time has not yet expired and the integrity determination cannot be completed temporarily due to the missing logical location, it is output as "cannot be determined" and the system waits for data to arrive; if the missing data still exists after the expiration time, it is determined as an integrity verification failure and "not passing" is output. In response to an output that cannot be determined, the verification controller performs a supplementary sampling operation according to the contract, adding 32 playback requests each time to supplement the samples. This batch is aligned with the minimum number of samples required for distribution comparison. Alternatively, the verification level can be upgraded from the node level to the subgraph level or even the end-to-end level, for example, from tensor-by-tensor comparison to subgraph semantic feature comparison. The supplemented running events are re-reorganized, paired, constraint-verified, and comparison-verified, and the verification status is re-output to form a decision closed loop.

[0053] In this embodiment, the comparison verification quantifies the degree of difference between the outputs of the logical position windows on both sides according to the comparison method specified in the contract, and determines the verification status accordingly: when normalized relative error is used as the comparison method, if the 95th percentile value of the normalized relative error calculated under uniform comparison precision does not exceed the relative error threshold specified in the contract, the result of the comparison verification is determined to meet the conditions limited by the comparison method, and the output passes; if it exceeds the relative error threshold, the output fails. When cosine similarity is used as the comparison method, if the cosine similarity of the output features is not lower than the similarity threshold specified in the contract, the result of the comparison verification is determined to meet the conditions limited by the comparison method, and the output passes; if it is lower than the similarity threshold, the output fails. When distribution comparison is used as the comparison method, if the distribution difference measurement is lower than the difference threshold specified in the contract, the result of the comparison verification is determined to meet the conditions limited by the comparison method, and the output passes; if it is not lower than the difference threshold, the output fails. When the number of samples participating in the comparison does not reach the minimum number of samples specified in the contract, the output cannot be determined.

[0054] As can be seen from the above, the hierarchical arbitration of overlapping conflicts in this embodiment ensures that the valid data in retransmission and multiple copy scenarios is uniquely determined, and different digests under the same priority can immediately expose data corruption; the late waiting time is set according to the statistical quantile of transmission delay, so that the inability to determine only exists in the window period when the evidence is insufficient, and it becomes a definite conclusion after the window expires, and the verification period is bounded; the supplementary sampling and hierarchical upgrading form a closed loop, and when the evidence is insufficient, the samples are automatically supplemented or the granularity is upgraded according to the contract, which avoids infinite waiting and avoids the forced binarization of insufficient evidence, thereby improving the rigor and engineering usability of the verification conclusion.

[0055] In one embodiment of this application, in response to an output failure, the method further includes: The criteria that trigger failure are identified as failed predicates, and the failure source node and output observation point corresponding to the failed predicate are identified as non-deletable anchor points. The failure source node represents the first node that generates an unequal observation, and the output observation point represents the observation position where the failed predicate is triggered. The evidence environment is fixed, which includes the version of the node-level verification contract, input snapshots, and state snapshots. Construct a candidate subgraph that preserves the dependency path between the failure source node and the output observation point. The candidate subgraph is a portion of the nodes and edges extracted from the computation graph of the candidate inference pipeline. The dependency path includes at least one of the data dependency path, state dependency path and transmission path. In a predetermined deterministic order, nodes or edges other than anchor points in the candidate subgraph are attempted to be deleted sequentially. If the dependent path is still retained after deletion, and the failure predicate is still valid in the evidence environment based on the new observation obtained by re-execution on the candidate subgraph after deletion, the deletion is confirmed, and the step of attempting deletion sequentially is returned based on the candidate subgraph after deletion. Until the deletion of any node or edge other than any remaining anchor point cannot simultaneously satisfy the conditions of preserving dependent paths and the failure predicate is true, a minimal difference subgraph in the sense of inclusion is obtained. The minimal difference subgraph in the sense of inclusion represents the set of nodes and edges that cannot be further deleted under the premise of satisfying path preservation and failure reproduction.

[0056] In this embodiment, a failure predicate refers to a specific criterion that triggers a non-compliance conclusion; a failure source node refers to the node that first generates an unequal observation; an output observation point refers to the observation location where the failure predicate is triggered; an anchor point is a node or observation point that cannot be deleted during subgraph pruning; an evidence environment refers to the set of fixed and unchanging conditions required to reproduce the failure; a candidate subgraph is a portion of nodes and edges extracted from the complete computation graph; a dependency path is the path through which data or state is transferred between nodes; and a subgraph with minimal differences in the sense of inclusion refers to a subgraph where no nodes or edges can be deleted while maintaining the reproducibility of the failure.

[0057] like Figure 3 As shown in the lower half, the process of localizing minimal differences is as follows: In response to the output failure, determine the first logical location window of the output failure, determine the failure source node and the output observation point as non-deletable anchor points and fix the evidence environment, construct a candidate subgraph that preserves the dependency path between the failure source node and the output observation point, and then try to delete nodes or edges outside the anchor points in the candidate subgraph in a preset deterministic order until the deletion of any remaining node or edge outside the anchor point cannot simultaneously satisfy the preservation of dependency path and the failure predicate is true, thus obtaining a minimal difference subgraph in the sense of inclusion.

[0058] In this embodiment, taking the aforementioned digital human scenario as an example, the logical position window W2=[640,960) corresponding to the candidate audio data is missing, causing the output to fail. This logical position window is... Figure 3 The lower half shows the first output that fails the logical location window. The verification controller identifies the failure predicate as "logical location window integrity check failed," identifies the earliest speech synthesis output node missing this window as the failure source node, and identifies the input observation of the video generation node as the output observation point; both are set as non-deletable anchor points. Subsequently, the evidence environment is fixed: the version of the node-level verification contract, the input snapshot of request R-0001 (prompt words, sampling parameters), and the state snapshots (persistent state summaries) of each relevant node are frozen and stored together to ensure that the input conditions for replay are completely consistent.

[0059] In this embodiment, when constructing the candidate subgraph, the data dependency path and transmission path between the failed source node and the output observation point are preserved. In this example, this includes cross-GPU sending nodes, transmission channels, receive buffer nodes, and video input adapter nodes. The deletion process attempts to delete nodes or edges other than anchor points one by one according to a deterministic order obtained by sorting by runtime epoch, logical position, canonical node identifier, and edge type. After each deletion attempt, it is first checked whether at least one dependency path is still preserved between anchor points. Then, in an isolated environment with available GPUs, the candidate subgraph after deletion is re-executed with a frozen input snapshot under a fixed evidence environment. Based on the new observation obtained from the re-execution, it is determined whether the failed predicate is still valid. Only when both conditions are met is the deletion confirmed, and the process returns to continue trying to delete the next node or edge. It is prohibited to use cached old outputs to replace new observations. When any deletion cannot simultaneously satisfy both conditions, a subgraph with minimal differences in inclusion significance is obtained. In this embodiment, the final subgraph only contains transmission channels, receive buffers, and input adapter components; computational nodes such as speech synthesis are excluded.

[0060] As can be seen from the above, this embodiment uses a dual deletion condition with the failure predicate as the anchor and a fixed evidence environment as the premise, which ensures that the deleted subgraph can still accurately reproduce the original failure. The final subgraph with minimal differences in the sense of inclusion narrows the investigation scope from dozens of nodes to a few nodes and edges directly related to the failure, and the location conclusion is reproducible and auditable. Based on this, operation and maintenance personnel only need to repair or roll back a small number of components, without having to rerun the entire chain to investigate, which greatly shortens the fault location time and reduces the computational resource consumption of the re-inspection.

[0061] In one embodiment of this application, after obtaining a subgraph containing minimal differences in a meaningful sense, the method further includes: In response to modification or recovery instructions for candidate nodes involved in a subgraph with minimal differences in a sense, the first runtime epoch continues to provide services to online requests, and a consistent snapshot is established based on the first runtime epoch. Here, a runtime epoch represents a deployment runtime instance of the inference pipeline, the first runtime epoch is the runtime currently providing services to online requests, modification instructions represent instructions to perform repair or adjustment on candidate nodes involved in a subgraph with minimal differences in a sense, recovery instructions represent instructions to perform the inverse operation of deployment changes on candidate inference pipelines, and a consistent snapshot represents the retention of the persistent state, buffer read / write cursors, random number counter values, and deployment configuration of the first runtime epoch at the moment of state consistency. A second runtime epoch is created based on a consistent snapshot and isolated from the first runtime epoch. The corresponding operations for modification or recovery instructions are executed in the second runtime epoch. The union of the minimal difference subgraph in the sense of inclusion and the set of downstream affected nodes of the candidate nodes that changed due to the execution of the operation in the second running epoch is determined as the incremental verification set. The verification is re-executed on the incremental verification set in the second running epoch to obtain a new verification state. The set of downstream affected nodes represents the set of nodes that can be reached from the changed candidate nodes along the dependency relationship. If the new verification status is passed, the runtime epoch for providing services will be switched from the first runtime epoch to the second runtime epoch; if the new verification status is failed or cannot be determined, the runtime epoch for providing services to online requests will remain the first runtime epoch.

[0062] In this embodiment, a runtime epoch refers to the identifier of a single deployment instance of the inference pipeline, and different runtime epochs correspond to mutually isolated state namespaces; the first runtime epoch refers to the runtime epoch currently requesting services from the online system; a modification instruction refers to an instruction to repair or adjust candidate nodes involved in a subgraph with minimal differences in a meaningful sense, and a recovery instruction refers to an instruction to perform the inverse operation of deployment changes on candidate inference pipelines; a consistency snapshot is a complete retention of the runtime environment at the moment of state consistency, and its contents include the persistent state of the first runtime epoch, buffer read / write cursors, random number counter values, and deployment configuration; the downstream affected node set refers to the set of nodes reachable from the changed candidate nodes along the dependencies; and the incremental verification set is the range of nodes that actually need to be re-verified.

[0063] In this embodiment, online traffic is carried by the first runtime epoch, numbered 41. When a modification instruction (e.g., fixing a receive buffer overflow defect) or a recovery instruction (e.g., rolling back asynchronous transmission changes) is received for nodes involved in a subgraph with minimal differences in a meaningful sense, the verification controller first maintains the first runtime epoch to continue providing services and selects a consistency point where all in-transit batches have been committed to establish a consistency snapshot. The snapshot content includes the persistent state of each node, buffer read / write cursors, random number counter values, and deployment configurations, and is written to the snapshot storage. Subsequently, a second runtime epoch, numbered 42, is created based on the snapshot using a copy-on-write method. Modification or recovery operations are only written to the namespace of the second runtime epoch. Requests used for verification only read the state of the second runtime epoch. In-transit requests in the first runtime epoch are cleared within the first runtime epoch, and their observations are not included in the verification evidence of the second runtime epoch. The incremental verification set is determined as the union of the minimal difference subgraph in the sense of inclusion and the set of downstream affected nodes. In this embodiment, the minimal difference subgraph in the sense of inclusion contains 3 nodes, and there are 5 downstream nodes that can be reached from the changed nodes in the positive direction along the data dependency edge and the state dependency edge. Therefore, the incremental verification set contains a total of 8 nodes, rather than a full graph re-verification.

[0064] In the second runtime epoch, the runtime events of the set are recollected and the verification is re-executed: if it passes, a preparation record is first written to the transaction log, then a commit record is written in an atomic transaction, and the current runtime epoch pointer is switched from 41 to 42; if it fails, cannot be determined after reaching the stop condition, or the execution process fails, an abort record is written, the pointer is kept pointing to 41, and the second runtime epoch is cleaned up or restored to a snapshot; if the controller crashes in the commit process and there is no commit record during recovery, the unpublished second runtime epoch is cleaned up.

[0065] As can be seen from the above, in this embodiment, the first runtime epoch continuously provides external services, and modifications and restorations are only carried out in the isolated second runtime epoch, making the repair process unaware of online services; the incremental verification set limits the scope of re-verification to the subgraph with minimal differences in the sense of inclusion and its downstream affected nodes, avoiding a full rerun; the runtime epoch pointer is switched only through atomic transactions when the verification passes, and any failure maintains the original epoch service and state unchanged, forming a consistent closed loop of modification, verification, and release, reducing the risk of interruption and rollback cost of online repair.

[0066] In one embodiment of this application, the reference inference pipeline and the candidate inference pipeline each include multiple nodes for processing different modal data, which include at least two of audio data, video data, and text data; the verification conditions of the node-level verification contract representation also include cross-modal synchronization conditions, which represent the conditions that constrain the time offset between the running events corresponding to different modal data under a unified media clock. Performing constraint verification based on the verification conditions also includes: Based on a unified media clock, detect whether the time offset between runtime events corresponding to different modal data exceeds the offset threshold specified by cross-modal synchronization conditions. If the time offset exceeds the offset threshold, the constraint verification is determined to have failed, and an error is output. If the time offset does not exceed the offset threshold, the cross-modal synchronization condition is satisfied, and the constraint verification is passed.

[0067] In this embodiment, modality refers to the sensory channel type to which the data belongs, such as audio, video, and text; cross-modal synchronization condition refers to the verification condition that constrains different modal data to maintain a consistent temporal relationship; unified media clock refers to the clock reference that converts the timestamps of each modal data to a common time base; time offset refers to the time difference between events that should be presented simultaneously in different modalities; and offset threshold is the maximum time offset allowed by the cross-modal synchronization condition.

[0068] In this embodiment, the reference inference pipeline of the digital human real-time interaction service includes nodes that process three modalities of data: audio modality (speech data with a sampling rate of 16kHz), video modality (lip-syncing images at 25fps), and text modality (token sequences). The verification conditions generated by the verification controller for the mapping node group include cross-modal synchronization conditions. When performing constraint verification, a unified media clock is first established: the timestamps reported by each node are uniformly converted to a common time base of 1 / 1000s, and a monotonic clock is used as the clock source to avoid system time rollback interference. When converting continuous time to discrete positions, a rounding method towards the nearest even number is used to prevent boundary discrepancies caused by the default rounding rules of different language runtime libraries. Subsequently, two types of synchronization detection are performed: first, aligning the phoneme time intervals of the audio with the motion curves of the lip key points in the video frame, and calculating the time offset between the corresponding pronunciation events and lip-syncing events; second, checking the arrival time difference between each audio window and the video frame that should overlap with it according to the display timestamp. The offset threshold is set based on the generally accepted conclusions of audiovisual perception experiments: the perceptible threshold for lip-sync issues among ordinary viewers is approximately 80ms. A 25% margin is reserved, setting the audio-visual offset threshold at 60ms. An additional 40ms tolerance is set for frame-level scheduling jitter. If any detection result exceeds the corresponding threshold, the constraint verification is deemed a failure and output as "not passed." If all detection results do not exceed the corresponding threshold, the cross-modal synchronization condition is deemed satisfied, and the constraint verification passes. Thus, even if the content of each modality itself passes equivalence verification, audio-visual desynchronization faults will be independently exposed and will not be masked by content-level passing conclusions.

[0069] As can be seen from the above, this embodiment unifies different modalities such as audio, video, and text under a common media clock to detect time offsets. This allows cross-modal faults such as lip-sync asynchrony and audio-visual misalignment to be automatically and quantitatively detected, just like numerical errors, eliminating the reliance on manual viewing and spot checks. The offset threshold is set based on perception experiment data and has a safety margin, so it will not produce false alarms due to normal scheduling jitter, nor will it miss synchronization degradation that is perceptible to the user. The unified rounding rules further ensure the consistency of detection results across different implementations, providing an objective and recalculated acceptance method for the consistency of the audiovisual experience of multimodal inference services.

[0070] Corresponding to the reasoning process verification method based on deployment change metadata in the above embodiment, Figure 4 This is a structural block diagram of an inference process verification apparatus based on deployment change metadata, provided as an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 4 The reasoning process verification device 20 based on deployment change metadata includes: an acquisition module 21, a contract generation module 22, a recombination pairing module 23, a random verification module 24, and a first verification module 25.

[0071] The acquisition module 21 is used to acquire the reference inference pipeline of the real-time interactive application, the candidate inference pipeline obtained by performing deployment changes on the reference inference pipeline, and the deployment change metadata representing the nodes and changed content affected by the deployment changes. Contract generation module 22 is used to establish a mapping relationship between the reference nodes of the reference inference pipeline and the candidate nodes of the candidate inference pipeline based on the deployment change metadata, obtain the mapping node group, and generate a node-level verification contract for each mapping node group. The node-level verification contract represents the normalization rules, verification conditions and comparison methods. The reassembly and pairing module 23 is used to collect the running events of the reference inference pipeline and the candidate inference pipeline. The running events carry pairing identification information that represents the request, node and logical position of the pipeline. According to the normalization rules, the running events with different physical segmentation methods or arrival orders are reassembled into logical position windows of the reference inference pipeline and the candidate inference pipeline respectively, and the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline are paired based on the pairing identification information. The random verification module 24 is used to perform consistency verification on the random number derivation protocol based on a fixed test vector of the random number derivation protocol for the mapping node group containing random operations; when the verification passes, a deterministic random subflow is derived for the reference inference pipeline and the candidate inference pipeline to perform paired execution; when the verification fails, the mapping node group pairing is prohibited and the comparison evidence of the corresponding execution event is set to invalid. The first verification module 25 is used to perform constraint verification based on the verification conditions and comparison verification based on the comparison method for logical position windows that have completed pairing and whose comparison evidence has not been set to invalid, and output one of the three verification states: pass, fail, and cannot be determined.

[0072] In one embodiment of this application, the contract generation module 22 is specifically used for: Based on the node mapping type indicated by the deployment change metadata and the same-source program region identifier of each node, establish the mapping relationship between the reference node and the candidate node to obtain the mapping node group. The same-source program region identifier represents the operator type and input / output range of the node. Based on the deployment change type indicated by the deployment change metadata, determine the nondeterministic category corresponding to each mapping node group. The nondeterministic category includes at least one of numerical nondeterminism, random nondeterminism, scheduling nondeterminism, and state nondeterminism. Based on the nondeterministic category, the normalization rules, verification conditions, and comparison methods corresponding to each mapping node group are determined, and node-level verification contracts are generated based on the normalization rules, verification conditions, and comparison methods.

[0073] In one embodiment of this application, the random verification module 24 is specifically used for: According to the field serialization rules specified in the node-level verification contract, the fields representing the logical location window and sample sequence number of the running event are serialized to obtain metadata messages; The metadata message is digested based on a preset seed to obtain digest data; The first and second non-overlapping fields in the summary data are mapped to the key and basic counter of a counter-type pseudo-random number generator, respectively. The counter-type pseudo-random number generator is characterized by taking the key and basic counter as input and outputting random number blocks, with the parallel output positions in a single random number block being the output channels. In the tensors processed by the paired runs of the reference inference pipeline and the candidate inference pipeline, the base counter is advanced according to the integer quotient of the linear index of the tensor elements and the number of output channels. With the key and the advanced base counter as input, a random number block is generated by a counter-type pseudo-random number generator. The output channel is selected from the random number block according to the remainder of the linear index and the number of output channels to obtain a deterministic random subflow.

[0074] In one embodiment of this application, after invalidating the comparative evidence of the corresponding runtime event, the inference process verification device 20 based on deployment change metadata further includes: a second verification module, used for: When the node-level verification contract allows for distributed comparison and the number of valid samples reaches the minimum number of samples specified by the node-level verification contract, the reference sample set corresponding to the reference inference pipeline and the candidate sample set corresponding to the candidate inference pipeline are obtained respectively. Among them, the valid samples represent the samples that meet the sample validity conditions specified by the node-level verification contract. The same normalization process is performed on the reference sample set and the candidate sample set, and a measure of the distribution difference between the normalized reference sample set and the normalized candidate sample set is calculated. The verification status corresponding to the mapping node group is determined based on the distribution difference metric.

[0075] In one embodiment of this application, the first verification module 25 is specifically used for: The system checks whether there are missing or overlapping logical positions covered by the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline, and obtains the results of constraint verification. The constraint verification includes at least the verification of the integrity of logical positions and the verification of overlapping conflicts. If the result of constraint verification indicates that any constraint verification has failed, the output "Fail" should be prioritized. If there is no constraint verification failure and the integrity determination cannot be completed due to a missing logical position before the expiration of the late waiting time specified in the node-level verification contract, the output is "cannot be determined". If a logical position is still missing after the late waiting period has expired, the integrity verification is determined to have failed, and an error is output. If all constraint verifications pass, perform comparison verification according to the comparison method. If the result of the comparison verification meets the conditions specified by the comparison method, output "pass"; if the result of the comparison verification does not meet the conditions specified by the comparison method, output "fail"; if the number of samples for comparison verification does not reach the minimum number of samples specified by the node-level verification contract, output "cannot be determined".

[0076] In one embodiment of this application, when the output cannot be determined, the inference process verification device 20 based on deployment change metadata further includes: a supplementary verification module, which is used to perform a supplementary sampling operation or upgrade the verification level in response to the output not being determined, and re-execute constraint verification and comparison verification based on the supplemented collected running events, and re-output the verification status.

[0077] In one embodiment of this application, when the output fails, the inference process verification device 20 based on deployment change metadata further includes: a minimal difference subgraph generation module, used for: The criteria that trigger failure are identified as failed predicates, and the failure source node and output observation point corresponding to the failed predicate are identified as non-deletable anchor points. The failure source node represents the first node that generates an unequal observation, and the output observation point represents the observation position where the failed predicate is triggered. The evidence environment is fixed, which includes the version of the node-level verification contract, input snapshots, and state snapshots. Construct a candidate subgraph that preserves the dependency path between the failure source node and the output observation point. The candidate subgraph is a portion of the nodes and edges extracted from the computation graph of the candidate inference pipeline. The dependency path includes at least one of the data dependency path, state dependency path and transmission path. In a predetermined deterministic order, nodes or edges other than anchor points in the candidate subgraph are attempted to be deleted sequentially. If the dependent path is still retained after deletion, and the failure predicate is still valid in the evidence environment based on the new observation obtained by re-execution on the candidate subgraph after deletion, the deletion is confirmed, and the step of attempting deletion sequentially is returned based on the candidate subgraph after deletion. Until the deletion of any node or edge other than any remaining anchor point cannot simultaneously satisfy the conditions of preserving dependent paths and the failure predicate is true, a minimal difference subgraph in the sense of inclusion is obtained. The minimal difference subgraph in the sense of inclusion represents the set of nodes and edges that cannot be further deleted under the premise of satisfying path preservation and failure reproduction.

[0078] In one embodiment of this application, after obtaining a subgraph containing minimal differences in meaning, the inference process verification device 20 based on deployment change metadata further includes: a re-verification module, used for: In response to modification or recovery instructions for candidate nodes involved in a subgraph with minimal differences in a sense, the first runtime epoch continues to provide services to online requests, and a consistent snapshot is established based on the first runtime epoch. Here, a runtime epoch represents a deployment runtime instance of the inference pipeline, the first runtime epoch is the runtime currently providing services to online requests, modification instructions represent instructions to perform repair or adjustment on candidate nodes involved in a subgraph with minimal differences in a sense, recovery instructions represent instructions to perform the inverse operation of deployment changes on candidate inference pipelines, and a consistent snapshot represents the retention of the persistent state, buffer read / write cursors, random number counter values, and deployment configuration of the first runtime epoch at the moment of state consistency. A second runtime epoch is created based on a consistent snapshot and isolated from the first runtime epoch. The corresponding operations for modification or recovery instructions are executed in the second runtime epoch. The union of the minimal difference subgraph in the sense of inclusion and the set of downstream affected nodes of the candidate nodes that changed due to the execution of the operation in the second running epoch is determined as the incremental verification set. The verification is re-executed on the incremental verification set in the second running epoch to obtain a new verification state. The set of downstream affected nodes represents the set of nodes that can be reached from the changed candidate nodes along the dependency relationship. If the new verification status is passed, the runtime epoch for providing services will be switched from the first runtime epoch to the second runtime epoch; if the new verification status is failed or cannot be determined, the runtime epoch for providing services to online requests will remain the first runtime epoch.

[0079] In one embodiment of this application, the reference inference pipeline and the candidate inference pipeline each include multiple nodes for processing different modal data, which include at least two of audio data, video data, and text data; the verification conditions of the node-level verification contract representation also include cross-modal synchronization conditions, which represent the conditions that constrain the time offset between the running events corresponding to different modal data under a unified media clock. The first verification module 25 is specifically used for: Based on a unified media clock, detect whether the time offset between runtime events corresponding to different modal data exceeds the offset threshold specified by cross-modal synchronization conditions. If the time offset exceeds the offset threshold, the constraint verification is determined to have failed, and an error is output. If the time offset does not exceed the offset threshold, the cross-modal synchronization condition is satisfied, and the constraint verification is passed.

[0080] See Figure 5 , Figure 5 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 5The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 4 The functions of the acquisition module 21, contract generation module 22, recombination and pairing module 23, random verification module 24, and first verification module 25 are shown.

[0081] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0082] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0083] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store deployment change metadata, runtime events, and other information.

[0084] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the inference process verification method based on deployment change metadata provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.

[0085] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0086] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0087] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0088] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0089] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces or units, or they may be electrical, mechanical, or other forms of connection.

[0090] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0091] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0092] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for verifying the inference process based on deployment change metadata, characterized in that, include: Obtain a reference inference pipeline for a real-time interactive application, candidate inference pipelines obtained by performing deployment changes on the reference inference pipeline, and deployment change metadata representing the nodes and changed content affected by the deployment changes. Based on the deployment change metadata, a mapping relationship is established between the reference nodes of the reference inference pipeline and the candidate nodes of the candidate inference pipeline to obtain a mapping node group, and a node-level verification contract is generated for each mapping node group. The node-level verification contract represents the normalization rules, verification conditions and comparison methods. The runtime events of the reference inference pipeline and the candidate inference pipeline are collected, and the runtime events carry paired identification information representing the request, node and logical position to which they belong; According to the normalization rule, the running events with different physical segmentation methods or arrival orders are reorganized into logical position windows for the reference inference pipeline and the candidate inference pipeline, respectively, and the logical position windows of the reference inference pipeline and the candidate inference pipeline are paired based on the pairing identification information. For a mapping node group containing random operations, a consistency check is performed on the random number derivation protocol based on a fixed test vector. If the check passes, a deterministic random subflow is derived for the reference inference pipeline and the candidate inference pipeline to perform paired execution. If the check fails, the mapping node group pairing is prohibited, and the comparison evidence of the corresponding execution event is invalidated. For logical position windows that have completed pairing and whose comparison evidence has not been invalidated, perform constraint verification according to the verification conditions, perform comparison verification according to the comparison method, and output one of the three verification states: pass, fail, or cannot be determined.

2. The reasoning process verification method based on deployment change metadata as described in claim 1, characterized in that, The process of establishing a mapping relationship between reference nodes of the reference inference pipeline and candidate nodes of the candidate inference pipeline based on the deployment change metadata, obtaining mapping node groups, and generating node-level verification contracts for each mapping node group includes: Based on the node mapping type indicated by the deployment change metadata and the same-origin program region identifier of each node, a mapping relationship between the reference node and the candidate node is established to obtain the mapping node group. The same-origin program region identifier represents the operator type and input / output range of the node. Based on the deployment change type indicated by the deployment change metadata, determine the nondeterministic category corresponding to each of the mapping node groups. The nondeterministic category includes at least one of numerical nondeterminism, random nondeterminism, scheduling nondeterminism, and state nondeterminism. Based on the nondeterministic category, the normalization rule, the verification condition, and the comparison method corresponding to each of the mapping node groups are determined, and the node-level verification contract is generated based on the normalization rule, the verification condition, and the comparison method.

3. The reasoning process verification method based on deployment change metadata as described in claim 1, characterized in that, The derived deterministic random subflow for paired execution of the reference inference pipeline and the candidate inference pipeline includes: According to the field serialization rules specified in the node-level verification contract, the fields representing the logical location window and sample sequence number of the running event are serialized to obtain metadata messages; The metadata message is digested based on a preset seed to obtain digest data; The first and second non-overlapping fields in the digest data are mapped to the key and base counter of a counter-type pseudo-random number generator, respectively. The counter-type pseudo-random number generator is characterized by taking the key and the base counter as input and outputting random number blocks, with the parallel output positions in a single random number block serving as output channels. In the tensors processed by the paired operation of the reference inference pipeline and the candidate inference pipeline, the basic counter is advanced according to the integer quotient of the linear index of the tensor elements and the number of output channels. With the key and the advanced basic counter as input, the counter-type pseudo-random number generator generates a block of random numbers. The output channels are selected from the block of random numbers according to the remainder of the linear index and the number of output channels to obtain the deterministic random substream.

4. The method for verifying the inference process based on deployment change metadata as described in claim 1, characterized in that, After invalidating the comparison evidence for the corresponding runtime event, the method further includes: When the node-level verification contract allows for distributed comparison and the number of valid samples reaches the minimum number of samples specified by the node-level verification contract, the reference sample set corresponding to the reference inference pipeline and the candidate sample set corresponding to the candidate inference pipeline are obtained respectively, wherein the valid sample represents the sample that meets the sample validity conditions specified by the node-level verification contract; The same normalization process is performed on the reference sample set and the candidate sample set, and a distribution difference measure is calculated between the normalized reference sample set and the normalized candidate sample set. The verification status corresponding to the mapping node group is determined based on the distribution difference metric.

5. The reasoning process verification method based on deployment change metadata as described in claim 1, characterized in that, For the logical position window where pairing is complete and comparison evidence is not invalidated, constraint verification is performed according to the verification conditions, comparison verification is performed according to the comparison method, and one of three verification states—pass, fail, and cannot be determined—is output, including: The system detects whether there are missing or overlapping logical positions covered by the logical position windows of the reference inference pipeline and the logical position windows of the candidate inference pipeline, and obtains the result of the constraint verification. The constraint verification includes at least the verification of the integrity of the logical positions and the verification of overlapping conflicts. If the result of the constraint verification indicates that any constraint verification fails, the output "fail" will be given priority. If there is no constraint verification failure and the integrity determination cannot be completed due to a missing logical location before the expiration of the late waiting time specified in the node-level verification contract, the output is "Cannot determine". If a logical position is still missing after the specified late waiting time has expired, the integrity verification is determined to have failed, and an error is output. If all constraint verifications pass, the comparison verification is performed according to the comparison method. If the result of the comparison verification meets the conditions defined by the comparison method, the output is "passed". If the result of the comparison verification does not meet the conditions defined by the comparison method, the output is "failed". If the number of samples for the comparison verification does not reach the minimum number of samples specified by the node-level verification contract, the output is "cannot be determined".

6. The reasoning process verification method based on deployment change metadata as described in claim 5, characterized in that, In response to a failed output, the following also applies: The criterion that triggers the failure is determined as a failed predicate, and the failure source node and output observation point corresponding to the failed predicate are determined as non-deletable anchor points. The failure source node represents the first node that generates an unequal observation, and the output observation point represents the observation position where the failed predicate is triggered. A fixed evidence environment, which includes the version of the node-level verification contract, an input snapshot, and a state snapshot; Construct a candidate subgraph that preserves the dependency path between the failure source node and the output observation point. The candidate subgraph is a portion of the nodes and edges extracted from the computation graph of the candidate inference pipeline. The dependency path includes at least one of the data dependency path, the state dependency path, and the transmission path. In accordance with a preset deterministic order, nodes or edges other than the anchor points in the candidate subgraph are attempted to be deleted sequentially. If the dependent path is still retained after deletion, and the failed predicate is still valid based on the new observation obtained by re-execution on the candidate subgraph after deletion in the evidence environment, the deletion is confirmed, and the process of attempting deletion sequentially is returned based on the candidate subgraph after deletion. Until the deletion of any remaining node or edge other than the anchor point cannot simultaneously satisfy the conditions of preserving the dependent path and the failure predicate being true, a minimal difference subgraph in the sense of inclusion is obtained. The minimal difference subgraph in the sense of inclusion represents the set of nodes and edges that cannot be further deleted under the premise of satisfying path preservation and failure reproduction.

7. The reasoning process verification method based on deployment change metadata as described in claim 6, characterized in that, After obtaining the subgraph containing the minimum differences in meaning, the method further includes: In response to modification or recovery instructions for candidate nodes involved in the minimally identifiable subgraph, the first runtime epoch continues to provide services to online requests, and a consistent snapshot is established based on the first runtime epoch. A runtime epoch represents a deployment runtime instance of the inference pipeline, the first runtime epoch is the runtime currently providing services to the online request, the modification instruction represents an instruction to perform repair or adjustment on candidate nodes involved in the minimally identifiable subgraph, the recovery instruction represents an instruction to perform the inverse operation of the deployment change on the candidate inference pipeline, and the consistent snapshot represents the retention of the persistent state, buffer read / write cursors, random number counter values, and deployment configuration of the first runtime epoch at a state of consistency. A second runtime epoch is created based on the consistent snapshot and is isolated from the first runtime epoch. The operation corresponding to the modification instruction or the recovery instruction is executed in the second runtime epoch. The union of the minimal difference subgraph in the sense of inclusion and the set of downstream affected nodes of the candidate nodes that changed due to the execution of the operation in the second runtime is determined as the incremental verification set, and the verification is re-executed on the incremental verification set in the second runtime to obtain a new verification state; the set of downstream affected nodes represents the set of nodes that can be reached from the changed candidate nodes along the dependency relationship. If the new verification status is passed, the runtime of providing services will be switched from the first runtime to the second runtime; if the new verification status is failed or cannot be determined, the runtime of providing services to the online request will remain the first runtime.

8. The reasoning process verification method based on deployment change metadata as described in claim 5, characterized in that, The reference inference pipeline and the candidate inference pipeline each include multiple nodes for processing different modal data, which include at least two of audio data, video data, and text data; the verification conditions represented by the node-level verification contract also include cross-modal synchronization conditions, which represent conditions that constrain the time offset between runtime events corresponding to different modal data under a unified media clock. The constraint verification based on the verification conditions also includes: Based on the unified media clock, detect whether the time offset between the running events corresponding to the different modal data exceeds the offset threshold specified by the cross-modal synchronization condition; If the time offset exceeds the offset threshold, the constraint verification is determined to have failed, and a "not passed" message is output. If the time offset does not exceed the offset threshold, it is determined that the cross-modal synchronization condition is met, and the constraint verification is passed.

9. A device for verifying inference processes based on deployment change metadata, characterized in that, include: The acquisition module is used to acquire the reference inference pipeline of the real-time interactive application, the candidate inference pipeline obtained by performing deployment changes on the reference inference pipeline, and the deployment change metadata representing the nodes and changed content affected by the deployment changes. The contract generation module is used to establish a mapping relationship between the reference nodes of the reference inference pipeline and the candidate nodes of the candidate inference pipeline based on the deployment change metadata, to obtain a mapping node group, and to generate a node-level verification contract for each mapping node group. The node-level verification contract represents the normalization rules, verification conditions and comparison methods. The reconfiguration and pairing module is used to collect the runtime events of the reference inference pipeline and the candidate inference pipeline. The runtime events carry pairing identification information that represents the request, node, and logical position to which they belong. According to the normalization rule, the running events with different physical segmentation methods or arrival orders are reorganized into logical position windows for the reference inference pipeline and the candidate inference pipeline, respectively, and the logical position windows of the reference inference pipeline and the candidate inference pipeline are paired based on the pairing identification information. The random verification module is used to perform consistency verification on the random number derivation protocol based on a fixed test vector of the random number derivation protocol for a mapping node group containing random operations; when the verification passes, a deterministic random subflow is derived for the reference inference pipeline and the candidate inference pipeline to perform paired operation; when the verification fails, the mapping node group pairing is prohibited and the comparison evidence of the corresponding operation event is set to invalid. The first verification module is used to perform constraint verification based on the verification conditions and comparison verification based on the comparison method for logical position windows that have completed pairing and whose comparison evidence has not been set to invalid, and output one of three verification states: pass, fail, and cannot be determined.

10. The inference process verification apparatus based on deployment change metadata as described in claim 9, characterized in that, The contract generation module is specifically used for: Based on the node mapping type indicated by the deployment change metadata and the same-origin program region identifier of each node, a mapping relationship between the reference node and the candidate node is established to obtain the mapping node group. The same-origin program region identifier represents the operator type and input / output range of the node. Based on the deployment change type indicated by the deployment change metadata, determine the nondeterministic category corresponding to each of the mapping node groups. The nondeterministic category includes at least one of numerical nondeterminism, random nondeterminism, scheduling nondeterminism, and state nondeterminism. Based on the nondeterministic category, the normalization rule, the verification condition, and the comparison method corresponding to each of the mapping node groups are determined, and the node-level verification contract is generated based on the normalization rule, the verification condition, and the comparison method.