Data verification method and related equipment based on artificial intelligence
Through the data verification method based on artificial intelligence, verification vectors are constructed and matched, and the problem of inefficient tax-deductible data verification is solved, automated and rapid data verification and error positioning are realized, and verification efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202111445066.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the prior art, the verification of tax deduction data mainly relies on manual verification methods, resulting in large workload and inefficient efficiency. Especially when facing complex tax deduction rules and diversified scenarios, it is difficult to improve the verification efficiency.
Using artificial intelligence-based data verification method, by constructing cash withdrawal data tables, calculating expected and actual tax deduction data, dividing classification sets, and constructing verification vectors, using vector similarity measurement methods to match verification vectors, enabling corresponding verification modes, and realizing automated data verification.
It improves the efficiency of tax deduction data, reduces the workload of manual calculations, can quickly identify wrong data and locate problems, and improves the overall verification efficiency and accuracy.
Smart Images

Figure CN114020644B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based data verification method, device, electronic device, and storage medium. Background Art
[0002] Taxes refer to the money or kind levied by the state on enterprises, collectives, and individuals. Since the amount of tax deductions directly affects the economic interests of the state, enterprises, and individuals, many enterprises and institutions need to verify whether the actual tax deduction results are consistent with the expected tax deduction results.
[0003] Currently, verification of tax deduction results and other data is primarily done manually. However, tax deductions are based on complex logic, numerous scenarios, and numerous tax deduction rules. Manual verification requires multiple manual checks of actual tax deduction results, calculations of expected tax deduction results based on corresponding tax deduction rules, and finally a comparison of actual and expected results. Therefore, manual verification of such data is labor-intensive and inefficient. Summary of the Invention
[0004] In view of the above content, it is necessary to propose an artificial intelligence-based data verification method and related equipment to solve the technical problem of how to improve the efficiency of tax deduction data verification. The relevant equipment includes an artificial intelligence-based data verification device, electronic equipment and storage medium.
[0005] This application provides an artificial intelligence-based data verification method, including:
[0006] Build a withdrawal data table based on the test scenario to obtain withdrawal data;
[0007] Calculating the withdrawal data to obtain expected tax deduction data and actual tax deduction data;
[0008] respectively dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set;
[0009] Constructing an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set respectively;
[0010] matching the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result;
[0011] A corresponding verification mode is enabled based on the matching result.
[0012] In this way, by calculating the obtained withdrawal data to obtain the tax deduction data, then dividing the tax deduction data, and constructing the divided tax deduction data into vector data for verification, the verification efficiency of the tax deduction data can be effectively improved, and the problem of low efficiency of manual verification can be solved.
[0013] In some embodiments, the withdrawal data table includes an analysis function, and the withdrawal data is used to obtain expected tax deduction data and actual tax deduction data according to different calculation methods, including:
[0014] Calculating the withdrawal data according to the analysis function and preset rules to obtain expected tax deduction data;
[0015] The withdrawal data is calculated according to a preset program interface to obtain actual tax deduction data.
[0016] In this way, the withdrawal data can be quickly calculated through the analysis function contained in the withdrawal data table to obtain the expected tax deduction data without the use of additional computing devices, effectively improving the efficiency of obtaining the expected tax deduction data. At the same time, the withdrawal data can also be quickly calculated through the preset program interface, which can effectively improve the efficiency of obtaining the actual tax deduction data compared to manual calculation methods.
[0017] In some embodiments, said dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction category set and an actual tax deduction category set comprises:
[0018] Calculating the expected tax deduction data and the actual tax deduction data to obtain an expected error sum of squares and an actual error sum of squares respectively;
[0019] Determining the number of categories of the expected tax deduction data and the actual tax deduction data based on the expected sum of squared errors and the actual sum of squared errors to obtain an expected number of categories and an actual number of categories;
[0020] The expected tax deduction data and the actual tax deduction data are divided based on the expected classification number and the actual classification number to obtain the expected tax deduction classification set and the actual tax deduction classification set.
[0021] In this way, the true number of classifications of expected tax deduction data and actual tax deduction data can be accurately obtained through the sum of squared errors, and accurate classification of expected tax deduction data and actual tax deduction data can be achieved based on the true number of classifications, which facilitates the subsequent process of constructing verification vectors according to categories, prevents the dimension of the verification vector from being too high, and improves the verification efficiency.
[0022] In some embodiments, constructing an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set, respectively, comprises:
[0023] Arranging the expected tax deduction classification set and the actual tax deduction classification set respectively to obtain expected classification sorting data and actual classification sorting data;
[0024] An expected verification vector and an actual verification vector for each category are respectively constructed based on the expected classification and ranking data and the actual classification and ranking data.
[0025] In this way, since the actual verification vector and the expected verification vector contain each type of tax deduction data, when the tax deduction data changes, the corresponding verification vector will cause it to change at the same time. Therefore, it is convenient for subsequent processes to realize large-scale verification of tax deduction data through verification vectors, thereby improving the verification efficiency of tax deduction data.
[0026] In some embodiments, when the expected tax deduction classification set and the actual tax deduction classification set are arranged respectively to obtain expected classification ranking data and actual classification ranking data, the method further includes:
[0027] If there are multiple identical tax deduction data in the expected classification and sorting data and the actual classification and sorting data, any one data is selected from the multiple identical tax deduction data as sample data, and the number of occurrences of the identical tax deduction data is added to the end of the sample data to merge the multiple identical tax deduction data into one data.
[0028] In this way, by merging the multiple identical tax deduction data into one data, the dimension of the verification vector can be greatly reduced, thereby effectively reducing the amount of calculation and improving the verification efficiency.
[0029] In some embodiments, the verification mode includes a traversal verification mode and a default mode, the matching result includes a correct match and an incorrect match, and enabling the corresponding verification mode based on the matching result includes:
[0030] If the matching result is a correct match, enabling the default mode to continue matching the expected verification vector and the actual verification vector;
[0031] If the matching result is a matching error, the traversal verification mode is enabled to perform matching verification on the data in the error vector one by one in sequence to obtain the location of the error data in the expected tax deduction data and the actual tax deduction data.
[0032] In this way, when the matching result is a correct match, by matching the actual verification vector and the expected verification vector, the actual tax deduction result and the expected tax deduction result can be quickly verified. Compared with checking each actual tax deduction result and the expected tax deduction result one by one, the verification efficiency is effectively improved, and when the matching result is a matching error, the location of the erroneous data can be quickly locked by traversing the verification mode.
[0033] In some embodiments, enabling the traversal verification mode to obtain the location of erroneous data in the expected tax deduction data and the actual tax deduction data includes:
[0034] Verify the expected tax deduction data in the error expected verification vector and the actual tax deduction data in the actual verification vector one by one based on the response assertion;
[0035] Displaying the verification result of the response assertion according to the view result tree;
[0036] The location of the erroneous data is determined based on the collation result.
[0037] In this way, when the expected verification vector and the actual verification vector match incorrectly, the actual tax deduction results and the expected tax deduction results in the category corresponding to the matching error can be automatically and quickly verified through the response assertion, thereby quickly locking the location of the erroneous data to facilitate the staff to correct the erroneous data.
[0038] The present application also provides an artificial intelligence-based data verification device, including:
[0039] An acquisition unit, configured to construct a withdrawal data table according to a test scenario to acquire withdrawal data, and further configured to calculate the withdrawal data to acquire expected tax deduction data and actual tax deduction data;
[0040] a classification unit, configured to classify the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set;
[0041] a construction unit, configured to construct an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set, respectively;
[0042] a matching unit, configured to match the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result;
[0043] An enabling unit is used to enable a corresponding verification mode based on the matching result.
[0044] An embodiment of the present application further provides an electronic device, including:
[0045] a memory storing at least one instruction;
[0046] A processor executes instructions stored in the memory to implement the artificial intelligence-based data verification method.
[0047] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence-based data verification method. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flowchart of a preferred embodiment of the data verification method based on artificial intelligence of the present application.
[0049] Figure 2 It is a flowchart of a preferred embodiment of the present application for dividing expected tax deduction data and actual tax deduction data to obtain expected tax deduction classification sets and actual tax deduction classification sets respectively.
[0050] Figure 3 It is a functional module diagram of a preferred embodiment of the artificial intelligence-based data verification device involved in this application.
[0051] Figure 4 It is a structural diagram of an electronic device of a preferred embodiment of the artificial intelligence-based data verification method involved in this application.
[0052] Figure 5 This is a graph showing the relationship between SSE and k involved in this application. DETAILED DESCRIPTION
[0053] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application. The embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.
[0054] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the described features. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0055] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" as used herein includes any and all combinations of one or more of the relevant listed items.
[0056] An embodiment of the present application provides an artificial intelligence-based data verification method that can be applied to one or more electronic devices. An electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0057] An electronic device can be any electronic product that can interact with a user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, Internet Protocol Television (IPTV), smart wearable device, etc.
[0058] The electronic device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0059] The network where the electronic device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0060] like Figure 1 FIG2 is a flowchart of a preferred embodiment of the data verification method based on artificial intelligence of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0061] S10: Build a withdrawal data table according to the test scenario to obtain withdrawal data.
[0062] In an optional embodiment, a withdrawal data table can be constructed based on a test scenario, which includes but is not limited to a single-month withdrawal scenario and a cross-month withdrawal scenario. The withdrawal data table can be an Excel data table, which contains three sheet names, namely, first-month withdrawal, second-month withdrawal and personal income tax withholding rate. The personal income tax withholding rate is shown in the withholding rate and quick deduction data table shown in Table 1.
[0063] In this optional embodiment, the data of the test scenario can be converted manually and input into an Excel data table, and finally the data input into the Excel data table is used as the withdrawal data.
[0064] In this way, the corresponding Excel withdrawal data table can be obtained according to different test scenarios, and then the corresponding withdrawal data can be obtained according to the withdrawal data table. Since the Excel withdrawal data table has diverse functions, it is convenient to analyze and calculate the withdrawal data based on this Excel withdrawal data table in the future, thereby improving calculation efficiency.
[0065] S11, calculating the withdrawal data to obtain expected tax deduction data and actual tax deduction data.
[0066] In an optional embodiment, the withdrawal data table includes an analysis function, and the withdrawal data obtains expected tax deduction data and actual tax deduction data according to different calculation methods, including:
[0067] S111, calculating the withdrawal data according to the analysis function and preset rules to obtain expected tax deduction data.
[0068] In an optional embodiment, the preset rules are as shown in the withholding rate and quick deduction data table shown in Table 1 and the preset rule data table shown in Table 2, where the current period's tax payable = cumulative tax payable - previous cumulative tax payable, cumulative tax payable = cumulative withholding tax prepaid taxable income * withholding rate - quick deduction. Cumulative withholding tax prepaid taxable income = previous cumulative withholding tax prepaid taxable income + current withholding tax prepaid taxable income, current withholding tax prepaid taxable income = taxable commission gross income - deduction of expenses - business costs - cumulative deduction of expenses - value-added tax - value-added tax surcharge.
[0069] In an optional embodiment, the analysis function includes a ROUND function, an IF function, and a LOOKUP function in an Excel data table, wherein the ROUND function is used to calculate the tax amount and retain two decimal places, the IF function is used to calculate the taxable commission gross income, and the LOOKUP function is used to obtain the tax rate and quick deduction number.
[0070] For example, in the test scenario, the total withdrawal amount is 103,000. If the monthly gross commission income (i.e., the total withdrawal amount for the month + the current withdrawal amount) is greater than 103,000, the taxable gross commission income is: the monthly gross commission income / 1.03, the VAT is: the monthly gross commission income / (1.03 * 0.03), and the VAT surcharge is: the monthly gross commission income / (1.03 * 0.03 * 0.06). Otherwise, the taxable gross commission income is the monthly gross commission income, and the VAT and VAT surcharge are 0. After deducting expenses and business costs, the total is 0.2 * taxable gross commission income, for a total of 5,000 after deducting expenses.
[0071] Table 1
[0072] series Cumulative withheld and prepaid taxable income Withholding rate (%) Quick deduction 1 No more than 36,000 yuan 3 0 2 The portion exceeding 36,000 yuan to 144,000 yuan 10 2520 3 The portion exceeding 144,000 yuan to 300,000 yuan 20 16920 4 The portion exceeding RMB 300,000 to RMB 420,000 25 31920 5 The portion exceeding 420,000 yuan to 660,000 yuan 30 52920 6 The portion exceeding 660,000 yuan to 960,000 yuan 35 85920 7 The amount exceeding 960,000 yuan 45 181920
[0073] Table 2
[0074]
[0075] S112, calculating the withdrawal data according to a preset program interface to obtain actual tax deduction data.
[0076] In an optional embodiment, a reading program can be written in a jar package, and the jar package can be imported into the jmeter tool. The Beanshell Sample can be used to call the jar package to read the withdrawal data table constructed according to the test scenario to obtain the withdrawal data.
[0077] In this optional embodiment, jmeter is a Java-based stress testing tool developed by the Apache organization, which can be used to test the performance of static and dynamic resources (files, Servlets, Perl scripts, Java objects, databases and queries, FTP servers, etc.); the jar package can package some already written classes and introduce these jar packages into the corresponding projects, and then you can directly use the classes, properties and methods in these jar packages; Beanshell Sample is a flexible Sample request sampler in the Jmeter component. In BeanShell, you can use custom functions in the Java language to process specific logic, and combine BeanShell's built-in objects to access variables.
[0078] In this optional embodiment, the jar package contains a static method, which receives two variables, one is the file name and the other is the sheet name. The static method implements the following: read the file content according to the passed file name and sheet name. If the passed sheet name is "First Month Withdrawal", read from the line containing the withdrawal amount information on the page. Otherwise, read from the line containing the withdrawal amount information on the "Second Month Withdrawal" page by default. Save the read "Single Withdrawal Amount" column and "Individual Tax Payable This Period" column to List <HashMap<String,String> >Return.
[0079] In this optional embodiment, the process of importing the jar package into the jmeter tool is to place the jar package in the "jmeter installation path / lib / ext" directory and then restart jmeter.
[0080] In this optional embodiment, the process of using Beanshell Sample to call the jar package to read the withdrawal data table constructed according to the test scenario is to call the static method in the jar package in BeanShell Sample, pass in two variables, one is the file name and the other is the sheet name, store the content length returned by the static method in the jar package in the variable "length", read the content into the list, read the withdrawal data in the list line by line through "length" to the withdrawal interface, and return the actual tax deduction result.
[0081] In an optional embodiment, the withdrawal interface refers to a developed withdrawal API (Application Programming Interface) program interface. API is a set of predefined interfaces (such as functions, HTTP interfaces), or refers to the agreement for connecting different components of a software system. It is used to provide a set of routines that applications and developers can access based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism. The withdrawal interface in the present invention is used to calculate the withdrawal data to obtain actual tax deduction data.
[0082] In this way, the withdrawal data can be quickly calculated through the analysis function contained in the withdrawal data table to obtain the expected tax deduction data without the use of additional computing devices, effectively improving the efficiency of obtaining the expected tax deduction data. At the same time, the withdrawal data can also be quickly calculated through the preset program interface, which can effectively improve the efficiency of obtaining the actual tax deduction data compared to manual calculation methods.
[0083] S12, dividing the expected tax deduction data and the actual tax deduction data respectively to obtain an expected tax deduction classification set and an actual tax deduction classification set.
[0084] In an optional embodiment, dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction category set and an actual tax deduction category set includes:
[0085] S121, respectively calculating the expected tax deduction data and the actual tax deduction data to obtain an expected sum of squares of errors and an actual sum of squares of errors.
[0086] In an optional embodiment, the expected tax deduction data and the actual tax deduction data may be calculated using a square error sum formula to obtain an expected square error sum and an actual square error sum. The square error sum formula is:
[0087]
[0088] Among them, SSE is the sum of squared errors, C i is the i-th category, k is the preset total data category, and p is category C i The data points in Indicates category C i The mean of all data points in .
[0089] For example, taking the expected tax deduction data as an example, let k be 1, and the corresponding data is (10, 20, 30), then SSE = (10-20) 2 +(20-20) 2 +(30-20) 2 =200, the calculated expected sum of squared errors is 200.
[0090] The calculation process of the actual sum of squared errors is the same as that of the expected sum of squared errors.
[0091] S122: Determine the number of categories of the expected tax deduction data and the actual tax deduction data based on the expected sum of squared errors and the actual sum of squared errors to obtain an expected number of categories and an actual number of categories.
[0092] In an optional embodiment, as the number of expected categories and the actual number of categories increase, the expected tax deduction data and the actual tax deduction data will be divided more finely, and the degree of aggregation of each category will gradually increase, so the sum of squared errors SSE will gradually become smaller.
[0093] Among them, when k is less than the number of categories, the increase of k will greatly increase the degree of aggregation of each category, so the decrease in SSE will be large. When k reaches the actual number of categories, the degree of aggregation obtained by increasing k will rapidly decrease, so the decrease in SSE will drop sharply, and then tend to be flat as the k value continues to increase. Therefore, the k value corresponding to the data point with the highest curvature can be determined by establishing a relationship graph of SSE increasing with k. At this time, the k value is the expected number of categories and the actual number of categories.
[0094] For example, Figure 5 In the graph showing the relationship between SSE and k, the curvature of the corresponding data points is the largest when k=4, so the optimal number of categories is k=4.
[0095] S123 , dividing the expected tax deduction data and the actual tax deduction data based on the expected classification number and the actual classification number to obtain the expected tax deduction classification set and the actual tax deduction classification set.
[0096] In this optional embodiment, the K-means clustering algorithm can be used to divide the expected tax deduction data and the actual tax deduction data, and the expected tax deduction data and actual tax deduction data of each category after division are used as the expected tax deduction classification set and the actual tax deduction classification set. The K-means clustering algorithm is an iterative clustering analysis algorithm, and its steps are to pre-divide the data into K groups, then randomly select K objects as the initial cluster centers, and then calculate the distance between each object and each seed cluster center, and assign each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Every time a sample is assigned, the cluster center of the cluster will be recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers change again, and the sum of squared errors is locally minimized.
[0097] In this way, the true number of classifications of expected tax deduction data and actual tax deduction data can be accurately obtained through the sum of squared errors, and accurate classification of expected tax deduction data and actual tax deduction data can be achieved based on the true number of classifications, which facilitates the subsequent process of constructing verification vectors according to categories, prevents the dimension of the verification vector from being too high, and improves the verification efficiency.
[0098] S13, constructing an expected verification vector and an actual verification vector based on the expected tax deduction category set and the actual tax deduction category set respectively.
[0099] In an optional embodiment, constructing an expected verification vector and an actual verification vector based on the expected tax deduction category set and the actual tax deduction category set respectively includes:
[0100] S131, arranging the expected tax deduction classification set and the actual tax deduction classification set respectively to obtain expected classification sorting data and actual classification sorting data.
[0101] In this optional embodiment, the expected tax deduction category set and the actual tax deduction category set may be sorted in ascending order.
[0102] In this optional embodiment, since each actual verification vector and expected verification vector is composed of multiple tax deduction data, and each tax deduction data is arranged according to the same rules, when the actual tax deduction data and the expected tax deduction data are the same, the actual verification vector and the corresponding expected verification vector are also exactly the same. Therefore, the result of the vector operation can be used to directly determine whether the data in the two vectors are consistent, which greatly improves the verification efficiency compared to matching the data one by one.
[0103] S132: Constructing an expected verification vector and an actual verification vector for each category based on the expected classification and sorting data and the actual classification and sorting data.
[0104] In an optional embodiment, the expected verification vector and the actual verification vector are denoted as P1(i) and P2(i), respectively, where P1(i) represents the i-th expected verification vector in the expected classified sorting data, and P2(i) represents the i-th expected verification vector in the actual classified sorting data, i represents the i-th category, and each category has an expected verification vector and an actual verification vector.
[0105] In an optional embodiment, if there are multiple identical tax deduction data in the expected classification and sorting data and the actual classification and sorting data, any one data is selected from the multiple identical tax deduction data as sample data, and the number of occurrences of the identical tax deduction data is added to the end of the sample data to merge the multiple identical tax deduction data into one data.
[0106] For example, suppose the tax deduction data is (100, 100, 101, 202, 205, 303, 306), k = 3, and the tax deduction data are classified according to the mean as (100, 100, 101), (202, 205), and (303, 306). Since 100 appears twice in the tax deduction data, the expected verification vector and the actual verification vector can be constructed as P1(1) = (1002, 101) and P2(1) = (1002, 101), respectively.
[0107] In this way, since the actual verification vector and the expected verification vector contain each type of tax deduction data, when the tax deduction data changes, the corresponding verification vector will cause it to change at the same time. Therefore, it is convenient for subsequent processes to realize large-scale verification of tax deduction data through verification vectors, thereby improving the verification efficiency of tax deduction data. At the same time, by merging the multiple identical tax deduction data into one data, the dimension of the verification vector can be reduced, thereby effectively reducing the amount of calculation and improving the verification efficiency.
[0108] S14: Match the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result.
[0109] In an optional embodiment, the matching result includes a correct match and an incorrect match.
[0110] In an optional embodiment, cosine similarity can be used to calculate the similarity between the actual verification vector and the expected verification vector to obtain a matching result. If the calculated matching result is 1, it indicates that the match is correct. If the calculated matching result is not 1, it indicates that the match fails.
[0111] In this optional embodiment, the expected verification vector P1(i) is only matched with the actual verification vector P2(i). If the match is correct, the expected verification vector P1(i+1) is continued to be matched with the corresponding actual verification vector P2(i+1) until all expected verification vectors and actual verification vectors are matched. If the match is incorrect, the traversal verification mode is enabled to match the data corresponding to the subcategories in the actual tax deduction classification set corresponding to the current actual verification vector and the data corresponding to the subcategories in the expected tax deduction classification set corresponding to the expected verification vector one by one.
[0112] In this way, the actual verification vector and the expected verification vector can be quickly calculated through cosine similarity to obtain a matching result, which facilitates different verification methods for the matching result in subsequent processes.
[0113] S15: Activate a corresponding verification mode based on the matching result.
[0114] In an optional embodiment, if the matching result is a correct match, the default mode is enabled to continue matching the expected verification vector and the actual verification vector; if the matching result is a matching error, the traversal verification mode is enabled to match and verify the data in the error vector one by one in sequence to obtain the location of the error data in the expected tax deduction data and the actual tax deduction data.
[0115] In this optional embodiment, if only one pair of the expected verification vector P1(i) and the actual verification vector P2(i) has an error, the erroneous pair of vectors will be verified using the traversal verification mode, and the remaining pairs of vectors without errors will continue to be verified using the default mode, where the default mode is to match the expected verification vector and the actual verification vector pair by pair in sequence, and the traversal verification mode is to match and verify each data in the erroneous vector one by one in sequence.
[0116] In some embodiments, enabling the traversal verification mode to obtain the location of the erroneous data includes: verifying the expected tax deduction data in the erroneous expected verification vector and the actual tax deduction data in the actual verification vector one by one according to the response assertion; displaying the verification result of the response assertion according to the viewing result tree; and determining the location of the erroneous data based on the verification result.
[0117] In an optional embodiment, the response assertion refers to performing an assertion check on the response interface of the server to determine whether the interface return value obtained by the interface test is correct.
[0118] In an optional embodiment, if the response assertion result is "true", the actual tax deduction result returned by the withdrawal interface is consistent with the estimated tax deduction data in the response assertion, the assertion passes, and the result tree is displayed in green; if the response assertion result is "False", the actual tax deduction result returned by the withdrawal interface is inconsistent with the estimated tax deduction data in the response assertion, the assertion fails, and the result tree is displayed in red, thereby determining the location of the current error data.
[0119] In this optional embodiment, the View Results Tree displays all request responses, allowing you to view the response to any request. In addition to displaying the response, you can also view the time it took to obtain the response and some response codes. The View Results Tree is needed to view the results returned by the server after processing the request and analyze whether there are any problems.
[0120] In this way, when the matching result is a correct match, by matching the actual verification vector and the expected verification vector, the actual tax deduction result and the expected tax deduction result can be quickly verified. Compared with checking each actual tax deduction result and the expected tax deduction result one by one, the verification efficiency is effectively improved, and when the matching result is a matching error, the location of the erroneous data can be quickly locked by traversing the verification mode.
[0121] See Figure 3 , Figure 3This is a functional block diagram of a preferred embodiment of the artificial intelligence-based data verification device of the present application. The artificial intelligence-based data verification device 11 includes an acquisition unit 110, a classification unit 111, a construction unit 112, a matching unit 113, and an activation unit 114. The modules / units referred to herein are a series of computer-readable instruction segments that can be executed by the processor 13 and perform a fixed function, and are stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0122] In an optional embodiment, the acquisition unit 110 is configured to construct a withdrawal data table according to a test scenario to acquire withdrawal data.
[0123] In an optional embodiment, a withdrawal data table can be constructed based on a test scenario, which includes but is not limited to a single-month withdrawal scenario and a cross-month withdrawal scenario. The withdrawal data table can be an Excel data table, which contains three sheet names, namely, first-month withdrawal, second-month withdrawal and personal income tax withholding rate. The personal income tax withholding rate is shown in the withholding rate and quick deduction data table shown in Table 1.
[0124] In this optional embodiment, the data of the test scenario can be converted and input into an Excel data table by manual conversion, and the data input into the Excel data table can be used as withdrawal data.
[0125] In an optional embodiment, the acquisition unit 110 is further configured to calculate the withdrawal data to obtain expected tax deduction data and actual tax deduction data, including:
[0126] Calculating the withdrawal data according to the analysis function and preset rules to obtain expected tax deduction data;
[0127] The withdrawal data is calculated according to a preset program interface to obtain actual tax deduction data.
[0128] In an optional embodiment, the preset rules are as shown in the withholding rate and quick deduction data table shown in Table 1 and the preset rule data table shown in Table 2, where the current period's tax payable = cumulative tax payable - previous cumulative tax payable, cumulative tax payable = cumulative withholding tax prepaid taxable income * withholding rate - quick deduction. Cumulative withholding tax prepaid taxable income = previous cumulative withholding tax prepaid taxable income + current withholding tax prepaid taxable income, current withholding tax prepaid taxable income = taxable commission gross income - deduction of expenses - business costs - cumulative deduction of expenses - value-added tax - value-added tax surcharge.
[0129] In an optional embodiment, the analysis function includes a ROUND function, an IF function, and a LOOKUP function in an Excel data table, wherein the ROUND function is used to calculate the tax amount and retain two decimal places, the IF function is used to calculate the taxable commission gross income, and the LOOKUP function is used to obtain the tax rate and quick deduction number.
[0130] For example, in the test scenario, the total withdrawal amount is 103,000. If the monthly gross commission income (i.e., the total withdrawal amount for the month + the current withdrawal amount) is greater than 103,000, the taxable gross commission income is: the monthly gross commission income / 1.03, the VAT is: the monthly gross commission income / (1.03 * 0.03), and the VAT surcharge is: the monthly gross commission income / (1.03 * 0.03 * 0.06). Otherwise, the taxable gross commission income is the monthly gross commission income, and the VAT and VAT surcharge are 0. After deducting expenses and business costs, the total is 0.2 * taxable gross commission income, for a total of 5,000 after deducting expenses.
[0131] Table 1
[0132] series Cumulative withheld and prepaid taxable income Withholding rate (%) Quick deduction 1 No more than 36,000 yuan 3 0 2 The portion exceeding 36,000 yuan to 144,000 yuan 10 2520 3 The portion exceeding 144,000 yuan to 300,000 yuan 20 16920 4 The portion exceeding RMB 300,000 to RMB 420,000 25 31920 5 The portion exceeding 420,000 yuan to 660,000 yuan 30 52920 6 The portion exceeding 660,000 yuan to 960,000 yuan 35 85920 7 The amount exceeding 960,000 yuan 45 181920
[0133] Table 2
[0134]
[0135] In an optional embodiment, a reading program can be written in a jar package, and the jar package can be imported into the jmeter tool. The Beanshell Sample can be used to call the jar package to read the withdrawal data table constructed according to the test scenario to obtain the withdrawal data.
[0136] In this optional embodiment, jmeter is a Java-based stress testing tool developed by the Apache organization, which can be used to test the performance of static and dynamic resources (files, Servlets, Perl scripts, Java objects, databases and queries, FTP servers, etc.); the jar package can package some already written classes and introduce these jar packages into the corresponding projects, and then the classes, properties and methods in these jar packages can be used directly; Beanshell Sample is a flexible Sample request sampler in the Jmeter component. In BeanShell, specific logic can be processed through custom functions in the Java language, and variables can be accessed in combination with the built-in objects of BeanShell.
[0137] In this optional embodiment, the jar package contains a static method, which receives two variables, one is the file name and the other is the sheet name. The static method implements the following: read the file content according to the passed file name and sheet name. If the passed sheet name is "First Month Withdrawal", read from the line containing the withdrawal amount information on the page. Otherwise, read from the line containing the withdrawal amount information on the "Second Month Withdrawal" page by default. Save the read "Single Withdrawal Amount" column and "Individual Tax Payable This Period" column to List <HashMap<String,String> >Return.
[0138] In this optional embodiment, the process of importing the jar package into the jmeter tool is to place the jar package in the "jmeter installation path / lib / ext" directory and then restart jmeter.
[0139] In this optional embodiment, the process of using Beanshell Sample to call the jar package to read the withdrawal data table constructed according to the test scenario is to call the static method in the jar package in BeanShell Sample, pass in two variables, one is the file name and the other is the sheet name, store the content length returned by the static method in the jar package in the variable "length", read the content into the list, read the withdrawal data in the list line by line through "length" to the withdrawal interface, and return the actual tax deduction result.
[0140] In an optional embodiment, the withdrawal interface refers to a developed withdrawal API (Application Programming Interface) program interface. API is a set of predefined interfaces (such as functions, HTTP interfaces), or refers to the agreement for connecting different components of a software system. It is used to provide a set of routines that applications and developers can access based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism. The withdrawal interface in the present invention is used to calculate the withdrawal data to obtain actual tax deduction data.
[0141] In an optional embodiment, the classification unit 111 is configured to classify the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set, respectively, including:
[0142] Calculating the expected tax deduction data and the actual tax deduction data to obtain an expected error sum of squares and an actual error sum of squares respectively;
[0143] Determining the number of categories of the expected tax deduction data and the actual tax deduction data based on the expected sum of squared errors and the actual sum of squared errors to obtain an expected number of categories and an actual number of categories;
[0144] The expected tax deduction data and the actual tax deduction data are divided based on the expected classification number and the actual classification number to obtain the expected tax deduction classification set and the actual tax deduction classification set.
[0145] In an optional embodiment, the expected tax deduction data and the actual tax deduction data may be calculated using a square error sum formula to obtain an expected square error sum and an actual square error sum. The square error sum formula is:
[0146]
[0147] Among them, SSE is the sum of squared errors, C i is the i-th category, k is the preset total data category, and p is category C i The data points in Indicates category C i The mean of all data points in .
[0148] For example, taking the expected tax deduction data as an example, let k be 1, and the corresponding data is (10, 20, 30), then SSE = (10-20) 2 +(20-20) 2 +(30-20) 2 =200, then the expected sum of squared errors is 200.
[0149] The calculation process of the actual sum of squared errors is the same as that of the expected sum of squared errors.
[0150] In an optional embodiment, as the number of expected categories and the actual number of categories increase, the expected tax deduction data and the actual tax deduction data will be divided more finely, and the degree of aggregation of each category will gradually increase, so the sum of squared errors SSE will gradually become smaller.
[0151] Among them, when k is less than the number of categories, the increase of k will greatly increase the degree of aggregation of each category, so the decrease in SSE will be large. When k reaches the actual number of categories, the degree of aggregation obtained by increasing k will rapidly decrease, so the decrease in SSE will drop sharply, and then tend to be flat as the k value continues to increase. Therefore, the k value corresponding to the data point with the highest curvature can be determined by establishing a relationship graph of SSE increasing with k. At this time, the k value is the expected number of categories and the actual number of categories.
[0152] For example, Figure 5 In the graph showing the relationship between SSE and k, the curvature of the corresponding data points is the largest when k=4, so the optimal number of categories is k=4.
[0153] The actual tax deduction data is used to obtain the expected tax deduction category set and the actual tax deduction category set.
[0154] In this optional embodiment, the K-means clustering algorithm can be used to divide the expected tax deduction data and the actual tax deduction data, and the expected tax deduction data and actual tax deduction data of each category after division are used as the expected tax deduction classification set and the actual tax deduction classification set. The K-means clustering algorithm is an iterative clustering analysis algorithm, and its steps are to pre-divide the data into K groups, then randomly select K objects as the initial cluster centers, and then calculate the distance between each object and each seed cluster center, and assign each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Every time a sample is assigned, the cluster center of the cluster will be recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no (or a minimum number) objects are reassigned to different clusters, no (or a minimum number) cluster centers change again, and the sum of squared errors is locally minimized.
[0155] The construction unit 112 is configured to construct an expected verification vector and an actual verification vector based on the expected tax deduction category set and the actual tax deduction category set, respectively, including:
[0156] Arranging the expected tax deduction classification set and the actual tax deduction classification set respectively to obtain expected classification sorting data and actual classification sorting data;
[0157] An expected verification vector and an actual verification vector for each category are respectively constructed based on the expected classification and ranking data and the actual classification and ranking data.
[0158] In this optional embodiment, the expected tax deduction category set and the actual tax deduction category set may be sorted in ascending order.
[0159] In this optional embodiment, since each actual verification vector and expected verification vector is composed of multiple tax deduction data, and each tax deduction data is arranged according to the same rules, when the actual tax deduction data and the expected tax deduction data are the same, the actual verification vector and the corresponding expected verification vector are also exactly the same. Therefore, the result of the vector operation can be used to directly determine whether the data in the two vectors are consistent, which greatly improves the verification efficiency compared to matching the data one by one.
[0160] In an optional embodiment, the expected verification vector and the actual verification vector are denoted as P1(i) and P2(i), respectively, where P1(i) represents the i-th expected verification vector in the expected classified sorting data, and P2(i) represents the i-th expected verification vector in the actual classified sorting data, i represents the i-th category, and each category has an expected verification vector and an actual verification vector.
[0161] In an optional embodiment, if there are multiple identical tax deduction data in the expected classification and sorting data and the actual classification and sorting data, any one data is selected from the multiple identical tax deduction data as sample data, and the number of occurrences of the identical tax deduction data is added to the end of the sample data to merge the multiple identical tax deduction data into one data.
[0162] For example, suppose the tax deduction data is (100, 100, 101, 202, 205, 303, 306), k = 3, and the tax deduction data are classified according to the mean as (100, 100, 101), (202, 205), and (303, 306). Since 100 appears twice in the tax deduction data, the actual verification vector and the expected verification vector can be constructed as P1(1) = (1002, 101) and P2(1) = (1002, 101), respectively.
[0163] In an optional embodiment, the matching unit 113 is configured to match the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result.
[0164] In an optional embodiment, the matching result includes a correct match and an incorrect match.
[0165] In an optional embodiment, cosine similarity can be used to calculate the similarity between the actual verification vector and the expected verification vector to obtain a matching result. If the calculated matching result is 1, it indicates that the match is correct. If the calculated matching result is not 1, it indicates that the match fails.
[0166] In this optional embodiment, the expected verification vector P1(i) is only matched with the actual verification vector P2(i). If the match is correct, the expected verification vector P1(i+1) is continued to be matched with the corresponding actual verification vector P2(i+1) until all expected verification vectors and actual verification vectors are matched. If the match is incorrect, the traversal verification mode is enabled to match the data corresponding to the subcategories in the actual tax deduction classification set corresponding to the current actual verification vector and the data corresponding to the subcategories in the expected tax deduction classification set corresponding to the expected verification vector one by one.
[0167] In an optional embodiment, the enabling unit 114 is configured to enable a corresponding verification mode based on the matching result.
[0168] In an optional embodiment, if the matching result is a correct match, the default mode is enabled to continue matching the expected verification vector and the actual verification vector; if the matching result is a matching error, the traversal verification mode is enabled to match and verify the data in the error vector one by one in sequence to obtain the location of the error data in the expected tax deduction data and the actual tax deduction data.
[0169] In this optional embodiment, if only one pair of the expected verification vector P1(i) and the actual verification vector P2(i) has an error, the erroneous pair of vectors will be verified using the traversal verification mode, and the remaining pairs of vectors without errors will continue to be verified using the default mode, where the default mode is to match the expected verification vector and the actual verification vector pair by pair in sequence, and the traversal verification mode is to match and verify each data in the erroneous vector one by one in sequence.
[0170] In some embodiments, enabling the traversal verification mode to obtain the location of the erroneous data includes: verifying the expected tax deduction data in the erroneous expected verification vector and the actual tax deduction data in the actual verification vector one by one according to the response assertion; displaying the verification result of the response assertion according to the viewing result tree; and determining the location of the erroneous data based on the verification result.
[0171] In an optional embodiment, the response assertion refers to performing an assertion check on the response interface of the server to determine whether the interface return value obtained by the interface test is correct.
[0172] In an optional embodiment, if the response assertion result is "true", the actual tax deduction result returned by the withdrawal interface is consistent with the estimated tax deduction data in the response assertion, the assertion passes, and the result tree is displayed in green; if the response assertion result is "False", the actual tax deduction result returned by the withdrawal interface is inconsistent with the estimated tax deduction data in the response assertion, the assertion fails, and the result tree is displayed in red, thereby determining the location of the current error data.
[0173] In this optional embodiment, the View Results Tree displays all request responses, allowing you to view the response to any request. In addition to displaying the response, you can also view the time it took to obtain the response and some response codes. The View Results Tree is needed to view the results returned by the server after processing the request and analyze whether there are any problems.
[0174] It can be seen from the above technical solution that this application can obtain tax deduction data by calculating the obtained withdrawal data, then divide the tax deduction data, and construct the divided tax deduction data into vector data for verification, which can effectively improve the verification efficiency of the tax deduction data and solve the problem of low efficiency of manual verification.
[0175] See Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Electronic device 1 includes memory 12 and processor 13. Memory 12 is used to store computer-readable instructions, and processor 13 is used to execute the computer-readable instructions stored in the memory to implement the artificial intelligence-based data verification method described in any of the above embodiments.
[0176] In an optional embodiment, the electronic device 1 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as an artificial intelligence-based data verification program.
[0177] Figure 4 Only the electronic device 1 having the memory 12 and the processor 13 is shown. It can be understood by those skilled in the art that Figure 4 The structure shown does not constitute a limitation on the electronic device 1 , and the electronic device 1 may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0178] Combine Figure 1 The memory 12 in the electronic device 1 stores a plurality of computer-readable instructions to implement a data verification method based on artificial intelligence, and the processor 13 can execute the plurality of instructions to implement:
[0179] Build a withdrawal data table based on the test scenario to obtain withdrawal data;
[0180] Calculating the withdrawal data to obtain expected tax deduction data and actual tax deduction data;
[0181] respectively dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set;
[0182] Constructing an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set respectively;
[0183] matching the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result;
[0184] A corresponding verification mode is enabled based on the matching result.
[0185] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0186] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may have either a bus structure or a star structure. The electronic device 1 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components. For example, the electronic device 1 may also include input and output devices, network access devices, etc.
[0187] It should be noted that the electronic device 1 is only an example, and other existing or future electronic products that are suitable for this application should also be included in the scope of protection of this application and incorporated herein by reference.
[0188] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 12 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), etc. equipped on the electronic device 1. The memory 12 can not only be used to store application software and various types of data installed on the electronic device 1, such as the code of the data verification program based on artificial intelligence, but can also be used to temporarily store data that has been output or is to be output.
[0189] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 1, connecting the various components of the entire electronic device 1 using various interfaces and lines. It executes or executes programs or modules stored in the memory 12 (for example, executing an artificial intelligence-based data verification program) and calls data stored in the memory 12 to perform various functions of the electronic device 1 and process data.
[0190] The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned embodiments of the data verification method based on artificial intelligence, such as Figures 1 to 2 Steps shown.
[0191] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, a classification unit 111, a construction unit 112, a matching unit 113, and an activation unit 114.
[0192] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, computer device, or network device, etc.) or a processor to execute the portion of the artificial intelligence-based data verification method described in various embodiments of the present application.
[0193] If the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment methods, and can also instruct the relevant hardware devices to complete them through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments.
[0194] The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory, or other memory.
[0195] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0196] The blockchain referred to in this application is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0197] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The diagram is represented by only one arrow, but it does not mean that there is only one bus or one type of bus. The bus is configured to implement connection and communication between the memory 12 and at least one processor 13, etc.
[0198] Although not shown, the electronic device 1 may also include a power source (such as a battery) to power various components. Preferably, the power source may be logically connected to the at least one processor 13 via a power management device, thereby implementing functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be detailed here.
[0199] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0200] Optionally, the electronic device 1 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0201] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable instructions are stored. The computer-readable instructions are executed by a processor in an electronic device to implement the artificial intelligence-based data verification method described in any of the above embodiments.
[0202] It should be understood that the embodiment is for illustration only and the scope of application is not limited by this structure.
[0203] In the several embodiments provided in this application, 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 merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.
[0204] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0205] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0206] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices listed in the specification may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.
[0207] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A data verification method based on artificial intelligence, characterized in that: include: Build a withdrawal data table based on the test scenario to obtain withdrawal data; Calculating the withdrawal data to obtain expected tax deduction data and actual tax deduction data; respectively dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set; Constructing an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set respectively; matching the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result; The corresponding verification mode is enabled based on the matching result, wherein the matching result includes a correct match and an incorrect match, and the verification mode includes a traversal verification mode and a default mode. The default mode is to match the expected verification vector and the actual verification vector pair by pair in sequence, and the traversal verification mode is to match and verify each data in the error vector one by one in sequence. The enabling of the corresponding verification mode based on the matching result includes: if the matching result is a correct match, enabling the default mode to continue matching the expected verification vector and the actual verification vector; if the matching result is an incorrect match, enabling the traversal verification mode to match and verify the data in the error vector one by one in sequence to obtain the location of the error data in the expected tax deduction data and the actual tax deduction data, including: checking the expected tax deduction data in the error expected verification vector and the actual tax deduction data in the actual verification vector one by one according to the response assertion; displaying the verification result of the response assertion according to the viewing result tree; and determining the location of the error data based on the verification result.
2. The artificial intelligence-based data verification method according to claim 1, characterized in that: The withdrawal data table includes an analysis function, and the withdrawal data obtains expected tax deduction data and actual tax deduction data according to different calculation methods, including: Calculating the withdrawal data according to the analysis function and preset rules to obtain expected tax deduction data; The withdrawal data is calculated according to a preset program interface to obtain actual tax deduction data.
3. The artificial intelligence-based data verification method according to claim 1, characterized in that: The dividing the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set comprises: Calculating the expected tax deduction data and the actual tax deduction data to obtain an expected error sum of squares and an actual error sum of squares respectively; Determining the number of categories of the expected tax deduction data and the actual tax deduction data based on the expected sum of squared errors and the actual sum of squared errors to obtain an expected number of categories and an actual number of categories; The expected tax deduction data and the actual tax deduction data are divided based on the expected classification number and the actual classification number to obtain the expected tax deduction classification set and the actual tax deduction classification set.
4. The artificial intelligence-based data verification method according to claim 1, wherein: The constructing of an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set respectively includes: Arranging the expected tax deduction classification set and the actual tax deduction classification set respectively to obtain expected classification sorting data and actual classification sorting data; An expected verification vector and an actual verification vector for each category are respectively constructed based on the expected classification and ranking data and the actual classification and ranking data.
5. The artificial intelligence-based data verification method according to claim 4, characterized in that: When the expected tax deduction classification set and the actual tax deduction classification set are arranged respectively to obtain expected classification sorting data and actual classification sorting data, the method further includes: If there are multiple identical tax deduction data in the expected classification and sorting data and the actual classification and sorting data, any one data is selected from the multiple identical tax deduction data as sample data, and the number of occurrences of the identical tax deduction data is added to the end of the sample data to merge the multiple identical tax deduction data into one data.
6. A data verification device based on artificial intelligence, characterized in that: include: An acquisition unit, configured to construct a withdrawal data table according to a test scenario to acquire withdrawal data, and further configured to calculate the withdrawal data to acquire expected tax deduction data and actual tax deduction data; a classification unit, configured to classify the expected tax deduction data and the actual tax deduction data to obtain an expected tax deduction classification set and an actual tax deduction classification set; a construction unit, configured to construct an expected verification vector and an actual verification vector based on the expected tax deduction classification set and the actual tax deduction classification set, respectively; a matching unit, configured to match the actual verification vector and the expected verification vector based on a preset vector similarity measurement method to obtain a matching result; An enabling unit is used to enable a corresponding verification mode based on the matching result, wherein the matching result includes a correct match and an incorrect match, and the verification mode includes a traversal verification mode and a default mode. The default mode is to match the expected verification vector and the actual verification vector pair by pair in sequence, and the traversal verification mode is to match and verify each data in the error vector one by one in sequence. Enabling the corresponding verification mode based on the matching result includes: if the matching result is a correct match, enabling the default mode to continue matching the expected verification vector and the actual verification vector; if the matching result is a wrong match, enabling the traversal verification mode to match and verify the data in the error vector one by one in sequence to obtain the location of the error data in the expected tax deduction data and the actual tax deduction data, including: checking the expected tax deduction data in the erroneous expected verification vector and the actual tax deduction data in the actual verification vector one by one according to the response assertion; displaying the verification result of the response assertion according to the viewing result tree; and determining the location of the error data based on the verification result.
7. An electronic device, characterized in that: include: a memory storing computer-readable instructions; and A processor that executes computer-readable instructions stored in the memory to implement the artificial intelligence-based data verification method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the artificial intelligence-based data verification method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for automatically comparing remote signaling signals of main plant station based on lucene
CN111274355A
Data checking method and device, terminal equipment and storage medium
CN112215692A