Versioned public reasoning reuse method for media event multi-user quiz
Patent Information
- Application Number
- CN202611297905.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-10-09
AI Technical Summary
[0008]本发明的目的在于提供一种面向媒体事件多用户问答的版本化公共推理复用方法,用于解决现有技术中仅根据问题文本相似度复用完整答案而易发生事件错配、无法复用部分计算、难以确定最小重计算范围,以及个性化生成可能改变公共事实和结论等问题
(1)通过步骤S3将用户查询转换为结构化查询计算依赖图、步骤S4通过节点规范化签名比较确定公共推理子图和残差计算子图,使不同表达形式和不同询问目标的问题能够在事实、规则及条件判定层面进行结构化比较,从而实现相关但不完全相同问题之间的部分计算复用,避免只能复用完整答案的问题。
Smart Images

Figure CN122885136A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence, natural language processing, media data processing, and computer caching technology, and in particular to a versioned public reasoning reuse method for multi-user question answering of media events. Background Technology
[0002] With the development of large language models, multimodal models, and media technologies, users can ask questions related to the current scene or media segment through text and voice when watching live media content such as sports events, e-sports, and press conferences, or on-demand videos such as course videos, event replays, and movies. Taking live sports events as an example, when events such as disallowed goals or offside decisions occur, a large number of users may ask highly semantically relevant questions such as "Why was it ruled offside?" or "Why was the goal disallowed?" within a short period of time. In on-demand scenarios, different users may also browse the same video at different times and ask similar questions at the same or corresponding playback positions.
[0003] If the server were to execute a complete reasoning process—including video segment localization, speech recognition, knowledge retrieval, and answer generation—for each user request, it would generate a large amount of repetitive computation, placing a high load on inference resources such as graphics processors and significantly increasing response latency. Especially after a live broadcast, the number of user requests could surge within seconds, posing a severe challenge to the system's real-time performance.
[0004] In existing technologies, complete answer caching can only handle requests with identical input text; semantic caching judges question similarity based on vector similarity, but in real-time event scenarios, text similarity does not necessarily mean the events they refer to are the same. For example, different live streaming sources may have playback delays, and users may pause or rewind. When multiple users simultaneously ask "Why was it ruled offside?", the actual events they refer to may be different. If answers are reused solely based on question text or server reception time, incorrect matching is highly likely to occur.
[0005] Furthermore, existing prompt word caching or key-value caching relies on the same tag sequence, making it difficult to identify common computational components under different representations, and also unable to reuse intermediate results when the problem is only partially relevant. Moreover, the factual state of live events continuously changes, such as the ruling status changing from "preliminary ruling" to "video assistant referee review" and then to "final ruling." Existing caching solutions lack data structures describing the facts, rules, and conditions upon which the reasoning results depend, making it impossible to accurately determine which reasoning results are affected by event changes. This often leads to the complete deletion of the cache and recalculation, discarding still valid factual and rule calculation results.
[0006] At the same time, different users may request answers in different languages, with different levels of expertise, or in different lengths. If a complete reasoning process is re-executed for each expression requirement, it will result in duplicate calculations. If existing answers are freely rewritten, the facts, rules, conditions, or conclusions may be changed during the translation or simplification process, resulting in different users obtaining contradictory interpretations.
[0007] Therefore, there is an urgent need for a technical solution suitable for multi-user question answering in media events to solve the above problems. Summary of the Invention
[0008] The purpose of this invention is to provide a versioned public reasoning reuse method for multi-user question-and-answer in media events, which solves the problems in the prior art that are prone to event mismatch, inability to reuse partial calculations, difficulty in determining the minimum recalculation range, and the possibility that personalized generation may change public facts and conclusions when reusing complete answers based solely on question text similarity.
[0009] To achieve the above objectives, the method provided by the present invention includes the following steps: S1, acquire media data, event or analysis data corresponding to the media data, and multiple user queries, and acquire the corresponding media time anchor for each user query; wherein, the media data includes at least one of live media streams and on-demand videos.
[0010] S2, construct a media event timeline based on the media data and the event or analysis data; based on the semantic information of the user query and the media time anchor, determine the target media event or target media segment corresponding to the user query from the media event timeline, and generate the corresponding media event status fingerprint.
[0011] S3. Perform structured parsing on the user query to obtain one or more of the following: query target, attribute to be judged, time constraint, rule scope, fact constraint, output requirement, and counterfactual condition. Construct a query computation dependency graph based on the structured parsing results and the target event. The query computation dependency graph includes at least two types of nodes: event alignment nodes, fact requirement nodes, rule requirement nodes, condition judgment nodes, conclusion nodes, and expression nodes. The nodes are connected by dependency edges.
[0012] S4. Generate a node normalized signature based on the node type, execution operator, normalized input identifier, event scope, rule version, and operator version; by comparing the normalized signatures of nodes in multiple query computation dependency graphs, determine the common inference subgraph of the multiple query computation dependency graphs and the residual computation subgraph corresponding to each user query.
[0013] S5, perform a calculation on the nodes in the public reasoning subgraph and generate reasoning result applicability credentials for reusable nodes; the credentials include at least the result value, fact dependency summary, rule dependency summary, validity condition, event version range, and failure trigger condition.
[0014] S6, upon receiving subsequent user queries or executing residual calculation subgraphs, searches for candidate inference results based on node normalized signatures and verifies the applicability credentials of the inference results corresponding to the candidate inference results; reuses the corresponding results when the event scope, fact dependency, rule dependency, and establishment conditions all meet the reuse conditions; reuses valid nodes when partial dependencies meet the reuse conditions and performs calculations on nodes that do not meet the reuse conditions; marks partial reuse when partial dependencies meet the reuse conditions and executes according to the following rules: when determined to be "not affecting all", the system only applies to events that directly or indirectly depend on the change within the coverage area. Nodes that are actually affected undergo recalculation, while nodes outside the coverage area (i.e., nodes that do not directly or indirectly depend on the change) continue to be reused, and their downstream nodes remain unaffected. When the coverage reaches or exceeds 80% (this threshold is determined based on the balance between reuse accuracy and computational resource saving rate in system performance testing; at this threshold, the reuse accuracy remains above 95%, while saving approximately 60% of the recalculation cost), it is determined to "affect all upstream nodes," and the system refuses to reuse the results of this candidate node and recalculates the node and all its downstream nodes. Reuse is refused and recalculation is performed when the reuse conditions are not met. When the validation of the condition fails, the system refuses to reuse the node's results and marks the node as needing recalculation. If only part of the predicates in the condition are false, the system attempts to identify the specific dependent node that caused the predicate to be false, performs recalculation only on that dependent node and its downstream nodes, and the remaining upstream nodes that meet the conditions can still be reused.
[0015] S7 generates a language-independent answer proposition structure based on the execution results of the common inference subgraph and the residual calculation subgraph; it then personalizes the answer proposition structure according to the user's language, level of expertise, output length, and expression method to obtain candidate answers.
[0016] S8: Perform proposition consistency verification on candidate answers to determine whether candidate answers cover required propositions, contain prohibited propositions, and maintain the relationship between propositions. If the verification passes, return the candidate answers to the user. If the verification fails, if the reason for the failure is the omission of optional propositions or the deviation at the expression level, return to step S7 to re-express the personalized version and generate new candidate answers. If the reason for the failure is the omission of required propositions, the inclusion of prohibited propositions, or the disruption of the relationship between propositions, then use a template answer that is definitively filled with the proposition structure of the answer to prevent the propagation of errors at the factual or conclusion level.
[0017] The deterministic expression template is a pre-defined, rule-based filling template that uses a fixed sentence structure of "fact statement + conclusion statement". It arranges the required propositions and conclusion propositions in the answer proposition structure in a pre-defined order and fills them into natural language statements. This template does not introduce any additional semantic inference or rewriting, but only realizes the deterministic mapping of the proposition set to the text.
[0018] S9: When receiving new media data, event or analysis data, caption or annotation data, rule or knowledge data corresponding to the target media event, generate a new media event version, compare the media and dependency summaries in the new media event version with those in the original version, and determine the media, facts, rules or knowledge nodes that have changed; determine the set of affected nodes based on the dependency edges in the query calculation dependency graph and the failure triggering conditions in the applicability certificate of the inference result, perform failure processing only on the affected nodes and their downstream nodes, and decide whether to recalculate based on the verification result of the applicability certificate, and update the corresponding answer according to the new media event version.
[0019] Further, in step S1, the media time anchor point is used to represent the actual location of the media content viewed when the user submits a query, and includes at least one or more of the following: media asset identifier, media asset version, live source identifier, media segment or fragment identifier, media presentation timestamp, playback offset, playback status, and content fingerprint. The playback status includes at least one of live playback, delayed playback, on-demand playback, pause, drag, speed-up playback, and rewind. In a live streaming scenario, the media time anchor point may include the user's media time level, and in an on-demand scenario, the media time anchor point may include the video playback position and the normalized fragment identifier. In one implementation, the media time anchor point may be represented as Au=(M, V, S, G, Tp, D, P, F), where M is the media asset identifier, V is the media asset version, S is the live source identifier, G is the media segment or normalized fragment identifier, Tp is the media timestamp being presented by the user terminal, D is the offset of the source timeline relative to the reference media timeline, P is the playback status, and F is the media frame or content fingerprint.
[0020] Further, in step S2, determining the target media event or segment based on the user query, media time anchor, and media event timeline includes: determining a candidate time range based on the media time anchor; obtaining candidate events or segments from the candidate time range; and calculating the semantic matching degree, time matching degree, content fingerprint matching degree, and visible object matching degree between the user query and the candidate events or segments, respectively. Specifically, the semantic matching degree is calculated based on the vector cosine similarity between the user query text and the event description text; the time matching degree is calculated based on the overlap ratio of the timestamps between the media time anchor and the event occurrence time range; the content fingerprint matching degree is calculated based on the Hamming distance between the video frame fingerprint or audio fingerprint; and the visible object matching degree is calculated based on the intersection-union ratio (IUGR) between the identified objects in the candidate event and the objects mentioned in the user query. When there are no identified objects in the candidate event or no objects are mentioned in the user query, the visible object matching degree takes a default value of 0 and does not participate in weighted fusion; when at least one party has an identified object, the IUGR is calculated normally. The four matching scores mentioned above are weighted and summed according to preset weights (semantic matching score 0.35, time matching score 0.30, content fingerprint matching score 0.20, and visible object matching score 0.15) to obtain a comprehensive matching score for the final determination of the target event or segment; the target media event or segment is determined based on the matching score. If the highest matching result does not reach the association threshold, the user query is marked as an uncertain association query, and clarification information is returned to the user or waiting for new events or analysis data. The association threshold is a preset matching score threshold with a default value of 0.70 and a value range of 0 to 1. It can be configured during system initialization and can be dynamically adjusted based on the historical association confirmation rate.
[0021] Furthermore, the query dependency graph in step S3 is constructed using an operator template library. First, a natural language processing model is used to identify the user's query intent and parameters. Then, a corresponding graph template is selected from the operator template library based on the intent, and the graph template is instantiated using the target event, fact constraints, rule applicability, and counterfactual conditions. This avoids the structural instability caused by relying entirely on large language models to freely generate graph structures.
[0022] Furthermore, for user queries containing counterfactual conditions, the system uses the real media event version as a read-only version anchor point, determines the branch grafting position corresponding to the counterfactual condition in the query computation dependency graph, and establishes a counterfactual virtual branch with a branch isolation identifier. The counterfactual virtual branch uses a hypothetical fact to cover the specified fact value at the branch grafting position, and performs virtual computation only on nodes downstream of that position. Nodes upstream of the branch grafting position that are not affected by the hypothetical fact can reuse the node results of the real media event version after the applicability certificate verification is passed. The node results and applicability certificates of the counterfactual virtual branch at least record the real media event version anchor point, hypothetical fact, branch isolation identifier, and virtual state identifier, and must not be written to the public fact cache, media event state fingerprint, or real conclusion cache of the real media event version.
[0023] Furthermore, the fact-requirement nodes are used to obtain structured facts from live media streams, on-demand videos, subtitle or speech recognition data, text recognition data, object tracking data, competition data, official event data, or external knowledge sources; the rule or knowledge-requirement nodes are used to obtain rule or knowledge versions corresponding to the event, region, time, media segment, object, or event type; the condition-determination nodes are used to perform Boolean judgments, numerical comparisons, temporal judgments, spatial relationship judgments, or logical combinations based on the fact nodes and rule or knowledge nodes; the conclusion nodes are used to generate media event conclusions based on one or more condition-determination nodes; and the expression nodes are used to convert the conclusions and their basis into answer proposition structures or natural language answers. The data record for each node includes: node identifier, node type, execution operator identifier, operator version, normalized input identifier set, output type, event scope, rule scope, estimated computational cost, actual result, result confidence level, and node status. Node status includes not calculated, in computation, completed, reusable, partially failed, and completely failed.
[0024] Furthermore, the normalized signature of the node can be generated according to the following formula: Node normalized signature = H(node type, execution operator identifier, operator version, set of normalized input identifiers, event scope, rule scope, output structure); where H represents a hash function, and the set of normalized input identifiers is arranged in a preset order; for fact nodes and decision nodes that are not related to natural language, the user's language or expression style is not written into the node normalized signature; for expression nodes, the user's language, level of expertise, or output length is written into the node normalized signature.
[0025] Further, step S4, determining the common inference subgraph, includes: classifying nodes in multiple query computation dependency graphs into corresponding node buckets according to their normalized signatures; identifying nodes appearing in two or more query computation dependency graphs as candidate common nodes; verifying whether the input dependencies of the candidate common nodes are the same or satisfy a preset compatibility relationship; forming a common inference subgraph from the verified candidate common nodes and their common dependency edges; and removing nodes and dependency edges already included in the common inference subgraph from each query computation dependency graph to obtain the corresponding residual computation subgraph.
[0026] Further, in step S4, for candidate nodes with different normalized signatures, the system normalizes the execution operators, parameter units, parameter order, commutative inputs, output fields, and operator versions of the candidate nodes based on a preset semantic operator normalization table. It also performs directed subgraph topology matching in conjunction with the dependency edges between nodes to determine whether there is a verified operator equivalence relation or input domain inclusion relation between the source node and the target node. When the input domain of the source node covers the input domain of the target node, and the output of the source node can obtain the output required by the target node through preset lossless projection, slicing, filtering, or pruning operators, the system establishes a verifiable mapping from the source node to the target node and creates a corresponding derived node. The derived node retains an independent node identifier, node signature, and applicability certificate, without directly rewriting the source node as the target node. If the region definition, time range, coordinate precision, rule scope, or output field cannot satisfy the verifiable mapping, then only the upstream node common to both is reused, and the target node is recalculated. The verifiable mapping includes at least the input domain relationship, output field mapping, unit and precision constraints, media event scope, rule or knowledge scope, and derived operator version. The source node result is used as the base result of the derived node only when both the verifiable mapping and the applicability certificate of the reasoning result of the source node are verified. If they cannot be verified, the fact, condition judgment result, or conclusion result of the source node is not reused.
[0027] Furthermore, the system can determine whether to perform node reuse based on the expected number of calls to the candidate common node, the node computation cost, the credential verification cost, and the risk of error reuse. For nodes with computation costs lower than credential verification costs, recalculation can be performed directly. For nodes with high computation costs and expected to be used by multiple queries, common computation is performed first and the results are cached.
[0028] Furthermore, based on the media event popularity decay description, the growth rate of the issue semantic cluster, the expected number of users requiring the service, node computing costs, caching and transmission costs, applicability credential verification costs, and resource pressure factors, the system determines the scheduling strategy for node caching, public computing, pre-computation, delayed computing, or direct recomputation. The resource pressure factors include at least one or more of the following: inference device utilization, video memory occupancy, task queue length, and network transmission load. When resource pressure increases, the system can adjust task priorities, reduce the computation of unnecessary expression nodes, use deterministic expression templates, or return to a pending confirmation state, but it does not reduce the applicability credential verification conditions, confidence thresholds, or media event version verification conditions of fact nodes, rule or knowledge nodes, condition decision nodes, and conclusion nodes.
[0029] Furthermore, the fact dependency summary in the applicability credential of the inference result consists of all leaf-level fact dependencies of the corresponding node, or is represented by a Merkle root summary; the rule dependency summary consists of the rule identifier, rule version, and rule content summary; the validity condition consists of one or more executable predicate expressions; the failure triggering condition includes changes in dependent facts, changes in rule version, changes in event state stage, changes in execution operator version, or the result confidence level being lower than a threshold.
[0030] The executable predicate expression adopts a structured format of (fact identifier, comparison operator, threshold or reference value, logical connector). For example, the condition for the offside foul judgment node can be expressed as: ("Confidence at the time of passing", ≥, 0.85) AND ("Offside position judgment", =, "True") AND ("Active participation judgment", ≠, "Pending confirmation"). When the system performs credential verification, it substitutes the latest value of the corresponding fact in the current event version into the predicate expression for evaluation. The condition is passed when all predicates are true.
[0031] Furthermore, the applicability of the inference result is verified, including: verifying whether the normalized signature of the current node is consistent with the signature of the node corresponding to the certificate; verifying whether the current event identifier and event version are within the event scope and version range allowed by the certificate; comparing the current fact dependency summary with the fact dependency summary in the certificate; comparing the current rule dependency summary with the rule dependency summary in the certificate; executing the validity conditions in the certificate; if all verifications pass, the candidate inference result is marked as reusable, if some dependencies change but do not affect all upstream nodes, it is marked as partially reusable, otherwise it is marked as unreusable.
[0032] Furthermore, the local failure handling in step S9 includes: generating a set of fact changes based on the old and new event versions; determining downstream reachable nodes along the dependency direction in the query calculation dependency graph, starting from the fact nodes in the set of fact changes; merging the downstream reachable nodes with the nodes in the applicability certificate of the inference result that record the corresponding facts as dependencies to form a set of affected nodes; marking the cached results of all nodes in the set of affected nodes as invalid and removing them; for nodes in the set of affected nodes, re-performing their applicability certificate verification, reusing the original results of those that pass the verification and restoring them to the "allowed reuse" state, and recalculating those that fail the verification; retaining the original results and continuing to reuse the nodes outside the set of affected nodes that pass the applicability certificate verification.
[0033] Furthermore, when the answer corresponding to the old event version has been sent to the user, the system determines the changed proposition based on the proposition structure of the old and new answers, generates differential correction data containing the original event version, the new event version, the original proposition, the new proposition and the reason for the update, and sends the differential correction data to the user terminal that received the old answer.
[0034] Furthermore, the central inference node encodes the difference correction data between the old and new answer proposition structures into a proposition graph patch and sends it to the edge nodes or user terminals. The proposition graph patch includes at least the target media event identifier, the base media event version, the target media event version, the changed proposition identifier, the original proposition status, the new proposition status, the proposition relationship change, the incremental evidence summary or applicability credential reference, the patch number, and the expiration scope. The edge nodes or user terminals apply the proposition graph patch to the local answer proposition structure only when the base media event version, patch number, and applicability credential verification pass the verification, and refresh the answer view based on the updated proposition structure.
[0035] Furthermore, in response to a large number of user queries within a short period of time, the system merges concurrent computation tasks with the same target event and the same common inference subgraph, so that the first computation task performs common inference, and other computation tasks subscribe to the common inference results; after the common inference results are generated, the corresponding node results are provided to the subscribing tasks through a publish-subscribe mechanism.
[0036] Furthermore, the system calculates the priority of public reasoning tasks based on the growth rate of the semantic cluster of the problem, the expected number of users in need, the proportion of missing nodes in the public reasoning graph, the expected computational cost of nodes, and the confidence of event association, and pre-calculates the public reasoning nodes and multiple commonly used expression versions corresponding to hot events according to the priority.
[0037] Compared with the prior art, the present invention has the following beneficial effects: (1) By converting the user query into a structured query computation dependency graph in step S3 and determining the common reasoning subgraph and residual computation subgraph by comparing the node normalization signature in step S4, questions with different expressions and different query objectives can be compared in a structured manner at the level of facts, rules and condition judgment, thereby realizing partial computation reuse between related but not completely identical questions and avoiding questions that can only reuse complete answers.
[0038] (2) Step S5 generates an applicability certificate for the reasoning result containing a fact dependency summary, a rule dependency summary and a condition for establishment for reusable nodes, and step S6 verifies the event scope, fact dependency, rule dependency and condition for establishment of the certificate, thereby reducing the risk of incorrect reuse caused by relying solely on semantic similarity.
[0039] (3) By obtaining the media time anchor point containing the playback status, user media time level or video playback position through step S1, and determining the target media event or segment from the media event timeline based on the media time anchor point in step S2, it can handle media content mismatch caused by different live source delays, pauses, replays, on-demand drags and different editing versions, and improve the accuracy of media event or segment association.
[0040] (4) By comparing the dependency summary of the new media event version with the original version when the event version changes in step S9, the nodes that have changed are identified. Combined with the factual dependency, rule dependency and failure triggering condition in the applicability certificate of the reasoning result generated in step S5, the set of affected nodes is accurately determined downstream along the dependency edge. Only the affected nodes and their downstream results are invalidated, while the node results that are still valid for certificate verification are retained. This solves the defect that the cache can only be deleted as a whole due to the lack of dependency data structure and cannot achieve local failure, and reduces the repeated calculation after the event is updated.
[0041] (5) By generating a language-independent answer proposition structure in step S7 and then expressing it in a personalized manner according to the user parameters, the immutable factual conclusions and variable expression parameters are distinguished, so that answers of different languages, different professional levels and different lengths can share the common reasoning results and reduce the probability of fact and conclusion deviations during the personalized generation process.
[0042] (6) By merging concurrent computing tasks and distributing results based on the publish-subscribe mechanism, a large number of concurrent requests corresponding to the same hot event are merged into a common subgraph computation and a small number of residual computations, which reduces the number of large language model calls, the number of input and output tags and the occupation of inference resources, and reduces the response latency in high-concurrency scenarios.
[0043] (7) By establishing a verifiable mapping and creating derived nodes based on the semantic operator paradigm table and the input domain inclusion relationship in step S4, verifiable derivation reuse between nodes with different signatures but compatible computational semantics is realized, expanding the scope of public computation reuse. At the same time, the risk of improper reuse is reduced through independent derived nodes and applicability credentials. Attached Figure Description
[0044] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention.
[0045] Figure 1 The overall flowchart of the versioned public reasoning reuse method for multi-user question answering of media events provided in the embodiments of the present invention is shown.
[0046] Figure 2 This is a schematic diagram of a query computation dependency graph structure including media time anchors and derived reuse nodes, provided for embodiments of the present invention.
[0047] Figure 3 This is a schematic diagram of the data structure for the applicability credentials of the reasoning results, which includes confidence states and decision boundaries, provided for embodiments of the present invention.
[0048] Figure 4 This is a schematic diagram of the direct common subgraph, derived reuse node, residual calculation subgraph, and counterfactual isolated branch provided in the embodiments of the present invention.
[0049] Figure 5 A flowchart illustrating the process of node local failure and incremental recalculation after a media event version change, provided in an embodiment of the present invention.
[0050] Figure 6 This is a flowchart illustrating the process of generating differentiated answers and updating proposition graph patches based on the answer proposition structure, as provided in an embodiment of the present invention.
[0051] Figure 7 This is a schematic diagram illustrating a scenario for unified media time anchoring and common reasoning reuse for live streaming media and on-demand video provided in an embodiment of the present invention. Detailed Implementation
[0052] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0053] I. System Overall Structure: like Figure 1As shown, the system in this embodiment includes a media time anchor acquisition module, a media event construction module, a query parsing module, a dependency graph construction module, a common and derived reuse identification module, an inference execution module, an applicability credential module, a personalized expression module, an answer verification module, and a media event version update module. These modules work together to achieve a complete process from query acquisition to answer generation and updating.
[0054] The inference execution module maintains the mapping relationship between operator identifiers and execution components. These execution components include at least one of a visual analysis model, a speech or text recognition model, a rule or knowledge retrieval module, a logical judgment module, and a large language model. Each execution operator identifier corresponds to a unique execution component and its calling interface. When executing a node, the scheduler finds and calls the corresponding execution component based on the node's execution operator identifier, mapping the node's normalized input identifier to the execution component's input parameters.
[0055] II. Media Time Anchor Points and Media Event Status Fingerprints: The media time anchor is represented as Au=(M, V, S, G, Tp, D, P, F). Where M is the media asset identifier, V is the media asset version, S is the live source identifier, G is the media segment or normalized fragment identifier, Tp is the timestamp of the media being presented on the user terminal, D is the offset of the source timeline relative to the baseline media timeline, P is the playback status, and F is the media frame or content fingerprint.
[0056] In live streaming scenarios, G can reuse segment sequence numbers from standard transmission protocols (such as segment numbers in the HLS protocol). In on-demand scenarios, the system divides the video into normalized segments and assigns segment identifiers based on keyframe timestamps or scene switching boundaries. The scene switching boundaries are determined based on a shot switching detection algorithm. This algorithm calculates the color histogram difference between video frames, and marks a scene switching boundary when the difference between consecutive frames exceeds a preset switching threshold (default 0.3). This threshold can be configured during system initialization based on the video content type (such as sports events, movies, or educational videos) and can be dynamically adjusted during operation based on scene detection accuracy. Chapter markers can serve as auxiliary division criteria. If the playback position corresponding to Tp falls within the segment time range identified by G, then Tp belongs to G.
[0057] Specifically, the playback states also include delayed playback, speed-up playback, and rewind. In the live streaming implementation, the user media time level is a type of media time anchor. When a user submits a query lacking specific time information, the system determines the user's actual viewing position based on Tp, G, and F, and searches for candidate media events or segments within a preset time range before and after that position. For rewind, drag, or on-demand states, the candidate range is determined based on the current playback position and the normalized segment; for paused states, the media event range corresponding to the paused state is maintained.
[0058] Media event status fingerprint Fe=H(media asset identifier, media asset version, event or segment identifier, normalized time range, content fingerprint, set of participants, action type, state stage, set of key fact summaries (including time uncertainty summaries and confidence state summaries for each fact), caption or annotation version, analysis model version, set of data source versions).
[0059] The media event construction module records events or semantic segments according to the baseline media time sequence. A record may include media assets and version, event or segment identifier, start time, end time, content fingerprint, event type, participating objects, object location, action status, subtitle or audio content, official status, data source, and confidence level. The confidence level is an overall confidence assessment of the event or segment record, obtained by weighting and fusing the confidence values of each source fact according to data source priority; the independent confidence values of each fact node are recorded as upstream dependencies in their respective fact nodes. For example, an offside-related event may include the pass time, the identity of the attacking player, the identity of the second-to-last defending player, the positions of both sides, the subsequent actions of the attacking player, and the status of the video assistant referee; a teaching video segment may include operating steps, on-screen objects, subtitle titles, and corresponding knowledge items.
[0060] like Figure 7 As shown, the media event construction module establishes a time alignment function for each data source, consisting of time offset, clock drift parameters, and synchronization error interval, converting the source timestamp of the data source into a reference time interval on the baseline media timeline. In addition to the fact value, the fact node also records the reference time interval, confidence value or confidence distribution, data source identifier, data source priority, and the model version that generated the fact value.
[0061] For facts obtained from multiple data sources, the media event construction module generates fused facts and their uncertainty descriptions according to preset data source fusion rules, and uses each source fact as an upstream dependency of the fused facts. For example, when multiple data sources provide outputs with different confidence levels for the same fact, the system performs weighted fusion according to data source priority (official event data > visual recognition data > speech recognition data) and confidence threshold (default ≥0.85 is considered reliable); when the confidence level of the result from the highest priority data source is lower than the preset threshold, the system uses the result from the second highest priority data source as a reference and marks the node status as "pending confirmation" instead of "confirmed".
[0062] The confidence value of the merged facts serves as one of the input confidence descriptions for the conditional decision node. When performing a decision, if the confidence value of the input fact is lower than a preset determination threshold (default ≥ 0.85, which is the same as the confidence threshold value in the aforementioned data source fusion but has a different purpose: the former is used to determine whether a single node has reached a definite state, while the latter is used to filter credible facts during data source fusion; both can be configured independently), the uncertainty of the fact within the acceptable time interval is considered not eliminated, and the corresponding decision result must not be marked as "definite state"; a definite state is only output when the confidence values of all upstream facts have reached the determination threshold and all possible fact values within the time uncertainty interval support the same decision result.
[0063] The condition decision node selects the appropriate rule from the confidence propagation rule table based on the operator type to propagate the time uncertainty interval and confidence description of the input facts. The confidence propagation rule table contains at least the following rules: for AND logic combination nodes, the output confidence is the minimum of all input fact confidences; for OR logic combination nodes, the output confidence is the maximum of all input fact confidences; for numerical comparison nodes, the output confidence is equal to the input fact confidence multiplied by the comparison operator confidence (equal to the preset confidence of the comparison operator); when time uncertainty propagates downstream along the dependency edge, the reference time interval of the downstream node is the union or intersection of the upstream fact reference time intervals, depending on the operator type. Different operator types correspond to different propagation functions in the confidence propagation rule table.
[0064] When a Boolean judgment is true or false across all acceptable time points and factual values, the condition decision node generates a definite state; when different judgment results exist within the range, the condition decision node generates a temporary or uncertain state. The conclusion node must not convert the temporary or uncertain state into a definite conclusion; it can only generate an answer proposition with a pending confirmation flag.
[0065] The temporary or uncertain states generated by the condition decision nodes serve as the upstream basis for the conclusion nodes to generate the pending confirmation flag. When any upstream condition decision node is in a temporary state, the conclusion node generates an answer proposition with the pending confirmation flag, and both maintain consistency in state management. The difference between a temporary state and a pending confirmation state is that the former indicates that the node result is based on conflicting or incomplete data and needs to wait for conflict resolution; the latter indicates that the final answer has not yet been confirmed by official or high-confidence data and needs to wait for new data to arrive.
[0066] III. Construction of the query computation dependency graph: like Figure 2 As shown, the query computation dependency graph is a directed graph with computation nodes as vertices and dependencies as edges. First, structured parameters are obtained from the user query using a query parsing model. Then, a graph template is selected from the operator template library and instantiated based on the target event type and query objective. Node types include event alignment nodes, fact requirement nodes, rule requirement nodes, condition decision nodes, conclusion nodes, and expression nodes.
[0067] Each node's execution operator identifier corresponds one-to-one with the operator implementation registered in the inference execution module. For example, the "passing moment location operator" maps to the trajectory detection interface of the visual analysis model, the "offside rule retrieval operator" maps to the query interface of the rule knowledge base, and the "offside position determination operator" maps to the coordinate comparison interface of the logic judgment module. When executing a node, the scheduler looks up the corresponding execution component based on the execution operator identifier recorded by the node, and converts the node's normalized input identifiers (such as event identifiers, player identifiers, and time ranges) into the input parameter format of the execution component before calling the execution.
[0068] For counterfactual queries (such as "If he hadn't touched the ball, would he still be offside?"), the system inserts a counterfactual overriding node between the fact node and the condition decision node, constructing a virtual branch. This branch replaces the specified fact value with the assumed value and isolates the computation, without affecting the public cache and conclusion of the real event.
[0069] like Figure 4 As shown, the construction process of a counterfactual virtual branch specifically includes: determining the covered fact node based on the counterfactual conditions; determining the branch grafting position between the fact node and its earliest affected downstream node; connecting the upstream real node of the grafting position to the virtual branch using a read-only reference; creating a counterfactual covering node and its downstream derived nodes in the virtual branch; and generating a virtual node signature based on the real media event version identifier, the covered fact identifier, the assumed fact value, the rule or knowledge scope, and the branch identifier. For counterfactual queries with the same real media event version, the same assumed fact, and the same rule or knowledge scope, nodes can be reused within the same virtual branch; counterfactual nodes with different assumed facts or different real media event versions must not be merged.
[0070] For example, for a query asking "if the player did not touch the ball," the counterfactual overlay node simply replaces the fact of ball contact related to active participation in the game with the hypothetical fact of "not touching the ball," without changing the timing of the pass, player position, applicable rules, or official rulings in the actual event. The system recalculates the active participation determination and counterfactual conclusion based on this hypothetical fact, and marks the corresponding proposition as a counterfactual proposition in the answer proposition structure. These counterfactual propositions are only used for the expression and verification of the corresponding user query and do not serve as factual basis for subsequent queries about actual events, nor do they participate in the differential correction of the actual event answers.
[0071] IV. Identification of common reasoning subgraphs and calculation of residuals: like Figure 4 As shown, the system calculates a normalized signature for each node and uses a hash index to group nodes with the same signature into the same node bucket. Nodes with the same signature must also verify that their upstream dependencies, event scopes, and rule scopes are consistent before they can be used as public nodes. For nodes with different signatures but semantic compatibility, the system uses a semantic operator normalization table to perform verifiable mapping and create derived nodes for reuse.
[0072] After the common subgraph is identified, the scheduler creates one execution task for the common inference subgraph and creates residual execution tasks for each user query. The results are synchronized between tasks through a publish-subscribe mechanism.
[0073] Combination Figure 4 As shown, in a preferred embodiment, the reuse benefits of system computing nodes are: Br = Nr × Cn - Cv - Cs; Where Br represents the reuse benefit, Nr represents the expected number of reuses, Cn represents the cost of a single node computation, Cv represents the cost of applicability credential verification, and Cs represents the caching and transmission costs. When Br is greater than a preset threshold, the corresponding node is cached and reused; otherwise, it can be recalculated directly. This avoids increasing the system burden by implementing complex caching management for low-cost nodes.
[0074] The preset thresholds are set during system initialization based on historical operating data or empirical values, and can be dynamically adjusted during system operation based on statistical indicators such as verification pass rate and reuse failure rate. When dynamically adjusted, the adjustment range shall not exceed ±20% of the initial value to prevent excessive fluctuations (this range is determined based on the maximum allowable adjustment range when the cache hit rate change rate does not exceed 5% during system stability testing). Both the confidence threshold and the reuse benefit threshold can be configured through the system management interface.
[0075] In one optional implementation, the scheduler assembles a policy state vector from media event popularity, popularity change rate, event state stage, expected node reuse count, node computation cost, applicability credential verification result, resource pressure factor, and historical reuse feedback. Based on this policy state vector, the scheduler selects actions such as caching, common execution, pre-computation, delayed execution, or recomputation. The policy can be implemented using a preset rule model, an online feedback update model, or a reinforcement learning model. For reinforcement learning models, the reward parameter is at least related to the number of verified reuses, task waiting time, resource consumption, number of credential verification failures, and number of subsequent corrections. Regardless of the policy model used, candidate nodes that fail verification based on media event scope, factual dependency, rule or knowledge dependency, validity conditions, and confidence state are not included in the candidate set of reusable actions.
[0076] For the 80% threshold used in the partial reuse determination in step S6, the system determines the threshold by statistically analyzing the correspondence between the coverage ratio of changed fact nodes in the upstream dependency set and the reuse failure rate. In practical applications, the threshold can be configured according to different media event types (such as sports events, news live broadcasts, and teaching videos), or it can be dynamically adjusted based on the reuse failure rate fed back online, with the adjustment range not exceeding ±10% of the initial value.
[0077] V. Generation and Verification of Evidence on the Applicability of Reasoning Results: like Figure 3 As shown, when a node's computation is complete, the applicability credential module generates a credential containing the result value, a fact dependency summary, a rule dependency summary, the validity conditions, the event version range, and the failure triggering conditions. The credential uses a Merkle tree summary to represent fact dependencies, reducing storage overhead and supporting rapid change detection.
[0078] For nodes with uncertainty descriptions, the applicability credential for the inference result also records the confidence state, the allowed reuse confidence threshold or confidence interval, the time boundary, and the decision boundary that would change the judgment result. When new high-precision data arrives, the system compares the old and new fact values, the time uncertainty interval, and the confidence state; only when the comparison causes a change in the validity conditions in the credential, the confidence state crosses the allowed reuse boundary, the time boundary crosses the decision boundary, or the fact version changes, is the corresponding node marked as needing re-verification. Nodes that do not cross the boundaries and whose credential verification still passes retain the original result, and their data source summary or confidence description is updated.
[0079] Before reuse, the system verifies each step of the credential, including event scope, fact dependency, rule dependency, and conditions for validity, and determines whether reuse is allowed, partially reused, or rejected based on the verification results.
[0080] VI. Localized failures and updates following version changes to media events: like Figure 5 As shown, when a media event version changes, the system compares the old and new versions, generates a set of changes, and determines the set of affected nodes based on the inverse index of the dependency graph. Only the cache within this set is invalidated and recalculated; nodes outside the affected set that have passed applicability credential verification retain their original results and continue to be reused. If an old answer has already been sent to the user, the system generates differential correction data (proposition graph patch) and sends it to the client.
[0081] Specifically, the failure handling includes: removing the cached results of all nodes in the affected node set from the cache, and updating the node status from "completed" or "allowed reuse" to "completely failed". The recalculation is performed from top to bottom according to the dependency order between nodes, that is, upstream nodes are calculated first and then downstream nodes are calculated. If a new user query is received during the recalculation process, the system returns the corresponding result according to the node status: if the node status is "completely failed", it is recalculated; if it is "calculating", the calculation result of that node is subscribed to; if it is "completed", it is directly reused.
[0082] VII. Differentiated Generation Based on Answer Proposition Structure: like Figure 6 As shown, the public reasoning results are first converted into a language-independent answer proposition structure, including mandatory propositions, optional propositions, prohibited propositions, and their interrelationships. The personalized expression module transforms the same proposition structure into different expression forms based on parameters such as the user's language proficiency and level of expertise, but strictly prohibits altering the semantic values of factual propositions, rule propositions, and conclusion propositions. The answer verification module performs propositional consistency verification on the generated candidate answers to ensure their accuracy and consistency.
[0083] Specifically, the proposition consistency verification adopts the following rules: First, candidate answers are converted into a proposition set P using a structured proposition extraction model. ans ; P ans With the set of required propositions P in the answer proposition structure must Compare, if P ans P not included must If any proposition in P is selected, it is determined to be an omitted mandatory proposition; ans With the set of prohibited propositions P forbidden Compare, if P ans It contains P forbidden If any proposition in the list is a statement, it is determined to contain a prohibited proposition; for the relationship R between propositions (such as a support relationship or a causal relationship), verify P. ansThe dependency direction between propositions in R is checked against R. If a dependency is reversed or missing, the relation is considered broken. The determination of the inclusion relation is based on the consistency of the normalized proposition identifiers, rather than semantic similarity.
[0084] The deterministic expression template is pre-stored in the system's configuration storage and can be stored in the form of configuration files (such as JSON (JavaScript Object Notation), XML (Extensible Markup Language) format) or code constants. When a candidate answer fails to pass the verification in step S8 and the reason for failure is that a required proposition is omitted, a prohibited proposition is included, or the relationship between propositions is broken, the system directly calls the template to generate a template answer and no longer attempts to re-express it in a personalized way.
[0085] When returning to step S7 to re-express the personalized content, the system adjusts the generation parameters of the expression model to reduce the randomness of the expression. For example, the temperature parameter is adjusted from 0.7 to 0.3, and remains unchanged at 0.3 for each regeneration, without further reduction. The temperature parameter is a hyperparameter controlling the randomness of the large language model's generation, with a value range of 0 to 1. The higher the temperature value, the stronger the output diversity; the lower the temperature value, the stronger the output determinism. For expression models not based on the large language model, a similar effect of reducing randomness is achieved by adjusting the search width in its decoding strategy (e.g., adjusting the bundle search width from 5 to 2). The number of regenerations does not exceed a preset limit (default 3 times). If the candidate answer generated after the 3rd retry still fails verification, the template answer, which is deterministically filled with the answer proposition structure, is used as the final output.
[0086] 8. High-concurrency task merging and pre-computation: After a live event occurs, the system merges tasks with the same target event and a common inference subgraph, performs only one common computation, and other tasks subscribe to the results.
[0087] 1. Pre-calculated trigger conditions: During the predictive preheating process, the system identifies preset media event features from live media streams or on-demand video access sequences, and predicts potentially high-frequency query targets based on the correlation between these media event features and historical question semantic clusters. These media event features may include referee interruption of a match, intervention by the video assistant referee, appearance of replay footage, official status changes, video chapter switching, increased access rate of hot segments, or the appearance of preset event markers. For the prediction results, the system pre-constructs a corresponding pre-computation dependency subgraph, prioritizing the calculation of upstream nodes such as media segment alignment, confirmed core facts, and applicable rules or knowledge; condition judgment nodes and conclusion nodes that have not yet met the conditions remain unconfirmed. Upon subsequent user queries, the system still performs applicability credential verification on the pre-computation nodes, and reuses the node results if the verification passes.
[0088] 2. Detailed interaction between edge and cloud: In the edge-cloud collaborative implementation, the central inference node maintains an authoritative mapping between media event versions and answer proposition structures, while edge nodes or user terminals maintain local proposition state graphs corresponding to received answers. When the central inference node detects a proposition change, it generates a proposition graph patch according to the media event identifier and patch number, and attaches an applicability credential identifier or evidence digest that can locate the basis of the change. The edge node or user terminal first verifies whether the target media event identifier, base media event version, target media event version, and patch number of the patch are continuous with the local proposition state graph; if the verification passes, only the affected proposition nodes and dependent edges are updated; if the verification fails, the patch is out of order, or the local version is missing, it requests the central inference node to issue the complete proposition structure or the missing patch.
[0089] The local rendering engine can update text, subtitles, or correction prompts based on the updated proposition state graph using deterministic templates, proposition-constrained expression models, or interface components. The local rendering engine only changes the surface form of the language and the presentation of the interface; it does not perform new fact analysis, rule judgments, or conclusion derivations. When the local expression result fails proposition consistency verification, a deterministic template filled with the updated proposition structure is used. Therefore, the central side does not need to retransmit the unchanged complete answer text for each proposition state change.
[0090] The public reasoning result can be generated by the central reasoning node, and the language-independent answer proposition structure can be distributed to the edge nodes. The edge nodes generate or cache commonly used answer versions based on the language and expression levels used within their respective regions. Since the edge nodes do not re-perform fact analysis and rule judgment, redundant reasoning calculations across regions can be reduced, while maintaining factual consistency of answers across different regions.
[0091] IX. Application Scenarios and Examples: 1. Offside scenario in football: In a live football match, a goal was scored in the 73rd minute. The assistant referee initially signaled offside, but the video assistant referee (VAR) subsequently reviewed the incident. Multiple live streaming platforms experienced varying playback delays relative to the baseline match stream. User A watched normally via stream A, User B watched via stream B, and User C paused and then resumed playback.
[0092] After the goal, User A asked "Why was this goal disallowed?", User B asked "Was it offside?", and User C asked "Why was it called offside?". The system retrieved the media timeline for each of the three users. User A and User B's media timeline were both related to the goal event in the 73rd minute, while User C's media timeline was still related to another event in the 68th minute. Therefore, User C's query was not merged with the first two queries.
[0093] For users A and B, the system constructs corresponding query computation dependency graphs. The two graphs share nodes for event alignment, pass timing, player position, applicable rules, and offside position determination. User A's residual calculation also includes active participation in the judgment, goal cancellation conclusion, and explanation of the cause; User B's residual calculation can simply return the current ruling status and position determination.
[0094] The system executes a common inference subgraph. The visual analysis module and object tracking data jointly determine the moment a teammate touches the ball and the position of the target attacking player; the rule retrieval module obtains the offside rule corresponding to the applicable match; and the condition judgment module determines that the target player is in an offside position. After the above nodes are completed, an applicability certificate for the inference result is generated.
[0095] During the Video Assistant Referee (VAR) review phase, because the fact of active involvement was not yet confirmed, the final conclusion node was marked as pending confirmation. The system returned an explanation with the event status to the user instead of presenting it as the final ruling. Subsequently, official event data confirmed that the target player had actively touched the ball. The system generated a new version of the event, and based on the set of fact changes, only the active involvement judgment, offside conclusion, and explanation nodes were re-verified or recalculated.
[0096] The final public answer's proposition structure includes the timing of the pass, the offside position, active participation, applicable rules, and the ruling. User A is identified as having a standard Chinese expression parameter, and the system generates a brief explanation; User B selects a professional English expression parameter, and the system generates an English explanation containing standard rule terminology. The two answers differ in language and level of professionalism, but reference the same fact nodes, rule nodes, and conclusion nodes.
[0097] If user Ding then asks, "If the player did not touch the ball, is he still offside?", the system reuses the event alignment, passing time, player position, rule, and offside position judgment node, and inserts a counterfactual overlay node for "not touching the ball" into user Ding's residual calculation subgraph, recalculating the active participation and counterfactual conclusion without modifying the public facts of the real event.
[0098] 2. Scenario where multiple users ask questions about the same segment of a video on demand: In one embodiment of video-on-demand, the media platform stores a device maintenance tutorial video. The video exists in both an original version and a released version with added intros and corrected subtitles. Different users can browse the video at normal speed, accelerated speed, or by dragging through different devices.
[0099] User E asked "Why do we need to close this valve first?" at 12 minutes and 18 seconds in the original version; User F asked "What is the purpose of this step?" at 12 minutes and 42 seconds in the released version; and User G asked an English question after pausing in the same released version. Because the released version added an intro, the absolute playback times of the three queries are not exactly the same. The system obtains the media asset identifier, asset version, presentation timestamp, normalized segment identifier, playback status, and content fingerprints of the corresponding video frames and audio segments to form media time anchors.
[0100] The media event construction module aligns three media time anchors to the same normalized operation segment based on frame fingerprints, audio fingerprints, subtitle timelines, and chapter markers. The media event state fingerprint of this segment includes the video asset version, normalized segment identifier, keyframe summary, subtitle version, speech recognition version, object recognition model version, and knowledge base version.
[0101] The system constructs a query computation dependency graph for the three queries. The queries share fragment alignment, speech recognition, subtitle extraction, valve object recognition, operation step recognition, equipment maintenance knowledge retrieval, and a conditional judgment node for "closing the valve to isolate the pressure source." The residual nodes for users E and F are used to explain the cause and purpose of the steps, respectively, while the residual nodes for user G also include English terminology mapping and English expression nodes.
[0102] If the source node has already calculated all device objects and their locations within the operation segment, while the target query only requires valve objects, the system verifies that the source node's input domain covers the target node's input domain using a semantic operator normal form table, and creates an object filtering derived node. The derived node records the source node identifier, object field mapping, segment scope, identification model version, and precision constraints using applicability credentials, without re-performing full object detection.
[0103] When the subtitle version is corrected, but the video frame, segment fingerprint, and object recognition results remain unchanged, the system generates a set of subtitle changes and only re-verifies the knowledge retrieval, condition judgment, and expression nodes that depend on the subtitle proposition; segment alignment, keyframes, and object recognition nodes continue to be reused. When the video is re-edited or the object recognition model version is updated, the media event version update module determines the affected nodes based on the applicability credential and performs a partial recalculation.
[0104] Ultimately, based on the same language-independent propositional structure, the system returns a plain Chinese explanation to user E, a brief step-by-step explanation to user F, and an English answer containing technical terminology to user G. Thus, even if different users ask different questions at different times, with different video versions, and under different playback conditions, they can reuse the common reasoning results of the same media segment after content alignment and credential verification are passed.
[0105] 10. Exception Handling Mechanism: When a media time anchor is missing or the matching scores of multiple candidate media events or segments are close, the system does not directly reuse the hottest answer, but instead marks the query as having uncertain media association. The system can re-determine the target media event or segment by combining the video frames recently presented on the user's terminal, audio fingerprints, subtitles, narration text, or user-added information; if it still cannot be determined, it requests the user to confirm the media time or target object.
[0106] When different data sources provide conflicting results regarding the same fact, the fact node records each data source, its priority, and confidence level, and sets the node status to either "conflicted" or "temporary." The "temporary" status indicates that the node result was generated based on conflicting or incomplete upstream data and may need to be updated based on new data or conflict resolution results. The "pending confirmation" status indicates that the node result depends on a fact that has not yet been definitively confirmed and will be converted to "confirmed" or "expired" after confirmation by official data or high-confidence data. Both are non-deterministic states and cannot be output as definitive facts or conclusions. Applicability credentials relying on this fact cannot be marked as ultimately valid until the conflict is resolved or a preset credibility condition is met.
[0107] When the applicable rule version cannot be determined, the rule node is not merged with nodes from other events or other rule versions. The system determines the rule scope based on the event identifier, match time, and event organizer; if it cannot be determined, it returns a status indicating a lack of rule basis, rather than directly reusing conclusions from other events.
[0108] XI. Examples of Electronic Devices and Storage Media: This invention can also be implemented by an electronic device. The electronic device includes a processor, a memory, a network interface, and a computer program stored in the memory and executable by the processor. When the processor executes the computer program, it implements the steps described above: media time anchor acquisition, media event state fingerprint generation, query computation dependency graph construction, common and derived reuse identification, inference result applicability credential generation and verification, local failure handling, and differentiated answer generation.
[0109] The electronic device can be a single server, a server cluster, a cloud computing node, an edge computing node, or a distributed system consisting of a central node and multiple edge nodes. The query computation dependency graph, node results, and inference result applicability credentials can be stored in memory, cache, database, or distributed object storage.
[0110] The present invention can also be implemented by a computer-readable storage medium storing a computer program, which, when run on a processor, causes the processor to perform the above-described method steps.
[0111] Through the above specific implementation methods, the present invention realizes efficient, accurate, and scalable public reasoning reuse in media event question-and-answer scenarios, significantly reducing system load and response latency, while ensuring the accuracy and consistency of answers.
Claims
1. A versioned public reasoning reuse method for multi-user question-answering in media events, characterized in that, include: S1. Acquire media data, event or analysis data corresponding to the media data, and multiple user queries, and obtain a corresponding media time anchor for each user query; wherein, the media data includes at least one of live media streams and on-demand videos; the media time anchor is used to indicate the actual position of the media content viewed when the user submits the query, and includes at least one or more of the following: media asset identifier, media asset version, live source identifier, media segment or fragment identifier, media presentation timestamp, playback offset, playback status, and content fingerprint; the playback status includes at least one of the following: live playback, delayed playback, on-demand, pause, drag, speed-up playback, and rewind; S2, construct a media event timeline based on the media data and the event or analysis data; based on the semantic information of the user query and the media time anchor, determine the target media event or target media segment corresponding to the user query from the media event timeline, and generate the corresponding media event status fingerprint; S3, perform structured parsing on the user query to obtain one or more of the following: query target, attribute to be judged, time constraint, rule scope, fact constraint, output requirement, and counterfactual condition. Construct a query computation dependency graph based on the structured parsing results and the target event. The query computation dependency graph includes at least two types of nodes: event alignment nodes, fact requirement nodes, rule requirement nodes, condition judgment nodes, conclusion nodes, and expression nodes. The nodes are connected by dependency edges. S4. Generate a node normalized signature based on the node type, execution operator, normalized input identifier, event scope, rule version, and operator version; by comparing the normalized signatures of nodes in multiple query computation dependency graphs, determine the common inference subgraph of the multiple query computation dependency graphs and the residual computation subgraphs corresponding to each user query respectively. S5, perform a calculation on the nodes in the public inference subgraph and generate an applicability certificate for the inference result for reusable nodes; the certificate includes at least the result value, fact dependency summary, rule dependency summary, validity condition, event version range, and failure triggering condition; the fact dependency summary consists of all leaf-level fact dependencies of the corresponding node, or is represented by a Merkle root summary; the validity condition consists of one or more executable predicate expressions; the failure triggering condition includes changes in dependent facts, rule version changes, event state stage changes, execution operator version changes, or result confidence falling below a threshold; S6, upon receiving a subsequent user query or executing a residual calculation subgraph, searches for candidate inference results based on the node normalized signature and verifies the applicability certificate of the inference result corresponding to the candidate inference result; reuses the corresponding result when the event scope, fact dependency, rule dependency, and establishment condition all meet the reuse conditions; reuses valid nodes when some dependencies meet the reuse conditions and calculates nodes that do not meet the reuse conditions; rejects reuse and recalculates when the reuse conditions are not met. S7 generates a language-independent answer proposition structure based on the execution results of the common inference subgraph and the residual calculation subgraph; it then personalizes the answer proposition structure according to the user's language, level of expertise, output length, and expression method to obtain candidate answers. S8 performs proposition consistency verification on candidate answers to determine whether candidate answers cover required propositions, contain prohibited propositions, and maintain the relationship between propositions; if the verification passes, the candidate answer is returned to the user; if the verification fails, the answer is regenerated or generated using a deterministic expression template. S9: When receiving new media data, event or analysis data, caption or annotation data, rule or knowledge data corresponding to the target media event, generate a new media event version, compare the media and dependency summaries in the new media event version with those in the original version, and determine the media, facts, rules or knowledge nodes that have changed; determine the set of affected nodes based on the dependency edges in the query calculation dependency graph and the failure triggering conditions in the applicability certificate of the inference result, perform failure processing and recalculation only on the affected nodes and their downstream nodes, and update the corresponding answer according to the new media event version.
2. The method according to claim 1, characterized in that, In step S2, the target media event or segment is determined based on the user query, media time anchor, and media event timeline. This includes: determining a candidate time range based on the media time anchor; obtaining candidate events or segments from the candidate time range; calculating the semantic matching degree, time matching degree, content fingerprint matching degree, and visible object matching degree between the user query and the candidate events or segments, respectively; determining the target media event or segment based on the matching degree; if the highest matching result does not reach the association threshold, the user query is marked as an uncertain association query, and clarification information is returned to the user or waiting for new events or analysis data.
3. The method according to claim 1, characterized in that, The query computation dependency graph in step S3 is constructed through an operator template library. First, a natural language processing model is used to identify the user's query intent and parameters. Then, a corresponding graph template is selected from the operator template library according to the intent, and the graph template is instantiated using the target event, fact constraints, rule scope, and counterfactual conditions. For user queries containing counterfactual conditions, the system uses the real media event version as the read-only version anchor point, determines the branch grafting position corresponding to the counterfactual condition in the query computation dependency graph, and establishes a counterfactual virtual branch with a branch isolation identifier. The counterfactual virtual branch uses a hypothetical fact to overwrite the specified fact value at the branch grafting position, and performs virtual calculations only on nodes downstream of that position; nodes upstream of the branch grafting position that are not affected by the hypothetical fact reuse the node results of the real media event version after the applicability credential verification is passed. The node results and applicability credentials of the counterfactual virtual branch must at least record the anchor point of the real media event version, the assumed facts, the branch isolation identifier, and the virtual state identifier, and must not be written to the public fact cache, media event state fingerprint, or real conclusion cache of the real media event version.
4. The method according to claim 1, characterized in that, Step S4, determining the common inference subgraph, includes: classifying nodes in multiple query computation dependency graphs into corresponding node buckets according to their normalized signatures; identifying nodes appearing in two or more query computation dependency graphs as candidate common nodes; verifying whether the input dependencies of the candidate common nodes are the same or satisfy a preset compatibility relationship; forming a common inference subgraph from the verified candidate common nodes and their common dependency edges; and removing the nodes and dependency edges already included in the common inference subgraph from each query computation dependency graph to obtain the corresponding residual computation subgraph.
5. The method according to claim 1, characterized in that, In step S4, for candidate nodes with different normalized signatures, the system normalizes the execution operators, parameter units, parameter order, commutative inputs, output fields, and operator versions of the candidate nodes based on a preset semantic operator normalization table. It then performs directed subgraph topology matching in conjunction with the dependency edges between nodes to determine whether a verified operator equivalence relation or input domain inclusion relation exists between the source node and the target node. When the input domain of the source node covers the input domain of the target node, and the output of the source node can obtain the output required by the target node through preset lossless projection, slicing, filtering, or pruning operators, the system establishes a verifiable mapping from the source node to the target node and creates a corresponding derived node. The derived node retains an independent node identifier, node signature, and applicability certificate, without directly rewriting the source node as the target node. The verifiable mapping includes at least input domain relations, output field mapping, unit and precision constraints, media event scope, rule or knowledge scope, and derived operator versions.
6. The method according to claim 1, characterized in that, In step S6, the applicability certificate of the inference result is verified, including: verifying whether the normalized signature of the current node is consistent with the signature of the node corresponding to the certificate; verifying whether the current event identifier and event version are within the event scope and version range allowed by the certificate; comparing the current fact dependency summary with the fact dependency summary in the certificate; comparing the current rule dependency summary with the rule dependency summary in the certificate; executing the validity conditions in the certificate; if all verifications pass, the candidate inference result is marked as reusable, if some dependencies change but do not affect all upstream nodes, it is marked as partially reusable, otherwise it is marked as unusable.
7. The method according to claim 1, characterized in that, The partial failure handling in step S9 includes: generating a set of fact changes based on the old and new event versions; determining downstream reachable nodes along the dependency direction in the query calculation dependency graph, starting from the fact nodes in the set of fact changes; merging the downstream reachable nodes with the nodes in the applicability certificate of the inference result that record the corresponding facts as dependencies to form a set of affected nodes; invalidating the cached results in the set of affected nodes, and retaining the node results outside the set of affected nodes that have passed the applicability certificate verification.
8. The method according to claim 1, characterized in that, When the answer corresponding to the old event version has been sent to the user, the system determines the changed proposition based on the proposition structure of the old and new answers, generates differential correction data containing the original event version, the new event version, the original proposition, the new proposition and the reason for the update, and sends the differential correction data to the user terminal that received the old answer; The central inference node encodes the difference correction data between the old and new answer proposition structures into a proposition graph patch and sends it to the edge nodes or user terminals. The proposition graph patch includes at least the target media event identifier, the base media event version, the target media event version, the changed proposition identifier, the original proposition status, the new proposition status, the proposition relationship change, the incremental evidence summary or applicability certificate reference, the patch number, and the expiration scope. The edge nodes or user terminals apply the proposition graph patch to the local answer proposition structure only when the base media event version, patch number, and applicability certificate are verified. They also refresh the answer view based on the updated proposition structure.
9. The method according to claim 1, characterized in that, To handle a large number of user queries within a short period of time, the system merges concurrent computation tasks with the same target event and the same common inference subgraph, so that the first computation task performs common inference, and other computation tasks subscribe to the common inference results; after the common inference results are generated, the corresponding node results are provided to the subscribing tasks through a publish-subscribe mechanism.
10. The method according to claim 1, characterized in that, The system calculates the priority of public reasoning tasks based on the growth rate of the semantic cluster of the problem, the expected number of users in need, the proportion of missing nodes in the public reasoning graph, the expected computational cost of nodes, and the confidence of event association. It also pre-calculates the public reasoning nodes and multiple commonly used expression versions corresponding to hot events according to the priority.