Verification rule generation methods, devices, storage media, and program products

By automatically generating data verification rules through data exchange specifications, the problem of low efficiency in manually writing rules in traditional data verification systems is solved, achieving automated conversion and efficient generation.

CN123115101APending Publication Date: 2026-11-17ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510638379.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In traditional data validation systems, validation rules need to be written manually, which leads to low development efficiency when facing complex and dynamically changing data environments.

Method used

By acquiring the data acquisition strategy described according to the set data exchange specifications, parsing the definition information of the data objects, and automatically generating data verification rules, the automatic transformation from data acquisition strategy to data verification rules is achieved.

Benefits of technology

This improves the efficiency of generating data validation rules, reduces the need for manual writing, and ensures the accuracy and consistency of the generated rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115101A_ABST
    Figure CN123115101A_ABST
Patent Text Reader

Abstract

This application provides a method, device, storage medium, and program product for generating verification rules. In this application embodiment, since the data acquisition strategy is described according to a set data exchange specification, the definition information of each data object included in the data acquisition strategy can be parsed from the data acquisition strategy according to the data exchange specification. Then, data verification rules can be automatically generated based on the definition information of each data object included in the data acquisition strategy, realizing an automated conversion from data acquisition strategy to data verification rules. This process eliminates the need for manual writing of data verification rules, thus improving the efficiency of data verification rule generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data governance technology, and in particular to a method, device, storage medium and program product for generating verification rules. Background Technology

[0002] In the context of digital transformation, enterprise data is growing rapidly, but data quality issues (such as inconsistency, incompleteness, and inaccuracy) severely hinder the extraction of data value. Data governance aims to ensure the availability, consistency, security, and compliance of data through strategies, processes, and technologies. Data verification, as a core technical means of data governance, checks the format, logic, and application rules of data to ensure that it meets expected standards, thereby supporting the achievement of data governance goals.

[0003] In traditional data validation systems, validation rules typically need to be written manually by developers, for example, through hard-coded conditional logic (such as if-else), regular expressions, or static schema definitions (such as JSON Schema). While this approach can meet basic data validation needs, it is inefficient in developing data validation rules because every time the data structure or application rules change, the validation code must be manually modified when facing complex and dynamically changing data environments. Summary of the Invention

[0004] This application provides a data rule generation method, device, storage medium, and program product to improve the generation efficiency of data quality verification rules.

[0005] This application provides a method for generating verification rules, including:

[0006] Obtain the data acquisition strategy described according to the set data exchange specifications;

[0007] According to the data exchange specification, the data acquisition strategy is parsed to obtain the definition information of each data object included in the data acquisition strategy;

[0008] Data validation rules are generated based on the definition information of each data object.

[0009] Optionally, the method further includes: obtaining the definition information of the transmission data structure included in the data acquisition strategy from the definition information of each data object included in the data acquisition strategy;

[0010] Based on the definition information of the transmitted data structure, obtain the data to be verified;

[0011] The data to be verified is verified using the aforementioned data verification rules.

[0012] This application also provides a data verification method, including:

[0013] Obtain the data acquisition strategy described according to the set data exchange specifications;

[0014] According to the data exchange specification, the data acquisition strategy is parsed to obtain the definition information of each data object included in the data acquisition strategy;

[0015] From the definition information of each data object, obtain the definition information of the transmission data structure included in the data acquisition strategy;

[0016] Based on the definition information of the transmitted data structure, obtain the data to be verified;

[0017] The data to be verified is verified using data verification rules, which are generated based on the definition information of each data object.

[0018] This application also provides an electronic device, including: a memory and a processor; wherein the memory is used to store computer programs;

[0019] The processor is coupled to the memory and is used to execute the computer program to perform the steps in the above-described verification rule generation method.

[0020] This application also provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps in the above-described verification rule generation method.

[0021] This application also provides a computer program product, including a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps in the above-described verification rule generation method.

[0022] In this embodiment, since the data acquisition strategy is described according to the set data exchange specification, the definition information of each data object contained in the data acquisition strategy can be parsed from the data acquisition strategy according to the data exchange specification. Then, data verification rules can be automatically generated according to the definition information of each data object contained in the data acquisition strategy, realizing the automatic conversion from data acquisition strategy to data verification rules. This process does not require manual writing of data verification rules, which helps to improve the generation efficiency of data verification rules. Attached Figure Description

[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 A flowchart illustrating the verification rule generation method provided in this application embodiment;

[0025] Figure 2 This is a schematic diagram illustrating the process from data acquisition strategy to data verification provided in the embodiments of this application;

[0026] Figure 3 A schematic diagram of each data object provided in the data exchange specification for embodiments of this application;

[0027] Figure 4 This application provides a dependency graph between data objects in its embodiments.

[0028] Figure 5a A schematic diagram of the data verification process provided in the embodiments of this application;

[0029] Figure 5b A flowchart illustrating the data verification method provided in this application embodiment;

[0030] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] It should be noted that, in the cases involving user information in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0033] The terms and concepts involved in the embodiments of this application will be explained below.

[0034] Data Acquisition: The process of obtaining raw data from data sources, standardizing it, and transforming it into a format that meets the needs of data sharing and utilization.

[0035] Data exchange: The process by which various entities exchange data with each other.

[0036] Event Model: Based on the framework of "Who (user), When (time), Where (location), How (method), What (behavior content)", it records user interactions with products (such as clicks, purchases, searches, etc.) and supports flexible extension of event attributes.

[0037] Super Position Model (SPM) is a coding system used to track the position of page modules. Its main function is to record the source and destination of page traffic, as well as user clicks and conversions on the page.

[0038] Dynamic rule engine: A software system that supports real-time loading, updating and execution of rules, and can dynamically adjust application logic without interrupting service.

[0039] Traditional data validation relies on interface specifications such as Open Application Programming Interface (OpenAPI). However, OpenAPI specifications can only constrain structured interface data and are only applicable to API interface scenarios. They cannot express data exchange scenarios.

[0040] To better represent data exchange scenarios, this application provides a data exchange specification that defines various data objects or parameters involved in the data exchange process. Users can formulate corresponding data acquisition schemes based on this data exchange specification and their actual needs.

[0041] Data exchange specifications are a set of conventions that standardize the structure, semantics, format, and transmission rules of data to ensure unambiguous data exchange between heterogeneous systems. Data exchange specifications cover both the syntactic layer (how data is represented) and the semantic layer (how data is understood), and are typically presented in documents or machine-readable schemas. Examples include JavaScript Object Notation (JSON), Extensible Markup Language (XML) schemas, or Protocol Buffers. JavaScript is a lightweight, interpreted, or just-in-time (JIT) compiled programming language.

