A rule generation method, device, apparatus and medium

CN122547835APending Publication Date: 2026-08-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0002]目前,各领域产生的数据量呈指数级增长,这些数据来源广泛、类型多样,然而,数据质量参差不齐,为了保证数据质量可以依赖人工经验和数据探查特征部署数据校验规则,存在遗漏或错误的情况,并且效率较低

Benefits of technology

[0014]本公开实施例提供的技术方案与现有技术相比具有如下优点:本公开实施例提供的规则生成方案,获取目标数据的基础信息;基于目标数据的基础信息生成至少两个提示词;将至少两个提示词输入规则生成模型中,输出得到数据校验规则,其中,规则生成模型包括至少两个生成子模型。采用上述技术方案,通过部署包括至少两个生成子模型的规则生成模型,基于目标数据的基础信息构建对应的至少两个提示词并输入生成最终的数据校验规则,由于规则生成模型包括至少两个生成子模型的擅长方向不同,可以从多维度生成数据校验规则,相较于相关技术中单个模型的单个方向的生成,有效提升生成的数据校验规则的准确性和创新性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547835A_ABST
    Figure CN122547835A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a rule generation method, device, equipment and medium, wherein the method comprises: obtaining basic information of target data; generating at least two prompt words based on the basic information of the target data; inputting the at least two prompt words into a rule generation model to output a data verification rule, wherein the rule generation model comprises at least two generation sub-models. By deploying the rule generation model comprising at least two generation sub-models, at least two corresponding prompt words are constructed based on the basic information of the target data and input to generate the final data verification rule. Since the rule generation model comprises at least two generation sub-models with different strengths, the data verification rule can be generated from multiple dimensions. Compared with the generation of a single model in a single direction in the related art, the accuracy and innovation of the generated data verification rule are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a rule generation method, apparatus, device, and medium. Background Technology

[0002] Currently, the amount of data generated across various fields is growing exponentially. This data comes from a wide range of sources and is diverse in type; however, its quality varies greatly. To ensure data quality, methods rely on human experience and data exploration features to deploy data verification rules, which can lead to omissions or errors and is inefficient. While related technologies can automatically generate rules using a single model to address efficiency issues, this single-model, single-direction generation method still suffers from low rule accuracy and requires improvement. Summary of the Invention

[0003] To address the aforementioned technical problems, this disclosure provides a rule generation method, apparatus, device, and medium.

[0004] This disclosure provides a rule generation method, the method comprising:

[0005] Obtain basic information about the target data;

[0006] Generate at least two prompt words based on the basic information of the target data;

[0007] The at least two prompt words are input into the rule generation model, and the output is the data verification rule, wherein the rule generation model includes at least two generation sub-models.

[0008] This disclosure also provides a rule generation apparatus, the apparatus comprising:

[0009] The acquisition module is used to obtain basic information about the target data;

[0010] The prompt word module is used to generate at least two prompt words based on the basic information of the target data;

[0011] The generation module is used to input the at least two prompt words into the rule generation model and output data verification rules, wherein the rule generation model includes at least two generation sub-models.

[0012] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the rule generation method provided in this disclosure.

[0013] This disclosure also provides a computer-readable storage medium storing a computer program for executing the rule generation method provided in this disclosure.

[0014] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The rule generation scheme provided in this disclosure obtains basic information of the target data; generates at least two prompt words based on the basic information of the target data; inputs the at least two prompt words into the rule generation model, and outputs data verification rules, wherein the rule generation model includes at least two generation sub-models. By deploying a rule generation model including at least two generation sub-models, at least two corresponding prompt words are constructed based on the basic information of the target data and input to generate the final data verification rules. Since the rule generation model includes at least two generation sub-models with different strengths, data verification rules can be generated from multiple dimensions. Compared with the single-direction generation of a single model in related technologies, this effectively improves the accuracy and innovation of the generated data verification rules. Attached Figure Description

[0015] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0016] Figure 1 This is a schematic diagram of the rule generation process in related technologies;

[0017] Figure 2 A flowchart illustrating a rule generation method provided in an embodiment of this disclosure;

[0018] Figure 3 A schematic diagram illustrating a rule generation process provided in an embodiment of this disclosure;

[0019] Figure 4 A schematic diagram illustrating a data verification rule provided in an embodiment of this disclosure;

[0020] Figure 5 A schematic diagram illustrating another rule generation process provided in an embodiment of this disclosure;

[0021] Figure 6 This is a schematic diagram of the structure of a rule generation device provided in an embodiment of the present disclosure;

