Television page compliance detection method and system
By employing a dual-agent architecture and resource identifier tree modeling method, the issues of automation and accuracy in TV page compliance detection were resolved. This enabled intelligent closed-loop scheduling from user needs to detection reports, improving the automation level of detection and the adaptability to standard updates, and ensuring the interpretability and traceability of detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ACADEMY OF BROADCASTING SCI STATE ADMINISTATION OF PRESS PUBLICATION RADIO FILM & TELEVISION
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies cannot achieve automated, rapid, and accurate compliance testing of TV pages. Especially in the Internet TV environment, traditional manual and script-based testing have limitations in terms of coverage, real-time monitoring, and cost-effectiveness, and are difficult to reflect the visual presentation structure and generate auditable and reproducible testing evidence.
The detection method, which adopts a dual-agent architecture and resource identifier tree (RIT) modeling, achieves intelligent closed-loop scheduling from user needs to rule generation, detection and judgment execution and report output through the collaborative work of the compliance detection main agent and the specification parsing agent. It constructs a computable structured model and uses the ReAct mode to dynamically update and optimize the rules.
It has achieved automation, scalability, and interpretability of TV page compliance, supports cross-task and cross-time period traceability and reproduction, improves the interpretability of test results and the ability to quickly adapt to standard updates, and provides effective technical support for the State Administration of Radio and Television's dual governance of TV "nested dolls".
Smart Images