[0042] Data exchange specifications may include the following: the data objects involved in the data exchange process and the definitions of the data objects. As shown in Table 1 below, data objects may include: metadata objects such as Info objects, Components objects, Parameter objects, Schema objects, Model objects, Action objects, and Payload objects, etc.

[0043] Table 1 Data Objects

[0044]

[0045]

[0046] In this context, an Info object refers to an object containing a set of descriptive information or metadata. As shown in Table 2, the definition of a metadata object may include attributes such as the name of the application from which the data originates, the application's version information, and a brief description of the application, as well as the data structure type of these attributes.

[0047] Table 2 Specification of Metadata Objects

[0048]

[0049]

[0050] As shown in Table 3, the Components object describes the constituent objects of the data acquisition scheme, and may include: parameter objects, pattern objects, and model objects, as well as the data structure types of these objects. The data structure type of the parameter object can be a key-value (KV) structure. Here, the key is the parameter's identifier (ID), and the value is the parameter object.

[0051] Table 3 Specifications of Component Objects

[0052]

[0053] As shown in Table 4, a parameter object may include the fields shown in Table 4, where the field names shown in Table 4 are the attributes of the parameter object.

[0054] Table 4 Specifications of Parameter Objects

[0055]

[0056]

[0057]

[0058] As shown in Table 5, the attributes of the data acquisition model may include the fields shown in Table 5.

[0059] Table 5 Specifications of the Data Acquisition Model

[0060]

[0061]

[0062]

[0063] Table 6 defines the Action object, i.e., the specification of the data collection point. As shown in Table 6, the attributes of the data collection point can include the fields listed in Table 6.

[0064] Table 6 Specifications of Data Collection Points (i.e., Action Objects)

[0065]

[0066]

[0067] A payload object is used to express the structure of transmitted data (referred to as the transmission data structure), which can represent one or more rows of data in different patterns. Therefore, a payload object can also be called a transmission data structure. As shown in Table 7, the transmission data structure may include the field names shown in Table 7.

[0068] Table 7 Specifications of Transmission Data Structure (i.e., Payload Object)

[0069]

[0070]

[0071] The foregoing provides the standardized definitions of each data object in the data exchange specification. Based on the data exchange specification provided in this application, users can formulate corresponding data acquisition strategies according to their actual needs. A unified data exchange specification allows for the development of complete data acquisition strategies, reducing specification fragmentation.

[0072] In some embodiments of this application, a data acquisition strategy described according to a set data exchange specification can be obtained, and the definition information of each data object contained in the data acquisition strategy can be parsed from the data acquisition strategy according to the data exchange specification. Then, data verification rules can be automatically generated according to the definition information of each data object contained in the data acquisition strategy, realizing the automated conversion from data acquisition strategy to data verification rules. This process does not require manual writing of data verification rules, which helps to improve the generation efficiency of data verification rules.

[0073] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0074] It should be noted that the same reference numerals in the following figures and embodiments denote the same object or the same step. Therefore, once an object or step is defined in one figure or embodiment, it does not need to be discussed further in subsequent figures and embodiments.

[0075] Figure 1 This is a flowchart illustrating the data rule generation method provided in an embodiment of this application. Figure 1 As shown, the method mainly includes the following steps:

[0076] 101. Obtain the data acquisition strategy described in accordance with the set data exchange specifications.

[0077] 102. Based on the data exchange specification, parse the data acquisition strategy to obtain the definition information of each data object included in the data acquisition strategy.

[0078] 103. Generate data verification rules based on the definition information of each data object included in the data acquisition strategy.

[0079] For a description of the data exchange specifications, please refer to the aforementioned relevant content, which will not be repeated here. In this embodiment, as... Figure 2 As shown in step S1, users can formulate data acquisition strategies based on data exchange specifications. The data exchange specifications provided above support standardized descriptions of multi-source heterogeneous data acquisition and exchange (such as structured or unstructured data from databases and logs), and also support data acquisition models expressing complex data storage structures and various application scenarios (such as event models or super-location models in embedded points) as well as data acquisition points. Modules, devices, or equipment executing the verification rule generation method provided in this application embodiment can dynamically load data acquisition strategies (such as...) Figure 2 (See step S2); and automatically generate data verification rules based on the data acquisition strategy.

[0080] Specifically, such as Figure 1 As shown, in step 101, the data acquisition strategy described in the data exchange specification can be obtained. The data acquisition strategy refers to the specific data acquisition plan described using the data exchange specification. For example... Figure 3 As shown, the data acquisition strategy described in the data exchange specification may include: the definition information of the application scenario parameters to be collected, the definition information of the data collection points, and the definition information of the data acquisition model, etc. Figure 3The arrows in the diagram represent the dependencies between data objects in the data exchange specification. Specifically, data collection points depend on the data collection model; the data collection model depends on the application scenario parameter definition; and the application scenario parameter definition depends on the transmission data structure. The application scenario parameters can be flexibly set according to actual data collection needs. There can be one or more application scenario parameters. "Multiple" refers to two or more (including two). For example, for collecting the click event of element C in module B of a webpage A, the application scenario parameters could include: webpage (Page=A), module (Module=B), element (element=C), and event (event=click). As another example, for collecting the viewing time of a user X for a video Y, the application scenario parameters could include: user (User=X), video (Video=Y), and viewing duration. The specific definition information of the application scenario parameters is determined by the data exchange specification. Specifically, as shown in Table 4 above, the definition information of application scenario parameters can include: the attributes of the application scenario parameter, such as the name (ID), data type, data format, example value, and enumeration value of the application scenario parameter. Of course, the attributes of application scenario parameters can also include: the conditions that the application scenario parameters need to meet, referred to as application scenario parameter conditions. Correspondingly, application scenario parameter conditions refer to the conditions that the application scenario parameters must satisfy. These conditions can be written using logical expressions, regular expressions, or condition-based validation logic. Condition-based validation logic is a data validation method that allows dynamic adjustment of validation rules based on specific values ​​or conditions in the data. During data processing and validation, a set of predefined conditions can be used to determine whether to apply certain validation rules to specific data fields or entities. This logic allows the system to dynamically adjust its validation strategy, rather than applying a fixed set of rules to all situations. It enables the validation process to adaptively adjust according to the specific attributes, values, or states of the input data, thereby achieving a more flexible and accurate data validation mechanism. Condition-based validation logic can be JSON Schema conditions. JSON Schema conditions refer to defining a set of rules in a JSON Schema using the if, then, and else keywords (or similar mechanisms). These rules check certain fields or values ​​in the data and determine whether to apply additional validation constraints or other rules based on the check results. This approach allows for flexible modification of the schema's behavior based on the specific content of the data. `if` defines a condition to test whether the data meets a specific criterion. `then` indicates that if the `if` condition is true, the validation rules or schema defined by the `then` statement are applied. `else` is optional; if the `if` condition is false, another set of validation rules or schemas defined by the `else` statement can be used.