[0022] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0023] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0024] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0025] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0027] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0028] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0029] Various sectors utilize big data technology to continuously collect, analyze, and process business data, using the processed data for data analysis and decision-making, real-time retrieval, and anomaly control. As data volume grows, only by ensuring data quality can the value of big data be fully realized, driving continuous business development and innovation. The core task in ensuring data quality is the mining and deployment of data verification rules. For example... Figure 1 A schematic diagram generated for rules in related technologies, such as Figure 1As shown in the diagram, the manual analysis process includes table structure and field descriptions, data exploration for data distribution, rule writing, rule validation and testing, and rule deployment. However, the generation process relies heavily on human experience and data exploration features, which can lead to omissions or errors. While related technologies can automatically generate rules using a single model to address efficiency issues, this single-model, single-direction generation method still suffers from low rule accuracy and requires improvement.

[0030] To address the aforementioned problems, this disclosure provides a rule generation method, which will be described below with reference to specific embodiments.

[0031] Figure 2 This is a flowchart illustrating a rule generation method provided in an embodiment of the present disclosure. The method can be executed by a rule generation device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. Figure 2 As shown, the method includes:

[0032] Step 101: Obtain basic information about the target data.

[0033] The target data can be any data that requires data quality verification. For example, the target data may include data from a data warehouse that stores historical user interaction data for videos, and the specific quantity is not limited. In this embodiment of the disclosure, when there are multiple target data, the multiple target data can be obtained in the form of a data table. For example, a data table can store multiple user access records, and a user access record is one target data.

[0034] The basic information of the target data can be all information related to the target data, specifically all information throughout the entire lifecycle of the target data, including generation, processing, analysis, and deletion. In this embodiment, the basic information of the target data can include at least one of the following: application information, dependency information, feature information, classification information, and production information of the target data. Application information can include information such as data usage and application scenarios; dependency information can include data that the data depends on during the data production process, i.e., the upstream and downstream source and destination relationships of the data, including the physical flow, logical relationships, and transformation processes of the data; feature information can be information such as the names, types, and distributions of different fields within the data; classification information can be the usage scenarios and basic classification label data of the data; and production information can be the code used by the data during production.

[0035] Specifically, in response to a user's rule generation operation, the rule generation device can call the system's application programming interface (API) to query and obtain the basic information of the target data included in the data table corresponding to the data table name in the data warehouse corresponding to the rule generation operation. The aforementioned application programming interface can be, for example, an application programming interface based on the Hypertext Transfer Protocol (HTTP), and the application programming interface can be called in parallel to obtain information.

[0036] Step 102: Generate at least two prompt words based on the basic information of the target data.

[0037] A prompt can be a text or sentence fragment used to trigger and guide the model to perform a specific task and generate specific output content. The prompt can describe the task the model should perform to guide it in generating specific text, images, audio, or other content. In this embodiment, the prompt is used to guide the subsequent rule generation model in generating data validation rules. This embodiment has at least two prompts, corresponding to at least two generation sub-models in the rule generation model, with one prompt corresponding to one generation sub-model. The rule generation model can be a model used to automatically generate data validation rules. A generation sub-model can be a sub-model within the rule generation model that specializes in a particular area; this sub-model can generate data validation rules independently.

[0038] In some embodiments, generating at least two prompt words based on the basic information of the target data may include: concatenating at least two prompt word templates corresponding to the basic information of the target data according to the rule-based generation model to generate at least two prompt words.

[0039] The prompt word template can be a template that configures the content and position of the prompt words, used to generate prompt words. The prompt word template includes multiple placeholders for filling in different information; in this embodiment, the prompt word template is used to fill in the basic information of the target data. Each generation sub-model has a corresponding prompt word template.

[0040] Specifically, after obtaining the basic information of the target data, the rule generation model can obtain at least two prompt word templates pre-defined for the rule generation model. For each prompt word template, the basic information of the target data can be filled and concatenated according to the placeholders set in the prompt word template to generate the corresponding prompt word, thereby generating at least two prompt words.

[0041] Step 103: Input at least two prompt words into the rule generation model and output the data validation rules. The rule generation model includes at least two generation sub-models.

[0042] The rule generation model can be a model used to automatically generate data validation rules, such as a rule generation model based on a pre-trained language model of large-scale data. The generation sub-model can be a sub-model within the rule generation model that specializes in a particular direction; this sub-model can generate data validation rules independently. In this embodiment, the rule generation model includes at least two generation sub-models, used to generate data validation rules from multiple directions or dimensions. Data validation rules can be rules used to validate target data to determine whether it meets requirements or specifications, specifically whether it meets the business requirements of the corresponding data warehouse. They can also be understood as rules for verifying the quality of target data, capable of measuring data quality levels. For example, data validation rules can be categorized by object dimension into table-level validation rules, field-level validation rules, etc.; by validation effect into uniqueness validation rules, reasonableness validation rules, integrity validation rules, and accuracy validation rules, etc.; and by validation source into single-table validation rules, multi-table validation rules, etc. This embodiment does not limit the number of data validation rules.

