Rule configuration method, terminal device, and computer-readable storage medium
By automatically configuring target validation rules and generating validation rules based on field identifiers and application domains, the problem of low rule configuration efficiency is solved, and efficient data validation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies have low efficiency in rule configuration, especially when dealing with large amounts of data, which requires a lot of time.
By receiving the identifier of the field to be verified and the application domain, the system determines the first and second verification rules based on the attributes of the field identifier and the application domain, generates the target verification rule, and automatically configures the verification rules without requiring manual operation by the user.
It improves the configuration efficiency of verification rules, and the generated target verification rules cover the rules necessary for the application domain. They can be directly applied to the corresponding domain, reducing secondary verification and improving verification efficiency.
Smart Images

Figure CN119359236B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a rule configuration method, a terminal device and a computer readable storage medium. BACKGROUND
[0002] In the financial field, such as banks, securities companies, a large amount of transaction data is generated every day, including stock transactions, bond transactions, foreign exchange transactions, etc., in order to ensure the integrity and accuracy of the transaction data and compliance, the transaction data needs to be checked according to rules.
[0003] At present, the rule configuration is usually configured by the staff according to the checking demand to configure the checking rule of the corresponding data field. However, when facing a large amount of rule configuration, configuring the checking rule of the corresponding data field one by one needs to consume a large amount of time, so that the rule configuration efficiency is low.
[0004] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a rule configuration method, a terminal device and a computer readable storage medium, which aims to solve the technical problem of low rule configuration efficiency.
[0006] In order to achieve the above purpose, the present application provides a rule configuration method, which comprises:
[0007] Receiving a to-be-checked field identifier and an application field to which the to-be-checked field identifier is to be applied;
[0008] According to the attribute of the to-be-checked field identifier, determining a first checking rule corresponding to the to-be-checked field identifier;
[0009] According to the application field of the to-be-checked field identifier, determining a second checking rule corresponding to the to-be-checked field identifier;
[0010] According to the first checking rule and the second checking rule, generating a target checking rule of the to-be-checked field identifier;
[0011] When receiving to-be-checked data, the target checking rule is used to check the to-be-checked data, and a checking result is output.
[0012] In some embodiments, before the step of generating the target checking rule of the to-be-checked field identifier according to the first checking rule and the second checking rule, the method further comprises:
[0013] Displaying the first checking rule and the second checking rule on a rule configuration interface;
[0014] Upon receiving the confirmation action of the rule configuration interface, generating the target check rule of the to-be-checked field identifier according to the rule configuration interface.
[0015] In some embodiments, the step of generating the target check rule of the to-be-checked field identifier comprises:
[0016] Comparing the first check rule corresponding to each to-be-checked field identifier in the target check rule and the second check rule, determining the first target check rule and the second target check rule that exist conflict;
[0017] According to the check reference value and the check operator in the first target check rule and the second target check rule, selecting a third target check rule from the first target check rule and the second target check rule;
[0018] Deleting the check rule in the first target check rule and the second target check rule that is not selected.
[0019] In some embodiments, before the step of receiving the to-be-checked field identifier and the application field to which the to-be-checked field identifier is to be applied, comprising:
[0020] Obtaining the standard file corresponding to the application field;
[0021] Identifying the standard file to determine the to-be-checked information;
[0022] Generating the second check rule corresponding to the application field according to the to-be-checked information.
[0023] In some embodiments, the step of generating the target check rule of the to-be-checked field identifier according to the first check rule and the second check rule comprises:
[0024] Comparing the first check rule and the second check rule to determine the check rule in the second check rule that is the same as the first check rule;
[0025] Deleting the same check rule;
[0026] Performing the step of generating the target check rule of the to-be-checked field identifier according to the first check rule and the second check rule.
[0027] In some embodiments, the method further comprises:
[0028] Upon receiving the trigger action of the rule management interface, displaying the rule management interface and displaying the selectable check rule in the rule management interface;
[0029] Upon receiving a selected action of the rule management interface, a verification rule corresponding to the selected action is acquired;
[0030] The target verification rule is generated according to the verification rule;
[0031] Upon receiving the data to be verified, the data to be verified is verified by using the target verification rule, and a verification result is outputted.
[0032] In some embodiments, before the step of upon receiving the data to be verified, verifying the data to be verified by using the target verification rule, and outputting a verification result, the method further comprises:
[0033] The load maximum value is determined according to the application field, and the load maximum value is run;
[0034] Test data is received, the test data is verified by using the target verification rule, and a test verification result of the test data is outputted;
[0035] If the test verification result is passed, the step of upon receiving the data to be verified, verifying the data to be verified by using the target verification rule, and outputting a verification result is executed.
[0036] In some embodiments, the step of upon receiving the data to be verified, verifying the data to be verified by using the target verification rule, and outputting a verification result comprises:
[0037] Upon receiving the data to be verified, a data format of verification data corresponding to each verification field identifier in the data to be verified is acquired;
[0038] If the data format of the verification data corresponding to the verification field identifier in the data to be verified is different from the data format corresponding to the verification field identifier in the target verification rule, the data format of the verification data corresponding to the verification field identifier is converted into the data format corresponding to the verification field identifier in the target verification rule;
[0039] The data to be verified is verified by using the target verification rule, and a verification result is outputted.
[0040] In addition, to achieve the above object, the present application further provides a terminal device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the rule configuration method.
[0041] In addition, to achieve the above object, the application further provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the rule configuration method.
[0042] The application provides a rule configuration method. The rule configuration method comprises the following steps: receiving a to-be-verified field identifier and an application field to which the to-be-verified field identifier is to be applied; determining a first verification rule corresponding to the to-be-verified field identifier according to an attribute of the to-be-verified field identifier; determining a second verification rule corresponding to the to-be-verified field identifier according to the application field to which the to-be-verified field identifier is to be applied; and finally generating a target verification rule of the to-be-verified field identifier according to the first verification rule and the second verification rule, and then verifying to-be-verified data by using the target verification rule when the to-be-verified data is received, and outputting a verification result. The application can automatically generate the target verification rule according to the to-be-verified field identifier, without the need for a user to manually configure, and can improve the configuration efficiency of the verification rule. Moreover, the target verification rule generated by the application covers the second verification rule necessary for the application field to which the to-be-verified field identifier is to be applied, can comprehensively verify the to-be-verified data, and can make the to-be-verified data after verification directly applied to the corresponding application field without the need for secondary verification, thereby improving the verification efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0043] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative work.
[0045] Figure 1 A flowchart is provided for the rule configuration method in Embodiment One of the application;
[0046] Figure 2 A flowchart is provided for the rule configuration method in Embodiment Two of the application;
[0047] Figure 3 A flowchart is provided for the rule configuration method in Embodiment Three of the application;
[0048] Figure 4 A flowchart is provided for the rule configuration method in Embodiment Four of the application;
[0049] Figure 5 A device structure diagram of a hardware running environment related to the rule configuration method in the embodiments of the application.
[0050] The object, functional features and advantages of the present application will be further illustrated in conjunction with the embodiments, with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0052] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0053] The main solution of the embodiments of the present application is: receiving a to-be-verified field identifier and an application field to be applied to the to-be-verified field identifier, then determining a first verification rule corresponding to the to-be-verified field identifier according to the attribute of the to-be-verified field identifier, determining a second verification rule corresponding to the to-be-verified field identifier according to the application field of the to-be-verified field identifier, and finally generating a target verification rule of the to-be-verified field identifier according to the first verification rule and the second verification rule, and then when the to-be-verified data is received, the target verification rule is used to verify the to-be-verified data, and the verification result is output. The present application can automatically generate a target verification rule according to a to-be-verified field identifier, without the need for users to configure it themselves, which can improve the configuration efficiency of the verification rule. And the target verification rule generated by the present application covers the second verification rule necessary for the application field to be applied, which can comprehensively verify the to-be-verified data, so that the to-be-verified data after verification can be directly applied to the corresponding application field without the need for secondary verification, which can improve the verification efficiency.
[0054] In the present embodiment, for the sake of description, the following describes the identification terminal device as the execution subject.
[0055] Since the rule configuration is usually configured by the staff according to the verification requirement to configure the verification rule of the corresponding data field one by one. However, when facing a large amount of rule configuration, configuring the verification rule of the corresponding data field one by one needs to consume a lot of time.
[0056] The present application can automatically generate a target verification rule according to a to-be-verified field identifier, without the need for users to configure it themselves, which can improve the configuration efficiency of the verification rule. And the target verification rule generated by the present application covers the second verification rule necessary for the application field to be applied, which can comprehensively verify the to-be-verified data, so that the to-be-verified data after verification can be directly applied to the corresponding application field without the need for secondary verification, which can improve the verification efficiency.
[0057] Based on this, the rule configuration method of the embodiments of the present application provides a rule configuration method, which is described in detail with reference to Figure 1 , Figure 1 The flowchart of the first embodiment of the rule configuration method of the present application is shown in the figure.
[0058] In the embodiment, the rule configuration method comprises steps S10-S50.
[0059] Step S10: receiving a to-be-verified field identifier and an application field to which the to-be-verified field identifier is to be applied.
[0060] In the embodiment, the user can directly input the to-be-verified field identifier and the application field to which the to-be-verified field identifier is to be applied. The application field to which the to-be-verified field identifier is to be applied refers to an application field to which the to-be-verified data corresponding to the to-be-verified field identifier is to be applied after the to-be-verified data is verified by the verification rule. The to-be-verified field identifier can be the name of the to-be-verified field.
[0061] In a feasible implementation, if the user does not know which fields in the to-be-verified data need to be verified, the user can input all the field identifiers involved in the verification data as the to-be-verified field identifier.
[0062] Step S20: determining a first verification rule corresponding to the to-be-verified field identifier according to the attribute of the to-be-verified field identifier.
[0063] It should be noted that the attribute of the field identifier refers to an attribute used to describe the characteristics or properties of the verification data corresponding to the field identifier. The attributes corresponding to different field identifiers can be the same or different, and one field identifier can correspond to one attribute or multiple attributes.
[0064] In the embodiment, after receiving the to-be-verified field identifier and the application field to which the to-be-verified field identifier is to be applied input by the user, the attribute of the to-be-verified field identifier is determined according to the to-be-verified field identifier, so as to determine the verification rule corresponding to the target verification field identifier same as the to-be-verified field identifier in the verification field identifier associated with the attribute as the first verification rule corresponding to the to-be-verified field identifier.
[0065] In a feasible implementation, the verification rules corresponding to the verification field identifiers in the historical verification rules corresponding to each type of historical verification data of the system are obtained. Then, the verification rules belonging to the same cluster are determined by clustering analysis on the verification rules. Further, the verification field identifiers corresponding to the verification rules in the same cluster are defined as the same attribute, and the verification field identifiers and the verification rules corresponding to the verification field identifiers belonging to the same attribute are associated with the attribute and saved. When the to-be-verified field identifier input by the user is received, the attribute associated with the to-be-verified field identifier is determined, so as to determine the verification rule corresponding to the target verification field identifier same as the to-be-verified field identifier in the verification field identifier associated with the attribute as the first verification rule corresponding to the to-be-verified field identifier.
[0066] In a possible implementation, the clustering analysis can be performed according to a check type of the historical check rule, and the check type can be classified into a data format, a logical relationship, a range limit, and the like, and the embodiment is not limited in this regard. That is, the check rules belonging to different check types can be classified into different attributes.
[0067] It should be noted that the check type of the data format refers to checking the data length and the data type of the check field identifier corresponding to the check data. The check type of the logical relationship refers to checking the relationship between the check field identifier and other check field identifiers. The relationship can be the size, equality, or other relationship therebetween. For example, whether the check field identifier A is greater than the check field identifier B. The check type of the range limit refers to checking the range of the check field. For example, whether the check field identifier S is greater than 20.
[0068] Step S30: determining a second check rule corresponding to the to-be-checked field identifier according to an application field of the to-be-checked field identifier;
[0069] In the embodiment, the same check field identifier is found from the database to which the application field belongs, so that the check rule corresponding to the same check field identifier is determined as the second check rule corresponding to the to-be-checked field identifier.
[0070] In a possible implementation, the standard files corresponding to different application fields can be acquired in advance, and then the standard files are identified, the to-be-checked information is determined, and the second check rule of the check field corresponding to the application field is generated according to the to-be-checked information.
[0071]
[0072] It should be noted that the standard file refers to a file formulated and published by a standardization department, an organization, or a unit of different application fields, which is used to standardize and guide the work, product, or service of the related field. The standard file contains a series of specifications, requirements, and guidelines, which aims to provide unified standards and criteria to ensure the quality, safety, and interoperability of the product, service, or work.
[0073] In the embodiment, the application collects the standard files of different application fields, and identifies the content of the standard files, so as to screen the to-be-checked information from the standard files, the to-be-checked information including the check field identifier and the related information of the check rule corresponding to the check field identifier, so as to further arrange the to-be-checked information, generate the check field identifier and the check rule corresponding to the check field identifier, and then associate and save the check field identifier and the check rule corresponding to the check field identifier in the database corresponding to the application field.
[0074] In a possible implementation, a standardized department, institution or unit corresponding to each application field generally has an official website for publishing standard files. Therefore, the official website corresponding to each application field can be monitored through a corresponding interface, and when a new file is published on the official website, the title of the new file is parsed to determine whether it is a standard file. If it is a standard file, the step of identifying the standard file and determining the information to be checked is performed.
[0075] In another possible implementation, the official website of the standardized department, institution or unit corresponding to each application field can be subscribed to, so that when the official website publishes a standard file, the published standard file is automatically sent. Then, when the standard file from the official website is received, the step of identifying the standard file and determining the information to be checked is performed.
[0076] Step S40: generating a target verification rule of the to-be-verified field identifier according to the first verification rule and the second verification rule;
[0077] In this embodiment, since the first verification rule is obtained according to the historical verification rule of the system, and the historical verification rule is set by the user according to the user's own needs in the past, and the second verification rule is generated according to the standard file of the application field, the same verification rule may exist between the two. Therefore, the present application identifies the first verification rule and the second verification rule corresponding to each to-be-verified field identifier, deletes one of the same verification rules, and the remaining verification rule after deletion is the target verification rule of the to-be-verified field identifier.
[0078] It should be noted that the target verification rule of the to-be-verified field identifier generated by the present application not only contains the verification rule of the user's own needs, but also contains the necessary verification rule in the corresponding application field, so that the to-be-verified data can be comprehensively verified when the to-be-verified data is verified, and the verified data can be well applied to the corresponding application field without the need for secondary verification.
[0079] Since the target verification rule is generated according to the first verification rule and the second verification rule, and the first verification rule and the second verification rule are determined based on different principles. Therefore, there may be a conflict between the first verification rule and the second verification rule corresponding to the same to-be-verified field identifier in the target verification rule corresponding to the to-be-verified field identifier. This will result in the case that the to-be-verified data corresponding to the same to-be-verified field identifier cannot meet the first verification rule and the second verification rule at the same time, and thus the to-be-verified data cannot be verified at the same time. For example, the first verification rule corresponding to the to-be-verified field identifier A is A>20, and the second verification rule is A<18.
[0080] In another possible implementation, the step of generating the target check rule for the to-be-checked field identifier includes: comparing the first check rule and the second check rule corresponding to each to-be-checked field identifier in the target check rule, determining that the first target check rule and the second target check rule exist in conflict, selecting a third target check rule from the first target check rule and the second target check rule according to the check reference value and the check operator in the first target check rule and the second target check rule, and deleting the check rule in the first target check rule and the second target check rule that is not selected, so that there is no conflicting check rule in the target check rule.
[0081] It should be noted that the first target check rule is the check rule in the first check rule, and the second target check rule is the check rule in the second check rule. The check reference value refers to a fixed value compared with the to-be-checked field identifier in the check rule. For example, the check rule is A < 200, and 200 is the check reference value. The check operator refers to an operator used to determine whether the to-be-checked field meets a specific condition in the check rule. The check operator includes a comparison operator, a logical operator, etc. For example, the check rule is A < 200, and < is the check operator.
[0082] In addition, it should be noted that the first target check rule needs to meet the second target check rule because the second target check rule is determined according to the standard file. That is, the first target check rule should be a specific refinement or further limitation that meets the second target check rule. For example, the second target check rule is that the data type of the to-be-checked field identifier A is a string or an integer. Therefore, the first target check rule is that the data type of the to-be-checked field identifier A is a string, or the data type of the to-be-checked field identifier A is an integer, or the data type of the to-be-checked field identifier A is a string or an integer, which meets the second target check rule. For another example, the second target check rule is that the to-be-checked field identifier A < 200. Therefore, the first target check rule is that the to-be-checked field identifier A < s, s should be a value less than or equal to 200, which meets the second target check rule, or the first target check rule is that the to-be-checked field identifier s1 < A < s2, s2 should be a value less than or equal to 200, which meets the second target check rule.
[0083] In the embodiment, the first target check rule and the second target check rule are obtained, and then the first range composed of the check operator and the check reference value corresponding to the first target check rule and the second range composed of the check operator and the check reference value corresponding to the second target check rule are determined respectively. If the first range is within the second range, the first target check rule is selected as the third target check rule, and the second target check rule is deleted. If the first range is out of the second range, the second target check rule is selected as the third target check rule, and the first target check rule is deleted.
[0084] In another possible implementation, if the first range is within the second range, the third target check rule can be selected according to the priority of the first check rule and the second check rule. Specifically, if the priority of the first check rule is higher than that of the second check rule and the first range is within the second range, the first target check rule is selected as the third target check rule. If the priority of the second check rule is higher than that of the first check rule, the second target check rule can be directly selected as the third target check rule without judging whether the first target check rule is within the range of the second target check rule. The priority of the first check rule and the second check rule can be set by the user.
[0085] Step S50: When the to-be-checked data is received, the to-be-checked data is checked by using the target check rule, and a check result is output.
[0086] In the embodiment, when the to-be-checked data is received, the to-be-checked data is checked by using the target check rule generated in advance, and a check result is output. The user can modify the to-be-checked data according to the check result, and then check the to-be-checked data again until the to-be-checked data passes the check, so that the check efficiency of the to-be-checked data can be improved.
[0087] In a possible implementation, when the check result is output, the to-be-checked data that fails the check and / or the check rule corresponding to the to-be-checked data can also be output in a preset display mode. The preset display mode can be a chart, a text prompt, or the like, which is not limited in the embodiment.
[0088] In the technical scheme provided in the embodiment, the field to be checked is identified and an application field to which the field to be checked is to be applied are received, then a first check rule corresponding to the field to be checked is determined according to an attribute of the field to be checked, a second check rule corresponding to the field to be checked is determined according to the application field to which the field to be checked is to be applied, finally, a target check rule of the field to be checked is generated according to the first check rule and the second check rule, and when the data to be checked is received, the data to be checked is checked by using the target check rule, and a check result is output. The target check rule can be automatically generated according to the field to be checked, without the need for the user to configure it by himself, and the configuration efficiency of the check rule can be improved. Moreover, the target check rule generated by the application covers the second check rule necessary for the application field to which the field to be checked is to be applied, can comprehensively check the data to be checked, and makes the data to be checked after the check directly applicable to the corresponding application field without the need for secondary check, thereby improving the check efficiency.
[0089] With reference to Figure 2 In the second embodiment, based on the first embodiment, before the step S40, the following steps are included:
[0090] In the embodiment, the rule configuration method includes steps S60-S70:
[0091] Step S60: displaying the first check rule and the second check rule on a rule configuration interface;
[0092] In the embodiment, the first check rule and the second check rule are displayed on the rule configuration interface, so that the user can modify the first check rule and the second check rule according to the current demand, or add a new check rule. It can be understood that the check rule added by the user on the rule configuration interface is regarded as the first check rule.
[0093] Step S70: when a confirmation action of the rule configuration interface is received, generating the target check rule of the field to be checked according to the rule configuration interface.
[0094] In the embodiment, after the user completes the configuration on the rule configuration interface, the user can trigger a determination action in the rule configuration interface, and then when the system receives the confirmation action of the rule configuration interface, the target check rule of the field to be checked is generated according to the check rule in the rule configuration interface, so that the generated target check rule is more in line with the check requirement of the data to be checked, and the user experience is improved.
[0095] In another possible implementation, after the system receives the user inputted field to be checked identifier and the application field to which the field to be checked identifier is to be applied, the system can output a prompt information on whether to automatically generate the check rule, and if a confirmation reply is received, the system can execute the step of determining the first check rule corresponding to the field to be checked identifier according to the attribute of the field to be checked identifier, and if a negative reply is received, the system can directly display the user inputted field to be checked identifier in the rule configuration interface, and / or display the standard file corresponding to the application field or the entry of the field to be checked information corresponding to the standard file in the corresponding position in the rule configuration interface, so that the user can configure the target check rule of each field to be checked identifier in the rule configuration interface, and / or view the standard file or the field to be checked information corresponding to the standard file through the entry, and configure the target check rule of each field to be checked identifier in the rule configuration interface according to the standard file or the field to be checked information corresponding to the standard file.
[0096] In another possible implementation, the rule configuration method further includes: when a trigger action of the rule management interface is received, displaying the rule management interface and displaying the selectable check rules in the rule management interface, when a selection action of the rule management interface is received, obtaining the check rule corresponding to the selection action, generating the target check rule according to the check rule, and then executing the step of receiving the data to be checked, checking the data to be checked by using the target check rule, and outputting the check result.
[0097] In this embodiment, the rule management interface is provided for managing the historical first check rules, and therefore the selectable check rules displayed in the rule management interface are all the first check rules configured by the user. The user can select the selectable check rules in the rule management interface, and after the selection is completed, the user can trigger the selection action, and then the rule management interface can obtain the check rule selected by the user when the selection action of the rule management interface is received, so as to combine the check rules into the target check rule.
[0098] It can be understood that the user can trigger the trigger action of the rule management interface by clicking the entry button of the rule management interface, and the user can trigger the selection action of the rule management interface by clicking the confirmation selection button of the rule management interface.
[0099] In another possible implementation, after the selected action corresponding to the verification rule is acquired, and the target verification rule is generated according to the verification rule, the target verification rule can be displayed in the rule configuration interface, so that the user can modify the target verification rule in the rule configuration interface, or add a new verification rule. When the confirmation action of the rule configuration interface is received, the target verification rule of the to-be-verified field identifier is regenerated according to the rule configuration interface. It can be understood that the verification rule added in the rule configuration interface is regarded as the first verification rule.
[0100] It should be noted that the rule management interface also supports updating the verification rule, for example, editing, modifying, deleting, and the like of the verification rule in the rule management interface.
[0101] In the technical solution provided in this embodiment, by displaying the first verification rule and the second verification rule in the rule configuration interface, and generating the target verification rule of the to-be-verified field identifier according to the rule configuration interface when the confirmation action of the rule configuration interface is received, the generated target verification rule is more in line with the verification requirements of the to-be-verified data, and the user experience is improved.
[0102] Reference Figure 3 In the third embodiment, based on any of the above embodiments, the step S50 comprises:
[0103] In this embodiment, the rule configuration method comprises steps S80-S100:
[0104] Step S80: When the to-be-verified data is received, the data format of the verification data corresponding to each verification field identifier in the to-be-verified data is acquired;
[0105] Step S90: When the data format of the verification data corresponding to the verification field identifier in the to-be-verified data is different from the data format corresponding to the verification field identifier in the target verification rule, the data format of the verification data corresponding to the verification field identifier is converted into the data format corresponding to the to-be-verified field identifier in the target verification rule;
[0106] In this embodiment, when the to-be-verified data is received, in order to avoid the data format of the to-be-verified data being different from the data format corresponding to the verification field identifier, so that when the to-be-verified data is verified by using the target verification rule, the to-be-verified data cannot be verified or the verification result is incorrect. Before the to-be-verified data is verified, the data format of the to-be-verified data is converted into the data format corresponding to the to-be-verified field identifier in the target verification rule, so that the target verification rule can verify the to-be-verified data, and the accuracy of the verification result is improved.
[0107] For example, the data format corresponding to the to-be-verified field identifier A is year-month-day format, and the data format of the received to-be-verified data corresponding to the to-be-verified field identifier A is timestamp. The application converts the data format of the to-be-verified data from timestamp to year-month-day format.
[0108] In an available embodiment, the application is provided with a pre-processing configuration interface of input data. The pre-processing configuration interface supports setting the processing rule of the input data in different ways. The input data of the application refers to the received to-be-verified data. That is, when the to-be-verified data is received, the processing rule configured by the user based on the pre-processing configuration interface is used to process the to-be-verified data, so as to compare the data format of the received to-be-verified data with the data format of the verification field identifier in the target verification rule. If the data format of the to-be-verified data is different from the data format of the verification field identifier in the target verification rule, the processing rule converts the data format of the to-be-verified data into the data format corresponding to the to-be-verified field identifier in the target verification rule, and then uses the target verification rule to verify the processed to-be-verified data.
[0109] In the embodiment, the way of setting the processing rule of the input data by the pre-processing configuration interface includes at least one of the following: setting based on regular expression; setting based on code programming; setting based on JsEngine (js). It should be noted that JsEngine is an interpreter specially running javascript. Its processing process is to first parse and convert into AST syntax tree, and then the interpreter mainly does two things, the first is to convert into machine language bytecode, and the second is to hand over to the editor (optimizting compiler) for optimization. There is a data analysis process (profilling data) in the middle, which is mainly used to optimize the running of JS. After optimization, the code is converted into machine language.
[0110] Step S100: verifying the to-be-verified data by using the target verification rule, and outputting the verification result.
[0111] In the embodiment, after converting the data format of the to-be-verified data into the data format corresponding to the to-be-verified field identifier, the target verification rule is used to verify the to-be-verified data, so as to improve the accuracy of the output verification result.
[0112] In another available embodiment, the data format corresponding to the to-be-verified field identifier in the target rule can be converted into the data format consistent with the to-be-verified data, which is not limited in the embodiment.
[0113] In the technical scheme provided in the embodiment, when the to-be-verified data is received, the data format of the corresponding verification data corresponding to each verification field identifier in the to-be-verified data is acquired, and then when the data format of the corresponding verification data corresponding to the verification field identifier in the to-be-verified data is different from the data format corresponding to the to-be-verified field identifier in the target verification rule, the data format of the corresponding verification data corresponding to the verification field identifier is converted into the data format corresponding to the to-be-verified field identifier in the target verification rule, and then the target verification rule is used to verify the to-be-verified data, and a verification result is output, so that the target verification rule can correctly verify the to-be-verified data, and the accuracy of the verification result is improved.
[0114] With reference to Figure 4 In the fourth embodiment, based on any of the above embodiments, before the step S50, the method comprises the following steps:
[0115] In the embodiment, the rule configuration method comprises steps S200-S400.
[0116] Step S200: determining a load maximum value according to the application field, and running with the load maximum value;
[0117] In the embodiment, the application determines a load maximum value according to the maximum data amount of the data generated by different application fields, that is, the load value of the system when the data corresponding to the maximum data amount is poured into the system. It can be understood that the greater the maximum data amount, the greater the load value of the system when the data corresponding to the maximum data amount is poured into the system. The control system of the application runs with the load maximum value.
[0118] Step S300: receiving test data, verifying the test data by using the target verification rule, and outputting a test verification result of the test data;
[0119] In the embodiment, after the system runs with the load maximum value, test data is received, and the test data is verified by using the target verification rule, and a test verification result of the test data is output.
[0120] It should be noted that after the system runs with the load maximum value, the load condition when the system receives the data corresponding to the maximum data amount can be simulated, and then the data amount requirement for the test data is reduced, and the verification accuracy of the target verification rule for verifying the to-be-verified data when the system receives the to-be-verified data with a large data amount can also be tested.
[0121] In a feasible implementation manner, the test data can be input by a user. In addition, the application also provides a test module, which can be used to manufacture test data corresponding to each to-be-verified field identifier in the target verification rule. The embodiment does not make specific limitation on this.
[0122] Step S400: If the test verification result is passed, a step of verifying the to-be-verified data by using the target verification rule when the to-be-verified data is received, and outputting a verification result is performed.
[0123] In the embodiment, by comparing the test verification result with the verification result of the test data, if the test verification result is the same as the verification result of the test data, it is determined that the test verification result is passed.
[0124] In the technical solution provided in the embodiment, by determining the load maximum value according to the application field, running with the load maximum value, then receiving test data, verifying the test data by using the target verification rule, and outputting a test verification result of the test data, if the test verification result is passed, a step of verifying the to-be-verified data by using the target verification rule when the to-be-verified data is received, and outputting a verification result is performed. Before the target verification rule is put into use, a few test data are used to test the target verification rule by running with the load maximum value, which can improve the verification accuracy of the target verification rule.
[0125] The application provides a terminal device, which comprises at least one processor and a memory connected with the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the rule configuration method in the above embodiment one.
[0126] Reference will be made to the accompanying drawings Figure 5 which shows a structural schematic diagram of a terminal device suitable for implementing the embodiments of the application. The terminal device in the embodiments of the application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (for example, vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The terminal device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.
[0127] As Figure 5As shown, the terminal device can include a processing apparatus 1001 (for example, a central processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage apparatus 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the terminal device are also stored. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input apparatus 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output apparatus 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the terminal device to perform wireless or wired communication with other devices to exchange data. Although the terminal device having various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0128] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.
[0129] The terminal device provided in the present application adopts the rule configuration method in the above-mentioned embodiments, and can solve the technical problem of low rule configuration efficiency. Compared with the prior art, the terminal device provided in the present application has the same beneficial effects as the rule configuration method provided in the above-mentioned embodiments, and other technical features in the terminal device are the same as the features disclosed in the above-mentioned embodiments, which will not be described here.
[0130] It should be understood that various parts of the present application can be realized with hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0131] The above description is merely that of specific embodiments of the present application, but the scope of the present application is not limited thereto. Any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present application, and all such changes and substitutions should be encompassed within the scope of the present application. Therefore, the scope of the present application should be decided based on the scope of the claims.
[0132] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., computer programs) for performing the rule configuration method in the above-described embodiments.
[0133] The computer readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination thereof.
[0134] The above computer readable storage medium can be contained in a terminal device; or can exist separately without being assembled into a terminal device.
[0135] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the terminal device, the terminal device is caused to: receive a to-be-verified field identifier and an application field to which the to-be-verified field identifier is to be applied, then determine a first verification rule corresponding to the to-be-verified field identifier according to an attribute of the to-be-verified field identifier, determine a second verification rule corresponding to the to-be-verified field identifier according to the application field of the to-be-verified field identifier, finally generate a target verification rule of the to-be-verified field identifier according to the first verification rule and the second verification rule, and then when the to-be-verified data is received, the target verification rule is used to verify the to-be-verified data, and a verification result is output.
[0136] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0137] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0138] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0139] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the rule configuration method described above, and can solve the technical problem of low rule configuration efficiency. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the rule configuration method provided by the above embodiments, and will not be described here.
[0140] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A rule configuration method, characterized in that, The method includes: Receive the identifier of the field to be verified and the application domain to which the identifier of the field to be verified is applied; Obtain historical verification rules corresponding to historical verification data, obtain verification rules corresponding to verification field identifiers in the historical verification rules, perform cluster analysis on the verification rules, determine and define the verification field identifiers corresponding to the verification rules in the same cluster as the same attribute, associate and save the verification field identifiers and the verification rules corresponding to the same attribute with the attribute, wherein, according to the verification type of historical verification rules, cluster analysis can divide verification rules belonging to different verification types into different attributes; Based on the attributes of the field identifier to be verified, determine the first verification rule corresponding to the field identifier to be verified; Based on the application domain of the field identifier to be verified, determine the second verification rule corresponding to the field identifier to be verified; Based on the first verification rule and the second verification rule, a target verification rule for the field identifier to be verified is generated, including: comparing the first verification rule and the second verification rule corresponding to each of the field identifiers to be verified in the target verification rules, and determining the first target verification rule and the second target verification rule that conflict; determining a first range composed of the verification reference value and the verification operator corresponding to the first target verification rule, and a second range composed of the verification reference value and the verification operator corresponding to the second target verification rule; if the priority of the first verification rule is higher than that of the second verification rule, and the first range is within the second range, then the first target verification rule is selected as the third target verification rule; if the priority of the second verification rule is higher than that of the first verification rule, then the second target verification rule is selected as the third target verification rule; deleting the verification rules that are not selected in the first target verification rule and the second target verification rule; Upon receiving data to be verified, the target verification rule is used to verify the data, and the verification result is output.
2. The method as described in claim 1, characterized in that, Before the step of generating the target verification rule for the field identifier to be verified based on the first verification rule and the second verification rule, the method further includes: The first verification rule and the second verification rule are displayed in the rule configuration interface; Upon receiving a confirmation action from the rule configuration interface, the target verification rule for the field to be verified is generated according to the rule configuration interface.
3. The method as described in claim 1, characterized in that, Before the step of receiving the identifier of the field to be verified and the application domain to which the identifier of the field to be verified is applied, the following steps are included: Obtain the standard documents corresponding to the application domain; Identify the standard file and determine the information to be verified; The second verification rule corresponding to the application domain is generated based on the information to be verified.
4. The method as described in claim 1, characterized in that, The step of generating the target verification rule for the field identifier to be verified based on the first verification rule and the second verification rule includes: Compare the first verification rule and the second verification rule, and determine the verification rule in the second verification rule that is the same as the first verification rule; Delete duplicate verification rules; Perform the step of generating the target verification rule for the field identifier to be verified based on the first verification rule and the second verification rule.
5. The method as described in claim 1, characterized in that, The method further includes: When a trigger action is received from the rule management interface, the rule management interface is displayed, and selectable verification rules are shown on the rule management interface; When a selected action is received from the rule management interface, the verification rule corresponding to the selected action is obtained; Generate the target verification rule according to the verification rule; The steps include: when receiving data to be verified, verifying the data to be verified using the target verification rule, and outputting the verification result.
6. The method according to any one of claims 1 to 5, characterized in that, Before the step of verifying the data to be verified using the target verification rule and outputting the verification result upon receiving the data to be verified, the following steps are included: Determine the maximum load value based on the application domain, and operate at the maximum load value; Receive test data, verify the test data using the target verification rules, and output the test verification result of the test data; If the test verification result is passed, the step of verifying the data to be verified using the target verification rule and outputting the verification result is executed when the data to be verified is received.
7. The method as described in claim 1, characterized in that, The step of verifying the data to be verified using the target verification rule and outputting the verification result upon receiving the data to be verified includes: Upon receiving the data to be verified, obtain the data format of the verification data corresponding to each verification field identifier in the data to be verified; When the data format of the verification data corresponding to the verification field identifier in the data to be verified is different from the data format of the verification field identifier in the target verification rule, the data format of the verification data corresponding to the verification field identifier is converted to the data format of the verification field identifier in the target verification rule. The target verification rule is used to verify the data to be verified, and the verification result is output.
8. A terminal device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the rule configuration method as described in any one of claims 1 to 7.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the rule configuration method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data standard conformance detection method, device, system and storage medium
CN110737689A
Data verification method and device, storage medium and electronic equipment
CN114595216A
Rule conflict detection method and device, electronic equipment and readable storage medium
CN116226666A
Verification rule configuration method and device, data verification method and device and storage medium
CN116954980A
Data compliance verification method, device and equipment and readable storage medium
CN118035224A