[0081] The application scenario parameter can be one or more. "Multiple" means two or more (including two). Multiple application scenario parameters can represent an event model or a super location model, enabling the data acquisition strategy to describe application scenarios such as event models or super location models, thus expanding the application scenarios of the data exchange specification.

[0082] Data collection points, as defined in the aforementioned data exchange specifications, refer to logically marked points in applications, servers, or data pipelines, predefined according to the data exchange specifications, used to accurately capture user behavior or system events (such as button clicks, page jumps, content exposure, etc.). The definition information of a data collection point may include its attribute information. As shown in Table 6, the attributes of a data collection point may include: the name of the action corresponding to the data collection point, the type of the data collection point (a group of tracking actions or a specific tracking action, etc.), the application scenario parameters that must be reported, and the key-value pairs (KV) composed of the application scenario parameters and their values.

[0083] A data acquisition model is a structured framework used to define and manage various parameters, conditions, and dependencies in the data acquisition process. It describes the specific requirements and rules of data acquisition through a series of standardized fields. The definition information of a data acquisition model may include: the attribute information of the data acquisition model. As shown in Table 5, the attributes of a data acquisition model may include: (1) Name of the data acquisition model (title): a required field that represents the unique name of the model and is used to identify different data acquisition models; (2) Description of the data acquisition model (description): a brief description of the data acquisition model to help understand the purpose and use of the model; (3) Model type (type): a required field that specifies the type of model, including the base model (base) and the specific model (event). The basic model can contain multiple specific models, and the specific models are for specific data collection scenarios; (4) Parameters: The parameter list of the model, which defines all the parameters involved in the model; (5) Qualified object value: The value range of certain parameters is limited by key-value pairs, which facilitates accurate matching and positioning; (6) Qualified parameters: Optional fields used to limit matching parameters and determine the parameters that the next level model needs to match; (7) Required parameters: The parameter group that must be reported to ensure the integrity of key data; (8) Trigger description: The triggering time description, which explains under what circumstances the data collection process is started.

[0084] The above is merely an illustrative description of the data acquisition strategy in conjunction with the data exchange specification and does not constitute a limitation. Since the data acquisition strategy in step 101 is described according to the set data exchange specification, in step 102, the data acquisition strategy can be parsed according to the set data exchange specification to obtain the definition information of each data object included in the data acquisition strategy.

[0085] In some embodiments, the data acquisition strategy can be parsed according to the established data exchange specifications to obtain the semantics of each element in the data acquisition strategy. Elements in the data acquisition strategy refer to the individual strings contained within the strategy. Determining the semantics of each element in the data acquisition strategy specifically involves determining which type of data object each element belongs to, i.e., whether it belongs to application scenario parameters, data acquisition points, data acquisition models, or other data objects, etc.

[0086] Specifically, the data acquisition strategy can be searched according to the definition specifications of each data object in the established data exchange specification. For any type of data object, if an element in the data acquisition strategy meets the definition specifications of that type of data object, then that element is determined to belong to that type of data object. For example, if an element in the data acquisition strategy meets the definition specifications of a data acquisition point, then that element is determined to belong to a data acquisition point, etc. Furthermore, the definition information of each data object included in the data acquisition strategy can be determined from the data acquisition strategy based on the semantics of each element in the data acquisition strategy.

[0087] In this embodiment, the definition specifications for each type of data object specified in the data exchange specification, based on these specifications to identify and classify elements in the data acquisition strategy, ensure that each element is correctly categorized, thereby improving the accuracy and consistency of the entire data acquisition process.

[0088] In other embodiments, definition templates can be created for various data objects according to the data exchange specification. This template should include the necessary attributes of each data object as specified in the data exchange specification, such as object name, description, data type, length limit, nullability, and default value. Furthermore, the definition templates for each data object can be matched with the elements included in the data acquisition strategy to determine the data object to which each element belongs; and the definition information of the data object to which each element belongs can be extracted from the data acquisition strategy. In this embodiment, by using predefined templates for various data objects based on the data exchange specification, and then matching and classifying the elements in the data acquisition strategy using these templates, the elements in the data acquisition strategy can be quickly classified and parsed, which helps improve the parsing efficiency of the data acquisition strategy.

[0089] After determining the definition information of each element object included in the data acquisition strategy, in step 103, data verification rules can be generated based on the definition information of each element object included in the data acquisition strategy.

[0090] In this embodiment, and in some embodiments of this application, since the data acquisition strategy is described according to the set data exchange specification, the definition information of each data object contained in the data acquisition strategy can be parsed from the data acquisition strategy according to the data exchange specification; then, data verification rules can be automatically generated according to the definition information of each data object contained in the data acquisition strategy, realizing the automated conversion from data acquisition strategy to data verification rules. This process does not require manual writing of data verification rules, which helps to improve the generation efficiency of data verification rules.

[0091] On the other hand, using the same data collection specifications to describe and parse data collection strategies ensures that a unified standard is followed from strategy formulation to execution. This helps eliminate ambiguities arising from the use of different specifications or interpretations at different stages and improves the accuracy of the generated data validation rules.

[0092] In some embodiments, when generating data validation rules based on the definition information of each data object included in the data acquisition strategy, the attribute information of each data object can be obtained from the definition information of each data object; and the attribute information of each data object can be used as validation conditions to generate data validation rules. Specifically, for any data object, the attribute information of that data object can be used as validation conditions to generate data validation rules corresponding to that data object. The same method can be used to obtain the data validation rules corresponding to each data object. Then, the set of data validation rules corresponding to each data object can be determined as the final data validation rules. Each data object has its specific attributes (such as name, type, length limit, whether it can be nullable, and parameter conditions that need to be met). Setting data validation rules based on these specific attributes can improve the accuracy of the generated data validation rules.

[0093] In some embodiments, the data objects included in the data acquisition strategy include: application scenario parameters, data acquisition points, and data acquisition models. Accordingly, when generating data verification rules based on the definition information of each data object included in the data acquisition strategy, data verification rules can be generated based on the definition information of the application scenario parameters, the definition information of the data acquisition points, and the definition information of the data acquisition model.

[0094] In some embodiments, attribute information of application scenario parameters can be obtained from the definition information of application scenario parameters, and data validation rules for application scenario parameters can be generated using the attribute information of application scenario parameters as validation conditions. Correspondingly, attribute information of data collection points can also be obtained from the definition information of data collection points, and data validation rules corresponding to data collection points can be generated using the attribute information of data collection points as validation conditions. Alternatively, attribute information of data collection models can be obtained from the definition information of data collection models, and data validation rules corresponding to data collection models can be generated using the attribute information of data collection models as validation conditions. Finally, the set of data validation rules for application scenario parameters, data validation rules for data collection points, and data validation rules corresponding to data collection models can be determined as the final data validation rules.

