Method, device and equipment for checking salary calculation result based on clustering algorithm
Through the clustering algorithm method, the abnormal points in the salary calculation results are identified, and the problems of low efficiency and poor accuracy of the salary calculation results in the existing technology are solved, and the rapid and accurate abnormal identification and automated verification process are realized. Reduced labor costs.
Patent Information
- Application Number
- CN202411104918.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-19
AI Technical Summary
The verification method for the calculation results of salary calculations in the prior art is single, and the inspection granularity is coarse, and the abnormal results in the calculation data cannot be accurately identified and quickly positioned, resulting in low recognition efficiency and high labor costs.
Using a clustering algorithm-based method, the baseline and clustering models to be detected are constructed by obtaining historical and to-calculate salary data, and the baseline time sliding window mechanism and density clustering are used to identify historical comparisons and abnormal points in the same batch. Implement automated verification process.
It realizes the rapid and accurate identification of abnormal points of salary calculation results, reduces labor costs, improves identification efficiency, and reduces the dependence of manual accounting through machine learning.
Smart Images

Figure CN118982332A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of data processing technology, and in particular to a method, device and equipment for verifying salary calculation results based on a clustering algorithm. Background Art
[0002] With the rapid development of the financial technology field, in order to assist enterprises in digital transformation and reduce their operating costs, the intelligent salary calculation business helps enterprises integrate salary payment, personnel, finance, leave and other functions into one, which has brought great convenience to the salary calculation and statistics of various enterprises. Intelligent salary calculation is mainly through setting employees' salary file data, synchronizing attendance and other information, manually importing employees' floating salary item data, and finally obtaining the final amount of payable wages through the corresponding calculation formula set by the user. However, in the salary calculation process, due to the involvement of human factors, such as deviations in the manual import of floating data, incorrect formula settings and modifications, etc., the salary calculation results may have large errors, which will bring certain risks of economic losses to enterprises or employees.
[0003] The existing technology pays more attention to the optimization of the salary calculation process, and less attention to the verification of the salary calculation results. For the verification of salary calculation results, the existing mainstream solutions are relatively simple, mainly through manual comparison and calculation, that is, the salary item data of each person in the salary table is checked one by one, and the financial staff performs a second manual calculation to ensure that the salary calculation results are correct. Some intelligent salary calculation tools will provide a rule setting method for simple salary item verification, that is, setting a maximum threshold and a minimum threshold for each salary item to limit the reasonable range of the salary item. The above-mentioned salary calculation result verification method is relatively simple, and the verification granularity is relatively coarse. It is impossible to discover potential data relationships from the existing salary calculation data, and it is difficult to accurately identify and quickly locate abnormal results.
[0004] At present, there is an urgent need for an intelligent salary calculation result verification method based on clustering algorithm, which can accurately infer the abnormal points of salary calculation result verification, so as to achieve the purpose of quickly and accurately identifying abnormal results and improve the user experience of financial salary calculation services. Summary of the invention
[0005] In order to solve the problem of poor universality and low accuracy of product recommendation methods in the prior art, the embodiments of this specification provide a method, device and equipment for verifying salary calculation results based on clustering algorithms, which can quickly verify abnormal salary calculation results from different levels, and generate comprehensive salary calculation result verification results based on historical comparison of abnormal points and abnormal points in the same batch, and issue timely warnings to help users quickly locate and troubleshoot abnormal salary calculation data. At the same time, the automated verification process is realized through machine learning related algorithms, which greatly reduces labor costs and improves recognition efficiency. The specific technical solutions of the embodiments of this specification are as follows:
[0006] On the one hand, the embodiments of this specification provide a method for verifying salary calculation results based on a clustering algorithm, including:
[0007] Obtain historical salary calculation data, and use each salary calculation item and salary calculation result in the historical salary calculation data as a feature dimension of the algorithm to construct a historical baseline data sample;
[0008] Filtering the historical baseline data samples based on a baseline time sliding window mechanism, and constructing a historical baseline data set according to the filtered historical baseline data samples;
[0009] Obtain the salary calculation data to be verified in the same batch, and select the same dimensional features as the historical baseline data set to construct a test data set to be verified;
[0010] Constructing a salary calculation result clustering model training algorithm, using the historical baseline data set and the test data set to be verified for training, and generating a baseline clustering model and a clustering model to be tested respectively;
[0011] Classify each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and mark the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point;
[0012] The test data set to be verified is clustered around the cluster model to be detected, and the salary calculation data to be verified that does not belong to any cluster is found and marked as outliers in the same batch;
[0013] The historical comparison anomaly points and the anomaly points in the same batch are sorted to generate a verification result of the salary calculation result.
[0014] Furthermore, obtaining historical salary calculation data, and using each salary calculation item and salary calculation result in the historical salary calculation data as a characteristic dimension of the algorithm to construct a historical baseline data sample further includes:
[0015] Obtaining the attributes of each salary calculation item and the mean and standard deviation of the attribute in the historical salary calculation data;
[0016] Standardizing and mapping the historical salary calculation data according to the mean and standard deviation to eliminate the impact of dimensional differences between attributes of various salary calculation items;
[0017] A historical baseline data sample is constructed based on the salary calculation item attributes after the standardized mapping and the salary calculation results as the characteristic dimensions of the algorithm.
[0018] Further, obtaining the salary calculation data to be verified of the same batch, selecting the same dimensional features as the historical baseline data set to construct the test data set to be verified further includes:
[0019] Standardizing and mapping the attributes of each salary calculation item in the salary calculation result data to be verified, so that the mapping scale of each salary calculation item in the salary calculation result data to be verified is consistent with the scale of the historical baseline data set;
[0020] The salary calculation result data to be verified is processed according to the mapping scales of the salary calculation items to construct the test data set to be verified.
[0021] Furthermore, the training algorithm for constructing the salary calculation result clustering model further includes:
[0022] Density clustering is performed based on data samples, and multiple salary relationship cluster core object sets of arbitrary spatial shapes are formed using Euclidean distance as a scale;
[0023] Set the neighborhood radius parameter ε and the minimum number of neighborhood samples threshold MinPts; construct the initial core object set Ω as an empty set, and calculate the value of any sample x in the historical baseline data sample D in turn. j With the rest of the samples x i The Euclidean distance, assuming that the sample space is an n-dimensional real vector The distance formula is:
[0024]
[0025] For vector x j , whose ε-neighborhood consists of the samples in the set D that are related to x j The distance between N and ε is not greater than the sample data, that is, it satisfies the formula: ε (x j )={x i ∈D|dist(x i ,x j )≤ε}
[0026] For each sample, if the number of samples in its ε-neighborhood is not less than MinPts, the sample is called a core object, that is, the core object meets the following formula requirements:
[0027] |N ε (x j )|≥MinPts
[0028] Add all the core objects in the salary calculation sample set to the core object set Ω and obtain the core object model model = Ω.
[0029] Furthermore, using the historical baseline data set and the test data set to be verified for training to generate a baseline clustering model and a clustering model to be tested respectively further includes:
[0030] The historical baseline data set is calculated by the clustering model training algorithm to construct the baseline clustering model model1=Ω1, which includes all core objects after density clustering of the historical baseline data set;
[0031] The data set to be tested is calculated by the clustering model training algorithm to construct the clustering model model2=Ω2 to be tested, which includes all the core objects after the density clustering of the test data set to be verified.
[0032] Furthermore, sorting the historical comparison anomaly points and the anomaly points in the same batch further includes:
[0033] When the core object set of the baseline clustering model Then the baseline reasoning process will not be carried out and the reasoning analysis of abnormal results in the same batch will prevail;
[0034] When the core object set of the baseline clustering model When , the historical baseline anomaly inference is performed through its cohesive data features to generate the historical comparison anomaly point.
[0035] On the other hand, the embodiment of this specification also provides a salary calculation result verification device based on a clustering algorithm, the device comprising:
[0036] A historical sample acquisition unit, used to acquire historical salary calculation data, and to construct a historical baseline data sample using each salary calculation item and salary calculation result in the historical salary calculation data as a feature dimension of the algorithm;
[0037] A historical baseline acquisition unit, used for filtering the historical baseline data samples by a baseline time sliding window mechanism, and constructing a historical baseline data set according to the filtered historical baseline data samples;
[0038] A test data set acquisition unit to be verified is used to acquire the salary calculation data to be verified of the same batch, and select the same dimensional features as the historical baseline data set to construct the test data set to be verified;
[0039] A training algorithm construction unit, used to construct a salary calculation result clustering model training algorithm, using the historical baseline data set and the to-be-verified test data set for training, to generate a baseline clustering model and a to-be-verified clustering model respectively;
[0040] A historical abnormal point comparison unit, used for classifying each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and marking the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point;
[0041] The same batch abnormal point comparison unit is used to perform same batch data clustering processing on the test data set to be verified around the clustering model to be detected, and find out the salary calculation data to be verified that does not belong to any cluster and mark them as the same batch abnormal points;
[0042] The verification result generating unit is used to sort the historical comparison abnormal points and the abnormal points in the same batch to generate a verification result of the salary calculation result.
[0043] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, and the processor implements the above method when executing the computer program.
[0044] On the other hand, an embodiment of the present specification further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0045] Finally, the embodiments of this specification also provide a computer program product, wherein the computer program product includes a computer program, and the computer program implements the above method when executed by a processor.
[0046] By using the embodiments of this specification, a verification solution is provided for abnormal salary calculation results caused by factors such as inaccurate salary calculation item data and deviations in the formulas in the salary calculation process. This solution obtains historical salary calculation data and the salary calculation data to be verified in the same batch and performs the same preprocessing respectively, so as to discover the potential connection between the salary calculation results and various attributes; then, based on the baseline time sliding window mechanism, the historical baseline data samples are filtered, and the salary calculation result clustering model training algorithm is constructed to generate the baseline clustering model and the clustering model to be tested respectively; then, the salary calculation data to be verified in the same batch are clustered and compared horizontally, and the salary calculation data to be verified that does not belong to any cluster is marked as the same batch abnormal points; and the salary calculation data to be verified is clustered and compared vertically with the historical baseline to mark the verified salary calculation data that does not belong to any cluster as the historical comparison abnormal points; from two perspectives, the outliers after clustering are discovered as abnormal data points, and the abnormal salary calculation results are quickly verified from different levels. Finally, the historical comparison abnormal points and the abnormal points in the same batch are sorted, and the verification results of the salary calculation results are generated, and timely warnings are issued to help users quickly locate and troubleshoot abnormal salary calculation data. At the same time, the automatic verification process is realized through machine learning related algorithms, which greatly reduces labor costs and improves recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 It is a schematic diagram of an implementation system of a salary calculation result verification method based on a clustering algorithm in an embodiment of this specification;
[0049] Figure 2 The figure is a flow chart of a salary calculation result verification method based on a clustering algorithm in an embodiment of the present specification;
[0050] Figure 3 The figure shows a flow chart of constructing a historical baseline data sample using the salary calculation items and salary calculation results in the historical salary calculation data as feature dimensions of the algorithm in an embodiment of the present specification;
[0051] Figure 4 It is a schematic diagram showing data filtering of the historical baseline data samples based on the baseline time sliding window mechanism in an embodiment of this specification;
[0052] Figure 5 The figure shows a flow chart of selecting the same dimensional features as the historical baseline data set to construct a test data set to be verified in an embodiment of the present specification;
[0053] Figure 6 It is a schematic diagram of the process of generating a baseline clustering model and a clustering model to be tested respectively in the embodiment of this specification;
[0054] Figure 7 FIG. 1 is a schematic diagram showing a specific structure of a salary calculation result verification device based on a clustering algorithm according to an embodiment of the present invention;
[0055] Figure 8 The figure shows a schematic diagram of the structure of a computer device in an embodiment of the present specification.
[0056]
Description of reference numerals
[0057] 101. Terminal;
[0058] 102. Server;
[0059] 701, historical sample acquisition unit;
[0060] 702. Historical baseline acquisition unit;
[0061] 703, a unit for acquiring a test data set to be verified;
[0062] 704. Training algorithm building unit;
[0063] 705. Historical abnormal point comparison unit;
[0064] 706. Abnormal point comparison unit of the same batch;
[0065] 707, verification result generating unit;
[0066] 802. Computer equipment;
[0067] 804. Processing equipment;
[0068] 806. Storage resources;
[0069] 808, drive system;
[0070] 810, input / output module;
[0071] 812. Input device;
[0072] 814. Output device;
[0073] 816. Presentation equipment;
[0074] 818. Graphical user interface;
[0075] 820, network interface;
[0076] 822, communication link;
[0077] 824. Communication bus. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of this specification.
[0079] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0080] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of the embodiments of this specification comply with the relevant provisions of national laws and regulations.
[0081] It should be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0082] like Figure 1 The diagram shows a schematic diagram of a system for implementing a salary calculation result verification method based on a clustering algorithm in an embodiment of the specification, including a terminal 101 and a server 102. The terminal 101 and the server 102 can communicate through a network, and the network can include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and is connected to a website, a user device (such as a computing device), and a back-end system. Optionally, the server 102 can be a node of a cloud computing system, or each server can be a separate cloud computing system, including multiple computers interconnected by a network and working as a distributed processing system.
[0083] Terminal 101 obtains salary calculation data, and sends each salary calculation item and salary calculation result therein to server 102. Server 102 uses the stored pre-trained baseline time sliding window mechanism and salary calculation result clustering model training algorithm to perform calculations, obtains salary calculation result anomalies, and recommends the salary calculation result verification result to the user through terminal 101.
[0084] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the embodiment of this specification. In actual application, other application environments may also be included, and this specification does not limit it.
[0085] In response to the problems existing in the prior art, the embodiments of this specification provide a salary calculation result verification method based on a clustering algorithm. Through horizontal clustering comparison of the salary calculation data to be verified in the same batch, and vertical clustering comparison of the salary calculation data to be verified with the historical baseline, the outliers after clustering are discovered to be abnormal data points, and abnormal salary calculation results are quickly verified from different levels, timely warnings are issued, and users are helped to quickly locate and troubleshoot abnormal salary calculation data.
[0086] Figure 2 The figure shows a flow chart of the method for verifying the salary calculation result based on the clustering algorithm in the embodiment of this specification. The figure describes the process of verifying the salary calculation result based on the clustering algorithm. The order of steps listed in the embodiment is only one way of executing the steps among many steps, and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel.
[0087] Specific as Figure 2 As shown, the method may include:
[0088] Step 201: Acquire historical salary calculation data, and use the salary calculation items and salary calculation results in the historical salary calculation data as feature dimensions of the algorithm to construct a historical baseline data sample;
[0089] Step 202: filtering the historical baseline data samples based on the baseline time sliding window mechanism, and constructing a historical baseline data set according to the filtered historical baseline data samples;
[0090] Step 203: Obtain the salary calculation data to be verified in the same batch, and select the same dimensional features as the historical baseline data set to construct a test data set to be verified;
[0091] Step 204: constructing a salary calculation result clustering model training algorithm, using the historical baseline data set and the test data set to be verified for training, and generating a baseline clustering model and a clustering model to be tested respectively;
[0092] Step 205: classify each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and mark the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point;
[0093] Step 206: clustering the to-be-verified test data set around the to-be-detected clustering model to find out the to-be-verified salary calculation data that does not belong to any cluster and mark them as outliers in the same batch;
[0094] Step 207: Sort the historical comparison anomaly points and the anomaly points in the same batch to generate a verification result of the salary calculation result.
[0095] By using the embodiments of this specification, a verification solution is provided for abnormal salary calculation results caused by factors such as inaccurate salary calculation item data and deviations in the formulas in the salary calculation process. This solution obtains historical salary calculation data and the salary calculation data to be verified in the same batch and performs the same preprocessing respectively, so as to discover the potential connection between the salary calculation results and various attributes; then, based on the baseline time sliding window mechanism, the historical baseline data samples are filtered, and the salary calculation result clustering model training algorithm is constructed to generate the baseline clustering model and the clustering model to be tested respectively; then, the salary calculation data to be verified in the same batch are clustered and compared horizontally, and the salary calculation data to be verified that does not belong to any cluster is marked as the same batch abnormal points; and the salary calculation data to be verified is clustered and compared vertically with the historical baseline to mark the verified salary calculation data that does not belong to any cluster as the historical comparison abnormal points; from two perspectives, the outliers after clustering are discovered as abnormal data points, and the abnormal salary calculation results are quickly verified from different levels. Finally, the historical comparison abnormal points and the abnormal points in the same batch are sorted, and the verification results of the salary calculation results are generated, and timely warnings are issued to help users quickly locate and troubleshoot abnormal salary calculation data. At the same time, the automatic verification process is realized through machine learning related algorithms, which greatly reduces labor costs and improves recognition efficiency.
[0096] In the embodiments of this specification, in order to address the pain points of the traditional manual verification method of salary calculation results, which is inefficient, has high labor costs, and is difficult to quickly locate abnormal results, it is proposed to select characteristic data that potentially affects salary calculation and final salary calculation results as features to build an algorithm model. The salary items that need to be considered in the salary calculation process specifically include multi-dimensional attributes such as job grade, length of service, salary data items in salary files, attendance days, personal taxes, and payable wages. The application in this scenario can help enterprises or employees avoid unnecessary economic losses and greatly enhance the interactive experience of financial personnel in related salary and financial services.
[0097] According to one embodiment of this specification, Figure 3 As shown, the steps of obtaining historical salary calculation data and using the salary calculation items and salary calculation results in the historical salary calculation data as feature dimensions of the algorithm to construct a historical baseline data sample include:
[0098] Step 301: Obtain the attributes of each salary calculation item and the mean and standard deviation of the attribute in the historical salary calculation data;
[0099] Step 302: performing standard mapping on the historical salary calculation data according to the mean and standard deviation to eliminate the impact of dimensional differences between attributes of various salary calculation items;
[0100] Step 303: Construct a historical baseline data sample based on the salary calculation item attributes and salary calculation results after the standardized mapping as the characteristic dimensions of the algorithm.
[0101] In the embodiments of the present specification, multi-dimensional feature selection is performed from normal historical salary calculation result data, and the salary calculation items and salary calculation results of the intelligent salary calculation are used as the feature dimensions of the algorithm, which may specifically include attributes such as job grade, length of service, salary data items in the salary file, attendance days, personal tax items, and payable salary; then the selected feature dimensions are preprocessed. Because different attributes have different dimensions, the difference in dimensions has a great impact on the calculation results, so it is necessary to standardize each attribute to eliminate the impact of dimensional differences; according to the preprocessed data samples, a historical baseline data sample is constructed.
[0102] Specifically, the z-score method is used for numerical scalar attributes to perform standardized mapping; for ordinal attributes such as job levels, this solution uses a numerical mapping method to first convert the ordinal values into scalar data in ascending order, and then perform normalization processing:
[0103] First, for each numerical scalar attribute, obtain the mean and standard deviation of the attribute in the salary calculation history dataset:
[0104] The attributes x1,x2,...,x in the original sample set n Standardization is performed, assuming that the sample mean is The sample standard deviation is s.
[0105] Through the z-score method, the standardized processing mapping is performed, and the formula is:
[0106]
[0107] Among the elements of the sequence, i represents the ordinal number of the i-th element. i Represents the original value before standardization, y i Indicates the value after the normalization formula. n Represents the original value of the last element, y n Represents the last standardized value. Mapped into a new sample sequence y1, y2, ..., y n is dimensionless data with a variance of 1 and a mean of 0. Standardize each numerical scalar attribute to reduce the impact of the data dimension on the recognition result; then for ordinal attributes such as job level, first use r to convert the ordinal attribute value into a value according to the potential ordinal relationship from small to large. if ∈{1,2,...,M f} value to replace it, converting it from 1 to M f Multiple numbers are then normalized using the z-score method to eliminate the impact of dimension, thereby constructing a historical baseline data sample.
[0108] According to an embodiment of this specification, as time goes by, due to the influence of internal and external factors such as business conditions and salary strategy adjustments, the reference value and significance of historical salary calculation result data for current salary calculation verification gradually decreases. Therefore, in order to implement the baseline time sliding window mechanism, such as Figure 4 As shown, it is also necessary to filter the historical baseline data samples based on the baseline time sliding window mechanism, and construct a historical baseline data set based on the filtered historical baseline data samples. The user can set the time sliding window size according to the characteristics of the enterprise. At each specific time point, the time sliding window will be shifted to the right to the latest current time point, and the sliding window will be used as a scale to filter and select the salary calculation result data within the window from the historical baseline data set as valid data for training. Figure 4 As shown in the figure, at time T, windows of stages 2, 3, and 4 are selected, and as time goes by, they are updated to T+1, and the sliding windows are also updated to 3, 4, and 5, so as to ensure that the selected time windows are always the latest. At the same time, users can also dynamically adjust the sliding window size according to specific circumstances to improve the reliability of the timeliness of baseline verification, thereby constructing a historical baseline data set.
[0109] According to one embodiment of this specification, Figure 5 As shown, obtaining the same batch of salary calculation data to be verified, selecting the same dimensional features as the historical baseline data set to construct a test data set to be verified further includes:
[0110] Step 501: Standardize and map the attributes of each salary calculation item in the salary calculation result data to be verified, so that the mapping scale of each salary calculation item in the salary calculation result data to be verified is consistent with the scale of the historical baseline data set;
[0111] Step 502: Process the salary calculation result data to be verified according to the salary calculation item mapping scales to construct the test data set to be verified.
[0112] When constructing the data set to be verified, for the same batch of salary calculation result data to be verified, the same dimensional features as the historical baseline data set are selected, and the z-score algorithm is used to perform standardized mapping for each attribute. The mapping scales such as the mean and standard deviation of each attribute are kept consistent with the scales of the historical baseline data set, thereby eliminating the impact differences of different dimensions.
[0113] According to one embodiment of the present specification, in order to obtain a clustering model, constructing a salary calculation result clustering model training algorithm further includes:
[0114] Based on the baseline data samples, density clustering is performed to form multiple salary relationship cluster core object sets of arbitrary spatial shapes using Euclidean distance as the scale;
[0115] Set the neighborhood radius parameter ε and the minimum number of neighborhood samples threshold MinPts; construct the initial core object set Ω as an empty set, and calculate the value of any sample x in the historical baseline data sample D in turn. j With the rest of the samples x i The Euclidean distance, assuming that the sample space is an n-dimensional real vector The distance formula is:
[0116]
[0117] Among them, for the vector x j , whose ε-neighborhood consists of the samples in the set D that are related to x j The distance between N and ε is not greater than the sample data, that is, it satisfies the formula: ε (x j )={x i ∈D|dist(x i ,x j )≤ε}, for each sample, if the number of samples in its ε-neighborhood is not less than MinPts, then the sample is called a core object, that is, the core object meets the following formula requirements:
[0118] |N ε (x j )|≥MinPts
[0119] Add all the core objects in the salary calculation sample set to the core object set Ω and obtain the core object model model = Ω.
[0120] In the embodiment of this specification, after constructing the salary calculation result clustering model training algorithm, it is necessary to train the historical baseline data set and the test data set to be verified, such as Figure 6 As shown, a baseline clustering model and a clustering model to be tested are generated respectively.
[0121] Step 601: Calculate the historical baseline data set through the clustering model training algorithm to construct the baseline clustering model model1=Ω1, which includes all core objects after density clustering of the historical baseline data set;
[0122] Step 602: Calculate the data set to be tested by the clustering model training algorithm to construct the clustering model model2=Ω2 to be tested, which includes all the core objects after density clustering of the test data set to be verified.
[0123] Specifically, the DBSCAN algorithm idea is adopted to construct a salary calculation result clustering model trainer. The salary calculation sample data is density clustered, and the Euclidean distance is used as the scale to form multiple salary relationship cluster core object sets of arbitrary spatial shapes according to the enterprise salary calculation result data. Finally, the baseline clustering model and the clustering model to be tested are generated by the model trainer for the historical baseline data set and the test data set to be verified. Then the historical baseline abnormal result reasoning is performed, that is, the test data set and the baseline clustering model are used for abnormal clustering reasoning. By comparing the distance between each test data of the test data set and the core object of the baseline clustering model, the cluster to which it belongs is determined, and the salary calculation data to be tested that does not belong to any cluster is found, which is the historical comparison abnormal point; the distance between each abnormal point and its nearest core object is measured as the abnormal distance of the data; all abnormal points are sorted according to their abnormal distance size, and the user is prompted for historical abnormal warning processing. The farther the abnormal distance, the higher the priority of the warning processing.
[0124] In another embodiment of the present specification, in order to discover outliers after clustering as abnormal data points, after obtaining each test data in the test data set to be verified, the distance is compared with the core object of the baseline clustering model, and the cluster to which it belongs is determined. The test salary calculation data to be verified that does not belong to any cluster is marked as a historical comparison abnormal point, further comprising:
[0125] When the core object set of the baseline clustering model Then the baseline reasoning process will not be carried out and the reasoning analysis of abnormal results in the same batch will prevail;
[0126] When the core object set of the baseline clustering model When , the historical baseline anomaly inference is performed through its cohesive data features to generate the historical comparison anomaly point.
[0127] Exemplarily, when the core object set of the baseline clustering model This shows that the historical baseline verification training set has a certain cohesion. The historical baseline anomaly reasoning process can be performed through its cohesive data features. The steps are as follows:
[0128] For any sample x in the dataset to be tested i ∈D2, calculate the Euclidean distance between each object and the core object set Ω1 of the baseline clustering model according to the distance formula, where o j ∈Ω1, ε is the neighborhood radius parameter distance;
[0129] If there is dist(x i ,o j )≤ε, then the data is calibrated as normal data for baseline comparison results; if all the core objects in Ω1 are the same as x iIf the distances are all greater than ε, the sample data is calibrated as baseline comparison abnormal sample data;
[0130] According to the Euclidean distance calculated between the abnormal sample data and each core object in Ω1, the shortest distance is selected as the abnormal distance value of the abnormal sample. The distance reflects the degree of deviation of the abnormal point from the group.
[0131] The processing flow in the first three steps is carried out for all the data to be tested in the data set to be tested, and the abnormal data set after baseline comparison is obtained. The abnormal points are sorted from large to small according to their abnormal distance values, and the abnormal warning at the baseline comparison level is given to the user. That is, the greater the deviation of the abnormal point, the higher the priority of the abnormal warning.
[0132] If the core object set of the baseline clustering model , it means that the current batch of salary calculation data to be tested is not highly cohesive, and the distribution is relatively discrete, which cannot reflect the data characteristics after cohesive convergence. At this time, the same batch abnormal reasoning is not performed, and the historical baseline abnormal reasoning result analysis is mainly based on the same batch abnormal result reasoning. At this time, the steps for the same batch abnormal result reasoning are as follows:
[0133]
[0134]
[0135] The sample data in the unvisited set Γ does not belong to any cluster in the same batch, so it is marked as abnormal result data in the same batch. Salary calculation abnormal point reasoning will integrate the historical baseline abnormal reasoning results and the abnormal reasoning results of the same batch, from the above two different reasoning perspectives, complement each other, and help users quickly locate and identify abnormalities.
[0136] In another embodiment of the present specification, after the abnormal data detection is completed, the user can also choose to add the batch of normal salary calculation result data that has been verified and modified to the historical baseline data, and retrain the baseline clustering model based on the incremental data set in a data-driven manner to continuously enhance the recognition ability of the salary calculation result detection model. In addition, in the time dimension, a timed sliding mechanism is used for the baseline time sliding window to regularly filter the baseline data outside the window for a long time, and re-drive the training of the baseline clustering model to improve the timeliness and accuracy of the model.
[0137] As an example of this specification, please refer to Figure 7 FIG. 4 is a schematic diagram showing the specific structure of the salary calculation result verification device based on the clustering algorithm in this embodiment.
[0138] The historical sample acquisition unit 701 is used to acquire historical salary calculation data, and use the salary calculation items and salary calculation results in the historical salary calculation data as feature dimensions of the algorithm to construct a historical baseline data sample;
[0139] A historical baseline acquisition unit 702 is used to filter the historical baseline data samples using a baseline time sliding window mechanism, and to construct a historical baseline data set according to the filtered historical baseline data samples;
[0140] The test data set acquisition unit 703 is used to acquire the salary calculation data to be verified of the same batch, and select the same dimensional features as the historical baseline data set to construct the test data set to be verified;
[0141] The training algorithm construction unit 704 is used to construct a salary calculation result clustering model training algorithm, and use the historical baseline data set and the test data set to be verified for training to generate a baseline clustering model and a clustering model to be tested respectively;
[0142] The historical abnormal point comparison unit 705 is used to classify each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and mark the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point;
[0143] The same batch abnormal point comparison unit 706 is used to perform same batch data clustering processing on the test data set to be verified around the clustering model to be detected, and find out the salary calculation data to be verified that does not belong to any cluster and mark them as the same batch abnormal points;
[0144] The verification result generating unit 707 is used to sort the historical comparison abnormal points and the abnormal points in the same batch to generate a verification result of the salary calculation result.
[0145] Since the principle of solving the problem by the above device is similar to that of the above method, the implementation of the above system can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0146] like Figure 8 The figure is a schematic diagram of the structure of a computer device according to an embodiment of the present specification. The computer device according to the embodiment of the present specification can run the method according to the embodiment of the present specification.
[0147] The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 802 may also include any storage resources 806 for storing any type of information such as code, settings, data, etc. Without limitation, for example, the storage resources 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any storage resource may use any technology to store information.
[0148] Further, any storage resource may provide volatile or non-volatile retention of information.
[0149] Further, any storage resource may represent a fixed or removable component of the computer device 802. In one case, when the processing device 804 executes the associated instructions stored in any storage resource or combination of storage resources, the computer device 802 may perform any operation of the associated instructions. The computer device 802 also includes one or more drive systems 808 for interacting with any storage resource, such as a hard disk drive system, an optical disk drive system, etc.
[0150] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface 818 (GUI). In other embodiments, the input / output module 810 (I / O), input device 812, and output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0151] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0152] The embodiments of the present specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0153] The embodiments of the present specification also provide a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to execute the above method.
[0154] It should be understood that in the various embodiments of the present specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.
[0155] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the embodiments of this specification generally indicates that the associated objects before and after are in an "or" relationship.
[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this specification can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of this specification.
[0157] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0158] In the several embodiments provided in the embodiments of this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0159] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.
[0160] In addition, each functional unit in each embodiment of the present specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0162] The embodiments of this specification use specific embodiments to illustrate the principles and implementation methods of the embodiments of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of this specification. At the same time, for those skilled in the art, according to the ideas of the embodiments of this specification, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of this specification.
Claims
1. A salary calculation result verification method based on clustering algorithm, characterized in that: The method comprises: Obtain historical salary calculation data, and use each salary calculation item and salary calculation result in the historical salary calculation data as a feature dimension of the algorithm to construct a historical baseline data sample; Filtering the historical baseline data samples based on a baseline time sliding window mechanism, and constructing a historical baseline data set according to the filtered historical baseline data samples; Obtain the salary calculation data to be verified in the same batch, and select the same dimensional features as the historical baseline data set to construct a test data set to be verified; Constructing a salary calculation result clustering model training algorithm, using the historical baseline data set and the test data set to be verified for training, and generating a baseline clustering model and a clustering model to be tested respectively; Classify each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and mark the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point; The test data set to be verified is clustered around the cluster model to be detected, and the salary calculation data to be verified that does not belong to any cluster is found and marked as outliers in the same batch; The historical comparison anomaly points and the anomaly points in the same batch are sorted to generate a verification result of the salary calculation result.
2. The method for verifying salary calculation results based on clustering algorithm according to claim 1, characterized in that: Acquiring historical salary calculation data, and using each salary calculation item and salary calculation result in the historical salary calculation data as a feature dimension of the algorithm to construct a historical baseline data sample further includes: Obtaining the attributes of each salary calculation item and the mean and standard deviation of the attribute in the historical salary calculation data; Standardizing and mapping the historical salary calculation data according to the mean and standard deviation to eliminate the impact of dimensional differences between attributes of various salary calculation items; A historical baseline data sample is constructed based on the salary calculation item attributes after the standardized mapping and the salary calculation results as the characteristic dimensions of the algorithm.
3. The salary calculation result verification method based on clustering algorithm according to claim 1 is characterized in that: Obtaining the same batch of salary calculation data to be verified, selecting the same dimensional features as the historical baseline data set to construct a test data set to be verified further includes: Standardizing and mapping the attributes of each salary calculation item in the salary calculation result data to be verified, so that the mapping scale of each salary calculation item in the salary calculation result data to be verified is consistent with the scale of the historical baseline data set; The salary calculation result data to be verified is processed according to the mapping scales of the salary calculation items to construct the test data set to be verified.
4. The salary calculation result verification method based on clustering algorithm according to claim 1 is characterized in that: The training algorithm for constructing the salary calculation result clustering model further includes: Density clustering is performed based on data samples, and multiple salary relationship cluster core object sets of arbitrary spatial shapes are formed using Euclidean distance as a scale; Set the neighborhood radius parameter ε and the minimum number of neighborhood samples threshold MinPts; construct the initial core object set Ω as an empty set, and calculate the value of any sample x in the historical baseline data sample D in turn. j With the rest of the samples x i The Euclidean distance, assuming that the sample space is an n-dimensional real vector The distance formula is: For vector x j , whose ε-neighborhood consists of the samples in the set D that are related to x j The distance between N and ε is not greater than the sample data, that is, it satisfies the formula: ε (x j )={x i ∈D|dist(x i ,x j )≤ε} For each sample, if the number of samples in its ε-neighborhood is not less than MinPts, the sample is called a core object, that is, the core object meets the following formula requirements: |N ε (x j )|≥MinPts Add all the core objects in the salary calculation sample set to the core object set Ω and obtain the core object model model = Ω.
5. The method for verifying salary calculation results based on clustering algorithm according to claim 4 is characterized in that: Using the historical baseline data set and the to-be-verified test data set for training to generate a baseline clustering model and a to-be-verified clustering model respectively further includes: The historical baseline data set is calculated by the clustering model training algorithm to construct the baseline clustering model model1=Ω1, which includes all core objects after density clustering of the historical baseline data set; The data set to be tested is calculated by the clustering model training algorithm to construct the clustering model model2=Ω2 to be tested, which includes all the core objects after the density clustering of the test data set to be verified.
6. The method for verifying salary calculation results based on clustering algorithm according to claim 1, characterized in that: Sorting the historical comparison anomaly points and the anomaly points in the same batch further includes: When the core object set of the baseline clustering model The baseline reasoning process will not be performed, and the reasoning analysis of abnormal results in the same batch will prevail; When the core object set of the baseline clustering model When , the historical baseline anomaly inference is performed through its cohesive data features to generate the historical comparison anomaly point.
7. A salary calculation result verification device based on clustering algorithm, characterized in that: The device comprises: A historical sample acquisition unit, used to acquire historical salary calculation data, and to construct a historical baseline data sample using each salary calculation item and salary calculation result in the historical salary calculation data as a feature dimension of the algorithm; A historical baseline acquisition unit, used for filtering the historical baseline data samples by a baseline time sliding window mechanism, and constructing a historical baseline data set according to the filtered historical baseline data samples; A test data set acquisition unit to be verified is used to acquire the salary calculation data to be verified of the same batch, and select the same dimensional features as the historical baseline data set to construct the test data set to be verified; A training algorithm construction unit, used to construct a salary calculation result clustering model training algorithm, using the historical baseline data set and the to-be-verified test data set for training, to generate a baseline clustering model and a to-be-verified clustering model respectively; A historical abnormal point comparison unit, used for classifying each to-be-verified salary calculation data in the to-be-verified test data set according to the distance between the to-be-verified salary calculation data and the baseline clustering model, and marking the verification salary calculation data that does not belong to any cluster as a historical comparison abnormal point; The same batch abnormal point comparison unit is used to perform same batch data clustering processing on the test data set to be verified around the clustering model to be detected, and find out the salary calculation data to be verified that does not belong to any cluster and mark them as the same batch abnormal points; The verification result generating unit is used to sort the historical comparison abnormal points and the abnormal points in the same batch to generate a verification result of the salary calculation result.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is 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 method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Data verification method and device, equipment, storage medium and product
CN119691528A
A data verification method, device, equipment, storage medium and product
CN119691528B
PreCheck-based optimization verification method, device and equipment and medium
CN121052623A
An optimized verification method, apparatus, device, and medium based on PreCheck
CN121052623B
Salary data verification method and device, equipment, storage medium and program product
CN121390919A
