Data rule generation method and device
By preprocessing business data and solving multivariate parameter relationships, data rules are generated, and combined with rule trees and streaming processing framework, the problems of low data mining efficiency and verification efficiency in the existing technology are solved, and efficient and accurate data is achieved Rule generation and verification.
Patent Information
- Application Number
- CN202011057500.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-09-30
AI Technical Summary
The prior art is difficult to effectively mine valuable business rules in business data, resulting in low data processing efficiency and poor accuracy, and long mining rules in large-scale business data and low verification efficiency.
By preprocessing the data to be processed, multivariate parameter relationships are constructed and solved, the attribute conditions that make the business relationship expressions have been established, data rules are generated, and data verification is performed using the rule tree form, combining offline batch processing and streaming processing frameworks to improve efficiency .
The process and automation of data rules generation are realized, and the generated data rules are more efficient, accurate and comprehensive, improving the efficiency of data verification, and are suitable for the mining and verification of rules in large-scale business data.
Smart Images

Figure CN112199416B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data mining technology, and in particular to a method and device for generating data rules. Background Art
[0002] With the development of Internet technology, the data generated on the Internet may contain a lot of value. In many business scenarios, how to effectively mine the business data generated by the business system has become the focus of current business processing. Data mining refers to the process of searching for information hidden in the large amount of business data generated by the business system through algorithms. The focus of data mining in the business processing process is to mine the valuable business rules in the business data to help process the business data generated in the subsequent operation of the business system. Summary of the invention
[0003] One or more embodiments of the present specification provide a data rule generation method. The data rule generation method includes: preprocessing the data to be processed to obtain attribute data of the attribute field and business data of the business field. Constructing a multivariate parameter relationship based on the business data of the business field, and solving the multivariate parameter relationship. According to the attribute data, determining the attribute condition that makes the solved business relationship expression valid. Using the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule, generate the target data rule.
[0004] One or more embodiments of the present specification provide a data rule generation device, including: a data preprocessing module, configured to preprocess the data to be processed, and obtain the attribute data of the attribute field and the business data of the business field. A parameter relationship construction module, configured to construct a multivariate parameter relationship based on the business data of the business field, and solve the multivariate parameter relationship. An attribute condition determination module, configured to determine the attribute condition that makes the solved business relationship expression valid based on the attribute data. A target data rule generation module, configured to generate a target data rule with the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
[0005] One or more embodiments of the present specification provide a data rule generation device, including: preprocessing the data to be processed to obtain attribute data of the attribute field and business data of the business field. Constructing a multivariate parameter relationship based on the business data of the business field, and solving the multivariate parameter relationship. Determining the attribute condition that makes the solved business relationship expression valid based on the attribute data. Using the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule, generate a target data rule.
[0006] One or more embodiments of the present specification provide a storage medium for storing computer executable instructions, which implement the following process when executed: preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field. Construct a multivariate parameter relationship based on the business data of the business field, and solve the multivariate parameter relationship. Determine the attribute condition that makes the solved business relationship expression valid based on the attribute data. Generate the target data rule with the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0008] Figure 1 A processing flow chart of a data rule generation method provided for one or more embodiments of this specification;
[0009] Figure 2 A processing flow chart of a data rule generation method applied to a business platform scenario provided by one or more embodiments of this specification;
[0010] Figure 3 A schematic diagram of a data rule generating device provided for one or more embodiments of this specification;
[0011] Figure 4 A schematic diagram of the structure of a data rule generation device provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0012] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0013] This specification provides an embodiment of a data rule generation method:
[0014] See also Figure 1The data rule generation method provided in this embodiment includes steps S102 to S108.
[0015] Step S102: pre-process the data to be processed to obtain attribute data of the attribute field and business data of the business field.
[0016] The data rule generation method provided in this embodiment obtains attribute data of attribute fields of business data and business data of business fields by preprocessing business data, and constructs a multi-parameter relationship by deeply analyzing the relationship between business data of business fields, and further solves the constructed multi-parameter relationship to obtain a business relationship expression, and infers the attribute conditions that make the business relationship expression valid from the business relationship expression, thereby constructing corresponding data rules with the obtained attribute conditions as preconditions and the business relationship expression as assertions, thereby realizing the process and automation of data rule generation, and deriving data rules from business data, so that the generated data rules are more efficient, accurate and comprehensive.
[0017] The data to be processed described in this embodiment refers to the business data generated during the operation of the business platform or business system. Generally speaking, business data often includes data related to business attributes. For example, the transaction data generated in the trading platform includes transaction attribute related data such as order source, order type, account type, etc. At the same time, the business data also includes data related to business data. For example, the transaction data generated in the trading platform includes transaction amount, account number, serial number, transaction time, transaction status and other transaction business related data.
[0018] The data rule defined in this embodiment consists of two parts: a precondition and an assertion. The precondition represents the data processing scenario to which the data rule belongs, and the assertion represents the law or rule followed by the data in the data processing scenario. The semantics of the data rule is: when the precondition is established, the assertion must also be established, which is specifically divided into the following three cases:
[0019] The first type: When the execution result of a certain data against the precondition of the data rule is negative, it means that the data does not belong to the business scenario represented by the current data rule, and the data is skipped;
[0020] The second type: When the execution result of a certain data for the precondition of the data rule is yes, it means that the data belongs to the business scenario represented by the current data rule, and the assertion is executed. If the execution result of the assertion is also yes, it means that the data verification has passed, and accordingly, the support degree of the data rule increases by 1;
[0021] The third type: When the execution result of a certain data for the precondition of the data rule is yes, it means that the data belongs to the business scenario represented by the current data rule, and the assertion is executed. If the execution result of the assertion is also no, it means that the data verification has failed.
[0022] In the process of generating data rules, attribute data is often related to the preconditions of data rules, and business data is often related to the assertions of data rules. Based on this, this embodiment determines the preconditions of data rules from the attribute data, and determines the assertions of data rules from the business data. In specific implementation, in the process of preprocessing the data to be processed and obtaining the attribute data of the attribute field and the business data of the business field, this embodiment provides an optional implementation method, by field marking the data to be processed, so as to obtain the attribute data of the attribute field and the business data of the business field.
[0023] For example, with respect to the transaction data generated by the trading platform within a period of time, the fields of each transaction data are marked respectively to obtain the attribute data of the attribute fields of each transaction data, specifically the order source data of the order source field, the order type data of the order type field, and the account type attribute data of the account type field; at the same time, the transaction data of the transaction data fields of each transaction data are also obtained, specifically the amount value of the amount field, the account information of the account number field, the transaction serial number of the serial number field, the transaction time information of the transaction time field, and the transaction status of the transaction status field.
[0024] In addition, in the process of preprocessing the data to be processed, in addition to the implementation method of the field marking provided above, the preprocessing can also be implemented by parsing the data to be processed into attribute identifiers of the attribute domain and parameter values of the business domain, and writing the attribute identifiers of the attribute domain and the parameter values of the business domain into the data table. Specifically, the attribute identifiers of the attribute domain are written into the attribute fields in the data table as the attribute data of the attribute fields, and the parameter values of the business domain are written into the business fields in the data table as the business data of the business fields.
[0025] Step S104: construct a multivariate parameter relationship based on the business data of the business field, and solve the multivariate parameter relationship.
[0026] In this embodiment, based on the data rule consisting of preconditions and assertions, a multi-parameter relationship between business data of the business field is defined, and the defined multi-parameter relationship is solved to determine the assertion of the data rule.
[0027] In actual applications, the transaction platform may involve or generate different data in various links of the transaction processing process, and there is a certain relationship between these data involved or generated. For example, in a transaction processing scenario without coupons, the order amount, transaction amount, and accounting amount generated at different transaction stages are equal. For another example, in a transaction processing scenario with coupons, the order amount is equal to the sum of the discount amount and the transaction amount, and the transaction amount and the accounting amount are equal. In order to improve the effectiveness of data rules, an optional implementation method provided in this embodiment starts from the business data with field marking of transaction data, statistically analyzes the inherent data relationship between business data, and generates data rules that are more suitable for business scenarios based on this. The process of constructing a multivariate parameter relationship based on the business data of the business field is as follows:
[0028] Parsing the business data of the business field to obtain the field data relationship of the business field;
[0029] A corresponding multivariate parameter relationship is constructed based on the field data relationship; wherein the field parameters included in the multivariate parameter relationship correspond to the business fields.
[0030] It should be noted that the multivariate parameter relationship is constructed by the field parameters of the business field and the field coefficients corresponding to the field parameters, and the field coefficients have a value space; and the business field has a field space, and the field space is determined according to the business data of the business field.
[0031] Using the above example, the transaction data fields obtained after field marking of the transaction data of the transaction platform contain the order amount, transaction amount, discount amount, and bookkeeping amount. Through statistical analysis of the order amount, transaction amount, discount amount, and bookkeeping amount, it is concluded that in the transaction scenario without coupons, the order amount, transaction amount, and bookkeeping amount have a certain amount relationship, and in the transaction scenario with coupons, the order amount, discount amount, and transaction amount have a certain amount relationship, and the transaction amount and bookkeeping amount also have a certain amount relationship;
[0032] Based on the statistical analysis, the order amount, transaction amount and bookkeeping amount have a certain amount relationship, the order amount, discount amount and transaction amount have a certain amount relationship among themselves, and the transaction amount and bookkeeping amount also have a certain amount relationship. The multivariate parameter relationship expression is abstracted: k1*X1+k2*X2+···+knXn=0;
[0033] Among them, k1, k2···kn are coefficients, and parameters X1, X2···Xn are related to order amount, transaction amount, discount amount and accounting amount. However, the specific amount X1 corresponds to and the specific amount X21 corresponds to can only be determined after the following solution; for coefficients k1, k2···kn, there is a corresponding value range, and this value range is the finite value space of coefficients k1, k2···kn; and for parameters X1, X2···Xn, they can only take values among order amount, transaction amount, discount amount and accounting amount. It can be seen that the values of parameters X1, X2···Xn are limited to the finite field space composed of order amount, transaction amount, discount amount and accounting amount.
[0034] On the basis of constructing a multivariate parameter relationship based on the business data of the business field as mentioned above, in order to further improve the effectiveness of the data rules, in an optional implementation manner provided in this embodiment, the multivariate parameter relationship is solved in the following manner: a solution algorithm is used to solve the combination of business fields and field coefficients in the field space and the value space that makes the multivariate parameter relationship valid; and the business data relationship is established according to the combination of business fields and field coefficients and the multivariate parameter relationship.
[0035] For example, based on the finite field space of parameters X1, X2...Xn and the finite value space of coefficients k1, k2...kn, a genetic algorithm is used to solve the combination of coefficient values and parameter fields in the finite field space and the finite value space that can make the multivariate parameter relationship expression valid; finally, the transaction data relationship expression is determined based on the combination of coefficient values and parameter fields and the multivariate parameter relationship expression obtained by the solution.
[0036] Step S106: Determine, based on the attribute data, the attribute conditions that make the solved business relationship expression valid.
[0037] After the above step S104 determines the assertion of the data rule by solving the construction of the multi-parameter relationship, in this step, the precondition of the data rule is inferred based on the assertion of the data rule. Specifically, based on the attribute data of the attribute field obtained by performing field marking processing on the data to be processed, the attribute condition that can make the business relationship expression valid is determined, thereby serving as the precondition of the data rule.
[0038] In an optional implementation manner provided by this embodiment, determining the attribute condition that makes the solved business relationship expression valid according to the attribute data includes:
[0039] Verifying the business data relationship using the data to be processed;
[0040] Filter out the target data that has passed the verification according to the verification results;
[0041] Extracting candidate attribute conditions satisfied by the target data from the attribute data of the target data;
[0042] A candidate attribute condition that determines that the business data relationship is established is selected from the candidate attribute conditions as the attribute condition.
[0043] For example, transaction data is used to verify transaction data relationships, and part of the transaction data that satisfies the transaction data relationship expression is filtered out from the transaction data. Then, the attribute data of the filtered part of the transaction data is determined in the attribute data of the attribute field obtained after field labeling processing of the transaction data. Then, a data mining algorithm (FPMAX, maximum frequent item set mining algorithm) is used to mine common attribute features from this part of the attribute data to form attribute conditions.
[0044] Step S108, generating a target data rule by taking the attribute condition as a precondition of the data rule and the business relationship expression as an assertion of the data rule.
[0045] After determining the business relationship expression as the assertion of the data rule and the attribute condition as the precondition of the data rule, in this step, the target data rule is generated with the attribute condition as the precondition of the data rule and the business data relationship as the assertion of the data rule. In an optional implementation provided by this embodiment, the validity of the data rule is improved by verifying the data rule, which is specifically implemented in the following way:
[0046] Verifying the attribute condition using the data to be processed;
[0047] In the case where the attribute condition verification passes, verifying the business relationship expression corresponding to the attribute condition using the data to be processed;
[0048] According to the verification result, the attribute conditions and business relationship expressions that make all the data to be processed pass the verification are determined as preconditions and assertions, and the target data rules are constructed according to the preconditions and assertions.
[0049] For example, transaction data is used to verify the transaction data relationship expression. According to the verification result of each transaction data, the attribute conditions that can make the transaction data relationship expression 100% valid are determined as preconditions, and the 100% valid transaction data relationship expression is used as an assertion to jointly construct the transaction rules of the trading platform.
[0050] This embodiment generates data rules from the data to be processed. The data to be processed may be business data generated by a business platform. In actual applications, the data scale of the business data generated by the business platform is often relatively large, and it takes a long time to mine data rules from large-scale business data. Therefore, in this embodiment, the process of generating data rules from the data to be processed adopts offline processing, such as using spark-odps, spark-yarn, hadoop and other offline batch processing methods to mine transaction rules from transaction data.
[0051] After the data rules are generated, the generated data rules are deployed to the corresponding business platform, and the business execution data generated during the operation of the business platform are verified accordingly. Considering that the business platform has a large number of data rules, if the business execution data is verified using the full amount of data rules for each business execution data, it will not only take a long time, but the efficiency of data verification will also be relatively low. In order to improve the efficiency of data verification, an optional implementation method provided in this embodiment uses a rule tree to perform data verification. The construction process of the rule tree is as follows: determine the rule dependency relationship between the data rules based on the attribute fields and / or business fields contained in the data rules; establish a rule tree composed of the data rules based on the rule dependency relationship; wherein, the data verification of the data rules of the next level of the same rule branch in the rule tree depends on the data verification of the data rules of the previous level, and is performed when the verification result of the data verification of the data rules of the previous level is yes.
[0052] In the specific implementation, during the data verification process, the business execution data generated after the business request submitted by the user is executed is first obtained, and then the business execution data is verified using the data rules to obtain the verification result. In order to improve the efficiency of data verification, a streaming processing architecture can be used for data verification in the actual verification process, such as using Spark-streaming, Flink, Storm and other stream processing frameworks to implement data verification.
[0053] In an optional implementation manner provided by this embodiment, the business execution data is verified by using the data rule in the following manner:
[0054] A precondition for executing the data rule based on the business execution data;
[0055] If the execution result of the precondition is yes, the assertion of the data rule is executed based on the business execution data; if the execution result of the assertion is yes, the business verification result of the business execution data is determined to be passed; if the execution result of the assertion is no, the business verification result of the business execution data is determined to be failed;
[0056] If the execution result of the precondition is no, the service execution data is skipped.
[0057] In addition, in practical applications, in the process of data rule generation, a model implementation method can also be adopted. Specifically, the data rule generation process is regarded as a model training process, and the data rule model obtained by training is the generated data rule. The model training process is an offline processing process. After the model training is completed, the data rule model is deployed to the corresponding business platform, and the business data generated during the operation of the business platform is input into the data rule model for data verification.
[0058] Specifically, in the scenario of model implementation, in the process of preprocessing the data to be processed to obtain the attribute data of the attribute field and the business data of the business field, optionally, the attribute data and the business data are vectorized to obtain the attribute vector data and the business vector data, and the attribute vector data and the business vector data are used as the input of model training. Correspondingly, in the process of generating the target data rule with the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule, the data rule model is constructed with the attribute condition as the precondition of the model and the business relationship expression as the assertion; wherein the input of the data rule model in the training stage is the data to be processed, the input of the data rule model in the application stage is the business execution data, and the output is the verification result obtained after the business execution data is verified.
[0059] The following uses the application of a data rule generation method provided in this embodiment in a business platform scenario as an example to further illustrate the data rule generation method provided in this embodiment. Figure 2 , a data rule generation method applied to a business platform scenario, specifically includes steps S202 to S212.
[0060] Step S202: Mark the fields of the data to be processed to obtain attribute data of the attribute field and business data of the business field.
[0061] Step S204, vectorizing the attribute data and the business data to obtain attribute vector data and business vector data.
[0062] Step S206: construct a multivariate parameter relationship model based on the business vector data.
[0063] Step S208, solving the multivariate parameter relationship model according to the field space of the business field and the value space of the model parameter.
[0064] Step S210, determining the attribute conditions that make the solved data rule model valid according to the attribute vector data.
[0065] Step S212, generating a target data rule with the attribute condition as the precondition of the data rule and the data rule model as the assertion of the data rule.
[0066] Specifically, the attribute conditions are first verified using the data to be processed. When the attribute conditions pass the verification, the data to be processed is input into the data rule model for verification. According to the verification results, the attribute conditions and data rule model that make all the data to be processed pass the verification are determined as preconditions and assertions, and the corresponding data rules are established according to the preconditions and data rule model.
[0067] To summarize, the data rule generation method first pre-processes the data to be processed to obtain attribute data and business data, constructs a multivariate parameter relationship based on the business data and solves the multivariate parameter relationship to obtain a business relationship expression, and then uses the attribute data to determine the attribute conditions that make the business relationship expression valid, and finally generates the target data rules with the attribute conditions as the preconditions of the data rules and the business relationship expressions as the assertions of the data rules, thereby realizing the process and automation of data rule generation, and deriving data rules from the data, so that the generated data rules are more efficient, accurate and comprehensive.
[0068] An embodiment of a data rule generation device provided in this specification is as follows:
[0069] In the above-mentioned embodiment, a data rule generation method is provided, and correspondingly, a data rule generation device is also provided, which will be described below with reference to the accompanying drawings.
[0070] Reference Figure 3 , which shows a schematic diagram of a data rule generating device provided in this embodiment.
[0071] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0072] This embodiment provides a data rule generation device, including:
[0073] The data preprocessing module 302 is configured to preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field;
[0074] A parameter relationship building module 304 is configured to build a multivariate parameter relationship based on the business data of the business field and solve the multivariate parameter relationship;
[0075] The attribute condition determination module 306 is configured to determine the attribute condition that makes the solved business relationship expression valid according to the attribute data;
[0076] The target data rule generation module 308 is configured to generate a target data rule using the attribute condition as a precondition of the data rule and the business relationship expression as an assertion of the data rule.
[0077] Optionally, the data preprocessing module 302 is specifically configured to perform field marking on the data to be processed to obtain attribute data of the attribute field and business data of the business field.
[0078] Optionally, the parameter relationship building module 304 includes:
[0079] A business data parsing submodule is configured to parse the business data of the business field to obtain the field data relationship of the business field;
[0080] The multivariate parameter relationship construction submodule is configured to construct a corresponding multivariate parameter relationship based on the field data relationship; wherein the field parameters included in the multivariate parameter relationship correspond to the business fields.
[0081] Optionally, the multivariate parameter relationship is constructed by field parameters of the business field and field coefficients corresponding to the field parameters, and the field coefficients have a value space; and the business field has a field space, and the field space is determined based on the business data of the business field.
[0082] Optionally, the parameter relationship building module 304 includes:
[0083] A multivariate parameter relationship solving submodule is configured to solve the combination of business fields and field coefficients in the field space and the value space that make the multivariate parameter relationship valid by using a solving algorithm;
[0084] The business data relationship building submodule is configured to build the business data relationship according to the combination of the business field and the field coefficient and the multivariate parameter relationship.
[0085] Optionally, the attribute condition determination module 306 is specifically configured to use the data to be processed to verify the business data relationship; filter out the target data that has passed the verification according to the verification result; extract candidate attribute conditions satisfied by the target data from the attribute data of the target data; and filter out candidate attribute conditions that determine that the business data relationship is established from the candidate attribute conditions as the attribute conditions.
[0086] Optionally, the target data rule generation module 308 is specifically configured to use the data to be processed to verify the attribute conditions; when the attribute conditions are verified, use the data to be processed to verify the business relationship expressions corresponding to the attribute conditions; based on the verification results, determine the attribute conditions and business relationship expressions that make all the data to be processed pass the verification as preconditions and assertions, and form the target data rules based on the preconditions and assertions.
[0087] Optionally, the data rule generating device further includes:
[0088] A rule dependency determination module is configured to determine the rule dependency between the data rules according to the attribute fields and / or business fields contained in the data rules;
[0089] A rule tree establishment module is configured to establish a rule tree composed of the data rules based on the rule dependency relationship; wherein, data verification of the data rules of the next level of the same rule branch in the rule tree depends on the data verification of the data rules of the previous level, and is performed when the verification result of the data verification of the data rules of the previous level is yes.
[0090] Optionally, the data rule generating device further includes:
[0091] A service execution data acquisition module is configured to acquire service execution data generated after a service request submitted by a user is executed;
[0092] The data verification module is configured to perform data verification on the business execution data using the data rule to obtain a verification result.
[0093] Optionally, the data verification module is specifically configured to execute the precondition of the data rule based on the business execution data;
[0094] If the execution result of the precondition is yes, the assertion of the data rule is executed based on the business execution data; if the execution result of the assertion is yes, the business verification result of the business execution data is determined to be passed; if the execution result of the assertion is no, the business verification result of the business execution data is determined to be failed;
[0095] If the execution result of the precondition is no, the service execution data is skipped.
[0096] An embodiment of a data rule generation device provided in this specification is as follows:
[0097] Corresponding to the data rule generation method described above, based on the same technical concept, one or more embodiments of this specification also provide a data rule generation device, which is used to execute the data rule generation method provided above. Figure 4 A schematic diagram of the structure of a data rule generation device provided in one or more embodiments of this specification.
[0098] This embodiment provides a data rule generation device, including:
[0099] like Figure 4 As shown, the data rule generation device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, and the memory 402 may store one or more storage applications or data. Among them, the memory 402 can be a short-term storage or a persistent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the data rule generation device. Furthermore, the processor 401 can be configured to communicate with the memory 402 to execute a series of computer executable instructions in the memory 402 on the data rule generation device. The data rule generation device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input and output interfaces 405, one or more keyboards 406, etc.
[0100] In a specific embodiment, the data rule generation device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the data rule generation device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0101] Preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field;
[0102] Constructing a multivariate parameter relationship based on the business data of the business field, and solving the multivariate parameter relationship;
[0103] Determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid;
[0104] The target data rule is generated by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
[0105] Optionally, constructing a multivariate parameter relationship based on the business data of the business field includes:
[0106] Parsing the business data of the business field to obtain the field data relationship of the business field;
[0107] A corresponding multivariate parameter relationship is constructed based on the field data relationship; wherein the field parameters included in the multivariate parameter relationship correspond to the business fields.
[0108] Optionally, the multivariate parameter relationship is constructed by field parameters of the business field and field coefficients corresponding to the field parameters, and the field coefficients have a value space; and the business field has a field space, and the field space is determined based on the business data of the business field.
[0109] Optionally, solving the multivariate parameter relationship includes:
[0110] Using a solving algorithm to solve the business field and field coefficient combination in the field space and the value space that enables the multivariate parameter relationship to hold true;
[0111] The business data relationship is established according to the combination of the business field and the field coefficient and the multivariate parameter relationship.
[0112] Optionally, determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid includes:
[0113] Verifying the business data relationship using the data to be processed;
[0114] Filter out the target data that has passed the verification according to the verification results;
[0115] Extracting candidate attribute conditions satisfied by the target data from the attribute data of the target data;
[0116] A candidate attribute condition that determines that the business data relationship is established is selected from the candidate attribute conditions as the attribute condition.
[0117] Optionally, the step of generating a target data rule by using the attribute condition as a precondition of the data rule and the business data relationship as an assertion of the data rule includes:
[0118] Verifying the attribute condition using the data to be processed;
[0119] In the case where the attribute condition verification passes, verifying the business relationship expression corresponding to the attribute condition using the data to be processed;
[0120] According to the verification result, the attribute conditions and business relationship expressions that make all the data to be processed pass the verification are determined as preconditions and assertions, and the target data rules are constructed according to the preconditions and assertions.
[0121] Optionally, when the computer executable instructions are executed, they also include:
[0122] Obtaining the business execution data generated after the business request submitted by the user is executed;
[0123] The business execution data is verified using the data rule to obtain a verification result.
[0124] Optionally, performing data verification on the business execution data by using the data rule to obtain a verification result includes:
[0125] Execute the precondition of the data rule based on the business execution data; if the execution result of the precondition is yes, execute the assertion of the data rule based on the business execution data; if the assertion execution result is yes, determine that the business verification result of the business execution data is a verification pass; if the assertion execution result is no, determine that the business verification result of the business execution data is a verification fail;
[0126] If the execution result of the precondition is no, the service execution data is skipped.
[0127] An embodiment of a storage medium provided in this specification is as follows:
[0128] Corresponding to the data rule generation method described above, based on the same technical concept, one or more embodiments of this specification also provide a storage medium.
[0129] The storage medium provided in this embodiment is used to store computer executable instructions, and the computer executable instructions implement the following process when executed:
[0130] Preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field;
[0131] Constructing a multivariate parameter relationship based on the business data of the business field, and solving the multivariate parameter relationship;
[0132] Determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid;
[0133] The target data rule is generated by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
[0134] Optionally, constructing a multivariate parameter relationship based on the business data of the business field includes:
[0135] Parsing the business data of the business field to obtain the field data relationship of the business field;
[0136] A corresponding multivariate parameter relationship is constructed based on the field data relationship; wherein the field parameters included in the multivariate parameter relationship correspond to the business fields.
[0137] Optionally, the multivariate parameter relationship is constructed by field parameters of the business field and field coefficients corresponding to the field parameters, and the field coefficients have a value space; and the business field has a field space, and the field space is determined based on the business data of the business field.
[0138] Optionally, solving the multivariate parameter relationship includes:
[0139] Using a solving algorithm to solve the business field and field coefficient combination in the field space and the value space that enables the multivariate parameter relationship to hold true;
[0140] The business data relationship is established according to the combination of the business field and the field coefficient and the multivariate parameter relationship.
[0141] Optionally, determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid includes:
[0142] Verifying the business data relationship using the data to be processed;
[0143] Filter out the target data that has passed the verification according to the verification results;
[0144] Extracting candidate attribute conditions satisfied by the target data from the attribute data of the target data;
[0145] A candidate attribute condition that determines that the business data relationship is established is selected from the candidate attribute conditions as the attribute condition.
[0146] Optionally, the step of generating a target data rule by using the attribute condition as a precondition of the data rule and the business data relationship as an assertion of the data rule includes:
[0147] Verifying the attribute condition using the data to be processed;
[0148] In the case where the attribute condition verification passes, verifying the business relationship expression corresponding to the attribute condition using the data to be processed;
[0149] According to the verification result, the attribute conditions and business relationship expressions that make all the data to be processed pass the verification are determined as preconditions and assertions, and the target data rules are constructed according to the preconditions and assertions.
[0150] Optionally, when the computer executable instructions are executed, they also include:
[0151] Obtaining the business execution data generated after the business request submitted by the user is executed;
[0152] The business execution data is verified using the data rule to obtain a verification result.
[0153] Optionally, performing data verification on the business execution data by using the data rule to obtain a verification result includes:
[0154] Execute the precondition of the data rule based on the business execution data; if the execution result of the precondition is yes, execute the assertion of the data rule based on the business execution data; if the assertion execution result is yes, determine that the business verification result of the business execution data is a verification pass; if the assertion execution result is no, determine that the business verification result of the business execution data is a verification fail;
[0155] If the execution result of the precondition is no, the service execution data is skipped.
[0156] It should be noted that the embodiment of the storage medium in this specification and the embodiment of the data rule generation method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0157] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0158] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0159] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0160] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0161] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0162] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0163] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0166] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0167] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0168] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change 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 (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0169] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0170] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0171] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0172] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. A data rule generation method, comprising: Preprocessing the data to be processed to obtain attribute data of the attribute field and business data of the business field, wherein the business field has a field space, and the field space is determined according to the business data; Parsing the business data to obtain a field data relationship of the business field, and constructing a corresponding multivariate parameter relationship based on the field data relationship, field parameters of the business field, and field coefficients corresponding to the field parameters, wherein the field parameters included in the multivariate parameter relationship correspond to the business field, and the field coefficients have a value space; Solving the business field and field coefficient combination that enables the multivariate parameter relationship to be established in the field space and the value space by using a solving algorithm, and establishing a business data relationship according to the business field and field coefficient combination and the multivariate parameter relationship; Determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid; The target data rule is generated by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
2. The data rule generation method according to claim 1, wherein the preprocessing of the data to be processed to obtain attribute data of the attribute field and business data of the business field comprises: Field marking is performed on the data to be processed to obtain attribute data of the attribute field and business data of the business field.
3. The data rule generation method according to claim 1, wherein determining the attribute condition that makes the solved business relationship expression valid based on the attribute data comprises: Verifying the business data relationship using the data to be processed; Filter out the target data that has passed the verification according to the verification results; Extracting candidate attribute conditions satisfied by the target data from the attribute data of the target data; A candidate attribute condition that determines that the business data relationship is established is selected from the candidate attribute conditions as the attribute condition.
4. The data rule generation method according to claim 1, wherein the step of generating a target data rule using the attribute condition as a precondition of the data rule and the business data relationship as an assertion of the data rule comprises: Verifying the attribute condition using the data to be processed; In the case where the attribute condition verification passes, verifying the business relationship expression corresponding to the attribute condition using the data to be processed; According to the verification result, the attribute conditions and business relationship expressions that make all the data to be processed pass the verification are determined as preconditions and assertions, and the target data rules are constructed according to the preconditions and assertions.
5. The data rule generation method according to claim 1, further comprising: Determining rule dependencies between the data rules according to attribute fields and / or business fields included in the data rules; Based on the rule dependency, establishing a rule tree composed of the data rules; The data verification of the data rules of the next level of the same rule branch in the rule tree depends on the data verification of the data rules of the previous level, and is performed when the verification result of the data verification of the data rules of the previous level is yes.
6. The data rule generation method according to claim 1, further comprising: Obtaining the business execution data generated after the business request submitted by the user is executed; The business execution data is verified using the data rule to obtain a verification result.
7. The data rule generation method according to claim 6, wherein the using the data rule to perform data verification on the business execution data to obtain the verification result comprises: A precondition for executing the data rule based on the business execution data; If the execution result of the precondition is yes, executing the assertion of the data rule based on the business execution data; If the assertion execution result is yes, the business verification result of the business execution data is determined to be passed; If the assertion execution result is negative, the business verification result of the business execution data is determined to be verification failure; If the execution result of the precondition is no, the service execution data is skipped.
8. The data rule generation method according to claim 2, wherein the preprocessing of the data to be processed to obtain attribute data of the attribute field and business data of the business field further comprises: Vectorization is performed on the attribute data and the business data to obtain attribute vector data and business vector data.
9. The data rule generation method according to claim 8, wherein the step of generating a target data rule using the attribute condition as a precondition of the data rule and the business relationship expression as an assertion of the data rule comprises: Constructing a data rule model with the attribute condition as a precondition of the model and the business relationship expression as an assertion; The input of the data rule model in the training phase is the data to be processed, the input of the data rule model in the application phase is the business execution data, and the output is the verification result obtained after data verification of the business execution data.
10. A data rule generating device, comprising: A data preprocessing module is configured to preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field, wherein the business field has a field space, and the field space is determined according to the business data; a parameter relationship building module, configured to parse the business data, obtain the field data relationship of the business field, build a corresponding multivariate parameter relationship based on the field data relationship, the field parameter of the business field and the field coefficient corresponding to the field parameter, use a solution algorithm to solve the business field and field coefficient combination in the field space and the value space that makes the multivariate parameter relationship valid, and build a business data relationship according to the business field and field coefficient combination and the multivariate parameter relationship, wherein the field parameter included in the multivariate parameter relationship corresponds to the business field, and the field coefficient has a value space; An attribute condition determination module is configured to determine, based on the attribute data, an attribute condition that makes the solved business relationship expression valid; The target data rule generation module is configured to generate the target data rule by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
11. A data rule generating device, comprising: processor; as well as, a memory configured to store computer executable instructions which, when executed, cause the processor to: Preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field, wherein the business field has a field space, and the field space is determined according to the business data; Parsing the business data to obtain a field data relationship of the business field, and constructing a corresponding multivariate parameter relationship based on the field data relationship, field parameters of the business field, and field coefficients corresponding to the field parameters, wherein the field parameters included in the multivariate parameter relationship correspond to the business field, and the field coefficients have a value space; Solving the business field and field coefficient combination that enables the multivariate parameter relationship to be established in the field space and the value space by using a solving algorithm, and establishing a business data relationship according to the business field and field coefficient combination and the multivariate parameter relationship; Determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid; The target data rule is generated by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
12. A storage medium for storing computer executable instructions, wherein the computer executable instructions implement the following process when executed: Preprocess the data to be processed to obtain attribute data of the attribute field and business data of the business field, wherein the business field has a field space, and the field space is determined according to the business data; Parsing the business data to obtain a field data relationship of the business field, and constructing a corresponding multivariate parameter relationship based on the field data relationship, field parameters of the business field, and field coefficients corresponding to the field parameters, wherein the field parameters included in the multivariate parameter relationship correspond to the business field, and the field coefficients have a value space; Solving the business field and field coefficient combination that enables the multivariate parameter relationship to be established in the field space and the value space by using a solving algorithm, and establishing a business data relationship according to the business field and field coefficient combination and the multivariate parameter relationship; Determining, based on the attribute data, an attribute condition that makes the solved business relationship expression valid; The target data rule is generated by taking the attribute condition as the precondition of the data rule and the business relationship expression as the assertion of the data rule.