[0095] According to the specifications of the data acquisition points in Table 6 and the data acquisition models shown in Table 5, the data acquisition points depend on the data acquisition model, and the data acquisition model can depend on other data acquisition models. For example, such as... Figure 4 As shown, data acquisition points 1.1.1 to 1.1.N depend on data acquisition model 1.1; data acquisition models 1.1 to 1.M depend on data acquisition model 1; data acquisition points NN1 to NNN depend on data acquisition model NN; and data acquisition models N.1 to NN depend on data acquisition model N. Data acquisition models 1 to N depend on the root node. The root node is a virtual node, which is not actually defined in the data acquisition strategy. Therefore, the data acquired based on the data acquisition strategy must not only meet the requirements of the data acquisition points but also the requirements of the data acquisition models. Based on this, when generating data validation rules according to the definition information of each data object included in the data acquisition strategy, the dependency graph between data acquisition points and data acquisition models, as well as between different data acquisition models, can be determined based on the definition information of the data acquisition points and the definition information of the data acquisition models. The dependency graph is shown below. Figure 4 As shown.

[0096] Specifically, according to the specifications of the data acquisition points shown in Table 6 above, the definition information of a data acquisition point may include the identifier of the data acquisition model that the data acquisition point depends on. Therefore, for any data acquisition point A, the dependency relationship between data acquisition point A and the data acquisition model can be determined based on the definition information of data acquisition point A. Specifically, the identifier of data acquisition point A (such as the name of the data acquisition point) and the identifier of the data acquisition model Y that data acquisition point A depends on can be obtained from the definition information of data acquisition point A; then, the dependency relationship between the data acquisition point and the data acquisition model can be determined based on the identifier of data acquisition point A and the identifier of the data acquisition model Y that the data acquisition point depends on. This dependency relationship specifically means that data acquisition point A depends on data acquisition model Y.

[0097] As shown in Table 6 above regarding the specifications of the data acquisition points, the definition information of a data acquisition model may include the identifiers of other data acquisition models that the data acquisition model depends on. Therefore, the dependency relationships between data acquisition models can be determined based on the definition information of the data acquisition models. In this embodiment, for ease of description and distinction, the dependency relationship between data acquisition points and data acquisition models is defined as a first dependency relationship; and the dependency relationship between data acquisition models is defined as a second dependency relationship.

[0098] Specifically, for any data acquisition model X, the identifier of the data acquisition model Z that data acquisition model X depends on can be determined from the definition information of data acquisition model X. Then, based on the identifier of data acquisition model X and the identifier of the data acquisition model Z that data acquisition model X depends on, a second dependency relationship between data acquisition model X and data acquisition model Z can be determined. This second dependency relationship specifically includes: data acquisition model X depends on data acquisition model Z. Using the same method, the second dependency relationship between any two data acquisition models with a dependency relationship can be determined.

[0099] Subsequently, based on the first dependency relationship between the data acquisition points and the data acquisition model, and the second dependency relationship between different data acquisition models, a dependency graph between the data acquisition points and the data acquisition model, and between different data acquisition models, can be generated. Specifically, using the identifiers of the data acquisition points and the identifiers of the data acquisition models as nodes, and according to the first dependency relationship between the data acquisition points and the data acquisition models, and the second dependency relationship between different data acquisition models, directed edges can be added between nodes with dependencies to obtain the dependency graph between the data acquisition points and the data acquisition models, and between different data acquisition models. This directed edge points from one node to the node that the current node depends on (i.e., the node that is depended on). For example, if the data acquisition point A depends on the data acquisition model Y, then the directed edge between the node corresponding to data acquisition point A and the node corresponding to data acquisition model Y points from the node corresponding to data acquisition point A to the node corresponding to data acquisition model Y, representing that data acquisition point A depends on data acquisition model Y.

[0100] In the above embodiments, the first dependency relationship between the data acquisition point and the data acquisition model, and the second dependency relationship between the data acquisition point and the data acquisition model, provide multi-level dependencies, construct a complete dependency chain between the data acquisition point and the data acquisition model, and provide a more comprehensive and hierarchical dependency relationship view, which helps to improve the comprehensiveness and hierarchy of the generated dependency relationship graph.

[0101] In other embodiments, the definition information of data acquisition points and the definition information of data acquisition models can be input into the relationship graph generation model. This relationship graph generation model can automatically generate a dependency graph between data acquisition points and data acquisition models, as well as between different data acquisition models, based on the definition information of the data acquisition points and data acquisition models. The relationship graph generation model can be a neural network model, and its model parameters and architecture can be flexibly adjusted according to actual application requirements. The relationship graph generation model can be a pre-trained neural network model or a generative model. For generative models, the definition information of data acquisition points and data acquisition models, along with textual descriptions instructing the relationship graph generation model to generate a dependency graph, can be input as prompts into the relationship graph generation model. Guided by these prompts, the relationship graph generation model can generate a dependency graph between data acquisition points and data acquisition models, as well as between different data acquisition models, based on the definition information of the data acquisition points and data acquisition models. Among them, the dependency graph generation model can automatically capture the dependency relationships between data collection points and data collection models, as well as the dependency relationships between different data collection models. When faced with large-scale or complex data collection strategies, it can significantly improve the generation efficiency of dependency graphs.

[0102] The dependency graph generation method shown in the foregoing embodiments is merely illustrative and does not constitute a limitation. The nodes in this dependency graph include the data acquisition points and data acquisition models contained in the aforementioned data acquisition strategy. After determining the dependency graph between data acquisition points and data acquisition models, and between different data acquisition models, a verification rule tree for the data acquisition points can be generated based on the definition information of the application scenario parameters and the definition information of each node in the dependency graph, serving as the data verification rules. Since the verification rule tree not only reflects the definition requirements of the application scenario parameters and the data acquisition points, but also the definition requirements of the data acquisition models that the data acquisition points depend on and the other data acquisition models that the data acquisition models depend on, the data verification rules generated in this embodiment are comprehensive and reliable, helping to improve the accuracy of subsequent data quality verification. Furthermore, automatically generating the verification rule tree through the dependency graph allows for structured management of the verification rules for the data acquisition points. This verification rule tree can then be used to perform multi-branch tree indexing on the collected data to determine the corresponding verification rules, which helps improve the efficiency of subsequent data verification.