[0043] Specifically, after determining at least two prompt words, the rule generation device can input each prompt word into the corresponding generation sub-model in the rule generation model, output data verification rules, and combine the data verification rules of at least two generation sub-models to obtain the current data verification rules for the target data.

[0044] In some embodiments, at least two generating sub-models include a first generating sub-model and a second generating sub-model. The first generating sub-model carries a rule template knowledge base, while the second generating sub-model does not carry a knowledge base. Optionally, inputting at least two prompt words into the rule generating model and outputting data validation rules may include: inputting the first generated prompt word from the at least two prompt words into the first generating sub-model of the rule generating model, outputting multiple first validation rules; inputting the second generated prompt word from the at least two prompt words into the second generating sub-model of the rule generating model, outputting multiple second validation rules; and combining the multiple first validation rules and the multiple second validation rules to determine the data validation rules.

[0045] The rule template knowledge base can include multiple template data validation rules. These rules can be pre-generated manually or through expressions, and may contain well-performing validation rules. For example, when the target data is a character type and the existing data features do not contain null values, the template data validation rule could be a rule that disallows null values. The first generation sub-model is a model that references the rule template knowledge base to generate similar data validation rules during rule generation; it is a model that needs to refer to historical experience to achieve basic data validation rule coverage. There can be one or more first generation sub-models, and when multiple first generation sub-models are included, the rule template knowledge bases they carry can be different. The second generation sub-model is a model that does not refer to any knowledge base and is used to flexibly generate various new data validation rules, improving the innovation and richness of the rules. The first validation rule can be a data validation rule generated by the first generation sub-model, and the second validation rule can be a data validation rule generated by the second generation sub-model.

[0046] Specifically, when the rule generation model includes a first generation sub-model and a second generation sub-model, after determining at least two prompt words, the rule generation device can extract the first generated prompt word from the at least two prompt words. This first generated prompt word can be a prompt word generated for the first generation sub-model. The first generated prompt word is input into the first generation sub-model for analysis. During the analysis, the basic information of the target data in the first generated prompt word can be used to search the rule template knowledge base. If a template data verification rule matching the basic information of the target data is found, then rule generation is performed according to the template data verification rule, and multiple first verification rules are output, such as a template. The data validation rule determines whether a data point is positive or negative if it is a numeric type. If the target data is also a numeric type, the template data validation rule can be retrieved, and a similar first validation rule can be generated. At least two second generated prompts are extracted. These second generated prompts can be generated for a second generation sub-model. The second generated prompts are input into the second generation sub-model for analysis, resulting in multiple second validation rules. These multiple first and second validation rules are then combined to form a data validation rule. This data validation rule can then be added to the data warehouse to validate the target data.

[0047] For example, Figure 3 This is a schematic diagram of a rule generation process provided in an embodiment of the present disclosure, such as... Figure 3As shown in the figure, the rule generation process based on the rule generation model is illustrated. Specifically, it includes: obtaining basic information of the target data to generate prompt words, inputting the prompt words into the rule generation model for understanding and analysis, referring to the rule template knowledge base during analysis, outputting data verification rules, and automating the deployment of data verification rules.

[0048] For example, Figure 4 This is a schematic diagram of a data verification rule provided in an embodiment of the present disclosure, such as... Figure 4 As shown in the figure, page 400 is displayed. Page 400 includes four generated data validation rules and specific information about each data validation rule. The four rules in the figure are only examples and not limitations.

[0049] In the above scheme, a first generation sub-model carrying a rule template knowledge base is set up in the rule generation model. During generation, the knowledge base is retrieved to output data validation rules, thereby achieving basic coverage of data validation rules and ensuring the completeness of basic rules. A second generation sub-model without a knowledge base is set up in the rule generation model. Relying on the model's own code writing and information understanding capabilities, it outputs data validation rules based on the information contained in the prompt words, generating complex and flexible data validation rules such as multi-field relationships and multi-table field relationships, thus improving the richness of data validation rules. In summary, by inputting prompt words into the generation sub-models in the rule generation model for different functions or roles, different prompt words can be used to define the strengths and core concerns of different generation sub-models, collaboratively producing high-quality rules and improving fault tolerance, resource utilization, and parallelism.

