Data auditing method and device, equipment, storage medium and program product
By obtaining resource data and cost data in data audit, mining their association rules and establishing logical chains, the problem of lack of transparency and traceability of data management in traditional methods is solved, and more accurate data audit is achieved.
Patent Information
- Application Number
- CN202510185970.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-10
AI Technical Summary
In traditional methods, the lack of transparency and traceability in the management of resource data and expense data makes it difficult to systematically identify and track potential anomalies between resource data and related expenses, reducing the accuracy of data audits.
By obtaining resource data and expense data, mining the target correlation rules between them, establishing a target logical chain between resources and expenses, and reviewing them through preset verification rules based on the logical chain to obtain the target audit results.
Improve data transparency and traceability, accurately identify and track potential anomalies between resource data and related expenses, and improve the accuracy of data audits.
Smart Images

Figure CN120125166A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a data auditing method, apparatus, device, storage medium, and program product. Background Art
[0002] With the development of information technology, enterprises and organizations generate a large amount of operation data every day. For example, resource data and corresponding expense data, etc.; effectively managing and optimizing these operation data helps to reduce operation costs and improve management efficiency.
[0003] However, in traditional methods, the management of resource data and expense data is usually carried out in isolation, and the verification process for resource data and expense data lacks transparency and traceability, resulting in difficulty in systematically identifying and tracking potential anomalies between resource data and related expenses, and reducing the accuracy of data auditing. Summary of the Invention
[0004] The main purpose of this application is to provide a data auditing method, apparatus, device, storage medium, and program product, aiming to solve the technical problem of low accuracy of data auditing.
[0005] To achieve the above object, this application proposes a data auditing method, and the method includes:
[0006] Obtain resource data and expense data;
[0007] Mine the target association rules between the resource data and the expense data;
[0008] Based on the target association rules, establish a target logical chain between resources and expenses;
[0009] Based on the target logical chain, conduct auditing through preset verification rules to obtain a target auditing result.
[0010] In one embodiment, the step of establishing a target logical chain between resources and expenses based on the target association rules includes:
[0011] Based on the common fields in the resource data and the expense data, establish an initial logical chain;
[0012] Based on the target association rules, optimize the initial logical chain to obtain an optimized logical chain;
[0013] Divide the optimized logical chain into a target logical chain with multiple levels according to the resource type.
[0014] In one embodiment, the step of mining the target association rules between the resource data and the expense data includes:
[0015] Determine multiple initial item sets based on the field types in the resource data and cost data;
[0016] Calculate the first frequency of occurrence of each initial item set in the resource data and cost data;
[0017] Filter out the initial item sets with the first frequency less than the preset frequency threshold to obtain the first frequent item sets;
[0018] Mine the target association rules between the resource data and cost data based on the first frequent item sets.
[0019] In one embodiment, the step of mining the target association rules between the resource data and cost data based on the first frequent item sets includes:
[0020] Generate multiple candidate item sets through a join operation and a pruning operation based on the first frequent item sets;
[0021] Calculate the second frequency of occurrence of each candidate item set in the resource data and cost data;
[0022] Retain the candidate item sets with the second frequency greater than or equal to the preset frequency threshold, update the first frequent item sets, and return to the step of generating multiple candidate item sets through a join operation and a pruning operation based on the first frequent item sets until no new candidate item sets can be generated to obtain the second frequent item sets;
[0023] Mine the target association rules between the resource data and cost data based on the second frequent item sets.
[0024] In one embodiment, the step of mining the target association rules between the resource data and cost data based on the second frequent item sets includes:
[0025] Enumerate the non-empty proper subsets of each second frequent item set, use the target non-empty proper subset as the premise of the rule, and use the subset complementary to the target non-empty proper subset in the second frequent item set as the result of the rule to obtain the first association rules;
[0026] Calculate the confidence and lift of the first association rules;
[0027] Determine the target association rules between the resource data and cost data based on the confidence and lift.
[0028] In one embodiment, the preset verification rules include at least one of an integrity verification rule, a business compliance verification rule, and a logical consistency verification rule, and the target audit results include at least one of a first audit result, a second audit result, and a third audit result;
[0029] The step of performing an audit based on the target logic chain through a preset verification rule to obtain a target audit result includes at least one of the following:
[0030] Obtain work order data, and based on the target logic chain and the work order data, audit the integrity of resources through an integrity verification rule to obtain a first audit result;
[0031] Based on the target logic chain, verify the reasonableness of expenses through a business compliance verification rule to obtain a second audit result;
[0032] Audit the logical relationship of the target logic chain through a logical consistency verification rule to obtain a third audit result;
[0033] After the step of performing an audit based on the target logic chain through a preset verification rule to obtain a target audit result, it further includes:
[0034] When the target audit result is abnormal, issue a warning and prohibit the payment operation for the corresponding settlement work order.
[0035] In addition, to achieve the above object, the present application also proposes a data audit device, and the data audit device includes:
[0036] An acquisition module, configured to acquire resource data and expense data;
[0037] A mining module, configured to mine the target association rule between the resource data and the expense data;
[0038] A building module, configured to build a target logic chain between resources and expenses based on the target association rule;
[0039] An audit module, configured to perform an audit based on the target logic chain through a preset verification rule to obtain a target audit result.
[0040] In addition, to achieve the above object, the present application also proposes a data audit device, and the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the data audit method as described above.
[0041] In addition, to achieve the above object, the present application also proposes a storage medium, and the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the data audit method as described above.
[0042] In addition, to achieve the above object, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the data review method described above.
[0043] One or more technical solutions proposed by the present application have at least the following technical effects:
[0044] The present application obtains resource data and cost data; mines the target association rules between the resource data and the cost data, so as to more comprehensively understand the complex relationship between the resource data and the cost data; based on the target association rules, establishes a target logic chain between resources and costs, improving data transparency and traceability; based on the target logic chain, performs a review through a preset verification rule to obtain a target review result, and can accurately identify and track potential anomalies between the resource data and the related costs, improving the accuracy of data review. Description of the Drawings
[0045] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0046] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0047] Figure 1 It is a schematic flowchart provided for the first embodiment of the data review method of the present application;
[0048] Figure 2 It is a schematic diagram of the first scenario provided for the first embodiment of the data review method of the present application;
[0049] Figure 3 It is a schematic diagram of the second scenario provided for the first embodiment of the data review method of the present application;
[0050] Figure 4 It is a schematic diagram of the third scenario provided for the first embodiment of the data review method of the present application;
[0051] Figure 5 It is a schematic diagram of the fourth scenario provided for the first embodiment of the data review method of the present application;
[0052] Figure 6 It is a schematic diagram of the fifth scenario provided for the first embodiment of the data review method of the present application;
[0053] Figure 7Schematic flowchart provided for the second embodiment of the data review method of this application;
[0054] Figure 8 Schematic diagram of the sixth scenario provided for the second embodiment of the data review method of this application;
[0055] Figure 9 Schematic module structure diagram of the data review device according to the embodiment of this application;
[0056] Figure 10 Schematic device structure diagram of the hardware operating environment involved in the data review method according to the embodiment of this application.
[0057] The implementation, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0058] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0059] For a better understanding of the technical solutions of this application, the following will be described in detail with reference to the accompanying drawings of the specification and the specific implementation manners.
[0060] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a data review device, etc. that can implement the above functions. The following takes the data review device as an example to describe this embodiment and the following embodiments.
[0061] Based on this, the embodiment of this application provides a data review method, referring to Figure 1 , Figure 1 Schematic flowchart of the first embodiment of the data review method of this application.
[0062] In this embodiment, the data review method includes steps S10 to S40:
[0063] Step S10, obtaining resource data and cost data;
[0064] It should be noted that the data review device described in this embodiment can be subordinate to a data review device or a data review system, referring to Figure 2, the data review system includes a data collection and integration module. The data collection and integration module integrates multiple data collection interfaces or directly connects to a database to obtain data from different systems (such as a resource data system, a cost management system, a work order record system, etc.): Each data collection interface accesses the resource data system to automatically collect resource data from multiple data sources. Through multi-source data collection and efficient data integration, a comprehensive underlying resource database is established to ensure the comprehensiveness, consistency, and real-time nature of the data.
[0065] For example, obtain resource data from the resource data system in real time; obtain cost data from the cost management system; obtain work order data from the work order record system in real time.
[0066] To improve the subsequent data processing efficiency, the data collection and integration module can clean the data obtained from each data source, removing redundant data, error data, outlier detection, null value processing, and standardizing it into a unified format, etc.; further, to ensure that the data can be accurately identified and processed during the integration and analysis process, the data collection and integration module of this embodiment can also label the cleaned data. Specifically, it can label the data source, data type, and associated fields, etc.
[0067] Furthermore, since the resource data and cost data come from multiple different data sources and lack a unified data integration and management mechanism, the data analysis process is cumbersome and error-prone; to support subsequent analysis and processing, the data collection and integration module can also integrate the labeled data. The specific method of data integration can be: integrating the labeled data to form a unified resource database and cost database; using the resource database, cost database, and work order database as the underlying data warehouse, thereby providing a unified data view and access interface. The data tables corresponding to the resource database, cost database, and work order database can be expressed in the form of Table 1 below.
[0068] Table 1, Different Types of Data Tables
[0069]
[0070]
[0071] Step S20, mine the target association rules between the resource data and the cost data;
[0072] To more comprehensively understand the complex relationship between the resource data and the cost data, this embodiment can mine the target association rules between the resource data and the cost data through a preset algorithm. The target association rules are the association relationships between the data.
[0073] Among them, the preset algorithm can be the Apriori algorithm (a data mining algorithm), or the FP-Growth (Frequent Pattern Growth) algorithm, etc.; since the Apriori algorithm is relatively simple, easy to understand and implement, does not require constructing complex data structures, and each operation of the Apriori algorithm is very clear, a candidate item set is generated and the support degree is calculated in each iteration, with relatively high transparency and being conducive to data traceability, the preset algorithm is preferably the Apriori algorithm in this embodiment.
[0074] Step S30, based on the target association rule, establish a target logical chain between the construction resources and the cost;
[0075] Since the current management of resource data and cost data is usually carried out in isolation, and the verification process for resource data and cost data also lacks transparency and traceability, it is difficult to systematically identify and track potential anomalies between resource data and related costs. The logical chain construction module in the data audit system of this embodiment, based on the target association rule, establishes a target logical chain between the construction resources and the cost (refer to Figure 3 ), so that the use of each resource has a clear cost allocation, and this information is recorded, making all activities more visible and easier to track.
[0076] Specifically, the specific implementation manner of establishing a target logical chain between the construction resources and the cost based on the target association rule may be:
[0077] Based on the common fields in the resource data and cost data, establish an initial logical chain; based on the target association rule, optimize the initial logical chain to obtain an optimized logical chain; divide the optimized logical chain into a target logical chain with multiple levels according to the resource type.
[0078] First, by identifying the common fields in the resource data and cost data, the association between the preliminary resource entity and the cost can be automatically established; for example, based on the "computer room name" field, the system can automatically construct an initial logical chain between the computer room, the base station, and the annual maintenance cost of the base station, refer to Figure 2 ; based on fields such as project number, task code, and timestamp, the initial logical chain between the base station, the antenna, and the cost under a certain project can be automatically constructed, etc.
[0079] Furthermore, since the initial logical chain constructed only based on fields may have logical problems, in this embodiment, to ensure the accuracy and integrity of all association relationships in the logical chain, based on the target association rule mined between the resource data and cost data mentioned above, the initial logical chain is optimized to obtain an optimized logical chain.
[0080] Due to the relatively complex logical relationship between resource data and cost data, in order to display this logical relationship in a more intuitive and understandable way; in this embodiment, the optimized logical chain is divided into target logical chains with multiple levels according to resource types.
[0081] Specifically, a structured analysis algorithm can be used to dynamically generate a multi-level data logical chain for expressing the complex relationship between resources and costs, providing an intuitive visualization result for data analysis.
[0082] Among them, the structured analysis algorithm can be a decision tree analysis algorithm or a hierarchical clustering analysis algorithm, etc.; since the hierarchical clustering analysis algorithm can reveal the hierarchical relationship between data, and the hierarchical clustering analysis algorithm is obtained based on a series of consecutive pairwise merging or splitting operations, rather than relying on the initial random assignment, the visualization result obtained by the hierarchical clustering analysis algorithm is less likely to be affected by the initialization and is more stable.
[0083] Based on the hierarchical clustering analysis algorithm, the specific implementation of dividing the optimized logical chain into target logical chains with multiple levels according to resource types can be: according to the target association rule, the resource data is divided into multiple nodes according to resource types, and each node represents a hierarchical resource type (for example, resources such as computer rooms, base stations, and cells are each a level).
[0084] By using the above method, the relationship between the hierarchical structures of cost settlement from the basic equipment at the bottom layer (such as antennas and power supplies) to the base stations and computer rooms at the middle layer, and then to the sites or regions at the top layer can be expressed more clearly. Moreover, the association relationship between each node is divided based on the target association rule, ensuring the reliability of the target logical chain.
[0085] Step S40, based on the target logical chain, perform an audit through a preset verification rule to obtain a target audit result.
[0086] Since currently the rationality of costs is usually audited manually, the audit process is time-consuming and inefficient, difficult to meet the audit requirements of large-scale data, and prone to omissions or misjudgments, making it difficult to ensure the accuracy and timeliness of the audit results; in this embodiment, based on the target logical chain, an automated verification is performed through a preset verification rule to obtain a target audit result, which can improve the audit efficiency and accuracy.
[0087] Among them, the dynamic rule engine in the data audit system can verify situations such as data missing, data error, and data unreasonableness through preset verification rules, referring to Figure 3 ; specifically, the preset verification rule includes at least one of an integrity verification rule, a business compliance verification rule, and a logical consistency verification rule.
[0088] It should be noted that the preset verification rules can be fixed, or can be defined according to business requirements, or can be defined based on settlement rules; specifically, the dynamic rule engine provides flexible rule definition and dynamic verification capabilities, and users can adjust the settlement rules according to business requirements to ensure the rationality and compliance of data and fees; or they can also customize other verification rules according to their own business characteristics. For example, verify whether the actual coordinates of each base station are consistent with the planned coordinates, and verify whether the maintenance fees match the service quality, etc.
[0089] Among them, the custom rules can be flexibly set through the rule configuration tool provided by the system, including rule conditions, thresholds, warning methods, handling suggestions, etc. The verification rules defined by users can be multi-dimensional, such as multiple dimensions including data integrity, business compliance, and logical consistency.
[0090] Furthermore, the dynamic rule engine supports dynamic setting and verification of any field based on the preset verification rules. By auditing the logic chain of a certain field, the rationality of the fee settlement is determined to ensure the flexibility and intelligence of the logic chain.
[0091] In this embodiment, the anomaly detection and warning module in the data audit system will detect data anomalies in real time, provide accurate risk warnings and decision-making support, automatically compare resource data and fee data from multiple dimensions, timely discover and identify inconsistencies or anomalies in the fee report, provide real-time risk warnings and decision-making support, ensure the rationality and compliance of data and fees, and help operators save costs and prevent financial risks; specifically, the target audit results corresponding to the preset verification rules include at least one of the first audit result, the second audit result, and the third audit result.
[0092] Specifically, the step of obtaining the target audit result by auditing through the preset verification rules based on the target logic chain includes at least one of the following:
[0093] Obtain work order data, and based on the target logic chain and work order data, audit the integrity of resources through the integrity verification rules to obtain the first audit result;
[0094] Based on the target logic chain, verify the fee rationality through the business compliance verification rules to obtain the second audit result;
[0095] Audit the logical relationship of the target logic chain through the logical consistency verification rules to obtain the third audit result.
[0096] Among them, the integrity verification rules include information integrity rules. By means of the integrity verification rules, it is audited whether each node in the target logic chain contains all necessary information, ensuring that all necessary resource data have been recorded and associated to support cost settlement and resource management, thereby ensuring information integrity. For example, the integrity verification of resources in work order data can be: auditing the resources under the work order data to identify whether all necessary equipment entities are included, and auditing whether each paid computer room contains BBU, antenna, etc. according to the integrity verification rules. If it is found that a certain computer room has no associated equipment, the system will mark this computer room as abnormal and prompt for further verification and processing. Refer to Figure 4 。
[0097] The integrity verification rules also include resource association integrity rules. By means of the resource association integrity rules, it is audited whether each base station is associated with necessary resources such as antennas and computer rooms, and if any are missing, they are marked as abnormal. The integrity verification rules also include resource attribute integrity rules. By means of the resource attribute integrity rules, it is audited whether the key attributes of each resource are complete, such as base station name, longitude and latitude, tower height, etc., and if null values are found, they are marked as abnormal. The integrity verification rules also include cost record integrity rules. By means of the cost record integrity rules, it is audited whether each work order cost record contains key elements such as amount, occurrence date, associated resources, etc., and if any are omitted, they are marked as abnormal.
[0098] In addition, the compliance of cost settlement can also be verified based on business compliance verification rules, ensuring that cost settlement complies with the company's internal regulations and industry standards, avoiding unreasonable cost expenditures, and ensuring the rationality of costs. Among them, the business compliance verification rules include tariff standard compliance rules. By means of the tariff standard compliance rules, it is audited whether the rent, electricity fee, etc. of each site comply with the tariff standards, and if any deviation is found, it is marked as abnormal. For example, by means of the tariff standard compliance rules, the power of the equipment in the computer room is audited to verify the rationality of the electricity fee in reverse. If the system finds that the electricity fee does not match the equipment power, the system will generate an exception report and provide handling suggestions. Refer to Figure 5 。
[0099] The business compliance verification rules can also include settlement cycle compliance rules. By means of the settlement cycle compliance rules, it is audited whether the settlement cycle of each expense conforms to the agreement. For example, settlement is made monthly / quarterly / annually, and if any incorrect accounts are found, they are marked as abnormal. The business compliance verification rules can also include cost approval compliance rules. By means of the cost approval compliance rules, it is audited whether large expenses or non-routine expenses have gone through the approval process, and if any overstepping of authority is found, it is marked as abnormal.
[0100] In addition, the logical relationships between the nodes in the target logic chain can be audited based on the logical consistency verification rules to ensure the correctness and rationality of the logical relationships, and to avoid data association errors and business logic conflicts. For example, through the logical consistency verification rules, it can be audited whether each device is correctly associated with its superior node. If any logical inconsistency is found, a warning will be marked and a handling suggestion will be generated.
[0101] Among them, the logical consistency verification rules include the resource attribution consistency rule. Through the resource attribution consistency rule, it is audited whether the attribution relationships of resources are consistent. For example, whether a base station and a machine room belong to the same site. If a mismatch is found, an abnormality will be marked. The logical consistency verification rules also include the cost amount consistency rule. Through the cost amount consistency rule, it is audited whether the cost amount matches the traffic volume, device power, etc. For example, whether the electricity cost of a high-traffic base station is normal. If a deviation is found, an abnormality will be marked. The logical consistency verification rules also include the cost occurrence time consistency rule. Through the cost occurrence time consistency rule, it is audited whether the time of the cost record is within the life cycle of the resource. For example, whether a demolished site is still generating costs. If a time disorder is found, an abnormality will be marked, referring to Figure 6 .
[0102] Furthermore, after the step of obtaining the target audit result by auditing based on the preset verification rules based on the target logic chain, it can also be: when the target audit result is abnormal, a warning is issued and the payment operation for the corresponding settlement work order is prohibited; in this way, errors can be timely prevented, financial losses of the company can be avoided, and it is ensured that only transactions that meet the preset verification rules can continue, which helps to improve the accuracy and reliability of bill and payment processing.
[0103] In this embodiment, resource data and cost data are obtained; the target association rules between the resource data and the cost data are mined, so as to more comprehensively understand the complex relationship between the resource data and the cost data; specifically, the Apriori algorithm is used to mine the association rules from multi-source data, dynamically generate multi-level target logic chains, reveal the deep-level association relationships between the data, and improve the depth and accuracy of data analysis; based on the target association rules, a target logic chain between resources and costs is established to improve data transparency and traceability; based on the target logic chain, through preset verification rules for auditing, a target audit result is obtained, so that potential anomalies between the resource data and the relevant costs can be accurately identified and traced, the need for manual intervention is reduced, and the overall processing efficiency and the accuracy of data auditing are improved; specifically, users are allowed to define and adjust multi-dimensional verification rules according to actual business needs to comprehensively verify the integrity, business compliance, and logical consistency of the data; through the rule engine and the anomaly detection mechanism, abnormal data can be identified and marked in real time, and detailed anomaly reports and warning information are provided to help users correct data problems in a timely manner and prevent potential risks; the intelligent and automated level of resource data and cost data management is improved; and by providing real-time target audit results, the efficiency and accuracy of verification are improved.
[0104] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 7 , the above step S20 includes steps S01 to S04:
[0105] Step S01, determine a plurality of initial item sets based on the field types in the resource data and the cost data;
[0106] In this embodiment, in order to improve the accuracy of the mined association rules, the Apriori algorithm is used in this embodiment to mine the target association rules between the resource data and the cost data. Specifically, a plurality of initial item sets can be determined first based on the field types in the resource data and the cost data.
[0107] Specifically, the field types in the resource data and the cost data can be determined according to the annotations of each data table in the above-mentioned database. Different initial item sets C are extracted based on different field types. Refer to Figure 8 .
[0108] For example, according to the fields such as "site name", "base station name", "machine room name", "antenna name", "power supply name" in the resource data, the corresponding site table, base station table, machine room table, antenna table, power supply table, etc. of the resource data are respectively used as an initial item set.
[0109] Alternatively, the resource data table can be joined with the corresponding cost data table to generate an intermediate resource-cost table. For example, the base station table and the electricity cost table are joined according to the "base station ID" to obtain an intermediate "base station - electricity cost" table; multiple initial item sets are obtained.
[0110] Step S02: Calculate the first frequency of each initial item set in the resource data and the cost data.
[0111] Furthermore, by scanning the resource data and the cost data in the database for the first time, calculate the first frequency (item set support) of each initial item set in the resource data and the cost data.
[0112] For example, if "base station name = A" appears 800 times in 1000 base station records, then the first frequency of the item set corresponding to "base station name = A" is 80%.
[0113] Step S03: Filter the initial item sets with the first frequency less than the preset frequency threshold to obtain the first frequent item sets.
[0114] Among them, the preset frequency threshold can be 2% or 5%, etc. Setting the preset frequency threshold is to filter out the initial item sets with low support and only retain the frequent item sets with high support, thereby reducing the number of item sets and focusing on the associations between important data.
[0115] Specifically, filter the initial item sets with the first frequency less than the preset frequency threshold to obtain the first frequent item sets (itemset). Refer to Figure 8 , the support (sup) of the frequent item set of "cell name = C" is 1%.
[0116] Step S04: Based on the first frequent item sets, mine the target association rules between the resource data and the cost data.
[0117] Furthermore, based on the above-mentioned first frequent item sets that retain high support, the target association rules between the resource data and the cost data can be mined. For example, if {BBU name, hardware replacement cost} is the first frequent item set, then the association rule (association relationship) between "BBU name" and "hardware replacement payment" can be mined from it.
[0118] Among them, the specific implementation manner of mining the target association rules between the resource data and the cost data based on the first frequent item sets can be:
[0119] Based on the first frequent itemset, generate multiple candidate item sets through a join operation and a pruning operation; calculate the second frequency of each candidate item set appearing in the resource data and the cost data; retain the candidate item sets whose second frequency is greater than or equal to a preset frequency threshold, update the first frequent itemset, and return the step of generating multiple candidate item sets based on the first frequent itemset through a join operation and a pruning operation until no new candidate item sets can be generated, obtaining the second frequent itemset; based on the second frequent itemset, mine the target association rules between the resource data and the cost data.
[0120] Specifically, based on the first frequent itemset, multiple candidate item sets can be generated through a join operation and a pruning operation. For example, based on the frequent item sets {A, B} and {A, C}, the candidate item set {A, B, C} can be generated through a join operation. Additionally, the item sets generated by the join operation can be screened through a pruning operation. For example, if there is a candidate item set with one or more subsets that are non-frequent, it is considered that this candidate item set itself cannot be frequent, and thus it can be removed from the candidate set.
[0121] Furthermore, the second frequency of each candidate item set appearing in the resource data and the cost data can be calculated; the candidate item sets whose second frequency is greater than or equal to the preset frequency threshold are retained, the first frequent itemset is updated, and the database is scanned multiple times. Repeat the above steps of generating multiple candidate item sets based on the first frequent itemset through a join operation and a pruning operation; calculate the second frequency of each candidate item set appearing in the resource data and the cost data; retain the candidate item sets whose second frequency is greater than or equal to the preset frequency threshold until no new candidate item sets can be generated (for example, the join operation cannot be performed), obtaining the second frequent itemset, refer to Figure 8 。
[0122] It can be understood that based on the second frequent itemset with important information, the target association rules between the resource data and the cost data can be mined. For example, from the second frequent itemset {A, B, C, D}, the target association rules A → BCD, AB → CD, ABC → D, etc. can be mined.
[0123] Among them, the specific implementation manner of mining the target association rules between the resource data and the cost data based on the second frequent itemset can be:
[0124] Enumerate the non-empty proper subsets of each second frequent itemset, use the target non-empty proper subset as the premise of the rule, and use the subset complementary to the target non-empty proper subset in the second frequent itemset as the result of the rule, obtaining the first association rule; calculate the confidence and lift of the first association rule; based on the confidence and lift, determine the target association rules between the resource data and the cost data.
[0125] Specifically, non-empty proper subsets of each second most frequent itemset can be enumerated, and the target non-empty proper subset is used as the premise of the rule. For example, all non-empty proper subsets of the second most frequent itemset {A, B, C, D}, such as {A, B, C}, {A, B}, {A}, {A, B, D}, {A, C, D}, {B, C, D}, etc., are enumerated.
[0126] Furthermore, the target non-empty proper subset is used as the premise of the rule, and the subset complementary to the target non-empty proper subset in the second most frequent itemset is used as the result of the rule; where the target non-empty proper subset is any one of the above non-empty proper subsets. For example, taking the target non-empty proper subset {A, B, C} as the premise of the rule, and the subset complementary to the target non-empty proper subset (the remaining non-empty proper subsets other than the target non-empty proper subset) in the second most frequent itemset as the result of the rule, multiple first association rules are obtained, such as ABC→D, ABC→ACD, etc.
[0127] Furthermore, calculate the confidence and lift of the first association rule; based on the confidence and lift, determine the target association rule between the resource data and the cost data.
[0128] Among them, the calculation method of confidence can be: confidence = support / antecedent support; the calculation method of lift can be: lift = rule confidence / consequent support.
[0129] For example, the confidence of the rule A→B = rule(A&B) / rule(A); if the lift > 1, then it is considered that the first association rule is a valid rule, that is, the first association rule that satisfies the preset condition of the lift is used as the target association rule.
[0130] In this embodiment, the Apriori algorithm is used to mine the target association rule between the resource data and the cost data, so as to improve the accuracy of the mined association rule.
[0131] This application also provides a data review device. Please refer to Figure 9 The data review device includes:
[0132] An acquisition module 10, configured to acquire resource data and cost data;
[0133] A mining module 20, configured to mine the target association rule between the resource data and the cost data;
[0134] A building module 30, configured to build a target logical chain between resources and costs based on the target association rule;
[0135] An audit module 40, configured to perform an audit based on the target logical chain through a preset verification rule to obtain a target audit result.
[0136] In one embodiment, the establishing module 30 includes:
[0137] An establishing sub-module, configured to establish an initial logic chain based on common fields in the resource data and the cost data;
[0138] An optimizing sub-module, configured to optimize the initial logic chain based on the target association rule to obtain an optimized logic chain;
[0139] A dividing sub-module, configured to divide the optimized logic chain into a target logic chain with multiple levels according to the resource type.
[0140] In one embodiment, the mining module 20 includes:
[0141] A determining sub-module, configured to determine a plurality of initial item sets based on the field types in the resource data and the cost data;
[0142] A calculating sub-module, configured to calculate the first frequency of occurrence of each initial item set in the resource data and the cost data;
[0143] A filtering sub-module, configured to filter the initial item sets with the first frequency less than a preset frequency threshold to obtain a first frequent item set;
[0144] A mining sub-module, configured to mine the target association rule between the resource data and the cost data based on the first frequent item set.
[0145] In one embodiment, the mining sub-module includes:
[0146] A generating unit, configured to generate a plurality of candidate item sets based on the first frequent item set through a connection operation and a pruning operation;
[0147] A calculating unit, configured to calculate the second frequency of occurrence of each candidate item set in the resource data and the cost data;
[0148] An updating unit, configured to retain the candidate item sets with the second frequency greater than or equal to the preset frequency threshold, update the first frequent item set, and return the step of generating a plurality of candidate item sets based on the first frequent item set through a connection operation and a pruning operation until no new candidate item sets can be generated to obtain a second frequent item set;
[0149] A mining unit, configured to mine the target association rule between the resource data and the cost data based on the second frequent item set.
[0150] In one embodiment, the mining unit includes:
[0151] A generating subunit, configured to enumerate non-empty proper subsets of each second frequent item set, use a target non-empty proper subset as a premise of a rule, and use a subset complementary to the target non-empty proper subset in the second frequent item set as a result of the rule, so as to obtain a first association rule;
[0152] A calculating subunit, configured to calculate a confidence level and a lift of the first association rule;
[0153] A determining subunit, configured to determine a target association rule between the resource data and the expense data based on the confidence level and the lift.
[0154] In an embodiment, the preset verification rule includes at least one of an integrity verification rule, a service compliance verification rule, and a logical consistency verification rule, and the target audit result includes at least one of a first audit result, a second audit result, and a third audit result;
[0155] The audit module 40 includes at least one of the following:
[0156] A first audit sub-module, configured to obtain work order data, and based on the target logic chain and the work order data, audit the integrity of resources through an integrity verification rule to obtain a first audit result;
[0157] A second audit sub-module, configured to verify the expense rationality through a service compliance verification rule based on the target logic chain to obtain a second audit result;
[0158] A third audit sub-module, configured to audit the logical relationship of the target logic chain through a logical consistency verification rule to obtain a third audit result;
[0159] After the step of auditing based on the target logic chain through a preset verification rule to obtain a target audit result, the apparatus further includes:
[0160] An early warning module, configured to issue an early warning and prohibit a payment operation for a corresponding settlement work order when the target audit result is abnormal.
[0161] The data audit apparatus provided in this application adopts the data audit method in the above embodiment, and can solve the technical problem of low accuracy of data audit. Compared with the prior art, the beneficial effects of the data audit apparatus provided in this application are the same as those of the data audit method provided in the above embodiment, and other technical features in the data audit apparatus are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0162] The present application provides a data review device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein 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 execute the data review method in Embodiment 1 above.
[0163] Reference is made below Figure 10 , which shows a schematic structural diagram of a data review device suitable for implementing the embodiments of the present application. The data review device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, tablet computers, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 10 The data review device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0164] As Figure 10 shown, the data review device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can execute various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the data review device are also stored. The processing device 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 may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data review device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a data review device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be alternatively implemented or had.
[0165] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0166] The data review device provided by the present application adopts the data review method in the above-mentioned embodiment, and can solve the technical problem of low accuracy in data review. Compared with the prior art, the beneficial effects of the data review device provided by the present application are the same as those of the data review method provided by the above-mentioned embodiment, and other technical features in the data review device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0167] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0168] As described above, only the specific embodiments of the present application are provided, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0169] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the data review method in the above-mentioned embodiment.
[0170] The computer-readable storage medium provided by the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0171] The above computer-readable storage medium may be included in the data review device; or it may exist separately without being assembled into the data review device.
[0172] The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by the data review device, the data review device is caused to: execute the above data review method.
[0173] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0175] The modules described in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0176] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above data review method, which can solve the technical problem of low accuracy of data review. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the data review method provided by the above embodiments, and will not be elaborated here.
[0177] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the data review method as described above.
[0178] The computer program product provided by the present application can solve the technical problem of low accuracy of data review. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the data review method provided by the above embodiments, and will not be elaborated here.
[0179] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A data audit method, characterized in that: The method includes: Obtain resource data and cost data; mining target association rules between the resource data and the cost data; Based on the target association rule, a target logic chain between construction resources and costs is established; Based on the target logic chain, an audit is performed through preset verification rules to obtain a target audit result.
2. The method according to claim 1, characterized in that The step of establishing a target logic chain between resources and costs based on the target association rule includes: Establishing an initial logical chain based on common fields in the resource data and the cost data; Based on the target association rule, the initial logic chain is optimized to obtain an optimized logic chain; The optimized logic chain is divided into target logic chains with multiple levels according to resource types.
3. The method according to claim 1, characterized in that The step of mining the target association rules between the resource data and the cost data comprises: Determining a plurality of initial item sets based on field types in the resource data and cost data; Calculate the first frequency of each initial item set appearing in the resource data and the cost data; Filter the initial item sets whose first frequency is less than the preset frequency threshold to obtain the first frequent item sets; Based on the first frequent itemsets, target association rules between the resource data and the cost data are mined.
4. The method according to claim 3, characterized in that The step of mining target association rules between the resource data and the cost data based on the first frequent item set includes: Based on the first frequent itemset, multiple candidate itemsets are generated through connection operations and pruning operations; Calculate the second frequency of each candidate item set appearing in the resource data and the cost data; retaining the candidate item sets whose second frequency is greater than or equal to the preset frequency threshold, updating the first frequent item set, and returning to the step of generating multiple candidate item sets based on the first frequent item set through connection operations and pruning operations until no new candidate item sets can be generated, thereby obtaining the second frequent item set; Based on the second frequent itemsets, target association rules between the resource data and the cost data are mined.
5. The method according to claim 4, characterized in that The step of mining target association rules between the resource data and the cost data based on the second frequent item set includes: Enumerate the non-empty true subsets of each second frequent item set, and use the target non-empty true subset as the premise of the rule, and use the subset of the second frequent item set that is complementary to the target non-empty true subset as the result of the rule, to obtain a first association rule; Calculating the confidence and lift of the first association rule; Based on the confidence and lift, a target association rule between the resource data and the cost data is determined.
6. The method according to claim 1, characterized in that The preset verification rule includes at least one of an integrity verification rule, a business compliance verification rule, and a logical consistency verification rule, and the target audit result includes at least one of a first audit result, a second audit result, and a third audit result; The step of performing audit based on the target logic chain by using preset verification rules to obtain the target audit result includes at least one of the following: Acquire work order data, and based on the target logic chain and the work order data, audit the integrity of the resource through integrity verification rules to obtain a first audit result; Based on the target logic chain, the rationality of the expenses is verified through business compliance verification rules to obtain a second audit result; Reviewing the logical relationship of the target logical chain through a logical consistency check rule to obtain a third review result; After the step of performing audit based on the target logic chain by using preset verification rules to obtain the target audit result, the method further includes: When the target audit result is abnormal, an early warning is issued and the payment operation for the corresponding settlement work order is prohibited.
7. A data audit device, characterized in that: The device comprises: An acquisition module, used to acquire resource data and cost data; A mining module, used for mining target association rules between the resource data and the cost data; An establishing module, used for establishing a target logic chain between construction resources and costs based on the target association rule; The audit module is used to perform audit based on the target logic chain through preset verification rules to obtain the target audit result.
8. A data audit device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data audit method according to any one of claims 1 to 6.
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, the steps of the data audit method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data audit method according to any one of claims 1 to 6 are implemented.