[0103] In some embodiments, validation rules for application scenario parameters can be generated based on the definition information of the application scenario parameters. Specifically, the attribute information of the application scenario parameters can be obtained from the definition information; and validation rules for the application scenario parameters can be generated using the attribute information of the application scenario parameters as validation conditions (defined as the first validation condition). The validation rules include the first validation condition. Accordingly, the specific data of the collected application scenario parameters needs to meet the first validation condition, that is, meet the attribute information requirements of the application scenario parameters. Setting the data validation rules based on these specific attributes can improve the accuracy of the generated data validation rules.

[0104] In some embodiments, the first validation condition described above can be written using condition-based validation logic (such as JSON Schema conditions) to obtain validation rules for application scenario parameters, thus enabling this embodiment to support condition-based validation logic. Compared to some field-level basic validations (such as type validation and data format validation), condition-based validation logic can be extended, which helps to improve the comprehensiveness of validation rules.

[0105] For any node E in the aforementioned dependency graph, excluding the root node, validation rules for node E can be generated based on its definition information. Specifically, the attribute information of node E can be obtained from its definition information; then, validation rules for node E can be generated using this attribute information as validation conditions (defined as the second validation condition). Specifically, the validation rules for node E include the second validation condition. Correspondingly, the collected data needs to meet the requirements of node E's attribute information, including but not limited to one or more of the following: mandatory field requirements, data format constraints, parameter condition requirements, and cross-parameter condition requirements. "Multiple" refers to two or more. Setting the data validation rules based on these specific attributes can improve the accuracy of the generated data validation rules.

[0106] For example, the following is a sample definition of a data collection point:

[0107]

[0108]

[0109] The aforementioned data collection points define a collection point model for the video playback page, defining its basic information, application scenarios, specific playback events, and related attributes. The attribute information of each data collection point includes: the action name corresponding to the data collection point, the type of the data collection point, and key-value pairs consisting of the application scenario parameter path and the values ​​of the application scenario parameters. Based on this, the action name, data collection point type, application scenario parameters, and their corresponding values ​​can be used as validation conditions to generate data validation rules for that data collection point. These data validation rules include: the collected data should belong to the "video content page," the collected data should be collected through a set of embedded actions, and the collected data should belong to the playback events generated in the playback area of ​​the "video details page."

[0110] In this embodiment, regular expressions or condition-based validation logic can be used to write second validation conditions corresponding to each node in the dependency graph, thereby obtaining the validation rules for each node in the dependency graph. This allows this embodiment to support condition-based validation logic. Compared to some basic field-level validations (such as type validation and data format validation), condition-based validation logic can be extended, which helps to improve the comprehensiveness of the validation rules.

[0111] Using the same method, the validation rules corresponding to each node in the dependency graph can be obtained. Then, based on the dependencies between nodes in the dependency graph, the validation rules for the application scenario parameters and the validation rules for each node in the dependency graph can be associated to obtain a validation rule tree. The association between validation rules can also be called a topological relationship, which is consistent with the dependencies between nodes in the dependency graph. In some other embodiments, the validation rules corresponding to each data object can be added to the aforementioned dependency graph based on the identifier of the data object corresponding to the validation rule to obtain the validation rule tree.

[0112] It is worth noting that, according to the specifications of the data collection points shown in Table 6 above, the attribute information of the data collection points may also include the application scenario parameter conditions corresponding to the data collection points. In this embodiment, the specific representation of the application scenario parameter conditions corresponding to the data collection points is not limited. For example, condition-based validation logic (such as Json Schema condition logic) or regular expressions can be used to write the application scenario parameter conditions corresponding to the data collection points. Similarly, according to the specifications of the data collection model shown in Table 5 above, the attribute information of the data collection model may also include the application scenario parameter conditions corresponding to the data collection model. In this embodiment, the specific representation of the application scenario parameter conditions corresponding to the data collection model is not limited. For example, condition-based validation logic (such as Json Schema condition logic) or regular expressions can be used to write the application scenario parameter conditions corresponding to the data collection model. Accordingly, the attribute information of each node in the aforementioned dependency graph may also include: the application scenario parameter conditions corresponding to that node, written using condition-based validation logic (such as Json Schema condition logic) or regular expressions. This approach extends the representation of parameter conditions and can support complex validation rules.

[0113] In some embodiments of this application, such as Figure 2As shown in step S3, the data to be verified can also be obtained for data verification to obtain the data verification result. Specifically, as shown in Table 7, the data exchange specification defines a transmission data structure. The transmission data structure, also known as a payload object, is used to express the structure of the transmitted data. It can express the input data structure and can express one or more lines of data in different patterns. The transmission data structure defines transmission parameters. Transmission parameters are the expression of application scenario parameters during transmission and storage. One transmission parameter can characterize one or more application scenario parameters. For example, a transmission parameter can be "duration," and application scenario parameters can include: application (APP) dwell time (duration_app), video playback time (Vedio_duration), webpage browsing time (Web_duration), and communication time (commu_duration), etc. For another example, if the transmission parameter is U, the corresponding application scenario parameter could be a username, etc. The transmission data structure specifications provided in this application decouple transmission parameters from application scenario parameters. This allows for the addition, deletion, and modification of application scenario parameters by altering the transmission parameters without affecting other components. For example, when actual needs change (such as adding a new application type or modifying the video playback duration calculation method), only the definition of the transmission parameters needs adjustment. This mechanism enables the system to quickly adapt to new application scenarios or rules without requiring large-scale modifications to the entire data acquisition process.

[0114] Based on the transmission data structure shown in Table 7, it can be seen that the transmission data structure defines the acquisition path from transmission parameters to application scenario parameters, where the application scenario parameters are the data to be collected. Accordingly, such as... Figure 3 As shown, the data objects included in the data acquisition strategy may also include transmission data structures. Therefore, the definition information of the transmission data structure included in the data acquisition strategy can be obtained from the definition information of each data object included in the data acquisition strategy; and the data to be verified can be obtained according to the definition information of the transmission data structure. In this embodiment, using the definition information of the transmission data structure to guide data acquisition can achieve automated data acquisition, reduce manual intervention, and help improve data acquisition efficiency. On the other hand, as the expression form of application scenario parameters in the transmission and storage process, the standardization of transmission parameters helps to eliminate possible ambiguities between different application scenarios and improve overall data quality.

[0115] Specifically, such as Figure 5aAs shown in "Data Representation Format and Association Path of Application Scenario Parameters," the association path from the transmission parameters to the application scenario parameters and the data representation format of the application scenario parameters can be determined based on the definition information of the transmission data structure. Specifically, according to the specifications of the transmission data structure in the data exchange specification, the association path carried by the field describing the association path from the transmission parameters to the application scenario parameters can be obtained from the definition information of the transmission data structure. This association path is the data representation format of the data to be verified. The data representation format refers to the structured way of organizing, storing, and transmitting data; it defines how data elements are encoded into a form suitable for storage or transmission. Different data representation formats are suitable for different types of application scenarios, and each format has its specific syntax and semantic rules. Data representation formats can be JSON or XML, etc. The data representation format of the data to be verified determines which parsing method to use. If the data representation format is JSON, then the corresponding JSON parsing method can be used. If the data representation format is XML, then the corresponding XML parsing method can be used.