[0050] The rule generation scheme provided in this disclosure obtains basic information about target data; generates at least two prompt words based on the basic information of the target data; inputs the at least two prompt words into a rule generation model, and outputs data verification rules. The rule generation model includes at least two generation sub-models. By deploying a rule generation model including at least two generation sub-models, at least two corresponding prompt words are constructed based on the basic information of the target data and input to generate the final data verification rules. Since the rule generation model includes at least two generation sub-models with different strengths, the data verification rules can be generated from multiple dimensions. Compared to the single-direction generation of a single model in related technologies, this effectively improves the accuracy and innovativeness of the generated data verification rules.

[0051] In some embodiments, the rule generation model further includes a check sub-model, and at least two prompt words also include check prompt words. The rule generation method may further include: inputting check prompt words and data validation rules into the check sub-model for check processing, and outputting the processed data validation rules and check results.

[0052] Optionally, the rule generation method may also include: if the check result shows that the number of abnormal rules is greater than the number threshold, then return to re-input at least two prompt words into the rule generation model to output new data validation rules.

[0053] The checking sub-model can be a model within the rule generation model used to check and process data validation rules generated by at least two generation sub-models. This checking and processing can include format checking and merging. Format checking involves verifying whether the content and format of the data validation rules meet requirements and deleting rules that do not meet the requirements. Content checking includes verifying whether the data the data validation rule targets is the target data. Merging involves merging duplicate data validation rules. Check prompts are information used to guide the checking sub-model in checking the generated data validation rules; they can be obtained by concatenating prompt templates corresponding to the checking sub-model. The check result is the result of the format check of existing data validation rules, specifically including anomalous rules that failed the check. Anomalous rules are data validation rules whose format or content does not meet requirements. The quantity threshold is the minimum number of anomalous rules set, determined according to actual conditions.

[0054] Specifically, after generating data validation rules based on at least two generation sub-models in the rule generation model, the rule generation device can input the data validation rules and check prompts into the check sub-model for format checking and merging, delete abnormal rules, and output the processed data validation rules and check results. Then, it can determine whether the number of abnormal rules in the check results is greater than the number threshold. If so, it returns to inputting the prompts other than the check prompts into at least two generation sub-models to re-analyze and generate new data validation rules until the number of abnormal rules in the check results is no greater than the number threshold. Finally, it can output the data validation rules and deploy them in the data warehouse to validate the target data.

[0055] In the above scheme, by setting up a checking sub-model in the rule generation model, the data validation rules generated by the generation sub-model can be checked and merged to ensure the accuracy and usability of the data validation rules.

[0056] For example, Figure 5 This is a schematic diagram of another rule generation process provided in an embodiment of the present disclosure, such as... Figure 5As shown in the diagram, the rule generation process in the rule generation model includes two generation sub-models and an inspection sub-model. It can be divided into three parts: information acquisition, model processing, and rule addition. Specifically, it includes: obtaining the name of the data table input by the user, and acquiring basic information about the target data, including application information, dependency information, feature information, classification information, and production information; then, based on the basic information of the target data, assembling prompt words according to the prompt word templates of each sub-model in the rule generation model to obtain three prompt words: the first generation prompt word, the second generation prompt word, and the inspection prompt word; finally, the three prompt words... The first generation prompt word is input into the corresponding sub-model of the rule generation model. During analysis and processing, a search is performed in the rule template knowledge base. The second generation prompt word is input into the second generation sub-model. Multiple first verification rules generated by the first generation sub-model and multiple second verification rules generated by the second generation sub-model, along with the check prompt word, are input into the check sub-model. The processed data verification rules and check results are output. Then, it can be determined whether the number of abnormal rules exceeds the number threshold. If so, the model processing is repeated. Otherwise, rules are added in batches. The process ends when the addition is successful, and continues until the addition is successful if the addition fails.

[0057] The above solution utilizes a rule generation model to automatically generate a rich set of usable data validation rules, ensuring rule completeness and accuracy, and improving rule deployment efficiency. Furthermore, the data validation rules output by the model can be standardized through inspection, and rules that do not meet the standards and requirements can be removed. If there are too many non-compliant rules or they cannot be removed, the rule generation model will be called again for a retry.

[0058] This solution generates data validation rules by acquiring basic data information and constructing a rule template knowledge base. The rule generation model then deploys multiple sub-models to collaboratively generate data validation rules based on different inputs and prompts, thereby improving the stability, usability, and innovation of the data validation rule generation process.

[0059] Figure 6 This is a schematic diagram of a rule generation device provided in an embodiment of the present disclosure. This device can be implemented by software and / or hardware, and is generally integrated into an electronic device. Figure 6 As shown, the device includes:

[0060] Module 601 is used to acquire basic information about the target data;

[0061] The prompt word module 602 is used to generate at least two prompt words based on the basic information of the target data;

[0062] The generation module 603 is used to input the at least two prompt words into the rule generation model and output data verification rules, wherein the rule generation model includes at least two generation sub-models.

[0063] Optionally, the prompt word module 602 is used for:

[0064] The basic information of the target data is concatenated with at least two prompt word templates corresponding to the model according to the rules to generate the at least two prompt words.

[0065] Optionally, the at least two generating sub-models include a first generating sub-model and a second generating sub-model, wherein the first generating sub-model carries a rule template knowledge base, and the second generating sub-model does not carry a knowledge base.

[0066] Optionally, the generation module 603 is used for:

[0067] The first generated prompt word from the at least two prompt words is input into the first generated sub-model in the rule generation model, and multiple first verification rules are output.

[0068] The second generated prompt word from the at least two prompt words is input into the second generated sub-model in the rule generation model, and multiple second verification rules are output.

[0069] The plurality of first verification rules and the plurality of second verification rules are combined to determine the data verification rule.

[0070] Optionally, the rule generation model further includes a checking sub-model, the at least two prompt words further include checking prompt words, and the device further includes a checking module for:

[0071] The inspection prompts and data verification rules are input into the inspection sub-model for inspection processing, and the processed data verification rules and inspection results are output.

[0072] Optionally, the device further includes a retry module for:

[0073] If the inspection result indicates that the number of abnormal rules exceeds the threshold, then return to the rule generation model and output new data verification rules by inputting the at least two prompt words.

[0074] Optionally, the basic information of the target data includes at least one of the following: application information, dependency information, feature information, classification information, and production information of the target data.

[0075] The rule generation apparatus provided in this disclosure can execute the rule generation method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0076] This disclosure also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the rule generation method provided in any embodiment of this disclosure.

[0077] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. See below for details. Figure 7 The diagram illustrates a structural schematic suitable for implementing the electronic device 700 in the embodiments of this disclosure. The electronic device 700 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0078] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0079] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0080] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the rule generation method of embodiments of this disclosure.

[0081] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0082] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0083] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0084] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire basic information about target data; generate at least two prompt words based on the basic information about the target data; input the at least two prompt words into a rule generation model and output data verification rules, wherein the rule generation model includes at least two generation sub-models.

[0085] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0087] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0088] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0089] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0090] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0091] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0092] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0093] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A rule generation method characterized by, include: Obtain basic information about the target data; Generate at least two prompt words based on the basic information of the target data; The at least two prompt words are input into the rule generation model, and the output is the data verification rule, wherein the rule generation model includes at least two generation sub-models.

2. The method of claim 1, wherein, Based on the basic information of the target data, at least two prompt words are generated, including: The basic information of the target data is concatenated with at least two prompt word templates corresponding to the model according to the rules to generate the at least two prompt words.

3. The method of claim 1, wherein, The at least two generating sub-models include a first generating sub-model and a second generating sub-model. The first generating sub-model carries a rule template knowledge base, while the second generating sub-model does not carry a knowledge base.

4. The method of claim 3, wherein, The at least two prompt words are input into the rule generation model, and the output is the data validation rules, including: The first generated prompt word from the at least two prompt words is input into the first generated sub-model in the rule generation model, and multiple first verification rules are output. The second generated prompt word from the at least two prompt words is input into the second generated sub-model in the rule generation model, and multiple second verification rules are output. The plurality of first verification rules and the plurality of second verification rules are combined to determine the data verification rule.

5. The method of claim 1, wherein, The rule generation model further includes a checking sub-model, the at least two prompt words further include checking prompt words, and the method further includes: The inspection prompts and data verification rules are input into the inspection sub-model for inspection processing, and the processed data verification rules and inspection results are output.

6. The method of claim 5, wherein, The method further includes: If the inspection result indicates that the number of abnormal rules exceeds the threshold, then return to the rule generation model and output new data verification rules by inputting the at least two prompt words.

7. The method according to any one of claims 1 to 6, characterized in that, The basic information of the target data includes at least one of the following: application information, dependency information, feature information, classification information, and production information of the target data.

8. A rule generating apparatus characterized by comprising: include: The acquisition module is used to obtain basic information about the target data; The prompt word module is used to generate at least two prompt words based on the basic information of the target data; The generation module is used to input the at least two prompt words into the rule generation model and output data verification rules, wherein the rule generation model includes at least two generation sub-models.

9. An electronic device, comprising: The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the rule generation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the rule generation method according to any one of claims 1-7.