Figure CN121908034A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for detecting the compliance of television pages. Background Technology
[0002] The "nested" pricing model for television services has sparked widespread dissatisfaction among consumers and attracted significant public attention. In response, the State Administration of Radio and Television has taken proactive measures, conducting in-depth investigations into issues such as misleading information and poor user experience on cable TV, IPTV, and internet TV pages, and proposing a series of rectification plans. These plans utilize different standards and management specifications to achieve simpler and more user-friendly pages, improving the overall user experience and ensuring transparency and convenience in subscription and billing processes. In summary, the page display requirements for these three service models—cable TV, IPTV, and internet TV—can be categorized into several main types: identification, area, function entry, and pricing strategy. Each service model has specific requirements. Identification requirements emphasize displaying unified logos in prominent locations and designated areas on the page, such as the "Watch TV" logo, the "Call Sign" logo, and paid / free logos. Area requirements specify the proportion of page space allocated to different types of programs. Function entry requirements require setting up specific service zones on the interactive homepage for quick user access and use of related services. Pricing strategy requirements standardize the billing process and the information that should be provided to users. While the above requirements can be met through manual review or template scripts, traditional manual and script-based inspections have limitations in terms of coverage, real-time monitoring, and cost-effectiveness. Therefore, how to automate and intelligently inspect the requirements for TV page display has become an urgent problem to be solved. Summary of the Invention
[0003] This invention provides a method and system for detecting the compliance of television pages, in order to solve the problem that existing methods cannot automatically, quickly and accurately detect the compliance of television pages.
[0004] In a first aspect, the present invention provides a method for detecting the compliance of a television page, the method comprising: Create a task based on the TV page inspection requirements and determine the corresponding management specification items for that task; The system collects TV pages to be tested, performs structured parsing and element information identification on the collected TV pages, and extracts the page information into a hierarchical and computable data model with a "page-column-element" structure, namely the Resource Information Tree (RIT). The management specification items are converted into executable discrimination scripts, and the converted discrimination scripts are subjected to syntax and semantic verification, conflict resolution, regression verification and version management. In the sandbox environment, a discrimination script is executed on each resource identifier tree of the structured model, outputting violation results, operation logs and performance indicators, and reproducing the violation page based on the trigger. By combining the violation results with the corresponding violation page snapshot, resource identifier tree path, and numerical metrics, a judgment basis with annotation and measurement information is generated, and a standardized report is generated.
[0005] Optionally, the step of creating a task based on the TV page detection requirements and determining the corresponding management specification item for the task includes: creating a task based on the TV page detection requirements, fixing the task context and generating a task number, wherein the task number is used to uniquely identify the task, and the task includes concurrency, timeout, retry policies and permission domains; determining the management specification item corresponding to the task, and obtaining the management specification item's number, version, effective period and anchor point, and binding the obtained management specification item to the task.
[0006] Optionally, the management specification entries are converted into executable discrimination scripts, and the converted discrimination scripts are subjected to syntax and semantic verification, conflict resolution, regression verification, and version control, including: The management specification entries are converted into executable DSL rules by a specification parsing agent, and the DSL rules are converted into discrimination scripts. The converted DSL rules and discrimination scripts are then subjected to syntax and semantic verification, conflict resolution, regression verification, and version management.
[0007] Optionally, converting the management specification entries into executable DSL rules and the DSL rules into discrimination scripts further includes: directly invoking the required management specification entries, DSL rules, and discrimination scripts when they exist in the database; and generating new management specification entries, DSL rules, and discrimination scripts through the specification parsing agent when they are missing from the database, and storing the generated management specification entries, DSL rules, and discrimination scripts in the database after performing syntax and semantic checks, security and specification checks.
[0008] Optionally, an isolated runtime environment is constructed for the discrimination script, with unified dependencies, resources and random seeds, and a runtime environment number is generated, wherein the runtime environment number is used to identify the sandbox execution instance; In the sandbox environment, the relevant resource identifier tree nodes or paths are located for the entire structured model based on the selectors and judgment conditions in the DSL rules. Logical operations and threshold comparisons are performed with the management specification entries, and violation results, operation logs and performance indicators are output. The detection results are aggregated and organized, and the violation judgment conclusions are organized according to the dimensions of page and management specification items. Abnormal samples and boundary situations are marked to provide a reference for subsequent feedback and DSL rule optimization.
[0009] Optionally, the acquisition of the television page to be detected includes: establishing a controlled session with the target television device and acquiring page snapshots and keyframes.
[0010] Optionally, the TV page to be detected is converted into a hierarchical, computable structured data model, including: performing element identification and structural modeling on the collected page snapshots, keyframes, etc., extracting them into a hierarchical structure of "page-column-element", adding attributes to the extracted hierarchical structure to realize the conversion of the TV page to be detected into a computable data model, wherein the data model is a resource identifier tree with path and measurement information, and the attributes include element type, display information, coordinates and area ratio; generating resource identifier tree numbers, performing consistency checks on the resource identifier tree, and correcting resource identifier tree nodes with inconsistent hierarchical structures.
[0011] Optionally, after generating the standardization report, the method further includes: adjusting the specification parsing agent based on false positives, false negatives, and conflicts in the standardization report to improve the matching and recognition accuracy of the specification parsing agent.
[0012] Secondly, this invention provides a television page compliance detection system, which includes: a compliance detection main intelligent agent and a specification parsing intelligent agent, wherein... The compliance detection main agent is used to control the creation of tasks based on the TV pages to be detected and to determine the management specification items corresponding to the tasks; trigger the collection of data from the TV pages to be detected; use the collected data to extract the TV pages to be detected into a hierarchical structure of page-column-element; add attributes to the extracted hierarchical structure and generate a Resource Identifier Tree (RIT) to convert the TV pages to be detected into a computable structured model; and trigger the execution of a discrimination script on each resource identifier tree of the structured model in a sandbox environment, outputting violation results, operation logs, and performance indicators, and reproducing the violation pages according to the trigger; combine the violation results with the corresponding violation page snapshot, RIT path, and numerical measurement to generate a discrimination basis with annotation and measurement information, and generate a standardized report; The specification parsing agent is used to convert the management specification entries into executable discrimination scripts, and to perform syntax and semantic verification, conflict resolution, regression verification and version management on the converted discrimination scripts, as well as to perform TV page compliance verification and regression evaluation.
[0013] Thirdly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.
[0014] The beneficial effects of this invention are as follows: This invention, for the first time, abstracts TV EPG page screenshots into a hierarchical structure of "page—section—element," and introduces attributes such as element type, displayed information, coordinates, and area ratio to construct a computable structured model. This method overcomes the limitation of HTML / DOM parsing being unusable in a TV environment, directly addressing the actual presentation interface and ensuring the stability and consistency of the detection input, providing a solid foundation for rule execution and indicator measurement. Furthermore, this invention possesses agent-driven full-process automation and dynamic adaptation capabilities. Through the collaboration of the main agent and the specification parsing agent, a closed-loop system is achieved from task configuration, page acquisition, RIT modeling, rule generation, judgment execution to report archiving. Dynamic updates and continuous optimization of rules are achieved through agent interaction in the ReAct mode. Compared to traditional methods relying on manual playback and template scripts, this invention supports cross-task and cross-time period traceability and reproduction, significantly improving the automation level of the detection process and the ability to quickly adapt to specification updates. It also enhances the interpretability and traceability of detection results, providing effective technical support for the State Administration of Radio and Television's dual governance and anti-rebound supervision work on TV "nested doll" systems.
[0015] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating a method for detecting the compliance of a television page according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating another method for detecting the compliance of television pages provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the interaction process of the main intelligent agent provided in an embodiment of the present invention; Figure 4 This is a flowchart of the main intelligent agent's exception handling and rollback provided in an embodiment of the present invention; Figure 5 This is a flowchart of the dual-agent ReAct collaborative process provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of the TV page compliance detection device based on AI intelligent agent and resource identifier tree provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a TV page compliance detection system provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of a resource identifier tree provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the regulatory semantic parsing process provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the process for generating a strategy DSL provided in an embodiment of the present invention. Detailed Implementation
[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of the invention.
[0018] While existing methods for detecting webpage / system interface elements, such as web crawlers that extract HTML / DOM structures, offer some convenience for standard web page detection, they face numerous adaptation challenges in real-world internet TV EPG scenarios. For example, current methods primarily rely on manual playback or semi-automatic processes, lacking mechanisms for intelligent agent planning, collaboration, rule generation, and closed-loop execution, resulting in a severe lack of scalability, automation, and interpretability. Furthermore, internet TVs typically do not use traditional web pages but rather native or hybrid rendering interfaces, making it impossible to obtain structural information through simple packet sniffing or DOM interfaces. The crawling process is often inefficient due to security concerns related to the TV system (such as user keys and encrypted channels), sometimes only yielding screenshots or images transmitted at the lower level, failing to capture the complete page structure tree. Moreover, DOM abstraction cannot reflect the actual visual effects of the interface, such as the prominence of sections, occlusion, and resolution adaptation, making the use of DOM to determine "visual compliance" inaccurate and unreliable. Furthermore, existing processes struggle to bind information such as timestamps, rule versions, and session logs captured from the interface. The generated detection evidence is mostly screenshots or structural snapshots, lacking a complete, auditable, and reproducible chain of evidence. Simultaneously, the existing system lacks a comprehensive governance framework encompassing management specification items, specific judgment scripts, reports, and signatures. Versioning of management specification items is difficult, and generating tamper-proof reports with signatures, hash values, and timeline traceability is impossible. In other words, existing pages are not rendered using HTML, resulting in low capture efficiency, inability to reflect visual presentation structure, and a lack of session binding and audit trail capabilities. To address these issues, this invention provides a detection method based on a dual-agent architecture and Resource Identifier Tree (RIT) modeling. RIT can transform complex pages into hierarchical, structured models, uniformly describing elements such as navigation bar categories, special zone entrances, program units, and prominent identifiers, along with their metrics, providing stable input for rule judgment and judgment basis generation. In the dual-agent design, the compliance detection main agent, Agent 1, serves as the core of execution and scheduling, responsible for task orchestration, page collection, RIT generation and updating, rule invocation and detection execution, and result aggregation and report generation. The specification parsing agent, Agent 2, serves as the core of rule governance and optimization, focusing on the parsing and key point extraction of management specifications and specification items. It generates judgment rules and scripts based on a Domain Specific Language (DSL) and maintains the evolution and stability of the rule system through testing, conflict resolution, and version release. Specifically, this invention provides a method for TV page compliance detection, see [link to relevant documentation]. Figure 1 The method includes: S101. Create a task based on the TV page detection requirements and determine the management specification items corresponding to the task. It should be noted that before step S101, a main intelligent agent Planner Agent (hereinafter referred to as Agent1) and a specification parser agent Parser Agent (hereinafter referred to as Agent2) need to be constructed first. Through the collaborative working mechanism of the constructed main intelligent agent and specification parser agent, an intelligent closed-loop scheduling is achieved from user requirements and specification items to rule generation, detection and judgment execution, and report output, thereby improving the automation, scalability and interpretability of TV page compliance detection.
[0019] In specific implementation, this embodiment of the invention creates a task based on the TV page detection requirements, solidifies the task context, and generates a task number job_id. The task number job_id is used to uniquely identify the task. The task includes concurrency, timeout, retry policies, and permission domains. Then, the management specification entry corresponding to the task is determined, and the number, version, effective period, and anchor point of the management specification entry are obtained. The obtained management specification entry is then bound to the task.
[0020] First, the task is created and the specification items are confirmed. The user configures the detection object and page range on the front end, and selects the specification items or set of specification items to be used for binding detection. Agent1 then solidifies this into the task context. S102. Collect the TV page to be detected, perform structured parsing and element information recognition on the collected TV page, and extract the page information into a hierarchical and computable data model with a "page-column-element" structure, namely the Resource Information Tree (RIT). In specific implementation, the embodiments of the present invention extract the TV page to be detected into a hierarchical structure of page-column-element, add attributes to the extracted hierarchical structure, and generate a unique RIT number to convert the TV page to be detected into a computable structured model. The structured model is a resource identifier tree structure with path and measurement information, and the attributes include element type, coordinates, area ratio and salience. In simple terms, embodiment S102 of the present invention involves page collection and RIT modeling. Agent1 calls the collection module to obtain page snapshots and operation logs, and completes structural modeling and consistency verification in the RIT module to generate a unique RIT number. In specific implementation, this invention establishes a controlled session with the target television device to collect page snapshots, keyframes, and operation logs. Based on the attributes in the collected page snapshots, keyframes, and operation logs, element identification and structural modeling are performed to generate a computable structured model. A consistency check is then performed on the hierarchical structure of the structured model, and inconsistent RIT nodes in the hierarchical structure are corrected.
[0021] S103. Convert the management specification items into an executable discrimination script, and perform syntax and semantic verification, conflict resolution, regression verification and version management on the converted discrimination script; Specifically, in this embodiment of the invention, a specification parsing agent is used to convert management specification entries into executable DSL rules, and then converts the DSL rules into discrimination scripts. The converted DSL rules and discrimination scripts are then subjected to syntax and semantic verification, conflict resolution, regression verification, and version management.
[0022] It should be noted that when the required management specification entries, DSL rules, and discrimination scripts exist in the database, they are directly invoked. When the required management specification entries, DSL rules, and discrimination scripts are missing from the database, new management specification entries, DSL rules, and discrimination scripts are generated by the specification parsing agent. The generated management specification entries, DSL rules, and discrimination scripts are then stored in the database after undergoing syntax and semantic verification, security and specification checks. In short, when a stable version of the rule set already exists, it can be directly invoked. If rules are missing or specification entries are updated, Agent2 invokes the management specification retrieval module and the DSL discrimination rule management module to generate new rules and discrimination scripts, which are then verified and optimized before being released as a new version. In other words, embodiments of the present invention can pre-set various management specification entries, DSL rules, and discrimination scripts in the database for subsequent retrieval and use.
[0023] S104. In the sandbox operating environment, execute the discrimination script for each resource identifier tree of the structured model, output the violation results, operation log and performance indicators, and reproduce the violation page according to the trigger. Specifically, this embodiment of the invention constructs an isolated runtime environment for the discrimination script, unifies dependencies, resources, and random seeds, and generates a runtime environment number (env_id), which is used to identify the sandbox execution instance. Within the sandbox runtime environment, the relevant RIT nodes or paths are located for the entire structured model based on the selectors and judgment conditions in the DSL rules. Logical operations and threshold comparisons corresponding to the management specification entries are performed, and violation results, runtime logs, and performance indicators are output. The detection results are aggregated and organized, and violation judgment conclusions are organized according to page and management specification entry dimensions. Abnormal samples and boundary conditions are labeled to provide a reference for subsequent feedback and DSL rule optimization.
[0024] That is, in this embodiment of the invention, Agent1 calls the sandbox runtime environment to execute the discrimination script on RIT node by node, outputs violation results, running logs and performance indicators, and triggers the reproduction of the violation page when necessary.
[0025] S105. Combine the violation results with the corresponding violation page snapshot, RIT path and numerical measurement to generate a judgment basis with annotation and measurement information, and generate a standardized report.
[0026] Specifically, in this embodiment of the invention, Agent1 combines violation results with screenshot annotations, RIT paths, and numerical metrics to generate a standardized detection report and archive it. At the same time, false alarms, missed alarms, and conflicts found during execution are fed back to Agent2, thereby promoting the continuous optimization of the rule system.
[0027] In other words, this invention introduces a Reasoning and Acting (ReAct) mode in the interaction between two agents. Through a cyclical mechanism of "reasoning—action—feedback—re-reasoning—re-action," a continuous optimization loop is formed between the two agents: if Agent 1 encounters missing rules or abnormal situations during detection, it triggers Agent 2 to generate or correct rules; after Agent 2 completes reasoning and rule governance, it returns the new version of the rules to Agent 1 for invocation. Through this cross-agent ReAct mode, dynamic adaptation and continuous optimization under management specification updates and page changes are achieved, constructing a complete closed loop from "management specification → specification item → DSL rule → judgment script → judgment result → judgment basis → detection report." Practice has proven that this invention not only achieves automation, reproducibility, and traceability of detection, but also ensures the self-evolution capability of the rule system through continuous feedback between agents, providing a long-term stable and intelligent solution for TV page compliance detection.
[0028] The following will combine Figure 2 The method described in the embodiments of the present invention will be explained and illustrated in detail through a specific example: Phase 1: Task Creation and Specification Item Confirmation: The user first configures the detection object (manufacturer / model / region / firmware) and page scope on the front end, and selects the specification items or sets of specification items to be bound for detection. Then, Agent1 solidifies the task context and generates a task number (job_id, used to uniquely identify a detection task), which includes concurrency, timeout, retry policies, and permission domains. Next, Agent1 calls the TV page management specification retrieval module in read-only mode to obtain the specification item's number, version, effective date, and anchor point, and strongly binds it to the task as the traceability baseline for the detection process.
[0029] Phase Two: Page Acquisition and RIT Modeling: After task preparation, Agent1 invokes the EPG page data acquisition module to establish a controlled session with the target television device and simulates remote control operations according to the acquisition script, acquiring page snapshots, keyframes, and operation logs. Subsequently, Agent1 sends the acquisition results to the Resource Identifier Tree (RIT) module to perform element identification and structural modeling of the page, generating a RIT node tree with path and metric information, and forming a unique RIT number (rit_id, used to identify a single page modeling result). Finally, a consistency check is performed on the RIT, and incremental updates and merging of the tree are performed as necessary. Version snapshots are also generated for key pages to support subsequent judgment and backtracking.
[0030] Phase 3: Rule Generation and Script Governance: After page modeling is complete, Agent1 first checks the DSL discriminative rule management module for a stable rule set version that matches the specification entry. If a version exists, it is directly installed and executed. If a version is missing or the specification entry has been updated, Agent1 will trigger Agent2 through inter-agent interaction. At this time, Agent2 calls the management specification retrieval module to obtain the specification entry context and case references, and generates or revises rules in the DSL discriminative rule management module. The specification entries are converted into computable decision logic using a Domain Specific Language (DSL), which is then further compiled into a discriminative script. The generated rules and scripts undergo syntax and semantic verification, security and specification checks, and regression verification using small-scale samples when necessary. After completing the above process, Agent2 publishes the rule set as a new version and returns the rule set version number (ruleset_id@version, where ruleset_id is the rule set identifier and version is the version number) to Agent1.
[0031] Phase Four: Rule Execution and Result Analysis: After rule preparation, Agent1 invokes the sandbox runtime environment module to build an isolated runtime environment for the discrimination script, unifying dependencies, resources, and random seeds, and generating a runtime environment number (env_id, used to identify a sandbox execution instance). Subsequently, Agent1 applies the discrimination script to the entire RIT tree within this environment, locating relevant nodes or paths based on the selectors and judgment conditions in the rules, performing logical operations and threshold comparisons corresponding to the specification entries, thereby outputting violation results, runtime logs, and performance metrics. In necessary scenarios, Agent1 can also invoke the sandbox's violation page reproduction function to generate minimal reproducibility scenarios and comparison materials to improve the interpretability of the judgment conclusions. Finally, Agent1 aggregates and organizes the detection results, categorizing violation judgment conclusions by page and specification entry dimensions, and labeling abnormal samples and boundary conditions to provide a reference for subsequent feedback and rule optimization.
[0032] Phase 5: Judgment Basis and Report Delivery: After the detection is completed, Agent1 calls the judgment basis and report generation management module to combine the violation results with the page snapshot, RIT path, and metric values to generate a standardized judgment basis list (evidence_list_id, used to identify the set of judgment basis for a single detection), and completes the signature and timestamp fixation. Subsequently, a detection report (report_id, used to uniquely identify a detection report) is generated. The report content covers specification items, rule and script versions, violation items, and judgment basis links, and is finally archived in PDF or XLSX format with a download link. Finally, Agent1 feeds back false positives, false negatives, conflicts, and RIT consistency anomalies found during the detection process to Agent2. After receiving the feedback, Agent2 optimizes the rules and iterates the version, thus forming a closed-loop optimization between the two agents based on the ReAct model.
[0033] In specific implementation, in this embodiment of the invention, the main intelligent agent bears the core responsibility of task orchestration and execution within the TV page compliance detection system. It is both the direct bearer of user intent and the central coordinator for all functional modules. It receives user configurations, drives data collection and modeling, calls rule sets and executes judgment scripts, ultimately generating judgment criteria and detection reports, and transmitting anomaly feedback to the specification parsing intelligent agent (Parser Agent2), thus enabling the continuous evolution of the rule system. The entire workflow is task-driven, covering five stages: "task creation and specification item confirmation, page collection and RIT modeling, rule assembly and script governance, rule execution and result analysis, and judgment criteria and report delivery," ensuring the detection chain is automated, reproducible, and traceable. Figure 3As shown, Agent1's main process sequentially covers task configuration, data collection and modeling, rule invocation, sandbox execution, and report delivery, presenting a complete execution chain from task input to result output.
[0034] In practice, the main intelligent agent needs to have exception handling and rollback mechanisms. For example... Figure 4 As shown, when page capture or RIT modeling fails, the system triggers a fallback retry; if it still fails, it is marked for manual review. During the rule assembly phase, if a rule is missing, Agent2 is triggered to generate a new rule; if generation fails, it reverts to the stable version. During the sandbox execution phase, if insufficient resources or timeout exceptions are encountered, resource strategies are adjusted or concurrency is reduced for retries; if these still fail, manual handling is required. Through this series of remedial and fallback measures, the robustness and controllability of the detection process are ensured.
[0035] Furthermore, Agent1 and Agent2 form a collaborative closed loop through the ReAct pattern. For example... Figure 5 As shown, when Agent1 detects a missing rule or an anomaly in its inference, it submits the specification entry and the anomaly context to Agent2. Agent2 parses the specification entry and generates or corrects the rule script. After DSL rule management and small-scale sandbox verification, a new version is released and fed back to Agent1 to continue task execution. The main agent continuously collects anomalies and triggers refactoring in subsequent operations, enabling the rule system to dynamically iterate and self-optimize.
[0036] The specification parsing agent (Agent2) is the "core of rule translation and optimization," responsible for transforming specification entries in the management specification into executable rules and scripts, and ensuring their stability across different page structures and versions. Its input comes from Agent1, including: a list of specification entries (including number, version, effective date, and anchor point), exception context (false positives / missed positives / conflicts, etc.), RIT summary, and task number; its output is the rule set version number (ruleset_id@version) and accompanying metadata (scope of application, effective date, change summary), and it stores the mapping link "specification entry → DSL → judgment script → evaluation → release" in the database for traceability and reproduction.
[0037] like Figure 6As shown, in the core process, Agent2 first performs structured parsing of the specification entries, extracting key judgment points (element category, selector path, metrics and thresholds / tolerances, etc.), and generates a DSL (Domain-Specific Language) rule draft based on this, which is then compiled into a judgment script draft. Subsequently, three thresholds are executed sequentially: ① Syntax and semantic verification (field completeness, selector solvability, threshold range and RIT metric alignment); ② Security and specification checks (whitelist / blacklist, resource and dependency restrictions, network blocking policies); ③ Small-scale regression evaluation (statistical coverage / false positive rate / false negative rate on the sandbox sampled RIT set). If any threshold is not met, revision is initiated: this may involve threshold fine-tuning, selector adjustment, conflict resolution (hyper- and hypo-hyper-entries, duplicate rules, coverage relationships), and rule splitting / merging. If necessary, Agent1 is requested to supplement the context until the threshold is met. After the evaluation is passed, Agent2 completes the version release and database entry: generating ruleset_id@version, calculating the product hash and solidifying metadata; simultaneously, it writes the link from entry → DSL → script → evaluation → release into the genealogy database to support subsequent tracing of judgment criteria and historical reproduction. The release result is returned to Agent1 for immediate assembly and execution; at the same time, Agent2 accumulates effective experience (DSL templates, anti-patterns, case-threshold mapping) into the knowledge base, improving the efficiency and stability of subsequent rule generation and verification, forming a long-term evolution mechanism of "re-re-release".
[0038] This invention proposes a TV page compliance detection system based on AI agents and resource identifier trees. The system primarily uses a dual-agent architecture to detect TV page compliance. In this embodiment, the main agent creates a task based on the TV page to be detected and determines the corresponding management specification item. It then converts the management specification item into an executable judgment script, performing syntax and semantic verification, conflict resolution, regression testing, and version management on the converted script. Furthermore, it extracts the TV page to be detected into a hierarchical structure of page-section-element, adds attributes to the extracted hierarchical structure, and generates a unique RIT number to convert the TV page to be detected. The system is a computable structured model, wherein the structured model is a resource identifier tree with path and metric information. The attributes include element type, coordinates, area ratio, and saliency. The system combines the violation results of the specification parsing agent with the corresponding violation page snapshot, RIT path, and numerical metric to generate a discrimination criterion with annotation and metric information, and generates a standardized report. The specification parsing agent is used to execute a discrimination script for each RIT number of the structured model in a sandbox environment, output violation results, operation logs, and performance indicators, and reproduce the violation page according to the trigger.
[0039] In specific implementation, such as Figure 7As shown, the detection system of this invention is divided into a data base layer, an MCP service layer, a dual-agent layer, and a visualization layer from bottom to top. Through data support, tool services, agent inference collaboration, and the coordination of the user interface, it achieves compliance detection of television pages. The data base layer of this invention is used to centrally store core data during system operation, including: EPG page images, Resource Identifier Tree (RIT) structured results, television management specifications and specification entries, DSL rules and corresponding discrimination scripts, and results and discrimination criteria of each detection task. This layer provides unified data support, comparison, and traceability capabilities for compliance detection, ensuring the traceability and reproducibility of detection results.
[0040] The MCP service layer of this invention consists of multiple functional services that provide callable execution interfaces for intelligent agents, including: (1) EPG page data acquisition service: realizes session management and remote control signal simulation of TV devices, supports screen frame capture and snapshot generation of EPG pages; at the same time, it provides a management mechanism for acquisition instruction scripts to maintain the personalized acquisition process required by different TV models, and ensures the configurability and reproducibility of the page data acquisition process. (2) Resource Identifier Tree (RIT) service: performs structured parsing and element identification on the acquired EPG pages, generates and maintains the resource identifier tree; supports tree merging, updating and consistency verification, and provides query and retrieval interfaces for page elements to ensure the accuracy and reusability of page structure modeling. (3) TV page management specification retrieval service: realizes the import of TV page management specification documents, the segmentation of specification items, semantic vectorization and retrieval; and combined with the violation case library, aligns the semantic points of specification items with the structural features of the resource identifier tree (RIT), thereby supporting the automatic mapping of specification items to DSL rules and discrimination scripts. (4) DSL discrimination rule management service: Generate DSL rules based on management specification items, complete the syntax and semantic verification of the rules, and automatically generate corresponding discrimination scripts in conjunction with RIT; support version management and iterative updates of rules and scripts to ensure the accuracy, variability and traceability of detection rules. (5) Sandbox runtime environment service: Provide an isolated execution environment, support the compilation of discrimination scripts and preparation of sandbox environment; realize the automated execution of discrimination scripts based on specification items, and monitor the execution process in real time; at the same time, support the detection and reproduction of violation interfaces to ensure the security, observability and reproducibility of the detection process. (6) Discrimination basis and report generation service: Complete the automatic generation and storage of discrimination basis, associate RIT path, specification items and discrimination script output; generate standardized detection reports on this basis, and support report archiving and long-term storage, thereby forming a complete traceability link of "item - discrimination script - discrimination result - discrimination basis - report".
[0041] The dual-agent layer of this invention consists of two agents that collaborate to form a closed loop from specification entries to detection execution: The main agent (Agent1) is responsible for user intent parsing and detection task orchestration, scheduling page collection and RIT generation and updates, calling published DSL rules and discrimination scripts to complete detection task execution, and aggregating and storing detection results and providing anomaly feedback, ultimately generating a compliance detection report. This agent primarily relies on a large inference model to complete process planning, task scheduling, and execution control, ensuring the controllability and traceability of the detection process. The specification parsing agent (Agent2) is responsible for parsing television management specifications and their entries, extracting key points, and combining them with RIT to generate DSL rules and discrimination scripts; further executing automated script testing and conflict resolution, completing the release of rule and script versions, and accumulating DSL templates, anti-patterns, and case data to form a continuously optimized knowledge base. This agent primarily relies on a large programming model to complete rule generation and script synthesis, ensuring the accuracy, evolvability, and reproducibility of the rule system. The two intelligent agents communicate through an agent-to-agent cooperation mechanism to build a closed-loop link of "standard entry - DSL rule - discrimination script - detection execution - discrimination basis", realizing full-process intelligence from standard understanding to detection and discrimination.
[0042] The visualization layer of this invention provides end users with a unified human-computer interaction interface, encompassing the entire process of operation and observation from task creation to result presentation. This layer, through task-based configuration, process monitoring, and result presentation, outputs the capabilities of the dual-agent layer and the MCP service layer in an operable manner, ensuring the transparency, traceability, and reproducibility of TV page compliance testing. Its functions include: a user portal for login and identity verification, and the creation and configuration display of TV compliance testing tasks (such as target device / page range, associated specification items, DSL rules used, and judgment script versions); a testing process control system providing a testing console and real-time monitoring capabilities, supporting task start, pause, termination, and retry, displaying running status, key logs, and sandbox replay trigger entry points; a centralized TV specification management system presenting management specifications and specification items, supporting retrieval, comparison, and version viewing, and displaying associated DSL rules and judgment scripts derived from specification items; a test result and basis presentation system that intuitively displays judgment conclusions in the form of a list of violation items, page snapshot annotations, RIT paths, and sandbox replay links, and provides traceable judgment basis and report downloads; and a system management system that enables unified configuration of user and role permissions, task and resource quotas, audit and retention policies, and rule / script version visibility, ensuring system stability and compliant operation.
[0043] Furthermore, in this embodiment of the invention, the MCP service layer specifically includes: The EPG page data acquisition module, located at the entry point for the full-process compliance detection of TV pages, is responsible for executing the interaction path according to the acquisition instruction script on the real TV terminal, capturing page snapshots / keyframes and recording the operation process to form reproducible and traceable raw page data. This module is the foundational data source for subsequent Resource Identifier Tree (RIT) construction, DSL rule and discrimination script execution, and reproduction of non-compliant interfaces. The module initiates remote control signals to set-top boxes, smart TVs, and emulation terminals in an automated and configurable manner to complete page capture, avoiding the high costs and inconsistencies associated with manual operation and screenshotting. The acquisition output uniformly includes metadata such as task number, session number, timestamp, arrival path, and interaction logs, facilitating alignment with RIT nodes, specification entries, and discrimination script outputs, ultimately forming a traceable basis for discrimination. The actual acquisition process is typically arranged according to the page paths related to the specification entries (such as "Homepage First Screen," "Paid Single-Channel Zone," "Order Entry," etc.) to ensure that page elements corresponding to management specification requirements are completely recorded. Its core functions are implemented by the following utility functions: 1) The function of TV device session management is to establish a controlled session with a designated TV terminal, complete basic status detection and context binding, and provide a stable channel for subsequent remote control operations and page capture. Typical inputs: TV device information (model, resolution, region, system version), task number, tenant identifier, and capture script number (the Agent can assemble the corresponding script during the session preparation phase); Typical outputs: session number, device status (online / offline, current resolution, network latency), and session context metadata (task / session binding, device fingerprint, log channel); Note: Session metadata needs to be stored in the database and bound to the task number to ensure consistency with subsequent RIT and judgment basis backtracking; a health detection / heartbeat interface is provided to facilitate Agent 1's execution of timeout, reconnection, and recovery.
[0044] 2) The function of remote control signal simulation is to simulate remote control button presses and coordinate selection / sliding to drive EPG page navigation and interaction, forming a reproducible page arrival path. Typical inputs: session number, button sequence (e.g., "HOME → arrow keys → confirm", supporting button intervals and retry strategies), touch events (coordinate clicks / slides, including throttling and debouncing configurations); typical outputs: operation log (timestamp, step number, success / failure, number of retries and reason for failure), arrival page identifier (e.g., "Homepage First Screen", "Paid Single-Piece Zone", "Order Entry", etc.); Note: Key jumps directly related to the specification items should automatically trigger page snapshots to ensure that the detection is verifiable and the path is traceable; in case of failure, idempotent retry and recovery strategies to return to the anchor page (e.g., HOME) should be provided.
[0045] 3) The screen frame capture and page snapshot function collects screenshots or keyframe sequences of the current page to form raw page data for RIT construction and rule judgment. Typical inputs: session number, capture mode (screenshot / keyframe sequence), capture duration, frame rate (effective for keyframe sequences), region of interest (ROI cropping, used for capturing key areas on high-resolution devices); typical outputs: capture file path (image or keyframe sequence storage path / URI), media metadata (resolution, color space, file checksum), timeline metadata (timestamp, trigger reason, associated with operation log step number); Note: the capture file must be strongly bound to the task number / session number, and the source path must be recorded (provided by the arrival page identifier of "remote control signal simulation" and operation log) to support RIT node location and judgment basis generation; the output deduplicated fingerprint (hash value) facilitates cache reuse and repeated scene identification.
[0046] 4) The management of acquisition command scripts specifically includes: registering, verifying, retrieving and binding acquisition command scripts for different models / system versions; defining the acquisition process of "remote control signal simulation + page snapshot" in a configurable manner to ensure the configurability, portability and reproducibility of the acquisition process; and maintaining alignment with the page paths corresponding to the management specifications / specification entries in the long term through versioning and compatibility information maintenance.
[0047] Typical inputs: ① Script registration sub-function: script name, device matching rules (model / resolution / region), step definition (key sequence and expected page anchor point), script version, file verification value; ② Script verification sub-function: instruction script number, idle session number (idle verification is performed in the controlled session). ③ Script Retrieval / Binding Sub-function: TV device information or acquisition script number, task number; Typical outputs: ① Registration / Update Result: Acquisition script number, script version, verification status; ② Verification Result: Verification report (pass / fail, failure steps, recovery suggestions); ③ Retrieval / Binding Result: Matched script number, binding metadata (task-script binding relationship); Note: The acquisition instruction script is only used for the definition and management of the acquisition process. Its execution is still completed by the three types of functions: "TV device session management + remote control signal simulation + screen frame capture and page snapshot"; Record script versioning and compatibility matrix (model / resolution / system version) change information.
[0048] In this embodiment of the invention, the Resource Identifier Tree (RIT) module serves as the page structure modeling and retrieval engine for TV page compliance testing. Its responsibility is to convert the collected EPG page snapshots and metadata into a tree structure model, and to provide capabilities such as tree management, structural consistency checks, page element querying, and version management around this model. RIT provides a unified, reusable, and searchable structured input for subsequent DSL rules and discrimination scripts; it provides semantic annotation and positioning interfaces for page elements related to the specification entries (such as navigation bar categories, special zone entrances, VIP / free identifiers, etc.), facilitating accurate referencing during detection execution and discrimination basis generation. RIT does not generate "compliant / non-compliant" conclusions, nor is it responsible for process orchestration; compliance judgments are completed by the discrimination script in a sandbox environment, with RIT only providing structural data and retrieval support.
[0049] The EPG page recognition function of this invention is to identify the page type and extract UI elements and text elements in the page, providing element candidates for subsequent structural modeling.
[0050] Typical inputs: Page snapshot path (image / keyframe sequence), collected metadata (task number, session number, timestamp, TV device information), recognition model version (OCR / detection model version number); Typical outputs: Page type (e.g., homepage first screen, application center, order information page, payment page, etc.); Candidate RIT node set, which consists of several "candidate RIT nodes", each containing attribute information including element type (navigation item / special zone entrance / recommendation position / program unit / icon / text label, etc.), normalized coordinates and size, OCR text / semantic tags (e.g., "free", "VIP", "paid single film"), visibility (optional), confidence level, source metadata (timestamp, frame number, model version, session number); Note: Candidate RIT nodes are preliminary identification results generated during the identification phase. They have not yet undergone the screening, deduplication, merging, hierarchical organization, and consistency checks of the "TV EPG page structure modeling" process, and are not equivalent to the final RIT nodes. They may contain duplicates, false positives, or incomplete information. The candidate RIT node set can be incorporated into the RIT node tree after screening / deduplication / merging / completeness / hierarchical organization / consistency checks. The discrimination script relies solely on the RIT node tree to judge the standard entries and forms the discrimination basis accordingly.
[0051] In the TV EPG page structure modeling of this embodiment, the function is to organize the "candidate RIT node set" into a RIT node tree according to spatial and hierarchical relationships, forming a unified structured representation.
[0052] Typical inputs: candidate RIT node set, page metadata (task number, session number, resolution, destination path).
[0053] Typical outputs include: RIT ID, complete RIT node tree (including node ID, parent-child relationship / level, element type, normalized coordinates and size, text / label, visibility, confidence, RIT path, etc.), and modeling summary (total number of nodes, tree depth, key semantic anchors). Note: Semantic node annotations are performed on common elements (navigation bar, special zone entrance, recommended slots, program units, VIP / free icons, etc.) to facilitate retrieval; this step does not output compliance conclusions.
[0054] The function of RIT tree management in this embodiment of the invention is to add, delete, modify, merge and update existing RITs, and maintain the binding relationship between RITs and collected products and semantic annotations.
[0055] Typical inputs: RIT number, operation type (add node / update node / delete node / merge update), node change list (node ID, attribute changes: coordinates, tags, visibility, text, etc.), associated metadata (task number, session number, page snapshot path); Typical outputs: Operation result (success / failure, reason for failure), updated RIT number or change number, change summary (list of affected node IDs, anchor point change description); Note: Merging updates are used to unify the same page under different collection periods or slight resolution differences, and only affect the structure and annotations.
[0056] The function of the RIT consistency check in this embodiment of the invention is to check the structural integrity and constraint consistency of the RIT, and to discover model gaps and unreasonable relationships.
[0057] Typical inputs: RIT number, check configuration (check item switches: coordinate range, overlap and conflict, hierarchy rationality, existence of necessary anchor points, etc.); Typical outputs include: consistency check results (pass / fail), issue list (issue type, involved node ID, RIT path, severity level, recommended remediation action), and check logs (time taken, rule version). Note: The consistency check focuses on the structure and constraints themselves; it is recommended to repair the issues before executing the judgment script if the check fails, to avoid affecting the reliability of the judgment criteria.
[0058] The page element query and retrieval function of this invention is based on the element-level retrieval capability provided by RIT, which supports the judgment script to locate and read node attributes according to the requirements of the standard entries.
[0059] Typical input: RIT number; Search criteria (can be combined): Element type (navigation item / special zone entrance / recommended slot / program unit / icon / text label, etc.), semantic tags ("free", "VIP", "paid single", etc.), text keywords (OCR text inclusion / matching), location range (normalized coordinates or area threshold), hierarchical path (RIT path expression), visibility (visible / semi-transparent / occluded); Typical output: list of hit nodes (node ID, RIT path, element type, coordinates and size, text / tag, visibility), hit statistics (number of hits, number of duplicates after deduplication); Note: This function does not directly provide a compliance conclusion; after the judgment script calls this function in the sandbox to obtain the node set, it combines the DSL rules to complete the judgment of the standard items, and cites the RIT path and attributes in the report to form the judgment basis.
[0060] The version management function of this invention embodiment is to perform versioned management of RIT, support version creation, query and rollback, and ensure the traceability and reproducibility of task-level and entry-level versions.
[0061] Typical inputs: RIT number, operation type (create version / get version / rollback to version / list history), optional parameters (target version number, version notes); Typical output: version operation result (success / failure, reason for failure), version number or version list, RIT reference (snapshot identifier) for the specified version; Note: Version management is used for point-in-time retention and retrospection; it does not provide difference comparison and compliance judgment in this module to avoid overstepping boundaries.
[0062] In specific implementation, the TV page management specification retrieval module in this embodiment of the invention acts as a "knowledge foundation and bridge" throughout the entire detection process: it is responsible for importing and segmenting the management specifications issued by the broadcasting and television authorities into referable specification items, fixing metadata such as number, version, effective date, and anchor point for each item, and completing semantic vectorization and retrieval / comparison. Simultaneously, it maintains a violation type case library associated with the items as a reference for rule generation and verification. During runtime, the specification parsing agent initiates semantic retrieval / comparison to this module based on task descriptions or page phenomena to locate relevant specification items. Based on this, it synthesizes DSL rules and discrimination scripts. In the rule back-refinement stage (referring to the process after the initial rule / script is generated and executed in a sandbox or on a small scale, based on the detection results, the main agent's abnormal feedback, RIT consistency information, and the case library, it diagnoses false positives / false negatives and conflicts, and modifies thresholds and conditions), it performs rule back-refinement. The necessary rules are split or merged, and regression testing is completed within the sandbox. If the criteria are met, a version release is initiated; otherwise, iteration continues. Simultaneously, effective experience is distilled into DSL templates, anti-patterns, and a traceable link for item mapping for correction and iteration. During task configuration and reporting, the main agent only reads the item number, version, and effective date, binding detection tasks to items to support report traceability. Downstream, this module provides authoritative item sources and traceable references to the RIT service and sandbox environment (without participating in page structure modeling or compliance conclusion generation). Its output item text and metadata, semantic vectors, and related case references are referenced by the discrimination script during execution and discrimination basis generation, thus creating a closed loop of "management specifications → specification items → DSL rules → discrimination script → discrimination basis," ensuring authoritative item sources, accurate semantic matching, traceable references, and reproducible history. Specific functions are implemented through the following utility functions: The function of importing management standard documents in this embodiment of the invention is to import management standard documents issued by the broadcasting and television authorities, solidify the source and metadata, and form an authoritative source of standards. Typical inputs: document file path or upload number (such as portable document format, hypertext markup document, word processing document, etc.), document metadata (issuing organization, document number, version number, effective date, applicable region, release / revision date); Typical outputs: standard document number, metadata record (version number, effective date, applicable region, issuing organization verification status), import verification result (success / failure, failure reason: such as missing page, inability to parse font, etc.), source and integrity information (source link summary, file integrity hash value / electronic signature verification value), page number / chapter coarse-grained anchor index (for subsequent entry anchor reference); Note: Only document-level import and metadata solidification are completed, without entry segmentation or semantic processing; used for source tracing in reports and judgment criteria.
[0063] The specification entry segmentation function of this invention parses imported management specification documents into referable specification entries, generating a unique number and precise anchor point for each entry. Typical inputs: specification document number, segmentation strategy (heading level, numbering rules, layout features, regular expression matching rules); typical outputs: specification entry list (specification entry number, entry text, applicable scope / object, chapter / page / paragraph anchor point, version number, effective date, status), segmentation report (segmentation success rate, entries requiring manual review, suspected cross-page entry alerts); Note: specification entry numbers are unique and stable within the same version; anchor points are used for visual positioning and audit tracing.
[0064] The specification entry vector generation and comparison function of this invention performs semantic vectorization on specification entries and provides semantic retrieval and inter-entry comparison, supporting the specification parsing agent to accurately locate entries and synthesize rules. Typical inputs: Vector generation (list of specification entry numbers); Semantic retrieval / comparison: Query text (e.g., "Number of navigation bar categories ≤ 15", "Homepage free zone area ≥ 50%)" or pairs of entries to be compared; Optional filtering conditions: Version number, effective date, applicable region, issuing organization; Typical outputs: Vector generation results (specification entry number, semantic vector, vector model version, generation time); Semantic retrieval results: Candidate specification entry list (specification entry number, entry text summary, relevance score, version / effective date, anchor point); Entry comparison results (similarity score, summary of key differences); RIT alignment hints (page element categories and measurement dimensions commonly associated with the entry). Note: Only semantic relevance at the entry level is output; no rules / scripts are generated, and no compliance conclusions are output; the entire "search conditions → hit entries" chain is recorded for review during the rule refining stage.
[0065] The function of the violation type case library in this invention is to maintain typical violation types and example samples bound to the standard entries, providing a reference for verification in the rule generation and rule refactoring stages. Typical inputs: violation type tags (e.g., "excessive source of paid packages", "missing free entry", "VIP identifier not prominent"); associated standard entry number; example resources: page snapshot path, associated resource identifier tree node / path reference, explanatory text; sample attributes: positive examples / negative examples / boundary samples, collection time, TV equipment information, source task number; typical outputs: case number, index tags (violation type, standard entry number, version / effective period), sensitive de-identification markers, case retrieval results, i.e., returning a case list by entry / tag / keyword (snapshot summary, resource identifier tree path extract, remarks); Note: The case library is for reference and comparison, and is not directly used as the basis for judgment in a single detection; its binding with entry / version / effective period ensures the authority and traceability of knowledge references, and provides false positive / false negative clustering and regression evaluation samples for the rule refactoring stage.
[0066] Furthermore, in this embodiment of the invention, the DSL discrimination rule management module occupies a crucial central position in the entire TV page compliance detection process, connecting "specification items → executable discrimination" and linking the preceding (TV page management specification retrieval, specification parsing intelligent agent) with the following (RIT service, sandbox operating environment, report generation). Its core responsibility is to precipitate abstract specification items into declarative DSL rules (Domain-Specific Language), and after completing syntax and semantic verification, generate corresponding specification item discrimination scripts in conjunction with RIT. Finally, these rules and scripts are released in a versioned and traceable form for the main intelligent agent to call, thereby constructing a closed-loop link of "management specification → specification item → DSL rule → discrimination script → discrimination result / discrimination basis," ensuring that the detection logic is stable, reusable, evolvable, and auditable.
[0067] The introduction of DSL in this embodiment of the invention enables compliance requirements to be clearly expressed in the form of "declarative constraints + structured selectors + reusable operators," ensuring strong coupling between rules and the RIT page structure and supporting version governance. Compared to directly relying on large models for compliance judgment based on page images, this approach has significant advantages in interpretability, stability, and consistency: 1) Interpretability: The relationship between rules, entries, and judgment criteria is clear, traceable, and verifiable; 2) Stability: The detection logic is independent of large model training drift, ensuring long-term stability of execution results; 3) Consistency: Rules maintain consistent execution semantics across different devices and samples; 4) Engineering: Facilitates gray-scale releases, version rollbacks, and regression evaluations, improving governance capabilities. The generated judgment script serves as the bridge between DSL and actual detection implementation. It is responsible for interacting with RIT, calling computational operators, handling boundary conditions, and collecting evidence, ensuring that rules are executable and reproducible in the sandbox environment and outputting directly referable judgment criteria (such as RIT paths, page snapshot annotations, and calculated index values).
[0068] In implementation, the large programming model is primarily used in two stages: first, to provide template filling and parameterization support during DSL rule draft generation; and second, to assist in generating boilerplate code during the synthesis of the discrimination script. All products generated by the large model must undergo DSL checks (syntax / semantics) and script security verification before entering the version release process. Through this "model-assisted + engineering quality gate" mechanism, the DSL discrimination rule management module ensures both generation efficiency and the accuracy, scalability, and reproducibility of the rule system. Specific functions are implemented through the following utility functions: The DSL rule generation function of this invention generates interpretable DSL rule drafts based on television management specification entries and page types. Typical inputs include: specification entry number, entry text, page type (e.g., homepage first screen, navigation bar, payment page), generation parameters (threshold setting, tolerance strategy, whether to call a large model draft for generation), and associated case number (optional). Typical outputs include: DSL rule text (including rule name, applicable page, selector conditions, judgment indicators and thresholds, and explanatory information), a mapping record from entry to DSL (entry number, entry version, effective date, and correspondence with the DSL rule number), and a generation report (generation mode, whether manual confirmation was required, and potential risk warnings). Note: The generation stage only forms a rule draft; it needs to enter the subsequent verification stage before it can be compiled and executed. It supports rapid instantiation based on templates or calling a large programming model for rule drafting.
[0069] The DSL syntax check function of this invention performs a syntax-level check on the DSL rule text to ensure that the format, keywords, structure, and schema definition are consistent. Typical inputs: DSL rule text, DSL schema version. Typical outputs: check result (pass / fail), problem list (missing fields, redundant selectors, undefined keywords, etc.), and repair suggestions (auto-completion, example modification solutions). Note: Syntax checking is a mandatory step before the DSL enters compilation; if it fails, the judgment script cannot be generated.
[0070] The semantic validation function of the DSL rule in this embodiment of the invention verifies the consistency of the DSL rule with the RIT structure and specification entries at the semantic level, ensuring that the selector is solvable, the metric is calculable, and the threshold value is reasonable. Typical inputs: DSL rule text, RIT structure summary (available node types, tags, attributes, metrics), specification entry metadata (number, version, effective date). Typical outputs: validation result (pass / fail), problem list (selector cannot match, metric is not supported, threshold exceeds range, etc.), and repair instructions. Note: Only after passing the semantic validation can the DSL rule enter the script generation stage; if it fails, it needs to return to the generation stage for modification.
[0071] The function of generating a discrimination script based on DSL and RIT in this embodiment of the invention is to compile the verified DSL rules into a standardized entry discrimination script, enabling it to call RIT for calculation and judgment in a sandbox environment. Typical inputs include: DSL rule text, target runtime environment (e.g., Python), and script generation options (whether to generate unit tests, whether to enable the evidence collection interface). Typical outputs include: discrimination script source code (including RIT calls, indicator calculations, judgment logic, and evidence collection logic), entry-to-source code line number mapping (for traceability), and a script dependency list (operator library, interface version). Note: The generated script must simultaneously output the discrimination conclusion and the intermediate quantities required for the discrimination basis (RIT path, snapshot annotation, calculated value) to ensure that the results are reproducible and traceable.
[0072] The script security and compliance check function of this invention is to perform a security and compliance scan on the script to prevent it from calling unauthorized interfaces or performing unauthorized operations. Typical inputs: script source code, security policy (whitelist / blacklist), sandbox environment constraints. Typical outputs: check result (pass / fail), violation list (violation call points, explanations), and remediation suggestions. Note: Security checks are a mandatory step before script release; scripts that fail the check must not be archived or released.
[0073] The rule publishing function of this invention is to package the verified DSL and the discrimination script into a rule set and publish it to the version repository for the main intelligent agent to call. Typical inputs include: DSL rule text, discrimination script source code, specification entry number and metadata (version, effective date), applicable page scope, device scope, effective time, and publishing instructions. Typical outputs include: rule set number, version number, publishing record (including metadata, applicable scope, hash signature), and publishing result (success / failure, reason for failure). Note: The published rule set is the unique authoritative version; downstream tasks can only reference published versions, ensuring the stability of detection and tracing.
[0074] The rule version management function of this invention is to maintain the versioning of published rules, including version reading, version comparison, and rollback. Typical inputs include: rule set number, target version number (for reading or rollback), comparison version number (difference comparison), and operation instructions. Typical outputs include: reading DSL text, identifying script source code, and metadata (clause mapping, scope of application, signature). It also includes: a summary of version differences (additions / modifications / deletions / threshold changes) and a potential impact report; and rolling back to a new activity version number and a description of the scope of impact (affected tasks / entries / pages). Note: Version management ensures the evolution and rollback of the rule system, forming a complete rule hierarchy.
[0075] In practical implementation, the sandbox runtime environment module of this invention acts as the "execution and verification hub" in the entire TV page compliance detection process. It receives the discrimination scripts generated by the DSL discrimination rule management module and completes compilation, execution, monitoring, and reproduction within a controlled environment. The primary function of this module is to build an isolated and reproducible runtime environment for the discrimination scripts, uniformly constraining execution dependencies, computing resources, and security policies to ensure consistency of script execution results across different times, devices, and task batches. At the execution level, this module supports running discrimination scripts on single or batches of RIT page trees, automatically outputting discrimination results and corresponding discrimination criteria (such as a list of violation items, RIT paths, page screenshot annotations, etc.). Through a process monitoring mechanism, this module can output logs, indicators, and status events in real time, facilitating anomaly localization and SLA assurance. When a suspected violation is detected, the sandbox runtime environment can also trigger the reproduction of the violation interface, replaying key interaction sequences and generating a "minimum reproducible scenario," ensuring the transparency and interpretability of the judgment process. From a system-wide perspective, the sandbox runtime environment module serves as an execution bridge connecting "standard items—DSL rules—judgment scripts" with "detection results—judgment basis—compliance reports." Compared to conclusions directly derived from a large model, sandbox execution ensures the determinism and traceability of rule execution: the same input will inevitably produce the same output, and both the execution process and results are reproducible and auditable, thus forming a closed loop for compliance detection. Specific functions are implemented through the following utility functions: The function of the discrimination script compilation and sandbox runtime environment preparation in this embodiment of the invention is to build an isolated runtime environment for a specified rule set, unify dependency locking, random seeds and resource limits, pre-compile the discrimination script, and ensure consistent execution results across tasks and devices. Typical inputs: rule set number, version number, runtime configuration (Python version, dependency package list, CPU / memory limits, timeout threshold, random seed). Typical outputs: runtime environment number, environment profile (dependency list, resource limits, random seed), pre-compiled artifact address, environment preparation log. Note: A unified "preparation-run" base ensures consistency across different batches of tasks; reproducible logs and environment hash fingerprints are provided in case of failure.
[0076] The automated execution function of the TV management specification item discrimination script in this embodiment of the invention is to run the discrimination script on a specified RIT page tree, complete the automated detection of the specification items, and output a violation list and discrimination basis. Typical inputs: rule set number, version number, RIT number, execution limit (CPU / memory / number of nodes / execution time). Typical outputs: violation results (rule number, node number, violation reason, location box / text / indicator value), execution statistics (time consumed, number of scanned nodes, memory usage), execution log. Note: The discrimination script directly operates on the RIT structure and attributes (such as the number of columns, area of special zones, and identification prominence), and the detection conclusions are aligned with the report generation service to ensure reproducibility and auditability.
[0077] The function of the discrimination process monitoring in this embodiment of the invention is to output logs, status, and performance indicators in real time during script execution, supporting execution process diagnosis and service quality monitoring. Typical input: Task number or execution result number. Typical output: Streaming logs (timestamp / level / content), progress events (completed / total / rate), runtime indicators (CPU, memory, rule hits, timeouts), and exception context fragments. Note: Process monitoring provides a basis for task anomaly localization and operational maintenance assurance, and can be integrated with platform monitoring and alarm systems.
[0078] The violation interface detection and reproduction function of this invention replays key interactive operations around the detected violation points, generates a minimum reproduction scenario, and outputs a comparison report and necessary evidence package. Typical inputs include: a list of violation results (including RIT number, node number, and selector information) and a reproduction plan (interaction steps, playback range, and termination conditions). Typical outputs include: a reproduction report (keyframe comparison, differential annotation, threshold and indicator details), a minimum reproduction scenario package (necessary RIT slices, screenshots, and interaction sequences), and diagnostic explanations. Note: This ensures the detection conclusions are verifiable, typically applied to interpretability scenarios such as "Homepage Free Zone ≥ 50%" and "Navigation Bar Item Count ≤ 15" detection.
[0079] In practical implementation, the judgment criteria and report generation management module in this embodiment of the invention acts as the terminal hub for "result solidification and external delivery" in the TV page compliance testing process. Its responsibility is to structure and process the judgment results and process evidence output from the sandbox environment into two types of verifiable, traceable, and submitable products: first, judgment criteria (including page snapshot cropping and annotation, RIT path and node extraction, metric value snapshots, execution log summaries, etc.); second, standardized testing reports (PDF / XLSX for regulators / vendors / internal auditors). The module uses item number, DSL rules and script version, and RIT path as the main index to uniformly complete the generation and storage of evidence and reports, and solidifies all products by signing, hashing, and timestamping to ensure that the same input can be reproduced and audited at any point in time. This module connects the "standard item—DSL rule—judgment script—sandbox execution" detection chain, and provides deliverable detection documentation materials with authoritative numbers and signature fingerprints. This ensures a close alignment between conclusions and factual materials, and provides a stable basis for subsequent accountability, review, and archiving, thus closing the entire chain of "management standard → standard item → DSL rule → judgment script → judgment result → judgment basis → detection report". Specific functions are implemented through the following utility functions: The function of generating the discrimination criteria in this embodiment of the invention is to process the sandbox execution results into discrimination criteria, including page screenshot cropping and annotation, RIT paths and node slices, numerical metric snapshots, and runtime log summaries. Typical inputs: execution result number; list of violations (entry number, rule number, RIT number / node, bounding box or polygon, indicator and threshold); original page snapshot path; RIT data reference; rendering parameters (annotation style, cropping margin, output format). Typical outputs: discrimination criterion list (screenshot cropping file path, annotation image file path, RIT slice file path, numerical metric file, runtime log fragment); criterion index (entry number, rule number, script version, RIT number / node, timestamp). Note: Ensure that "where is non-compliant and why is non-compliant" is readable at both the image and structural levels, and corresponds one-to-one with the specification entries.
[0080] The function of the discrimination criteria storage in this embodiment of the invention is to store the generated discrimination criteria in a database, sign and timestamp them to form a traceable criteria list. Typical inputs include: discrimination criteria list path, criteria index (entry number, rule number, script version, RIT number / node, execution time), and solidification algorithm (signature and hash type). Typical outputs include: criteria list number; solidification result (signature, hash digest, timestamp); database entry receipt (storage location, retention strategy). Note: The discrimination criteria are strongly bound to the specification entries, DSL rules, and discrimination script versions to ensure long-term consistency and traceability.
[0081] The function of generating the test report in this embodiment of the invention is to assemble standardized test reports by combining referenced standard entries, rule and script versions, sandbox execution conclusions, and a list of judgment criteria. Typical inputs: task number; summary of violation results (aggregated by entry and page); list number of judgment criteria; report template type (regulatory / vendor / internal audit); report parameters (cover information, header and footer styles). Typical outputs: report file path (PDF, XLSX); report table of contents and content index (entry number and version / effective date, rule and script version, RIT path and node, basis hash digest). Note: The report text automatically displays the numerical measurements of key entries (such as "Free Zone Area ≥ 50%", "Number of Navigation Bar Columns ≤ 15") and a summary of their judgment logic, and embeds basis fingerprints in the header and footer for easy external verification.
[0082] The function of the test report storage in this embodiment of the invention is to store, sign, and hash the generated test reports, and establish an index binding with task numbers, entries, rules, and judgment criteria, supporting long-term archiving. Typical inputs: report file path (PDF / XLSX); associated metadata (task number, entry number and version / effective date, rule and script version, judgment criterion list number); hashing algorithm. Typical outputs: report file number; hashing result (signature, hash digest, timestamp); storage receipt (storage location, retention period, access permission configuration). Note: The report and judgment criteria are bidirectionally indexed, ensuring full-link traceability and cross-cycle review of the "conclusion—criteria—execution result".
[0083] The specific design of the MCP service layer utility functions is shown in Table 1.
[0084] Table 1: MCP Service Layer Utility Function Design Table Specifically, the dual-agent layer of this invention consists of a master agent and a specification parsing agent, which collaborate through the ReAct mode: Agent1 performs task scheduling, page collection, rule invocation, and report generation during detection execution. When false alarms, missed alarms, or rule conflicts are detected, it transmits the anomaly and feedback information to Agent2. Agent2 performs reasoning based on the feedback results, identifies conflicts or deficiencies between specification entries and rules, and takes action to correct rules, optimize scripts, or release new versions, which are then finally handed over to Agent1 for execution. This forms a cross-agent "reasoning-action-feedback-re-reasoning-re-action" loop, realizing the continuous evolution of rules and execution.
[0085] In terms of implementation, Agent1 primarily relies on deterministic, procedural steps. It utilizes the MCP tool to perform operations such as user intent parsing, device session and page collection, RIT modeling and consistency checks, sandbox judgment script execution, and judgment criteria and report generation, ensuring the stability and traceability of detection results. Agent2, on the other hand, focuses on rule and script governance. Through entry parsing, DSL rule generation and verification, script synthesis and testing, conflict resolution, and version management, it ensures the accuracy and long-term evolution of the rule system. While some aspects of these internal processes (such as anomaly diagnosis and conflict resolution) reflect localized reasoning and action logic, the overall approach leans more towards the invocation and control of engineering toolchains.
[0086] This two-layer design leverages the feedback loop advantage of the ReAct model between agents while maintaining the process controllability within each agent. This achieves a highly efficient, automated, reproducible, evolvable, and traceable compliance testing system within the "management specifications → specification items → DSL rules → judgment scripts → judgment results → judgment basis → detection report" chain. The main agent (Agent 1) acts as the "task orchestration and execution core" in the TV page compliance testing system. It is responsible for translating user-inputted testing intent into executable tasks, driving page data collection and RIT generation updates, and executing published DSL rules and judgment scripts in a sandbox environment, monitoring the execution process in real time and handling anomalies. After task completion, the agent aggregates and attributes the detection results, calling the judgment basis and report generation module to output a standardized, submitable, and traceable detection report. Simultaneously, Agent 1 feeds back anomalies such as false positives, missed positives, unsolvable selectors, or threshold conflicts found during operation to Agent 2, forming a loop for rule optimization and version iteration. Agent1 is task-centric and results-deliverable, ensuring the controllability, reproducibility, and traceability of the detection chain: "Management Specifications → Specification Items → DSL Rules → Judgment Scripts → Judgment Results → Judgment Basis → Detection Report". The specific functional design principles are as follows: In this embodiment of the invention, the detection intent understanding and task orchestration function refers to transforming user-inputted detection requirements (target device, page range, associated specification entries, execution window, and SLA) into executable task units. The implementation principle includes: parsing the target page (e.g., "homepage first screen," "order entry"), and fixing the associated specification entry numbers and version information; breaking down the detection target into a job grid of model × page based on the TV device information (model, resolution, region, system version), and configuring concurrency, timeout, and retry strategies; matching the collection instruction script and published rule version for each task segment, generating warnings for missing or incompatible cases; establishing the binding relationship between tasks, sessions, RITs, and rule versions, and generating a unique and traceable task number (job_id).
[0087] In this embodiment of the invention, the detection task execution function refers to completing page navigation, snapshot acquisition, and RIT modeling on a real television terminal, and executing a discrimination script in a sandbox environment to produce violation judgments. The implementation principle includes: calling the television device session management and remote control signal simulation to drive the terminal into the target page and trigger screen frame capture; calling EPG page recognition and structural modeling to generate a RIT node tree and performing consistency checks, supplementing completeness through incremental updates and version snapshots when necessary; reading and assembling the appropriate rule set version (ruleset_id@version), calling the discrimination script compilation and sandbox environment preparation, unifying dependencies and resource configurations, and generating a runtime environment number (env_id); applying the discrimination script to the entire RIT tree in the sandbox, locating relevant nodes or paths based on rule selectors and conditions, completing logical judgments and threshold comparisons, and outputting runtime logs and indicators through discrimination process monitoring; and, when necessary, calling the violation interface detection reproduction function to generate minimum reproducible scenarios and comparison materials.
[0088] In this embodiment of the invention, the detection result output function refers to aggregating the detection results and generating traceable discrimination criteria and detection reports, while simultaneously feeding back anomaly feedback to Agent2. The implementation principle includes: aggregating violation results by task, page, and specification item dimensions; calling the discrimination criteria generation and storage tool function to crop, label, and align the violation areas with RIT paths and measurement information, forming a discrimination criteria list (evidence_list_id) and solidifying it into a long-term traceable archive; calling the detection report generation and storage function to output a standardized PDF / XLSX report with specification item references, rule and script versions, and violation item links, and archiving it to form a report number (report_id); simultaneously, organizing false alarms, missed alarms, conflicts, and execution anomalies to form an anomaly feedback list and pushing it to Agent2 for rule conflict resolution and version optimization.
[0089] In this embodiment of the invention, the specification parsing agent (Agent2) is positioned as the "core of rule parsing and optimization" in the TV page compliance detection system. It is responsible for converting the management specification items issued by the broadcasting and television authorities into executable DSL (Domain Specific Language) rules and discrimination scripts, and ensuring the accuracy and stability of the rule system under different page structures and versions through automated verification and conflict resolution. Agent2 does not directly face the user; instead, it is triggered by the main agent (Agent1) and initiates the rule parsing process when rule missing, abnormal, or conflicting rules are found during the execution of the detection task. Through the parsing of specification items, rule generation, script verification, and release, Agent2 and Agent1 form a closed loop of "task orchestration—rule generation—execution feedback—rule optimization," ensuring the continuous availability, evolution, and traceability of the detection chain: "management specification → specification item → DSL rule → discrimination script → discrimination result → discrimination basis → detection report." The specific functional design principles are as follows: In this embodiment of the invention, the rule parsing task orchestration function refers to the preprocessing of the submitted set of specification entries, versions, and exception contexts when Agent 1 is triggered, forming a rule parsing task. The implementation principle includes: importing management specification documents and segmenting specification entries to obtain an authoritative entry list; using specification entry vector generation and comparison tools for semantic retrieval to locate entry content related to the detection task; supplementing positive and negative example information with a violation type case library, and solidifying the entry numbers, versions, and detection points required for the task (such as column number thresholds and special zone ratio requirements), forming a parsing task unit. Finally, the rule parsing task number, specification entry index, and key point summary are output as input for subsequent rule generation.
[0090] In this embodiment of the invention, the parsing task execution function refers to converting specification entries into executable rules and performing automated verification at the syntax, semantic, and security levels. The implementation principle includes: calling a DSL rule generation tool to generate a rule draft based on entries and page types; calling DSL syntax checks and DSL semantic checks to ensure rule fields are complete, selectors are solvable, thresholds are reasonable, and consistent with the RIT structure; calling a tool that generates a discrimination script based on DSL and RIT to compile the rules into a script draft, and using script security and specification checks to exclude unauthorized calls and non-compliant operations; subsequently, calling a sandbox runtime environment to execute the script on a small scale, collecting accuracy, recall, and boundary cases, and comparing them with the false positives / false negatives and unsolvable selector list fed back by Agent 1, triggering conflict resolution logic (coverage conflicts, duplicate conflicts, priority conflicts), and correcting the rules through merging, splitting, or priority sorting. Finally, the corrected rule draft and conflict resolution report are output.
[0091] In this embodiment of the invention, the discriminant script output function refers to packaging and publishing the verified and conflict-resolved rules and scripts, and incorporating them into version management and knowledge accumulation. The implementation principle includes: calling the rule publishing tool to generate a unique number and version number (ruleset_id@version) for the rule set, specifying the applicable pages and scope of effect; calling the rule version management tool to read the version, compare differences, and rollback; and simultaneously accumulating the generation and conflict resolution process into a DSL template, anti-pattern, and entry mapping link for subsequent rapid generation and optimization reuse. Finally, the function outputs the rule set number and version number, the published DSL rule text, and the discriminant script source code, updates the template and anti-pattern library, and returns it to Agent 1 for execution.
[0092] In practical implementation, the visualization layer of this invention serves as the unified entry point for human-computer interaction and information presentation within the TV page compliance inspection system. It connects the front-end user with the back-end intelligent agent and MCP service, ensuring a complete closed loop in the inspection process "from task creation to result presentation." Its design adheres to the core objectives of "user-friendly, process-controllable, and result-traceable," ensuring transparency, compliance, and traceability of the inspection work through task-based configuration, process monitoring, and result-based display. The module as a whole is divided into five functions: user entry, inspection process control, TV standard management, inspection result and basis presentation, and system management. These five parts are both independent and closely connected, ensuring the standardized operation of the entire compliance inspection chain.
[0093] In this embodiment of the invention, the user entry function refers to providing unified access and task configuration capabilities for the testing system. This function, through a login and identity verification module, completes the permission authentication and hierarchical management of different roles (such as administrators, testers, auditors, or supervisors), ensuring the security and compliance of testing operations. Users can initiate TV compliance testing tasks in the task creation and configuration interface, filling in or importing manufacturer model, terminal platform, region, and firmware version information, and selecting associated specification items (such as "Homepage first screen free zone ≥ 50%" and "Navigation bar column count ≤ 15"). The system generates a unique number for each task and binds it to the backend testing session, forming a unified identifier throughout the task process.
[0094] In this embodiment of the invention, the inspection process control function refers to providing users with real-time control and visual monitoring of the task execution status. This function, through the television system's inspection console, supports task start, pause, termination, and retry operations; simultaneously, it accesses the EPG page capture stream in real time, displaying page snapshots and operation logs. With the help of the real-time monitoring task monitoring module, users can intuitively view the progress and operation status of the task chain, from page capture and RIT generation to rule execution and judgment basis generation, all displayed through progress bars, log pushes, and operational indicators, ensuring the inspection process is transparent, controllable, and traceable.
[0095] In this embodiment of the invention, the television specification management function refers to the unified display and visual maintenance of management specifications and specification entries. Users can search, browse, and compare the broadcasting specification entry library on the front-end interface, including information such as the entry text, version number, effective date, and scope of application, and view the linked mapping relationship with DSL rules and judgment scripts. Users can also view the version evolution of entries, supporting a traceable link from specification entries to rules and scripts. The front-end system works in conjunction with the specification retrieval service to ensure the authority and traceability of entries, while providing a rule simulation interface to allow users to instantly run rule sets on a designated RIT page and intuitively verify the execution effect from entries to rules.
[0096] In this embodiment of the invention, the detection result and basis presentation function refers to the intuitive and visual display of the violation results and judgment basis in the detection output. Users can filter violations by specification item, page, or time dimension through the results browser. Each violation record can be expanded to view the page snapshot, cropped and annotated image, RIT path, and corresponding judgment logic. The timeline playback function supports reproducing the entire task process, from page acquisition to rule execution, helping users verify the consistency between the process and the results. The comparative analysis function supports the differentiated display of detection results from different versions or different devices. Users can also generate standardized PDF / XLSX reports with one click through the automatic report generator and download the basis package file (screenshots, annotated images, RIT slices, metrics, and verification fingerprints) to ensure the transferability and long-term traceability of the detection results.
[0097] In this embodiment of the invention, the system management function refers to the unified configuration and auditing of the testing platform's operation, tasks, and users. This function includes task and historical archiving, supporting retrieval and archiving based on manufacturer, model, version, or testing time, forming a complete task archive chain; it also includes user and operation log management, recording all key operation trajectories (task execution, rule modification, report generation and download), ensuring the auditability and compliance of the testing process. Through these functions, the system can meet the dual requirements of regulatory authorities and internal enterprise audits, and ensure the security and stability of the testing platform during long-term operation.
[0098] In specific implementation, the Internet TV system model recognition method based on resource identifier tree in this embodiment of the invention includes: S1. Data modeling, as the fundamental technical step in implementing this algorithm, focuses on constructing a priori knowledge model—a resource identifier tree—that defines the hierarchical logical relationships between elements of the Internet TV interface. Based on this tree model, a dataset with both visual features and semantic associations is built, providing standardized support for model training and inference. Considering the hierarchical characteristics of the Internet TV system interface, a "System-Page-Column-Element" resource identifier tree is constructed. The tree structure and the definitions of each level are as follows: See Figure 8 This invention employs a multi-branch tree data structure. The root node represents the entire Internet TV system. First-level child nodes correspond to "pages," second-level child nodes correspond to "categories" within a page, and third-level child nodes correspond to "elements" within a category. Each node contains four core fields: a unique identifier (ID), a set of attributes, a parent node pointer, and a list of child nodes. Page-level (first-level nodes): Defined as independent functional interfaces within the Internet TV system, such as "Home," "Movie Channel Page," and "Free Zone Page." Special pages like the Home, Free Zone, and Application Pages are identified according to relevant standards. Category-level (second-level nodes): Defined as modules within a page with clearly defined functional areas, encompassing core types such as navigation bars (e.g., the top "Home - Movies - Variety Shows" navigation), application bars (e.g., the side "Games - Education - Music" application list), recommendation areas (e.g., the "Hot Recommendations" and "Recommended for You" content sections on the homepage), search bars, and settings areas, thus achieving the association and functional differentiation between categories and pages. Element-level (third-level node): Defined as the smallest interactive or display unit within a column, including four categories: image elements (such as posters in the recommendation area and icons in the application bar), text elements (such as navigation bar text and titles in the recommendation area), button elements (such as "Play" and "Download" buttons), and input box elements, providing basic data support for subsequent interaction algorithms.
[0099] Furthermore, this invention provides a method for generating a Domain-Specific Description Language (DSL) for Internet TV specification intent parsing and compliance detection. For example... Figure 9 As shown, in the semantic parsing stage of regulations, a multi-stage parsing framework based on deep learning is adopted. First, the Legal-BERT model is used to extract entities and relationships from the regulatory text, identifying key elements such as obligated subjects, behavioral conditions, and binding clauses. For television-specific terminology, the system constructs a broadcasting domain ontology library containing 872 professional terms. Semantic disambiguation technology is used to solve the problem of polysemy, and the final output is an Abstract Syntax Tree (AST) in JSON Schema format. Each node contains the clause type, logical operators, conditional expression tree, and the associated location identifier of the original regulatory text. This structured representation enables subsequent processing to accurately understand the semantic requirements and logical relationships of the regulations. Figure 10 As shown, in the strategy DSL generation stage, the system uses the AST output by the semantic parsing module and the UI element data provided by the UI recognition module as dual inputs. The system first performs template matching, selecting a basic framework from a pre-built template library based on the clause type (such as price clause or path clause) in the AST. Then, specific parameters are injected into the template. This process requires dynamically binding UI element attributes and automatically calculating the click path depth based on its parent container hierarchy. The final generated DSL strategy undergoes double validation: first, it checks whether the syntax conforms to the domain language specification, and then verifies the existence of all referenced UI attributes to ensure that the output strategy can be directly compiled and executed.
[0100] Overall, this invention transforms complex and diverse TV pages into a hierarchical structured model by constructing a TV page resource identifier tree. It abstracts steps such as controlled TV page acquisition, structured modeling of page information, generation and governance of compliance judgment rules, sandbox execution, and test report generation into services that can be invoked via the MCP protocol. Furthermore, through the collaboration of intelligent agents and specification parsing intelligent agents, it achieves automatic task orchestration, establishing a closed-loop system from task configuration, page acquisition, RIT modeling, rule generation, judgment execution to report archiving. This effectively solves the problems of existing technologies being unable to adapt to complex and diverse TV pages and dynamically updated regulatory requirements, improving the full-process automation and dynamic adaptability of the compliance testing chain, and enhancing the traceability and interpretability of test results.
[0101] Furthermore, this invention is the first to abstract a TV EPG page screenshot into a hierarchical structure of "page—category—element," and introduces attributes such as element type, coordinates, area ratio, and salience to construct a computable structured model. This method overcomes the limitation that HTML / DOM parsing cannot be used in a TV environment, directly addressing the actual presentation interface, ensuring the stability and consistency of the detection input, and providing a solid foundation for rule execution and metric measurement.
[0102] Furthermore, this invention utilizes a specification parsing agent to transform management specification entries into executable DSL rules and discrimination scripts. It also introduces syntax and semantic verification, conflict resolution, regression testing, and version control mechanisms, forming a traceable chain from "specification entry → DSL rule → discrimination script → discrimination basis." This governance mechanism not only solves the problems of rule maintenance difficulties and lack of consistency in existing methods but also ensures that detection tasks under different time periods and different specification versions are reproducible.
[0103] Furthermore, this invention introduces a sandbox runtime environment, providing unified dependencies, resource limits, and random seed configurations for the discrimination script, ensuring consistent output under the same input. The runtime process records logs, performance metrics, and scenarios for reproducing violating pages, supporting cross-version and cross-device comparison and verification, significantly improving the stability and interpretability of the detection. In the output stage, this invention combines violation results with page snapshots, RIT paths, and numerical metrics to generate a discrimination basis and standardized report with annotation and measurement information. Compared to traditional methods that only output screenshots or abstract logs, this invention's report is more transparent and intuitive, facilitating understanding and verification by regulatory agencies, manufacturers, and users.
[0104] This invention constructs a closed-loop system from task configuration, page acquisition, RIT modeling, rule generation, judgment execution to report archiving. All detection products (task number, TV equipment information, page snapshot, RIT model, rule version, judgment basis, and detection report) are bound together, supporting traceability and reproduction across tasks and time periods, thus overcoming the shortcomings of existing solutions that are "fragmented in tasks and untraceable in processes".
[0105] Accordingly, this invention also provides a TV page compliance detection system, which includes: a compliance detection main intelligent agent and a specification parsing intelligent agent. The compliance detection main intelligent agent is used to control the creation of tasks based on TV page detection requirements and determine the management specification entries corresponding to the tasks; trigger the collection of data from the TV page to be detected; use the collected data to extract the TV page to be detected into a hierarchical structure of page-section-element; add attributes to the extracted hierarchical structure and generate a Resource Identifier Tree (RIT) to convert the TV page to be detected into a computable structured model; and trigger... In a sandbox environment, a discrimination script is executed on each resource identifier tree of the structured model, outputting violation results, operation logs, and performance indicators, and reproducing the violation page based on the trigger. The violation conclusion is combined with the corresponding violation page snapshot, RIT path, and numerical metric to generate a discrimination basis with annotation and metric information, and a standardized report is generated. The specification parsing agent is used to convert the management specification items into executable discrimination scripts, and to perform syntax and semantic verification, conflict resolution, regression verification, and version management on the converted discrimination scripts, as well as to perform TV page compliance verification and regression evaluation.
[0106] Meanwhile, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for deducing strategies for building an artificial intelligence innovation ecosystem based on multi-agent game theory.
[0107] The relevant content of the system embodiments and storage medium embodiments of the present invention can be understood by referring to the method embodiments of the present invention, and will not be discussed in detail here.
[0108] Although preferred embodiments of the invention have been disclosed for illustrative purposes, those skilled in the art will recognize that various modifications, additions, and substitutions are possible, and therefore the scope of the invention should not be limited to the embodiments described above.
Claims
1. A method for detecting the compliance of television web pages, characterized in that, The method includes: Create a task based on the TV page inspection requirements and determine the corresponding management specification items for that task; The system collects TV pages to be tested, performs structured parsing and element information identification on the collected TV pages, and extracts the page information into a hierarchical and computable data model with a "page-column-element" structure, namely the Resource Information Tree (RIT). The management specification items are converted into executable discrimination scripts, and the converted discrimination scripts are subjected to syntax and semantic verification, conflict resolution, regression verification and version management. In the sandbox environment, a discrimination script is executed on each resource identifier tree of the structured model, outputting violation results, operation logs and performance indicators, and reproducing the violation page based on the trigger. By combining the violation results with the corresponding violation page snapshot, resource identifier tree path, and numerical metrics, a judgment basis with annotation and measurement information is generated, and a standardized report is generated.
2. The method according to claim 1, characterized in that, The process of creating a task based on the TV page detection requirements and determining the corresponding management specification item for that task includes: A task is created based on the TV page detection requirements. The task context is fixed and a task number is generated. The task number is used to uniquely identify the task. The task includes concurrency, timeout, retry policies and permission domains. The management specification entry corresponding to the task is determined, and the number, version, effective period and anchor point of the management specification entry are obtained. The obtained management specification entry is bound to the task.
3. The method according to claim 1, characterized in that, The management specification entries are converted into executable decision scripts, and the converted decision scripts are then subjected to syntax and semantic verification, conflict resolution, regression verification, and version control, including: The management specification entries are converted into executable DSL rules by a specification parsing agent, and the DSL rules are converted into discrimination scripts. The converted DSL rules and discrimination scripts are then subjected to syntax and semantic verification, conflict resolution, regression verification, and version management.
4. The method according to claim 3, characterized in that, The process of converting the management specification entries into executable DSL rules and converting the DSL rules into a decision script also includes: If the required management specification entries, DSL rules, and discrimination scripts exist in the database, they are directly invoked; When the database is missing the required management specification entries, DSL rules, and discrimination scripts, the corresponding management specification entries, DSL rules, and discrimination scripts are generated by the specification parsing agent. The generated management specification entries, DSL rules, and discrimination scripts are then stored in the database after undergoing syntax and semantic verification, security and specification checks.
5. The method according to claim 1, characterized in that, To identify scripts, an isolated runtime environment is constructed, with unified dependencies, resources, and random seeds, and a runtime environment number is generated, which is used to identify sandbox execution instances; In the sandbox environment, the relevant resource identifier tree nodes or paths are located for the entire structured model based on the selectors and judgment conditions in the DSL rules. Logical operations and threshold comparisons are performed with the management specification entries, and violation results, operation logs and performance indicators are output. The detection results are aggregated and organized, and the violation judgment conclusions are organized according to the dimensions of page and management specification items. Abnormal samples and boundary situations are marked to provide a reference for subsequent feedback and DSL rule optimization.
6. The method according to any one of claims 1-5, characterized in that, The process of collecting the television page to be detected includes: Establish a controlled session with the target television device to capture page snapshots and keyframes.
7. The method according to claim 6, characterized in that, The TV page to be inspected is converted into a hierarchical, computable structured data model, including: The collected page snapshots and keyframes are used for element identification and structural modeling, and extracted into a hierarchical structure of "page - column - element". Attributes are added to the extracted hierarchical structure to convert the TV page to be detected into a computable data model. The data model is a resource identifier tree with path and measurement information. The attributes include element type, display information, coordinates and area ratio. Generate resource identifier tree numbers, perform consistency checks on the resource identifier trees, and correct resource identifier tree nodes with inconsistent hierarchical structures.
8. The method according to any one of claims 1-5, characterized in that, After generating the standardized report, the method further includes: The specification parsing agent is adjusted based on false positives, omissions, and conflicts in the standardization report to improve the matching and recognition accuracy of the specification parsing agent.
9. A television page compliance detection system, characterized in that, The system includes: a compliance detection main agent and a specification parsing agent, wherein, The compliance detection main intelligent agent is used to control the creation of tasks based on TV page detection requirements and determine the corresponding management specification items for the tasks; trigger the collection of data of the TV pages to be detected; use the collected data to extract the TV pages to be detected into a hierarchical structure of page-column-element; add attributes to the extracted hierarchical structure and generate a Resource Identifier Tree (RIT) to convert the TV pages to be detected into a computable structured model; and trigger the execution of a discrimination script for each resource identifier tree of the structured model in a sandbox environment, outputting violation results, operation logs, and performance indicators, and reproducing the violation page according to the trigger; combine the violation conclusion with the corresponding violation page snapshot, RIT path, and numerical measurement to generate a discrimination basis with annotation and measurement information, and generate a standardized report; The specification parsing agent is used to convert the management specification entries into executable discrimination scripts, and to perform syntax and semantic verification, conflict resolution, regression verification and version management on the converted discrimination scripts, as well as to perform TV page compliance verification and regression evaluation.
10. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for television page compliance detection as described in any one of claims 1-8.