[0116] Furthermore, such as Figure 5a As shown in the "Acquiring Data to be Verified" section, the data to be verified can be obtained based on the association path from transmission parameters to application scenario parameters and the data representation format. Since the association path from transmission parameters to application scenario parameters reflects the path to obtain the application scenario parameters, and the data representation format reflects the parsing method of the obtained data, the mapping and dynamic association between transmission data and application scenario data can be achieved based on this association path and data representation format. This ensures that the conversion between the transmission layer and the application layer is accurate. This reduces problems caused by misunderstanding or misinterpretation of data.

[0117] Specifically, the data read from the data source (defined as the first target data) can be parsed according to the parsing method corresponding to the data representation format to obtain the semantics of each element in the first target data, such as field names and types. The data read from the data source corresponds to... Figure 2 and Figure 5aThe process begins with "Collecting Data (Data Source)". Then, based on the semantics of each element in the first target data and the association path from transmission parameters to application scenario parameters, the data to be verified, i.e., the value of the application scenario parameter, can be obtained from the first target data. Specifically, based on the semantics of each element in the first target data, it can be determined which part of the first target data represents the transmission parameters, and the fields involved in the association path; then, according to the fields involved in the association path, the value of the specific application scenario parameter can be located, which is the data to be verified. Afterwards, the located data to be verified (corresponding to...) can be obtained. Figure 5a ("Acquiring data to be verified"). A data source refers to any structure or service that can store data. Data sources can be log storage services, databases, data warehouses, or data lakes, etc. This embodiment can adapt to application scenarios that collect data from data sources such as databases and log storage services through the transmission data structure in the data exchange specification, thus expanding the application scenarios for data collection from data sources. On the other hand, by parsing the first target data and understanding the semantics of its elements (such as field names, types, etc.), it is possible to accurately identify which parts belong to transmission parameters and which parts are fields involved in the association path, thereby ensuring the correctness of the acquired data to be verified.

[0118] In other embodiments, there are multiple application scenario parameters, which represent a super location model. Accordingly, the super location model represented by multiple application scenario parameters can be obtained from the definition information of the transmission data structure based on the association path from the transmission parameters to the application parameters. Specifically, multiple application scenario parameters and their values ​​can be obtained from the definition information of the transmission data structure based on the association path from the transmission parameters to the application parameters. These multiple application scenario parameters and their values ​​can represent a super location model. For example, if the multiple application scenario parameters include: webpage (Page=A), module (Module=B), element (element=C), and event (event=click), it means that a tracking point is placed on element C in module B of webpage A, and this tracking event is used for the click event of element C in module B of webpage A.

[0119] Furthermore, data points can be embedded at the locations indicated by the super location model; and data (defined as the second target data) represented in the aforementioned transmission data format can be collected from these locations. Then, the second target data can be parsed according to the parsing method corresponding to the aforementioned data representation format to obtain the semantics of each element in the second target data. Subsequently, the data to be verified can be obtained from the second target data based on the semantics of each element and the association path from transmission parameters to application scenario parameters. This embodiment implements multi-parameter dynamic data embedding to collect data, achieving dynamic data embedding for the test object (such as the application). On the other hand, a data embedding model (i.e., the super location model) can be defined through multi-parameter combinations without relying on unique event codes. Various data embedding models can be adapted by adjusting parameter groups, offering high flexibility. Compared to traditional data embedding methods that rely on unique event codes, this embodiment can standardize the description of various data embedding models through a unified transmission data structure specification, reducing the maintenance costs of different data embedding models.

[0120] After obtaining the data to be verified, the aforementioned generated data verification rules can be used to verify the data. Specifically, the data to be verified includes at least one entry to be verified. Each entry to be verified includes: at least one application scenario parameter and at least one key-value pair (KV) consisting of the parameter values ​​of each of the at least one application scenario parameter. Accordingly, for any entry to be verified P, the target verification rule corresponding to at least one key-value pair corresponding to the entry to be verified P can be determined from the data verification rules.

[0121] In some embodiments, the data validation rules are a set of data validation rules corresponding to each data object included in the aforementioned data acquisition strategy. Accordingly, at least one key-value pair corresponding to the entry P to be validated can be matched with the definition information of each data object included in the data acquisition strategy. Specifically, for a data acquisition point included in the data acquisition strategy, the key-value pair carried by the qualified name field of the data acquisition point definition is obtained from the definition information of the data acquisition point; if at least one key-value pair corresponding to the entry P to be validated is the same as the key-value pair carried by the qualified name field of the data acquisition point definition, then the data validation rule corresponding to that data acquisition point is determined to belong to the target validation rule corresponding to at least one key-value pair corresponding to the entry P to be validated. For a data acquisition model included in the data acquisition strategy, the key-value pair carried by the qualified name field of the data acquisition model definition is obtained from the definition information of the data acquisition model; if at least one key-value pair corresponding to the entry P to be validated is the same as the key-value pair carried by the qualified name field of the data acquisition model definition, then the data validation rule corresponding to that data acquisition model is determined to belong to the target validation rule corresponding to at least one key-value pair corresponding to the entry P to be validated. This embodiment achieves accurate data validation rule matching by comparing the key-value pairs of the entry P to be validated with the key-value pairs carried by the qualified name field in the data collection point or data collection model. This method ensures that only data that meets specific conditions will be subject to the corresponding validation rules, thus improving the accuracy of data validation.

[0122] In other embodiments, the aforementioned data validation rules are implemented as a validation rule tree. When determining the target validation rule corresponding to at least one key-value pair of a data validation rule from the data validation rules, a depth-first order can be used to match at least one key-value pair corresponding to any entry P to be validated with the definition information of each level node in the dependency graph, and the target node (corresponding to) whose definition information matches at least one key-value pair can be determined from the dependency graph. Figure 5a "Based on the dependency graph, determine the target node that matches the entry to be verified."

[0123] Specifically, since the root node does not correspond to a specific data object, when matching in the dependency graph according to depth-first order, at least one key-value pair corresponding to the entry P to be verified can be used to first match it with the definition information of the child nodes of the root node in the dependency graph. Generally, the child nodes of the root node are data acquisition models. Correspondingly, at least one key-value pair corresponding to the entry P to be verified can be used to first match it with the definition information of each data acquisition model contained in the child nodes of the root node in the dependency graph; if the key-value pair carried by the qualified name field of a certain data acquisition model definition is the same as at least one key-value pair corresponding to the entry P to be verified, then it is determined that the definition information of the data acquisition model matches at least one key-value pair corresponding to the entry P to be verified, and thus the data acquisition model can be determined as a target node. Using the same method, the target nodes contained in the child nodes of the root node can be determined from the child nodes of the root node.

