Business Information Cleaning Method, Device, Computer Equipment and Storage Medium
By adaptively selecting cleaning rule templates and using the information cleaning rule engine, the problem that hard-coded cleaning rules cannot be adjusted in real time is solved, and fast response and efficient information cleaning is achieved.
Patent Information
- Application Number
- CN202210584527.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-05-27
AI Technical Summary
The existing hard-coded cleaning rules cannot be adjusted in real time, and cannot meet the needs of changes in financial information and the urgent launch of new cleaning rules, resulting in the inability to respond quickly to business needs.
By obtaining cleaning targets, adaptively selecting cleaning rule templates, and dynamically adjusting them using the information cleaning rule engine to achieve real-time configuration and adjustment of cleaning rules.
It realizes rapid response to business needs without downtime, with real-time and flexibility, and improves the efficiency and adaptability of information cleaning.
Smart Images

Figure CN114880315B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method and apparatus for cleaning business information, a computer device, and a storage medium. Background Art
[0002] With the development of computer technology, information cleaning technology has emerged. This technology performs checks in a hard-coded form. If new cleaning rules need to be added or modified, the cleaning rules need to be re-developed and then put online.
[0003] In traditional methods, information cleaning is generally performed in a hard-coded form, and the cleaning rules cannot be adjusted after being put online. However, affected by changes in financial information, there may be a need to adjust the threshold of the cleaning rules. Moreover, due to the existence of temporary risks in financial information, there may be a need to urgently put online new information cleaning rules. Therefore, the existing data cleaning solution for financial information using hard-coded cleaning rules cannot meet the need to adjust the cleaning rules of the online operating system in real time. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method and apparatus for cleaning business information, a computer device, a computer-readable storage medium, and a computer program product that can adaptively clean information in real time according to conditions.
[0005] In a first aspect, this application provides a method for cleaning business information. The method includes: obtaining a cleaning target corresponding to the business information to be cleaned; the cleaning target is determined according to the business cleaning requirements corresponding to the business information to be cleaned; determining a cleaning rule template that matches the cleaning target from a preset set of cleaning rule templates, and adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; inputting the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the business information to be cleaned according to the target information cleaning rule, and obtain information cleaning results corresponding to each business data record in the business information to be cleaned; the information cleaning results are used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rules; in the business information to be cleaned, the business data records that pass the cleaning conditions are used as the business information after cleaning.
[0006] In one embodiment, determining the cleaning rule template that matches the cleaning target from the preset set of cleaning rule templates includes: extracting the rule names corresponding to each of the cleaning rule templates in the preset set of cleaning rule templates, and using them as the name identifiers corresponding to each of the cleaning rule templates. The name identifier is used to characterize the type of information cleaning parameters that each of the cleaning rule templates can clean; obtaining the cleaning type identifier corresponding to the cleaning target, where the cleaning type identifier is used to characterize the type of information cleaning data that the cleaning target needs to clean; traversing the types of information cleaning parameters corresponding to each of the cleaning rule templates in the set of cleaning rule templates with the type of information cleaning data corresponding to the cleaning type identifier to determine the cleaning rule template that matches the cleaning target.
[0007] In one embodiment, after traversing the types of information cleaning parameters corresponding to the cleaning rule template with the type of information cleaning data corresponding to the cleaning type identifier to determine the cleaning rule template that matches the cleaning target, it further includes: if the cleaning target fails to match the cleaning rule template, prompting to load the cleaning rule template that matches the type of information cleaning data corresponding to the cleaning type identifier; based on the loaded cleaning rule template, using the type of information cleaning data corresponding to the cleaning type identifier to check the types of information cleaning parameters corresponding to the loaded cleaning rule template; if the check of the types of information cleaning parameters passes, using the loaded cleaning rule template as the cleaning rule template that matches the cleaning target.
[0008] In one embodiment, adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule includes: determining the information cleaning parameters in the cleaning rule template that need to be adjusted according to the cleaning target; based on the information to be cleaned business information, jointly adjusting the information cleaning parameters that need to be adjusted according to the limit conditions of the information cleaning parameters in the cleaning rule template to obtain the adjusted information cleaning parameters; if the adjusted information cleaning parameters exceed the adjustment range corresponding to the information cleaning parameters, modifying the limit conditions and then adjusting the information cleaning parameters to obtain the target information cleaning rule.
[0009] In one embodiment, after adjusting the information cleaning parameters that need to be adjusted in the cleaning rule template according to the limit conditions of the information cleaning parameters according to the information to be cleaned business information to obtain the adjusted information cleaning parameters, it further includes: obtaining the information cleaning key value in the cleaning rule template, where the information cleaning key value characterizes the corresponding cleaning rule template in the preset set of cleaning rule templates; establishing a corresponding relationship based on the adjusted information cleaning parameters and the information cleaning key value in the cleaning rule template.
[0010] In one embodiment, inputting the target information cleaning rule into the information cleaning rule engine to obtain the information cleaning results corresponding to each business data record in the to-be-cleaned business information includes: comparing the business data in each business data record in the to-be-cleaned business information with the information cleaning parameters corresponding to the target information cleaning rule; if the comparison results of any business data in the business data record with the information cleaning parameters are all passed, outputting the information cleaning result corresponding to the business data record; if any one of the comparison results of any business data in the business data record with the information cleaning parameters fails, deleting the business data record corresponding to the business data.
[0011] In a second aspect, the present application further provides a business information cleaning device. The device includes: a cleaning target acquisition module, configured to acquire a cleaning target corresponding to the to-be-cleaned business information; the cleaning target is determined according to the business cleaning requirements corresponding to the to-be-cleaned business information; a target information cleaning rule obtaining module, configured to determine a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjust the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; an information cleaning result obtaining module, configured to input the target information cleaning rule into the information cleaning rule engine; the information cleaning rule engine is configured to perform information cleaning on the to-be-cleaned business information according to the target information cleaning rule to obtain the information cleaning results corresponding to each business data record in the to-be-cleaned business information; the information cleaning results are used to represent whether the corresponding business data record passes the cleaning conditions formed by the target cleaning rules; a post-cleaning business information obtaining module, configured to use the business data records that pass the cleaning conditions in the to-be-cleaned business information as the post-cleaning business information.
[0012] In one embodiment, the target information cleaning rule obtaining module is configured to extract the rule names corresponding to each of the cleaning rule templates in the preset set of cleaning rule templates, and use them as the name identifiers corresponding to each of the cleaning rule templates, and the name identifiers are used to represent the types of information cleaning parameters that each of the cleaning rule templates can clean; obtaining the cleaning type identifier corresponding to the cleaning target, and the cleaning type identifier is used to represent the type of information cleaning data that the cleaning target needs to clean; traversing the types of information cleaning parameters corresponding to each of the cleaning rule templates in the set of cleaning rule templates with the type of information cleaning data corresponding to the cleaning type identifier to determine the cleaning rule template that matches the cleaning target.
[0013] In one embodiment, the target information cleaning rule obtaining module is further configured to, if the cleaning target fails to match the cleaning rule template, prompt to load the cleaning rule template that matches the information cleaning data type corresponding to the cleaning type identifier; based on the loaded cleaning rule template, use the information cleaning data type corresponding to the cleaning type identifier to check the information cleaning parameter type corresponding to the loaded cleaning rule template; if the check of the information cleaning parameter type passes, use the loaded cleaning rule template as the cleaning rule template that matches the cleaning target.
[0014] In one embodiment, the target information cleaning rule obtaining module is configured to determine the information cleaning parameters that need to be adjusted in the cleaning rule template according to the cleaning target; based on the to-be-cleaned service information, jointly adjust the information cleaning parameters that need to be adjusted according to the limitation conditions of the information cleaning parameters in the cleaning rule template to obtain adjusted information cleaning parameters; if the adjusted information cleaning parameters exceed the adjustment range corresponding to the information cleaning parameters, modify the limitation conditions and then adjust the information cleaning parameters to obtain the target information cleaning rule.
[0015] In one embodiment, the target information cleaning rule obtaining module is further configured to obtain the information cleaning key value in the cleaning rule template, where the information cleaning key value represents the corresponding cleaning rule template in the preset cleaning rule template set; establish a corresponding relationship based on the adjusted information cleaning parameters and the information cleaning key value in the cleaning rule template.
[0016] In one embodiment, the information cleaning result obtaining module is configured to compare the service data in each service data record in the to-be-cleaned service information with the information cleaning parameters corresponding to the target information cleaning rule; if the comparison result of any service data in the service data record with the information cleaning parameters passes, output the information cleaning result corresponding to the service data record; if any comparison result of any service data in the service data record with the information cleaning parameters fails, delete the service data record corresponding to the service data.
[0017] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: obtaining a cleaning target corresponding to the to-be-cleaned service information; the cleaning target is determined according to the service cleaning requirement corresponding to the to-be-cleaned service information; determining a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; inputting the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the to-be-cleaned service information according to the target information cleaning rule to obtain information cleaning results corresponding to each service data record in the to-be-cleaned service information; the information cleaning results are used to represent whether the corresponding service data record passes the cleaning conditions constituted by the target cleaning rules; in the to-be-cleaned service information, the service data records passing the cleaning conditions are used as the cleaned service information.
[0018] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, the following steps are implemented: obtaining a cleaning target corresponding to the to-be-cleaned service information; the cleaning target is determined according to the service cleaning requirement corresponding to the to-be-cleaned service information; determining a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; inputting the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the to-be-cleaned service information according to the target information cleaning rule to obtain information cleaning results corresponding to each service data record in the to-be-cleaned service information; the information cleaning results are used to represent whether the corresponding service data record passes the cleaning conditions constituted by the target cleaning rules; in the to-be-cleaned service information, the service data records passing the cleaning conditions are used as the cleaned service information.
[0019] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the following steps: obtaining a cleaning target corresponding to the business information to be cleaned; the cleaning target being determined according to the business cleaning requirements corresponding to the business information to be cleaned; determining a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; inputting the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine being configured to perform information cleaning on the business information to be cleaned according to the target information cleaning rule to obtain information cleaning results corresponding to each business data record in the business information to be cleaned; the information cleaning results being used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rule; and in the business information to be cleaned, using the business data records passing the cleaning conditions as the cleaned business information.
[0020] For the above business information cleaning method, device, computer device, storage medium and computer program product, by obtaining a cleaning target corresponding to the business information to be cleaned; the cleaning target being determined according to the business cleaning requirements corresponding to the business information to be cleaned; determining a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; inputting the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine being configured to perform information cleaning on the business information to be cleaned according to the target information cleaning rule to obtain information cleaning results corresponding to each business data record in the business information to be cleaned; the information cleaning results being used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rule; and in the business information to be cleaned, using the business data records passing the cleaning conditions as the cleaned business information.
[0021] Through a business information cleaning method based on a rule engine, for a cleaning target corresponding to the cleaning requirements of business information, by extracting cleaning rules and introducing a configuration center and an information cleaning rule engine, and configuring the cleaning rules in the configuration center, an information cleaning method that can adjust cleaning rules is provided. This method can quickly respond to scenarios where the business has new cleaning requirements, and can also respond to the business adjusting cleaning rules or cleaning thresholds according to real-time situations without downtime to meet the release requirements. It has both real-time performance and flexibility, can better meet the requirements of business information data cleaning in different fields, and improve the efficiency of business information cleaning. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is an application environment diagram of the business information cleaning method in an embodiment;
[0023] Figure 2 It is a schematic flow chart of a method for cleaning business information in an embodiment;
[0024] Figure 3 It is a schematic flow chart of a method for determining a matching cleaning rule template in an embodiment;
[0025] Figure 4 It is a schematic flow chart of a method for determining a matching cleaning rule template in another embodiment;
[0026] Figure 5 It is a schematic flow chart of a method for determining a cleaning rule for target information in an embodiment;
[0027] Figure 6 It is a schematic flow chart of a method for determining a cleaning rule for target information in another embodiment;
[0028] Figure 7 It is a schematic flow chart of a method for cleaning business information in another embodiment;
[0029] Figure 8 It is a schematic diagram of information included in a cleaning rule in an embodiment;
[0030] Figure 9 It is a schematic diagram of the entire process after introducing the Apollo configuration center in an embodiment;
[0031] Figure 10 It is a structural block diagram of a business information cleaning device in an embodiment;
[0032] Figure 11 It is an internal structure diagram of a computer device in an embodiment. Specific embodiments
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] The business information cleaning method provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown, the terminal 102 obtains data. The server 104 responds to the instructions of the terminal 102 to receive the data of the terminal 102, and calculates the obtained data. The server 104 transmits the calculation result of the data back to the terminal 102, and the terminal 102 displays it. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The server 104 obtains the cleaning target corresponding to the to-be-cleaned service information from the terminal 102; the cleaning target is determined according to the service cleaning requirements corresponding to the to-be-cleaned service information; determines the cleaning rule template matching the cleaning target from the preset cleaning rule template set, and adjusts the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule; inputs the target information cleaning rule into the information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the to-be-cleaned service information according to the target information cleaning rule to obtain the information cleaning result corresponding to each service data record in the to-be-cleaned service information; the information cleaning result is used to represent whether the corresponding service data record passes the cleaning conditions constituted by the target cleaning rules; in the to-be-cleaned service information, the service data records passing the cleaning conditions are used as the cleaned service information. Among them, the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0035] In one embodiment, as Figure 2 shown, a method for cleaning service information is provided. Taking the server in Figure 1 as an example, the method includes the following steps:
[0036] Step 202, obtain the cleaning target corresponding to the to-be-cleaned service information.
[0037] Among them, the to-be-cleaned service information can be a set containing multiple service data records. Each service data record in the to-be-cleaned service information needs to undergo information cleaning. If any service data record can pass the cleaning of all conditions in the combined conditions, it is used for information release. If any service data record cannot pass the cleaning of any condition in the combined conditions, the information is deleted.
[0038] Among them, the cleaning target can be the direction pointed to after cleaning each business record data in the business information to be cleaned. For example, if the amplitude in the A business record data cannot be greater than 300, the cleaning target is to retain the A business record data with an amplitude less than 300. The cleaning target corresponding to each business record data is determined according to the business cleaning requirements corresponding to the business information to be cleaned. Therefore, the cleaning target is dynamically changing. For business data records with the same cleaning target, this cleaning target is also the cleaning target corresponding to the business information to be cleaned at the same time.
[0039] Specifically, the server responds to the instruction of the terminal, obtains the cleaning target corresponding to the business information to be cleaned from the terminal, and stores the obtained business information to be cleaned and the corresponding cleaning target in the storage unit. When the server needs to clean any business data record in the business information to be cleaned, it is retrieved from the storage unit to the volatile storage resource for the central processing unit to calculate. Among them, the business information to be cleaned can be a single piece of information or multiple pieces of information input simultaneously. For each piece of business information to be cleaned, it can contain at least one business data record, and each business data record has its corresponding cleaning target.
[0040] For example, the server 104 responds to the instruction of the terminal 102, obtains the cleaning target corresponding to the business information to be cleaned from the terminal 102, and stores it in the storage unit in the server 104. Among them, there are 10 pieces of business information to be cleaned obtained by the server 104, and there are 20 business data records corresponding to each piece of business information to be cleaned, and each business data record has its own corresponding cleaning target.
[0041] Step 204, determine the cleaning rule template that matches the cleaning target from the preset set of cleaning rule templates, and adjust the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule.
[0042] Among them, the cleaning rule template is pre-set in the computer and is the original rule template for cleaning the business data records in the business information to be cleaned. There are multiple parameters in the cleaning rule template, and the parameters inside can be adjusted according to actual needs to clean the business data records that do not meet the requirements.
[0043] Among them, the set of cleaning rule templates can be a set composed of multiple different types of cleaning rule templates, and each type of cleaning rule template can be further divided into cleaning rule templates for different cleaning targets.
[0044] Among them, the information cleaning parameter can be a parameter used to compare each data in the business data record in the cleaning rule template, and a comparison result is obtained. The information cleaning parameter includes one or more of rule number, gear, fields 1 to field n, comparison method, threshold, etc.
[0045] Among them, the target information cleaning rule can be an information cleaning rule that meets the business requirements after the selected cleaning rule template in the cleaning rule template is adjusted according to the requirements of the cleaning target. For the adjustment of the information cleaning parameter, if it exceeds the adjustable range in the cleaning rule template, it is necessary to reset the cleaning target or modify the threshold corresponding to the adjustable range of the cleaning rule template. For the operation of the parameters in the cleaning rule template, not only can the parameters be adjusted, but also the parameters in the cleaning rule template can be added or deleted.
[0046] Specifically, the cleaning rules of business information are templated, and the cleaning rules can be expanded, realizing the execution of cleaning in a configuration form. When there is a need to adjust the cleaning rules corresponding to business adjustments, the cleaning rules can be adjusted by adjusting the configuration items. In addition, the goal of quickly and conveniently adjusting the cleaning threshold can also be achieved through the configuration form. On this basis, when obtaining the target information cleaning rule, a configuration center is introduced, and the cleaning rules to be executed are configured in the configuration center, so that the goal of real-time modification of the cleaning rules can be achieved by adjusting the configuration of the cleaning items in the configuration center. After the configuration center determines the specific direction of the cleaning target according to the business requirements, it retrieves the cleaning rule template corresponding to the direction of the cleaning target that meets the cleaning target from the preset cleaning rule template. Since the specific cleaning threshold required for each business data record is different, the information cleaning parameters in the cleaning rule template are adjusted according to the cleaning target corresponding to each business data record. For business data records with the same cleaning target, this cleaning target is also the cleaning target corresponding to the business information to be cleaned. The adjusted information cleaning parameters should conform to objective laws and can play a role in cleaning the business data record, efficiently cleaning the business information to be cleaned. The information cleaning rule after adjusting the information cleaning parameter is the target information cleaning rule.
[0047] Among them, the cleaning rule template set includes time-based cleaning rules and price-based cleaning rules. The time-based cleaning rules include market time window cleaning rules and technical time window cleaning rules. It should be understood that the above two cleaning rules are applicable to the cleaning of various business data records. Hereinafter, the scenario of real-time cleaning of foreign exchange market quotations by a bank is used as an example. Market time window cleaning rule: That is, compare the current system time with the market generation time. If it is greater than the threshold, the cleaning fails; otherwise, the cleaning passes. Technical time window cleaning rule: Compare the current system time with the time when the market enters the message queue. If it is greater than the threshold, the cleaning fails; otherwise, the cleaning passes. Similarly, the price-based cleaning rules include price inversion cleaning rules, price inversion cleaning rules between data sources, vertical comparison cleaning rules, and pyramid-shaped price comparison cleaning rules. Price inversion cleaning rule: That is, compare the buying and selling prices of the first gear in the foreign exchange market quotation. The selling value must be greater than a certain threshold, otherwise the cleaning fails. Price inversion cleaning rule between data sources: That is, respectively perform inversion checks on the buying and selling prices of the first gear in the foreign exchange market quotation and the buying and selling prices of the benchmark market quotation. If the difference between the selling price and the buying price is greater than the threshold, the cleaning fails; otherwise, the same applies. Vertical comparison cleaning rule: That is, respectively compare the buying and selling prices of the first gear in the foreign exchange market quotation with the previous quotation price of this market quotation. If the price difference exceeds the threshold, the cleaning fails; otherwise, the cleaning passes. Pyramid-shaped price comparison cleaning rule: For the foreign exchange market quotation in the spot inquiry market (QDM), for the buying price, as the multi-layer gears increase, its quantity continuously increases and its price continuously decreases; for the selling price, as the multi-layer gears increase, its quantity continuously increases and its price also continuously increases; those that do not meet this rule fail the cleaning.
[0048] For example, when introducing the Apollo configuration center in the process of obtaining the target information cleaning rules, configuring the cleaning rules to be executed into the Apollo configuration center can achieve the goal of real-time modification of the cleaning rules by adjusting the configuration of the market cleaning items in the configuration center. The specific process is to input the preset cleaning rule template set into the Apollo configuration center. The Apollo configuration center selects the matching cleaning rule template from the preset cleaning rule template set according to the cleaning target. Further, the Apollo configuration center adjusts the information cleaning parameters in the cleaning rule template according to the cleaning target. The adjustment includes addition, modification, and deletion. After the Apollo configuration center adjusts the information cleaning parameters, the target information cleaning rules for cleaning are obtained.
[0049] Step 206, input the target information cleaning rules into the information cleaning rule engine to obtain the information cleaning results corresponding to each business data record in the business information to be cleaned.
[0050] Among them, the information cleaning rule engine can be a computer algorithm for cleaning the to-be-cleaned business information according to the target information cleaning rules. This algorithm mainly filters the business data records that fail to pass the target information cleaning rules.
[0051] Among them, the information cleaning result can be used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rules. Generally, for the information cleaning result, a conclusion of passing or not passing will be given. For passing or not passing, the information cleaning sub-result can be further output to obtain the comparison result between the specific data in the business data record and each parameter in the target information cleaning rules.
[0052] Specifically, the configuration center inputs the already configured target information cleaning rules into the information cleaning rule engine to clean each business data record in the to-be-cleaned business information center. Since the cleaning of each business data record in the to-be-cleaned business center can use one target information cleaning rule according to business requirements, or multiple target information cleaning rules can be used simultaneously, one or more information cleaning results will be output for each business data record in the to-be-cleaned business information center, and each information cleaning result indicates passing or not passing. For each information cleaning result, its corresponding information cleaning sub-result can be obtained to get the comparison sub-result between each parameter in the target information cleaning rules and the data of each business data record in the to-be-cleaned business information center.
[0053] For example, the Apollo configuration center inputs the already configured target information cleaning rules 1-5 into the information cleaning rule engine to clean the business data records 1-10 in the to-be-cleaned business information center. Therefore, one or more information cleaning results will be output for the business data records 1-10 in the to-be-cleaned business information center, and each information cleaning result indicates passing or not passing.
[0054] Step 208, in the to-be-cleaned business information, the business data records that pass the cleaning conditions are used as the cleaned business information.
[0055] Among them, the cleaned business information can be the business data records whose information cleaning results are all passing after being cleaned by the target information cleaning rules.
[0056] Specifically, for the information cleaning result obtained by the information cleaning rule engine according to the target information cleaning rules, if the cleaning result of any business data record is passing, then this business data record is used as the cleaned business information for publication. If the comparison result between the data of any business data record and any parameter in the target information cleaning rules is not passing, then this business data record is deleted, and a deletion log is generated and recorded.
[0057] For example, for business data records 1-10 in the business information to be cleaned, the corresponding target information cleaning rules 1-5 in the information cleaning rule engine are used for information cleaning, and multiple cleaning results are obtained. If the cleaning result corresponding to any business data record is passed, the business data records that pass the cleaning conditions are used as the cleaned business information and published.
[0058] In the above business information cleaning method, the cleaning target corresponding to the business information to be cleaned is obtained; the cleaning target is determined according to the business cleaning requirements corresponding to the business information to be cleaned; a cleaning rule template matching the cleaning target is determined from a preset set of cleaning rule templates, and the information cleaning parameters in the cleaning rule template are adjusted according to the cleaning target to obtain the target information cleaning rule; the target information cleaning rule is input into the information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the business information to be cleaned according to the target information cleaning rule, and obtain the information cleaning results corresponding to each business data record in the business information to be cleaned; the information cleaning result is used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rules; in the business information to be cleaned, the business data records that pass the cleaning conditions are used as the cleaned business information.
[0059] Through the business information cleaning method based on the rule engine, for the cleaning target corresponding to the cleaning requirements of business information, by extracting cleaning rules and introducing a configuration center and an information cleaning rule engine, the cleaning rules are configured in the configuration center, thus providing an information cleaning method that can adjust cleaning rules. This method can not only quickly respond to the scenario where the business has new cleaning requirements, but also respond to the business's adjustment of cleaning rules or cleaning thresholds according to real-time situations without downtime to meet the publishing requirements. It has both real-time and flexibility, can better meet the requirements of business information data cleaning in different fields, and improve the efficiency of business information cleaning.
[0060] In one embodiment, as Figure 3 shown, determining a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates includes:
[0061] Step 302, extracting the rule names corresponding to each cleaning rule template in the preset set of cleaning rule templates, and using them as the name identifiers corresponding to each cleaning rule template.
[0062] Among them, the rule name can be the name corresponding to the cleaning rule template, and this name can reflect the cleaning type and cleaning target of the cleaning rule template. For example: time single value comparison template, price double value mutual comparison template, pyramid type volume-price increasing template, etc.
[0063] Among them, the name identifier can be an identifier that represents the inherent characteristics of the cleaning rule template and has a name. Using the rule name as the name identifier helps to express the cleaning type and cleaning target of the cleaning rule template, and the main information of the cleaning rule template can be intuitively read.
[0064] Specifically, the server traverses the information of each cleaning rule template in the preset cleaning rule template set. When traversing the information of any cleaning rule template, the rule name corresponding to the cleaning rule template will be extracted. If the rule name conforms to the naming method of the name identifier, the modified rule name will be used as the name identifier corresponding to the cleaning rule template. Among them, the name identifier is used to characterize the information cleaning parameter type that each cleaning rule template can clean.
[0065] For example, the rule names corresponding to 2 cleaning rule templates in the preset cleaning rule template set are extracted, which are the time single-value comparison template and the price double-value comparison template respectively. The extracted rule names are used as the name identifiers corresponding to these two cleaning rule templates.
[0066] Step 304, obtain the cleaning type identifier corresponding to the cleaning target.
[0067] Among them, the cleaning type identifier can be an identifier corresponding to the information contained in the cleaning target. The data type contained in the cleaning type identifier can be compared with the data type contained in the name identifier to ensure the accurate selection of the cleaning rule template.
[0068] Specifically, the server responds to the instruction of the terminal, obtains the cleaning type identifier corresponding to the cleaning target from the terminal, traverses the data of the cleaning type identifier, extracts the data type corresponding to the cleaning target, and then stores the obtained result in the storage unit.
[0069] For example, the server obtains the cleaning type identifier corresponding to the cleaning target, traverses the data in the cleaning type identifier, obtains the data types 1-10, and stores them in the storage unit of the server.
[0070] Step 306, traverse the information cleaning data type corresponding to the cleaning type identifier through the information cleaning parameter types corresponding to each cleaning rule template in the cleaning rule template set, and determine the cleaning rule template that matches the cleaning target.
[0071] The information cleaning data type or the information cleaning parameter type can be the data types included in the cleaning target or the cleaning rule template. If you want to use the cleaning rule template to clean the business data records in the business information to be cleaned, the data types in the cleaning target and the cleaning rule template need to match, that is, the data types of both must be the same.
[0072] Specifically, traverse the data identified by the cleaning type to obtain the information cleaning data type corresponding to the cleaning type identifier. Based on the above information cleaning data type, traverse the information cleaning parameter types corresponding to all the cleaning rule templates in the cleaning rule template set and compare them one by one until a cleaning rule template corresponding to the information cleaning parameter type that is exactly the same as the information cleaning data type corresponding to the cleaning type identifier is found, and use it as the cleaning rule template that matches the cleaning target.
[0073] For example, the information cleaning data types corresponding to the cleaning type identifier are A, B, and C. The server needs to find the cleaning rule templates corresponding to the information cleaning parameter types A, B, and C from each cleaning rule template, and then use them as the cleaning rule templates that match the cleaning target.
[0074] In this embodiment, by comparing the data types in the cleaning target and each cleaning rule template, a matching cleaning rule template is found, and the most appropriate cleaning rule template can be used to clean the business data records corresponding to the cleaning target, reducing the extra calculations caused by different data types during cleaning and improving the cleaning efficiency.
[0075] In one embodiment, as Figure 4 shown, after traversing the information cleaning data type corresponding to the cleaning type identifier through the information cleaning parameter type corresponding to the cleaning rule template and determining the cleaning rule template that matches the cleaning target, it further includes:
[0076] Step 402, if the cleaning target fails to match the cleaning rule template, prompt to load the cleaning rule template that matches the information cleaning data type corresponding to the cleaning type identifier.
[0077] Specifically, if the data types of the information cleaning data type corresponding to the cleaning target and the information cleaning parameter type corresponding to the cleaning rule template do not match after matching, suspend the cleaning process and prompt to load the cleaning rule template that matches the information cleaning data type corresponding to the cleaning target into the cleaning rule template set to enrich the cleaning rule templates in the cleaning rule template set.
[0078] For example, if the information cleaning data types corresponding to the cleaning target are A, B, and C, while the information cleaning parameter types corresponding to the cleaning rule template are A, B, and D, the cleaning process is paused, and a prompt is given to load the cleaning rule template corresponding to the information cleaning parameter types A, B, and C.
[0079] Step 404: Based on the loaded cleaning rule template, use the information cleaning data type corresponding to the cleaning type identifier to check the information cleaning parameter type corresponding to the loaded cleaning rule template.
[0080] Specifically, after loading the cleaning rule template into the server, the server will automatically check again the information cleaning parameter type corresponding to the loaded cleaning rule template and the information cleaning data type corresponding to the required cleaning target, and determine whether the data types of the two match. If it is found that they do not match, the cleaning process is paused again, and a prompt is given to load a matching cleaning rule template.
[0081] For example, after loading the cleaning rule template into the server, the server will automatically check again the information cleaning parameter types A, B, and C corresponding to the loaded cleaning rule template and the information cleaning data types A, B, and C corresponding to the cleaning target, and determine whether the data types of the two are consistent.
[0082] Step 406: If the check of the information cleaning parameter type passes, use the loaded cleaning rule template as the cleaning rule template that matches the cleaning target.
[0083] Specifically, if it is found that the data types of the information cleaning parameter type corresponding to the loaded cleaning rule template and the information cleaning data type corresponding to the required cleaning target are the same after matching, then through comparison, the loaded cleaning rule template is used as the cleaning rule template required by the cleaning target, and this template is locked for this cleaning target.
[0084] For example, if it is found that the data types of the information cleaning parameter type corresponding to the loaded cleaning rule template and the information cleaning data type corresponding to the required cleaning target are both A, B, and C after matching, then through comparison, the loaded cleaning rule template is used as the cleaning rule template required by the cleaning target.
[0085] In this embodiment, by prompting to load a suitable cleaning rule template after a matching failure and performing a secondary verification on the data types in the cleaning rule template, it is possible to ensure that the data types of the cleaning target and the cleaning rule template match, avoid errors during the cleaning process, and improve the cleaning efficiency.
[0086] In one embodiment, as Figure 5As shown, adjust the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule, including:
[0087] Step 502, determine the information cleaning parameters that need to be adjusted in the cleaning rule template according to the cleaning target.
[0088] Specifically, for different cleaning targets, there are different cleaning directions, resulting in different cleaning effects. Therefore, determine the range of each information cleaning parameter in the cleaning rule template and the specific information cleaning parameters that need to be adjusted. For any cleaning target, the server will confirm the information cleaning parameters that need to be adjusted to achieve the target. For the information cleaning parameters that do not need to be adjusted, the server will further lock them to prevent changes in the parameters that do not need to be adjusted while adjusting individual parameters, and can also avoid incorrect adjustments.
[0089] For example, the server determines that parameters from 6 to 13 in parameters 1 - 20 of the cleaning rule template are the information cleaning parameters that need to be adjusted according to the required cleaning target. The standard for determining the information cleaning parameters that need to be adjusted is based on the direction of the cleaning target and the final result.
[0090] Step 504, based on the to-be-cleaned service information, jointly adjust the information cleaning parameters that need to be adjusted according to the limiting conditions of the information cleaning parameters in the cleaning rule template to obtain the adjusted information cleaning parameters.
[0091] Among them, the limiting conditions can be the range, threshold, etc. that limit the adjustment of the information cleaning parameters. The limiting conditions are generally preset in the cleaning rule template. When adjusting, if the adjustment of the information cleaning parameters needs to exceed the limiting conditions, the parameters in the cleaning rule template need to be reset.
[0092] Among them, the adjusted information cleaning parameters can be the information cleaning parameters that are reasonably adjusted based on the cleaning service information according to the limiting conditions of the information cleaning parameters in the cleaning rule template, and further obtained information cleaning parameters are the adjusted information cleaning parameters.
[0093] Specifically, based on the service requirements in the to-be-cleaned service information, further determine the range and threshold of the information cleaning parameters that need to be adjusted. However, since the cleaning rule template also presets the limiting conditions for the adjustment range and threshold of the information cleaning parameters, the information cleaning parameters that need to be adjusted are adjusted within the specified range in combination with the service requirements and the limiting conditions to obtain the adjusted information cleaning parameters, where the specified range is determined by the service requirements and the limiting conditions.
[0094] For example, the cleaning service information obtained by the server is M, and the limit for the information cleaning parameters in the cleaning rule template is N. If the information cleaning parameters to be adjusted are adjusted, they need to be adjusted within the range jointly set according to the cleaning service information M and the limit condition N to obtain the adjusted information cleaning parameters.
[0095] Step 506, if the adjusted information cleaning parameters exceed the adjustment range corresponding to the information cleaning parameters, modify the limit condition and then adjust the information cleaning parameters to obtain the target information cleaning rule.
[0096] Specifically, for special information of the service to be cleaned, if the adjustment of the information cleaning parameters determined to be adjusted exceeds the limit condition of the information cleaning parameters in the cleaning rule template, the server stops the relevant process and prompts to modify the limit condition. The cleaning rule template after the limit condition is modified needs to be run with zero load to check whether the modified limit condition conforms to the inherent objective law of the cleaning rule template. If the cleaning rule template with the modified limit condition passes the check, the information cleaning parameters to be adjusted are adjusted again according to the special information of the service to be cleaned, and finally the target information cleaning rule is obtained. If the adjustment range required by the information of the service to be cleaned does not exceed the limit condition, the adjusted information cleaning parameters are directly put into the cleaning rule template as the target information cleaning rule.
[0097] In this embodiment, by adjusting the information cleaning parameters that need to be adjusted in the cleaning rule template according to the limit, the adjusted parameters corresponding to the cleaning rule template can conform to the objective law, reduce unnecessary running errors, and improve the running efficiency of the system.
[0098] In one embodiment, as Figure 6 shown, after adjusting the information cleaning parameters that need to be adjusted in the cleaning rule template according to the limit condition of the information cleaning parameters for the service to be cleaned to obtain the adjusted information cleaning parameters, it further includes: [[ID=!16]]
[0099] Step 602, obtain the information cleaning key value in the cleaning rule template.
[0100] Among them, the information cleaning key value can be used to represent the corresponding cleaning rule template in the preset set of cleaning rule templates. That is, for any cleaning rule template, there will be an information cleaning key value corresponding to it one by one. The information cleaning key value is equivalent to the inherent information number of the cleaning rule template.
[0101] Specifically, the server traverses the data corresponding to all the cleaning rule templates in the preset cleaning rule template set, extracts the information cleaning key values corresponding to each cleaning rule template to represent the information of the corresponding cleaning rule template, and stores each information cleaning key value in the form of a table.
[0102] For example, there are 20 cleaning rule templates in the preset cleaning rule template set. The server traverses the data corresponding to these 20 cleaning rule templates, extracts the information cleaning key values corresponding to the 20 cleaning rule templates, and stores them in the form of a table.
[0103] Step 604, establish a corresponding relationship based on the adjusted information cleaning parameters and the information cleaning key values in the cleaning rule template.
[0104] Specifically, for the adjusted information cleaning parameters, corresponding information cleaning key values are required to facilitate the server to efficiently find the corresponding cleaning rule template during traversal. Therefore, a corresponding relationship is established based on the adjusted information cleaning parameters and the information cleaning key values in the cleaning rule template. For example: Fx = FxR1, QuoteTime, g, 5000; FxR1, KafkaTime, l, 5000. Here, key represents the information cleaning key value, value can be a list separated by semicolons. This configuration includes two cleanings in total, both of which are FxR1 cleaning rules, and perform time window cleaning on QuoteTime and KafkaTime in the foreign exchange market respectively. l represents less than, and 5000 represents the threshold, with the unit of milliseconds, that is, the time difference between the system time and QuoteTime and KafkaTime cannot exceed 5 seconds.
[0105] In this embodiment, by establishing the corresponding relationship between the information cleaning key value and the adjusted information cleaning parameter, the corresponding cleaning rule template can be quickly located through the adjusted information cleaning parameter, and at the same time, the adjusted information cleaning parameter can also be located through the information cleaning key value, improving the information exchange efficiency in the system.
[0106] In one embodiment, as Figure 7 shown, input the target information cleaning rule into the information cleaning rule engine to obtain the information cleaning results corresponding to each business data record in the to-be-cleaned business information, including:
[0107] Step 702, compare the business data in each business data record in the to-be-cleaned business information with the information cleaning parameters corresponding to the target information cleaning rule.
[0108] Among them, the business data can be the data representing the specific situation in the business data record, and each business data can reflect the data available for cleaning in this business data record.
[0109] Specifically, traverse the business data in each business data record of the business information to be cleaned, extract one or more pieces of business data corresponding to each business data record, and compare these business data with the information cleaning parameters corresponding to the target information cleaning rules. The corresponding comparison can be that the type-A data in the business data is compared with the type-A data in the information cleaning parameters.
[0110] For example, there are 5 business data records in the business information to be cleaned, and each business data record contains 3 pieces of business data with data types A, B, and C respectively. Then, the business data in these business data records are compared with the information cleaning parameters A, B, and C corresponding to the target information cleaning rules according to the types.
[0111] Step 704, if the comparison results of any business data in the business data record with the information cleaning parameters all pass, output the information cleaning result corresponding to this business data record.
[0112] Specifically, if the comparison results obtained after comparing any business data corresponding to the business data record in the business information to be cleaned with the information cleaning parameters all pass, that is, any business data meets the range or threshold of the corresponding information cleaning parameters, output the information cleaning result corresponding to this business data record.
[0113] For example, if after comparing the business data A, B, and C corresponding to the business data record with the A, B, and C corresponding to the information cleaning parameters, the thresholds and ranges of the business data A, B, and C all meet the thresholds and ranges of the information cleaning parameters A, B, and C, output that the information cleaning result corresponding to this business data record passes.
[0114] Step 706, if any one of the comparison results of any business data in the business data record with the information cleaning parameters fails, delete the business data record corresponding to this business data.
[0115] Specifically, if any one of the comparison results obtained after comparing any business data corresponding to the business data record in the business information to be cleaned with the information cleaning parameters fails, that is, any business data fails to meet the range or threshold of the corresponding information cleaning parameters, delete the business data record corresponding to this business data.
[0116] For example, if after comparing the business data A, B, and C corresponding to the business data record with the A, B, and C corresponding to the information cleaning parameters, the thresholds and ranges of the business data A, B, and C fail to all meet the thresholds and ranges of the information cleaning parameters A, B, and C, delete the business data record corresponding to this business data.
[0117] In this embodiment, by comparing any business data in the business data record with the information cleaning parameters corresponding to the target information cleaning rule, business data records that do not conform to the target information cleaning rule can be cleaned, and business data records that conform to the target information cleaning rule can be retained, making the cleaning target clearer.
[0118] In one embodiment, for time-based cleaning rules and price-based cleaning rules, cleaning rules as shown in Figure 8 can be abstracted. Among them, the rule number is the unique index of the rule. According to this rule number, the corresponding cleaning rule is loaded. Different cleaning rules correspond to different parameters. Among them, the fields must all be fields in the name identifier, otherwise the cleaning rule is invalid. In addition, the comparison methods include greater than (g), less than (l), equal to (e), greater than or equal to (ge), less than or equal to (le), and not equal to (ne).
[0119] In one embodiment, it should be understood that the above-mentioned business information cleaning method is applicable to the cleaning of various business data records. The following uses the scenario of real-time cleaning of foreign exchange quotations by a bank as an example: The cleaning rules for foreign exchange quotations are templated, and the cleaning rules can be extended, realizing the execution of cleaning in a configuration-based form. When the business has a need to adjust the cleaning rules, the cleaning rules can be adjusted by adjusting the configuration items. In addition, the goal of quickly and conveniently adjusting the cleaning threshold can also be achieved through a configuration-based form. On this basis, the Apollo configuration center is introduced into the rule engine, and the cleaning rules to be executed are configured in the Apollo configuration center, and the goal of real-time modification of the cleaning rules can be achieved by adjusting the configuration of the quotation cleaning items in the configuration center. The processing flow is as shown in Figure 9 : 1. Adjust the cleaning rule configuration in the configuration center and publish the adjustment; 2. The rule engine reads the change in the cleaning rule, loads the new cleaning rule into the memory, and replaces the original cleaning rule; 3. The rule engine reads the updated cleaning rule from the memory and executes the cleaning.
[0120] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.
[0121] Based on the same inventive concept, an embodiment of the present application further provides a business information cleaning device for implementing the business information cleaning method involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the business information cleaning device provided below can refer to the limitations on the business information cleaning method in the above text, and will not be repeated here.
[0122] In one embodiment, as Figure 10 shown, a business information cleaning device is provided, including: a cleaning target acquisition module, a target information cleaning rule obtaining module, an information cleaning result obtaining module, and a post-cleaning business information obtaining module, where:
[0123] The cleaning target acquisition module 1002 is used to acquire the cleaning target corresponding to the business information to be cleaned; the cleaning target is determined according to the business cleaning requirements corresponding to the business information to be cleaned;
[0124] The target information cleaning rule obtaining module 1004 is used to determine a cleaning rule template matching the cleaning target from a preset set of cleaning rule templates, and adjust the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule;
[0125] The information cleaning result obtaining module 1006 is used to input the target information cleaning rule into an information cleaning rule engine; the information cleaning rule engine is used to perform information cleaning on the business information to be cleaned according to the target information cleaning rule to obtain the information cleaning result corresponding to each business data record in the business information to be cleaned; the information cleaning result is used to represent whether the corresponding business data record passes the cleaning conditions constituted by the target cleaning rules;
[0126] The post-cleaning business information obtaining module 1008 is used to use the business data records that pass the cleaning conditions in the business information to be cleaned as the post-cleaning business information.
[0127] In one of the embodiments, the target information cleaning rule obtaining module is used to extract the rule names corresponding to each cleaning rule template in the preset set of cleaning rule templates, and use them as the name identifiers corresponding to each cleaning rule template. The name identifier is used to represent the type of information cleaning parameters that each cleaning rule template can clean; obtain the cleaning type identifier corresponding to the cleaning target. The cleaning type identifier is used to represent the type of information cleaning data that the cleaning target needs to clean; traverse the type of information cleaning parameters corresponding to each cleaning rule template in the set of cleaning rule templates with the type of information cleaning data corresponding to the cleaning type identifier to determine the cleaning rule template matching the cleaning target.
[0128] In one embodiment, the target information cleaning rule obtaining module is further configured to, if the cleaning target fails to match the cleaning rule template, prompt to load a cleaning rule template that matches the information cleaning data type corresponding to the cleaning type identifier; based on the loaded cleaning rule template, use the information cleaning data type corresponding to the cleaning type identifier to check the information cleaning parameter type corresponding to the loaded cleaning rule template; if the check of the information cleaning parameter type passes, use the loaded cleaning rule template as the cleaning rule template that matches the cleaning target.
[0129] In one embodiment, the target information cleaning rule obtaining module is configured to determine the information cleaning parameters to be adjusted in the cleaning rule template according to the cleaning target; based on the business information to be cleaned, jointly adjust the information cleaning parameters to be adjusted according to the limitation conditions of the information cleaning parameters in the cleaning rule template to obtain the adjusted information cleaning parameters; if the adjusted information cleaning parameters exceed the adjustment range corresponding to the information cleaning parameters, modify the limitation conditions and then adjust the information cleaning parameters to obtain the target information cleaning rule.
[0130] In one embodiment, the target information cleaning rule obtaining module is further configured to obtain the information cleaning key value in the cleaning rule template, where the information cleaning key value represents the corresponding cleaning rule template in the preset cleaning rule template set; establish a corresponding relationship based on the adjusted information cleaning parameters and the information cleaning key value in the cleaning rule template.
[0131] In one embodiment, the information cleaning result obtaining module is configured to compare the business data in each business data record in the business information to be cleaned with the information cleaning parameters corresponding to the target information cleaning rule; if the comparison results of any business data in the business data record with the information cleaning parameters all pass, output the information cleaning result corresponding to the business data record; if any one of the comparison results of any business data in the business data record with the information cleaning parameters fails, delete the business data record corresponding to the business data.
[0132] Each module in the above business information cleaning device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0133] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11As shown in the figure. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store server data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a method for cleaning business information.
[0134] Those skilled in the art can understand that Figure 11 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0135] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0136] In one embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0137] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method embodiments.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0139] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0140] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0141] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limitations on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A business information cleaning method, characterized in that: The method comprises: Acquire a cleaning target corresponding to the business information to be cleaned; the cleaning target is determined based on the business cleaning requirements corresponding to the business information to be cleaned; Determining a cleaning rule template that matches the cleaning target from a preset cleaning rule template set, and adjusting information cleaning parameters in the cleaning rule template according to the cleaning target to obtain a target information cleaning rule; Inputting the target information cleaning rule into an information cleaning rule engine to obtain information cleaning results corresponding to each business data record in the business information to be cleaned; the information cleaning rule engine is used to clean the business information to be cleaned according to the target information cleaning rule; the information cleaning results are used to indicate whether the corresponding business data record passes the cleaning conditions formed by the target cleaning rule; In the business information to be cleaned, the business data that passes the cleaning conditions is recorded as the business information after cleaning; Determining a cleaning rule template that matches the cleaning target from a preset cleaning rule template set includes: extracting a rule name corresponding to each cleaning rule template in the preset cleaning rule template set and using the rule name as a name identifier corresponding to each cleaning rule template, wherein the name identifier is used to represent the type of information cleaning parameters that can be cleaned by each cleaning rule template; Acquire a cleaning type identifier corresponding to the cleaning target, wherein the cleaning type identifier is used to indicate the type of information cleaning data required to be cleaned for the cleaning target; Traversing the information cleaning data type corresponding to the cleaning type identifier through the information cleaning parameter types corresponding to the cleaning rule templates in the cleaning rule template set to determine a cleaning rule template that matches the cleaning target; The adjusting the information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule includes: determining the information cleaning parameters that need to be adjusted in the cleaning rule template according to the cleaning target; Based on the business information to be cleaned, jointly adjusting the information cleaning parameters that need to be adjusted according to the restriction conditions of the information cleaning parameters in the cleaning rule template to obtain adjusted information cleaning parameters; If the adjusted information cleaning parameter exceeds the adjustment range corresponding to the information cleaning parameter, the information cleaning parameter is adjusted again after modifying the restriction condition to obtain the target information cleaning rule.
2. The method according to claim 1, characterized in that After traversing the information cleansing data type corresponding to the cleaning type identifier through the information cleansing parameter types corresponding to the cleaning rule templates in the cleaning rule template set to determine the cleaning rule template that matches the cleaning target, the method further includes: If the cleaning target fails to match the cleaning rule template, a prompt is given to load the cleaning rule template that matches the information cleaning data type corresponding to the cleaning type identifier; Based on the loaded cleaning rule template, using the information cleaning data type corresponding to the cleaning type identifier to verify the information cleaning parameter type corresponding to the loaded cleaning rule template; If the information cleaning parameter type is checked to be passed, the loaded cleaning rule template is used as the cleaning rule template that matches the cleaning target.
3. The method according to claim 1, characterized in that After jointly adjusting the information cleaning parameters that need to be adjusted according to the restriction conditions of the information cleaning parameters in the cleaning rule template to obtain the adjusted information cleaning parameters, the method further includes: Acquire an information cleaning key value in the cleaning rule template, where the information cleaning key value represents a corresponding cleaning rule template in the preset cleaning rule template set; A corresponding relationship is established based on the adjusted information cleansing parameters and the information cleansing key values in the cleansing rule template.
4. The method according to claim 1, wherein Inputting the target information cleaning rule into the information cleaning rule engine to obtain the information cleaning result corresponding to each business data record in the business information to be cleaned includes: Comparing the business data in each business data record in the business information to be cleaned with the information cleaning parameters corresponding to the target information cleaning rule; If the comparison results between any business data in the business data record and the information cleaning parameters are both passed, outputting the information cleaning result corresponding to the business data record; If any item of the comparison result between any business data in the business data record and the information cleaning parameter fails, the business data record corresponding to the business data is deleted.
5. A business information cleaning device, characterized in that: The device comprises: A cleaning target acquisition module is used to acquire a cleaning target corresponding to the business information to be cleaned; the cleaning target is determined according to the business cleaning requirements corresponding to the business information to be cleaned; a target information cleaning rule obtaining module, configured to determine a cleaning rule template that matches the cleaning target from a preset cleaning rule template set, and adjust information cleaning parameters in the cleaning rule template according to the cleaning target to obtain the target information cleaning rule; An information cleaning result obtaining module is configured to input the target information cleaning rule into an information cleaning rule engine to obtain an information cleaning result corresponding to each business data record in the business information to be cleaned; the information cleaning rule engine is configured to perform information cleaning on the business information to be cleaned according to the target information cleaning rule; the information cleaning result is configured to indicate whether the corresponding business data record passes the cleaning condition formed by the target cleaning rule; A module for obtaining post-cleaning business information is configured to record business data that passes the cleaning conditions in the business information to be cleaned as post-cleaning business information; The target information cleaning rule obtaining module is specifically configured to extract a rule name corresponding to each cleaning rule template in the preset cleaning rule template set and use the rule name as a name identifier corresponding to each cleaning rule template, wherein the name identifier is used to represent the type of information cleaning parameters that can be cleaned by each cleaning rule template; Acquire a cleaning type identifier corresponding to the cleaning target, wherein the cleaning type identifier is used to indicate the type of information cleaning data required to be cleaned for the cleaning target; Traversing the information cleaning data type corresponding to the cleaning type identifier through the information cleaning parameter types corresponding to the cleaning rule templates in the cleaning rule template set to determine a cleaning rule template that matches the cleaning target; Determining the information cleaning parameters that need to be adjusted in the cleaning rule template according to the cleaning target; Based on the business information to be cleaned, jointly adjusting the information cleaning parameters that need to be adjusted according to the restriction conditions of the information cleaning parameters in the cleaning rule template to obtain adjusted information cleaning parameters; If the adjusted information cleaning parameter exceeds the adjustment range corresponding to the information cleaning parameter, the information cleaning parameter is adjusted again after modifying the restriction condition to obtain the target information cleaning rule.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Data cleaning method and data cleaning system
CN108363782A
A data cleaning method and device
CN109033274A