[0124] Next, at least one key-value pair corresponding to the entry P to be verified can be used to match the definition information contained in each child node of the target node. If the key-value pair carried by the qualified name field of a certain child node is the same as at least one key-value pair corresponding to the entry P to be verified, then the definition information of that child node is determined to match at least one key-value pair corresponding to the entry P to be verified, and thus the child node is determined to be a target node. Using the same method, the target nodes contained in the child nodes of the target node can be determined from the child nodes of the target node. This process is repeated until at least one key-value pair corresponding to the entry P to be verified is matched with the leaf nodes in the dependency graph, thus obtaining all target nodes in the dependency graph whose definition information matches at least one key-value pair corresponding to the entry P to be verified. If no target node is matched from the definition of a node at a certain level of the dependency graph, the matching is considered to have failed, indicating that the corresponding data collection point is undefined, and thus the data verification result can be determined to be a consistency problem or an integrity problem (corresponding to...). Figure 5a (The branch where "match successful" is not specified).

[0125] Furthermore, for an embodiment where the target node is matched at each node layer, i.e. Figure 5a If the branch is marked as "match successful", then as follows: Figure 5aAs shown in "The target validation rule validates the entry to be validated," the validation rule of the target node can be determined from the validation rule tree and used as the target validation rule. In this embodiment, a multi-branch tree index is used to associate data objects with data validation rules. Following a depth-first order, the target node matching the entry to be validated P is first determined from each node in the dependency graph. This validation rule traversal method only traverses the child nodes of the target node for each level of nodes, without having to traverse all nodes at each level. This reduces traversal complexity and workload, helps improve the efficiency of determining the target validation rule, and thus helps improve the efficiency of subsequent data validation.

[0126] After determining the target validation rule, the entry P to be validated can be validated using the target validation rule. The same method can be used to validate all entries contained in the data to be validated. This embodiment utilizes the target validation rule corresponding to the entry to be validated to validate that entry, ensuring that the validation rule for the entry to be validated matches the entry itself, thus helping to improve the accuracy of data validation.

[0127] This embodiment realizes the dynamic loading of data acquisition strategies and the automatic generation of data verification rules. Based on the generated data verification rules, it realizes data quality verification, realizing an integrated process from data acquisition strategy to data verification, which helps to improve data verification efficiency.

[0128] It is worth noting that the data verification method and verification rule generation method provided in the foregoing embodiments can be executed by the same device or by different devices. Accordingly, this application also provides a separate data verification method. Specifically, as... Figure 5b As shown in the figure, this application embodiment also provides a data verification method, which mainly includes the following steps:

[0129] 501. Obtain the definition information of each data object included in the data acquisition strategy; the data acquisition strategy is described according to the set data exchange specification; the definition information of each data object is obtained by parsing the data acquisition strategy according to the data exchange specification.

[0130] 502. Obtain the definition information of the transmission data structure included in the data acquisition strategy from the definition information of each data object.

[0131] 503. Obtain the data to be verified based on the definition information of the transmission data structure.

[0132] 504. Use data validation rules to validate the data to be validated; data validation rules are generated based on the definition information of each data object.

[0133] In this embodiment, the definition information of each data object included in the data acquisition strategy obtained in step 501 can be obtained by the device performing data verification through real-time parsing of the data acquisition strategy according to the data exchange specification; or, it can be provided to the device performing data verification by the aforementioned device that generates the verification rules. For the specific implementation method of parsing the data acquisition strategy according to the data exchange specification to obtain the definition information of each data object included in the data acquisition strategy, please refer to the relevant content of the foregoing embodiments, which will not be repeated here. The description and specific implementation method of steps 502-504 can also be found in the relevant content of the foregoing embodiments, which will not be repeated here.

[0134] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 and 102 can be device A; or the execution subject of step 101 can be device A, and the execution subject of step 102 can be device B; and so on.

[0135] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0136] Accordingly, embodiments of this application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause one or more processors to perform the steps in the verification rule generation method and / or data verification method provided in the foregoing embodiments.

[0137] Computer-readable storage media include volatile or non-volatile or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium.

[0138] This application also provides a computer program product, including a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps in the verification rule generation method and / or data verification method provided in the foregoing embodiments.

[0139] In the embodiments of this application, the specific implementation form of the computer program product is not limited. In some embodiments, the computer program product may be implemented as an application (APP), a mini-program, a computer-side client, a program module, a plug-in, an installation package, a software development kit (SDK), an image file of an optical disc, a plug-in, or software in the form of Software as a Service (SaaS), etc., but is not limited to these.

[0140] The computer program product should understand that each or a combination of the above-described method flow can be implemented by a computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above-described method embodiments.

[0141] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device includes a memory 60a and a processor 60b. The memory 60a is used to store computer programs and can be configured to store various other data to support operation on a computing platform. Examples of this data include instructions for any application or method operating on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.

[0142] The processor 60b is coupled to the memory 60a and is used to execute computer programs to perform the steps in the verification rule generation method and / or data verification method provided in the foregoing embodiments. Specific implementation details of each step can be found in the relevant descriptions of the foregoing embodiments, and will not be repeated here.

[0143] In some alternative implementations, such as Figure 6 As shown, the electronic device may also include optional components such as a communication component 60c, a power supply component 60d, a display component 60e, and an audio component 60f. Figure 6 The diagram only shows some components and does not mean that the electronic device must contain them. Figure 6 The inclusion of all components does not imply that an electronic device can only include... Figure 6 The components shown.

[0144] in addition, Figure 6 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the form factor of the electronic device. The electronic device in this embodiment can be a desktop computer, laptop computer, mobile phone, or IoT device; it can also be a traditional server, cloud server, or server cluster, or other server equipment.

[0145] In this embodiment, the memory is used to store computer programs and can be configured to store various other data to support operation on its host device. The processor can execute the computer programs stored in the memory to implement corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), electrically erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0146] In the embodiments of this application, the processor can be any hardware processing device capable of executing the above-described method logic. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), or a microcontroller unit (MCU); it can also be a field-programmable gate array (FPGA), a programmable array logic (PAL), a general array logic (GAL), a complex programmable logic device (CPLD), or other programmable devices; or it can be an advanced RISC machine (ARM) or a system on chip (SoC), etc., but is not limited thereto.

[0147] In this embodiment, the communication component is configured to facilitate wired or wireless communication between its host device and other devices. The device hosting the communication component can access wireless networks based on communication standards, such as 2G or 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0148] In embodiments of this application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0149] In this embodiment, a power supply component is configured to provide power to various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component resides.

[0150] In embodiments of this application, the audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), which is configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals. For example, in devices with voice interaction capabilities, voice interaction with the user can be achieved through the audio component.

[0151] It should be noted that the terms "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

[0152] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the aforementioned element.

[0153] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating verification rules, characterized in that, include: Obtain the data acquisition strategy described according to the set data exchange specifications; According to the data exchange specification, the data acquisition strategy is parsed to obtain the definition information of each data object included in the data acquisition strategy; Data validation rules are generated based on the definition information of each data object.

2. The method according to claim 1, characterized in that, The data objects include: application scenario parameters, data collection points, and data collection models; the generation of data verification rules based on the definition information of each data object includes: Based on the definition information of the data collection points and the definition information of the data collection models, a dependency graph is determined between the data collection points and the data collection models, as well as between different data collection models. Based on the definition information of the application scenario parameters and the definition information of each node in the dependency graph, a verification rule tree for the data collection point is generated as the data verification rule; each node in the dependency graph includes the data collection point and the data collection model.

3. The method according to claim 2, characterized in that, The step of determining the dependency graph between the data acquisition points and the data acquisition model based on the definition information of the data acquisition points and the definition information of the data acquisition model includes: Based on the definition information of the data collection points, a first dependency relationship between the data collection points and the data collection model is determined; Based on the definition information of the data acquisition model, a second dependency relationship between the data acquisition models is determined; The dependency graph is generated based on the first dependency relationship and the second dependency relationship.

4. The method according to claim 2, characterized in that, The step of generating a verification rule tree for the data collection points based on the definition information of the application scenario parameters and the definition information of each node in the dependency graph includes: Based on the definition information of the application scenario parameters, generate the verification rules for the application scenario parameters; For any node in the dependency graph other than the root node, a verification rule for that node is generated based on the definition information of that node. Based on the dependencies between nodes in the dependency graph, the verification rules for the application scenario parameters are associated with the verification rules for each node in the dependency graph to obtain the verification rule tree.

5. The method according to claim 4, characterized in that, The step of generating verification rules for the application scenario parameters based on the definition information of the application scenario parameters includes: Obtain the attribute information of the application scenario parameters from the definition information of the application scenario parameters; Using the attribute information of the application scenario parameters as the first verification condition, a verification rule for the application scenario parameters is generated. And / or, The step of generating a verification rule for any node based on the definition information of any node includes: Obtain the attribute information of any node from the definition information of any node; Using the attribute information of any node as the second verification condition, a verification rule for any node is generated.

6. The method according to claim 5, characterized in that, The step of generating verification rules for the application scenario parameters, using the attribute information of the application scenario parameters as the first verification condition, includes: The attribute information of the application scenario parameters is used as the first verification condition, and the first verification condition is written using condition-based verification logic to obtain the verification rules of the application scenario parameters. And / or, The step of generating a verification rule for any node, using the attribute information of any node as the second verification condition, includes: Using the attribute information of the application scenario parameters as the second verification condition, and employing condition-based verification logic to write the second verification condition, the verification rules for the application scenario parameters are obtained.

7. The method according to claim 6, characterized in that, The attribute information of any node includes: application scenario parameter conditions corresponding to any node, which are written using condition-based verification logic; the application scenario parameter conditions refer to the conditions that the application scenario parameters of any node must meet.

8. The method according to claim 2, characterized in that, The application scenario parameters are multiple; multiple application scenario parameters represent an event model or a super location model.

9. The method according to any one of claims 1-8, characterized in that, Also includes: From the definition information of each data object included in the data acquisition strategy, obtain the definition information of the transmission data structure included in the data acquisition strategy; Based on the definition information of the transmitted data structure, obtain the data to be verified; The data to be verified is verified using the aforementioned data verification rules.

10. The method according to claim 9, characterized in that, The step of obtaining the data to be verified based on the definition information of the transmission data structure includes: Based on the definition information of the transmission data structure, determine the association path from the transmission parameters to the application scenario parameters and the data representation format of the data to be verified; The data to be verified is obtained based on the associated path and the data representation format.

11. The method according to claim 10, characterized in that, The step of obtaining the data to be verified based on the acquisition path and the data representation format includes: According to the parsing method corresponding to the data representation format, the first target data read from the data source is parsed to obtain the semantics of each element in the first target data; Based on the semantics of each element in the first target data and the associated path, the data to be verified is obtained from the first target data.

12. The method according to claim 10, characterized in that, The application scenario parameters are multiple, and these multiple application scenario parameters represent a super location model; the step of obtaining the data to be verified based on the associated path and the data representation format includes: Based on the associated path, a super location model representing multiple application scenario parameters is obtained from the definition information of the transmission data structure; Place the embedded points at the locations indicated by the super location model; Second target data, represented in the form of the transmission parameters, is collected from the buried point location; The second target data is parsed according to the parsing method corresponding to the data representation format to obtain the semantics of each element in the second target data; Based on the semantics of each element in the second target data and the associated path, the data to be verified is obtained from the second target data.

13. The method according to claim 9, characterized in that, The data to be verified includes: at least one entry to be verified; the entry to be verified includes: at least one key-value pair consisting of at least one application scenario parameter and the parameter value of the at least one application scenario parameter; the data verification rule is implemented as a verification rule tree; the verification rule tree is generated based on the dependency graph between data collection points and data collection models in the data collection strategy; The step of verifying the data to be verified using the data verification rules includes: For any entry to be verified, in a depth-first order, at least one key value corresponding to the entry to be verified is used to match the definition information of each level node in the dependency graph. From the dependency graph, determine the target node whose definition information matches the at least one key-value pair; The verification rule of the target node is determined from the verification rule tree and used as the target verification rule for any entry to be verified. Using the target verification rules, at least one key-value pair corresponding to any entry to be verified is verified.

14. A data verification method, characterized in that, include: The definition information of each data object included in the data acquisition strategy is obtained; the data acquisition strategy is described according to a set data exchange specification; the definition information of each data object is obtained by parsing the data acquisition strategy according to the data exchange specification; From the definition information of each data object, obtain the definition information of the transmission data structure included in the data acquisition strategy; Based on the definition information of the transmitted data structure, obtain the data to be verified; The data to be verified is verified using data verification rules, which are generated based on the definition information of each data object.

15. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is used to store computer programs; The processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 1-14.

16. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the method according to any one of claims 1-14.

17. A computer program product, characterized in that, Includes a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps of the method according to any one of claims 1-14.