Business data processing method and device, storage medium and electronic device
By comparing the index data in the business data dictionary before and after the system upgrade, the problem of inability to specify comparison accuracy in the existing technology is solved, and flexible system upgrade judgment is achieved.
Patent Information
- Application Number
- CN202011240929.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-09
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2040-11-09
AI Technical Summary
When comparing the data consistency in the two files, the prior art cannot specify the comparison accuracy of the index value according to the actual situation, resulting in poor flexibility.
By obtaining the data dictionary corresponding to the business data before and after the system upgrade, including the indicator data with the target accuracy of business dimension data and indicator accuracy, the difference between the two is compared to determine whether the system upgrade is successful.
The comparison accuracy of specifying index values based on actual conditions is realized, and the success of the system upgrade can be flexibly judged, and the comparison requirements for specified accuracy are met.
Smart Images

Figure CN112329424B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method and device for processing business data, a storage medium, and an electronic device. Background Art
[0002] When the system or function is upgraded, it is often necessary to recalculate the business within the system. At this time, the business results after recalculation may change. However, from the actual process, even if there is a change in the result data, if the change is within the allowable range, it is considered normal and allowed.
[0003] For example, to calculate the population distribution of certain dimensions or businesses in different cities, the input conditions are: visitor log, visitor IP, visitor source, visitor type and population sample package. The output log and sample package are sampled and crossed to obtain the relevant results of population changes. If the current calculation process involves the upgrade of the crossover algorithm, the same business name, city name, and transaction number will be obtained, but the change rate will not be completely consistent with the original one. From a practical business perspective, if this change rate is within the allowable range, it will not affect the correctness of the entire system.
[0004] In the prior art, the method of comparing whether the data in two files are consistent is: Method 1: Use the diff command in Linux to compare the similarities and differences of the text line by line. For example, enter: $diff<file1><file2> in the command line to get whether there are differences between the files, and the location where the differences appear. Method 2: Use Ultraedit software under Windows to select the files to be compared according to the file path, and display the comparison results. For example, the location where the difference between the files appears is highlighted. As mentioned above, in the method of comparing text data differences in the prior art, as long as there is different content, it will be displayed, which cannot meet the requirements of specified precision comparison.
[0005] Therefore, the related technology cannot specify the comparison accuracy of the indicator value according to the actual situation, and has poor flexibility. Summary of the invention
[0006] The present application provides a method and device for processing business data, a storage medium and an electronic device, so as to at least solve the problem in the related art that the comparison accuracy of indicator values cannot be specified according to actual conditions and the flexibility is poor.
[0007] According to one aspect of an embodiment of the present application, a method for processing business data is provided, the method comprising: obtaining a first data dictionary corresponding to first business data, wherein the first business data is business data before a target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is a target indicator accuracy; obtaining a second data dictionary corresponding to second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator accuracy is the target indicator accuracy; determining a first comparison result between the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0008] Optionally, after obtaining the second data dictionary corresponding to the second business data, the method further includes: obtaining the number of first business categories of the first business data and the number of second business categories of the second business data; determining a second comparison result of the number of the first business categories and the number of the second business categories, wherein the second comparison result is used to indicate whether the number of the first business categories is equal to the number of the second business categories.
[0009] Optionally, after determining the second comparison result of the first number of business types and the second number of business types, the method further includes: determining that the target business system upgrade has failed when the second comparison result is used to indicate that the first number of business types is not equal to the second number of business types.
[0010] Optionally, determining the first comparison result between the first data dictionary and the second data dictionary includes: selecting one entry from the first data dictionary in turn to obtain first combination data corresponding to the entry, wherein the first combination data includes first sub-dimensional data corresponding to the entry in the first business dimension data, and first sub-indicator data corresponding to the entry in the first business indicator data; obtaining second combination data corresponding to a matching entry of the entry from the second data dictionary, wherein the second combination data includes second sub-dimensional data corresponding to the matching entry in the second business dimension data, and second sub-indicator data corresponding to the matching entry in the second business indicator data; determining a target comparison result between the first combination data and the second combination data, wherein the target comparison result is used to indicate whether the first combination data and the second combination result are consistent, wherein the first comparison result includes the target comparison result.
[0011] Optionally, selecting one entry from the first data dictionary in turn to obtain first combined data corresponding to the entry includes: obtaining business dimension data of at least one business dimension corresponding to the entry in the first data dictionary to obtain the first sub-dimension data; obtaining business indicator data of at least one business indicator corresponding to the entry in the first data dictionary to obtain the first sub-indicator data; combining the first sub-dimension data and the first sub-indicator data to obtain the first combined data.
[0012] Optionally, after determining the first comparison result of the first data dictionary and the second data dictionary, the method further includes: when the first comparison result is used to indicate that the first data dictionary and the second data dictionary are consistent, sending first indication information to the target terminal device, wherein the first indication information is used to indicate that the target business system is successfully upgraded; when the second comparison result is used to indicate that the first data dictionary and the second data dictionary are inconsistent, sending second indication information to the target terminal device, wherein the second indication information is used to indicate that the target business system upgrade has failed.
[0013] According to another aspect of an embodiment of the present application, a business data processing device is also provided, the device comprising: a first acquisition module, used to acquire a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data with an indicator accuracy of the target indicator accuracy; a second acquisition module, used to acquire a second data dictionary corresponding to second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data with an indicator accuracy of the target indicator accuracy; a first determination module, used to determine a first comparison result of the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0014] Optionally, the device also includes: a third acquisition module, used to obtain the first number of business types of the first business data and the second number of business types of the second business data after acquiring the second data dictionary corresponding to the second business data; a second determination module, used to determine a second comparison result of the first number of business types and the second number of business types, wherein the second comparison result is used to indicate whether the first number of business types is equal to the second number of business types.
[0015] Optionally, the device also includes: after determining the second comparison result of the first service type number and the second service type number, if the second comparison result is used to indicate that the first service type number is not equal to the second service type number, determining that the target service system upgrade has failed.
[0016] Optionally, the first data dictionary also includes first business dimension data, and the second data dictionary also includes second business dimension data; the first determination module includes: a first selection unit, used to select an entry from the first data dictionary in turn to obtain first combination data corresponding to the entry, wherein the first combination data includes first sub-dimensional data corresponding to the entry in the first business dimension data, and first sub-indicator data corresponding to the entry in the first business indicator data; a second selection unit, used to obtain second combination data corresponding to a matching entry of the entry from the second data dictionary, wherein the second combination data includes second sub-dimensional data corresponding to the matching entry in the second business dimension data, and second sub-indicator data corresponding to the matching entry in the second business indicator data; a determination unit, used to determine a target comparison result of the first combination data and the second combination data, wherein the target comparison result is used to indicate whether the first combination data and the second combination result are consistent, wherein the first comparison result includes the target comparison result.
[0017] Optionally, the first selection unit includes: a first acquisition sub-unit, used to acquire business dimension data of at least one business dimension corresponding to the entry in the first data dictionary, and obtain the first sub-dimension data; a second acquisition sub-unit, used to acquire business indicator data of at least one business indicator corresponding to the entry in the first data dictionary, and obtain the first sub-indicator data; and a combination sub-unit, used to combine the first sub-dimension data and the first sub-indicator data to obtain the first combination data.
[0018] Optionally, the device also includes: a first sending module, used to send first indication information to the target terminal device after determining the first comparison result of the first data dictionary and the second data dictionary, if the first comparison result is used to indicate that the first data dictionary and the second data dictionary are consistent, wherein the first indication information is used to indicate that the target business system is successfully upgraded; a second sending module, used to send second indication information to the target terminal device if the second comparison result is used to indicate that the first data dictionary and the second data dictionary are inconsistent, wherein the second indication information is used to indicate that the upgrade of the target business system has failed.
[0019] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the steps of the method for processing business data in any of the above embodiments by running the computer program stored in the memory.
[0020] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of the method for processing business data in any of the above embodiments when running.
[0021] According to another aspect of the embodiments of the present application, a computer program product or a computer program is also provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the business data processing method in any of the above embodiments.
[0022] In an embodiment of the present application, the indicator data before and after the system upgrade are compared by arbitrarily setting the indicator accuracy to determine whether the system upgrade is successful. The comparison accuracy of the indicator value can be specified according to actual conditions to achieve the purpose of flexibly comparing text differences. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0024] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 It is a schematic diagram of a hardware environment of an optional service data processing method provided by an embodiment of the present invention;
[0026] Figure 2 It is a flowchart of an optional method for processing business data provided in an embodiment of the present application;
[0027] Figure 3 This is a schematic diagram of the overall process of an optional method for processing business data provided by an embodiment of the present application;
[0028] Figure 4 This is a structural block diagram of an optional service data processing device provided in an embodiment of the present application;
[0029] Figure 5 It is a structural block diagram of an optional electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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 devices.
[0032] In the prior art, the methods for comparing whether the data in two files are consistent are: Method 1: using the diff command in Linux to compare the similarities and differences of the text line by line, for example: comparing the text file1.csv with the text file2.csv, where the content of file1.csv is:
[0033] Business 1 Shijiazhuang City 87000 0.000532238344397448399
[0034] Business Zhangjiakou City 75669 0.000439875437534433847
[0035] Business 1 Beijing 129346 0.000798383344934323293
[0036] Business 2 Shijiazhuang City 23000 0.000893744943999454193
[0037] file2.csv content:
[0038] Business 1 Shijiazhuang City 87000 0.000532238695445345345
[0039] Business Zhangjiakou City 75669 0.000439875783432434342
[0040] Business 1 Beijing 129346 0.000798383838479343329
[0041] Business 2 Shijiazhuang City 23000 0.000893744633332323223
[0042] Input command: $diff file1.csv file2.csv, output result:
[0043] 1,4c1,4
[0044] <Business 1 Shijiazhuang City 87000 0.000532238344397448399
[0045] <Business Zhangjiakou City 75669 0.000439875437534433847
[0046] <Business 1 Beijing 129346 0.000798383344934323293
[0047] <Business 2 Shijiazhuang City 23000 0.000893744943999454193
[0048] ---
[0049] >Business 1 Shijiazhuang City 87000 0.000532238695445345345
[0050] >Business: Zhangjiakou City 75669 0.000439875783432434342
[0051] >Business 1 Beijing 129346 0.000798383838479343329
[0052] >Business 2 Shijiazhuang City 23000 0.000893744633332323223
[0053] The above results show that the 4 lines of data in file1.csv and file2.csv are different. It should be noted that in the above output results, c means the content has changed; 4 means all 4 lines have changed; < means the files are different and only the first file (file1.csv) contains the line; > means the files are different and only the second file (file2.csv) contains the line; --- means the second file.
[0054] Method 2: Use Ultraedit software under Windows to select the files to be compared according to the file path, display the comparison results, and highlight the locations where differences occur between the files.
[0055] However, in the existing method of comparing text data differences, as long as there are different contents, they will be displayed, which cannot meet the requirements of specified precision comparison.
[0056] An embodiment of the present application provides a method for processing business data. The method for processing business data can be applied when the system is upgraded or the function is upgraded, and when the business data results change and the change in the data results has no actual impact on the system upgrade. By setting the indicator accuracy comparison value, flexible judgment can be achieved.
[0057] Optionally, in the embodiment of the present application, the above-mentioned method for processing business data can be applied to: Figure 1 In the hardware environment shown in the figure. Figure 1 As shown, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional component). The terminal 102 may be connected to a server 112 via a network 110 for communication. The server 112 may be used to provide services (such as game services, application services, etc.) for the terminal or a consumer terminal installed on the terminal. A database 114 may be set on the server 112 or independently of the server 112 to provide data storage services for the server 112. In addition, a processing engine 116 may be running in the server 112, and the processing engine 116 may be used to execute the steps executed by the server 112.
[0058] Optionally, the terminal 102 may be, but is not limited to, a terminal that can calculate data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a laptop, a PC (Personal Computer), etc. The above network may include, but is not limited to, a wireless network or a wired network. The wireless network includes: Bluetooth, WIFI (Wireless Fidelity) and other networks that implement wireless communication. The above wired network may include, but is not limited to: a wide area network, a metropolitan area network, and a local area network. The above server 112 may include, but is not limited to, any hardware device that can perform calculations.
[0059] In addition, in this embodiment, the above product sales forecasting method can also be applied to, but not limited to, an independent processing device with a relatively powerful processing capability without data interaction. For example, the processing device can be, but not limited to, a terminal device with a relatively powerful processing capability, that is, each operation in the above product sales forecasting method can be integrated in an independent processing device. The above is only an example, and this embodiment does not make any limitation to this.
[0060] Optionally, in this embodiment, the above product sales forecasting method can be executed by the server 112, or by the terminal 102, or by both the server 112 and the terminal 102. The terminal 102 executes the method for processing business data of the embodiment of the present application, or the consumer terminal installed thereon.
[0061] Take running on the server as an example, Figure 2 is a flow chart of an optional method for processing business data according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0062] Step S201, obtaining a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is the target indicator accuracy.
[0063] Optionally, in an embodiment of the present application, first business data before the target business system is upgraded is obtained, and then a first data dictionary corresponding to the first business data is obtained, wherein the target business data can be any business in the current system, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is the target indicator accuracy.
[0064] It should be noted that business dimension data refers to certain characteristics of things or phenomena, such as gender, region, time, etc. In the embodiment of the present application, it can be "business name", "region", etc. The target indicator accuracy refers to the number of digits of the comparison indicator value. For example, if it is set to 9, then you only need to compare the first 9 indicator values.
[0065] In order to more clearly show the expression of indicator data and dimension data, please refer to the content of Table 1. Table 1 is the business data of Bank A before the system module upgrade, in which the number of transactions and the change rate are the first business indicator data in the embodiment of the present application, and the business name and region are the first business dimension data in the embodiment of the present application.
[0066] Table 1
[0067] Business Name area Number of transactions Rate of change Business 1 Shijiazhuang City 87000 0.000532238344397448399 Business 1 Zhangjiakou City 75669 0.000439875437534433847 Business 1 Beijing 129346 0.000798383344934323293 Business 2 Shijiazhuang City 23000 0.000893744943999454193
[0068] Step S202, obtaining a second data dictionary corresponding to the second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator accuracy is the target indicator accuracy.
[0069] Optionally, in an embodiment of the present application, second business data after the target business system is upgraded is obtained, and then a second data dictionary corresponding to the second business data is obtained, the second data dictionary including second business dimension data and second business indicator data with an indicator accuracy of the above-mentioned target indicator accuracy, so that the target indicator accuracy of the first business indicator data and the second business indicator data is the same.
[0070] As shown in Table 2, Table 2 is the business data of Bank A after the system module is upgraded, among which the number of transactions and the rate of change are the second business indicator data in the embodiment of the present application, and the business name and region are the second business dimension data in the embodiment of the present application.
[0071] Table 2
[0072] Business Name area Number of transactions Rate of change Business 1 Shijiazhuang City 87000 0.000532238695445345345 Business 1 Zhangjiakou City 75669 0.000439875783432434342 Business 1 Beijing 129346 0.000798383838479343329 Business 2 Shijiazhuang City 23000 0.000893744633332323223
[0073] Step S203: determining a first comparison result between the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0074] Optionally, based on the target indicator accuracy, the first data dictionary and the second data dictionary are compared to see whether they are completely consistent within the target indicator accuracy range, to obtain a first comparison result.
[0075] For example: Data changes starting from the 10th decimal place do not affect the correctness of the system, so the target indicator precision is set to 9. At this time, only the 9th decimal place of the change rate in Table 1 and Table 2 can be compared, and the decimals behind can be different. From the change rates recorded in Table 1 and Table 2, it can be seen that the first 9 digits are consistent, so it is determined that the current business system upgrade is successful.
[0076] In an embodiment of the present application, the indicator data before and after the system upgrade are compared by arbitrarily setting the indicator accuracy to determine whether the system upgrade is successful. The comparison accuracy of the indicator value can be specified according to actual conditions to achieve the purpose of flexibly comparing text differences.
[0077] As an optional embodiment, after acquiring the second data dictionary corresponding to the second service data, the method further includes:
[0078] Acquire the number of first service categories of the first service data and the number of second service categories of the second service data;
[0079] A second comparison result of the first service category number and the second service category number is determined, wherein the second comparison result is used to indicate whether the first service category number is equal to the second service category number.
[0080] Optionally, after obtaining the first data dictionary before the target business system is upgraded and the second data dictionary after the upgrade, the number of business types contained in the two data dictionaries can be compared first, that is, the number of business data rows contained in the first data dictionary is compared with the number of business data rows contained in the second data dictionary, to obtain a second comparison result. The second comparison result can indicate that the number of the first business types is equal to the number of the second business types, or that the number of the first business types is not equal to the number of the second business types.
[0081] As an optional embodiment, after determining a second comparison result between the number of the first service category and the number of the second service category, the method further includes:
[0082] When the second comparison result indicates that the number of the first service category is not equal to the number of the second service category, it is determined that the upgrade of the target service system has failed.
[0083] Optionally, for example, if the number of business data rows in Table 1 and Table 2 are both 4, then the number of the first business category and the number of the second business category are equal, and the second comparison result can be 1. Only when the number of data rows is equal (that is, the second comparison result is 1), it is necessary to compare the first business indicator data and the second business indicator data within the target indicator accuracy range. If the number of the first business category and the second business category are not equal, the second comparison result can be 0, and it can be directly determined that the target business system upgrade has failed. For details, please refer to Figure 3 The overall flow chart of the method for processing business data is shown.
[0084] The embodiment of the present application compares the number of the first service category and the number of the second service category, and directly determines that the upgrade of the target service system fails when the number of service categories is not equal, thereby saving server resources.
[0085] As an optional embodiment, determining a first comparison result between the first data dictionary and the second data dictionary includes:
[0086] Selecting one entry from the first data dictionary in sequence to obtain first combination data corresponding to the entry, wherein the first combination data includes first sub-dimension data corresponding to the entry in the first business dimension data and first sub-indicator data corresponding to the entry in the first business indicator data;
[0087] Acquire second combination data corresponding to the matching entry of the entry from the second data dictionary, wherein the second combination data includes second sub-dimension data corresponding to the matching entry in the second business dimension data and second sub-indicator data corresponding to the matching entry in the second business indicator data;
[0088] A target comparison result of the first combined data and the second combined data is determined, wherein the target comparison result is used to indicate whether the first combined data and the second combined data are consistent, wherein the first comparison result includes the target comparison result.
[0089] Optionally, an embodiment of the present application compares the business data in Table 1 and Table 2 one by one in the form of rows. Optionally, an entry is selected from the first data dictionary in turn, and the entry corresponds to first combined data. The first combined data includes first sub-dimensional data in the first business dimension data, and first sub-indicator data corresponding to the first sub-dimensional data.
[0090] For example, the first sub-dimension data in Table 1: "Business Name", "Region" and the first sub-indicator data corresponding to the first sub-dimension data: "Number of Transactions", "Change Rate" are taken as a combination, or the first sub-dimension data: "Business Name" and the first sub-indicator data corresponding to the first sub-dimension data: "Change Rate" are taken as a combination to obtain the first combination data. The embodiment of the present application can arbitrarily combine the above-mentioned sub-dimension data. At the same time, the "Business Name", "Region" and "Number of Transactions" here can also be used as the key of the first data dictionary, and the "Change Rate" can also be used as the value of the first data dictionary.
[0091] Among them, when the target indicator accuracy is determined to be 9, the dimensions and indicators in Table 1 are as follows:
[0092] Business 1^Shijiazhuang City 87000 0.000532238
[0093] Business 1^Zhangjiakou City 75669 0.000439875
[0094] Business 1^Beijing 129346 0.0007983833
[0095] Business 2^Shijiazhuang City 23000 0.000893744
[0096] Among them, "Business 1 ^ Zhangjiakou City" are two dimensions, which are combined through the symbol ^ to form a combined dimension.
[0097] The second combination data matching the above items is obtained from the second data dictionary. For example, the second sub-dimension data in Table 2: "Business Name", "Region" and the second sub-indicator data corresponding to the second sub-dimension data: "Number of Transactions", "Rate of Change" can be used as the combination data (second combination data) matching the items in Table 1. Here, "Business Name", "Region", "Number of Transactions" can also be used as the key of the second data dictionary, and "Rate of Change" can also be used as the value of the second data dictionary. As above, the dimension and indicator performance in Table 2 can be obtained in the same way.
[0098] After that, first compare whether the first sub-dimension data in the first combination data is equal to the second sub-dimension data in the second combination data, that is, compare the key values in the first data dictionary and the second data dictionary. If the key values of the first sub-dimension data and the second sub-dimension data are the same, then compare the value values of the first sub-indicator data and the second sub-indicator data within the target indicator accuracy range. As long as the value values of the first sub-indicator data and the second sub-indicator data are not equal, it is determined that the upgrade of the target business system has failed, and the target comparison result is obtained; if the value values of the first sub-indicator data and the second sub-indicator data are equal within the target indicator accuracy range, then it is determined that the upgrade of the target business system has succeeded. It should be noted that the target result is the result of comparing the combined data in each first data dictionary and the second data dictionary, which also reflects the final result of the first comparison result.
[0099] The embodiment of the present application can arbitrarily combine sub-dimensional data to form combined data of different dimensional columns, which can better meet the flexibility requirements of business judgment.
[0100] As an optional embodiment, after determining the first comparison result between the first data dictionary and the second data dictionary, the method further includes:
[0101] When the first comparison result indicates that the first data dictionary and the second data dictionary are consistent, sending first indication information to the target terminal device, wherein the first indication information is used to indicate that the target service system is successfully upgraded;
[0102] When the second comparison result indicates that the first data dictionary and the second data dictionary are inconsistent, second indication information is sent to the target terminal device, wherein the second indication information is used to indicate that the upgrade of the target business system has failed.
[0103] Optionally, after obtaining the first comparison result, the server sends a first indication message or a second indication message to the target terminal device (which may be a mobile phone, tablet computer, PC, etc.), wherein the first indication message is used to indicate that the target business system upgrade is successful, and the second indication message is used to indicate that the target business system upgrade has failed.
[0104] After obtaining the comparison result, the embodiment of the present application sends the comparison result to the target terminal, so that the target terminal can perform subsequent data processing according to the target business system upgrade result.
[0105] As an optional embodiment, Figure 3 , Figure 3 The overall flow diagram of an optional business data processing method provided in an embodiment of the present application, the specific steps are as follows:
[0106] Step S301, obtaining first service data and second service data;
[0107] Step S302, determining whether the number of data rows of the first business data and the second business data is the same; if so, executing step S303, otherwise, executing step S307;
[0108] Step S303, setting the combination data of the first business data and the dimension data in the second business data, and setting the target indicator accuracy;
[0109] Step S304, determining whether the data of each dimension in the combined data are the same; if so, executing step S305, otherwise, executing step S307;
[0110] Step S305, comparing whether the indicator data within the target indicator accuracy range are consistent under the combined data of the same dimension; if so, executing step S306, otherwise, executing step S307;
[0111] Step S306, the target business system is upgraded successfully;
[0112] Step S307: the target business system upgrade fails.
[0113] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0115] According to another aspect of an embodiment of the present application, a business data processing device for implementing the above-mentioned business data processing method is also provided. Figure 4 is a schematic diagram of an optional service data processing device according to an embodiment of the present application, such as Figure 4 As shown, the device may include:
[0116] A first acquisition module 401 is used to acquire a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is the target indicator accuracy;
[0117] A second acquisition module 402 is used to acquire a second data dictionary corresponding to second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data with an indicator accuracy of a target indicator accuracy;
[0118] The first determination module 403 is used to determine a first comparison result between the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0119] In an embodiment of the present application, the indicator data before and after the system upgrade are compared by arbitrarily setting the indicator accuracy to determine whether the system upgrade is successful. The comparison accuracy of the indicator value can be specified according to actual conditions to achieve the purpose of flexibly comparing text differences.
[0120] Optionally, the device also includes: a third acquisition module, used to obtain the number of first business types of the first business data and the number of second business types of the second business data after acquiring the second data dictionary corresponding to the second business data; a second determination module, used to determine a second comparison result of the number of first business types and the number of second business types, wherein the second comparison result is used to indicate whether the number of first business types is equal to the number of second business types.
[0121] Optionally, the device further includes: after determining a second comparison result of the first service category number and the second service category number, determining that the target service system upgrade has failed if the second comparison result is used to indicate that the first service category number is not equal to the second service category number.
[0122] Optionally, the first data dictionary also includes first business dimension data, and the second data dictionary also includes second business dimension data; the first determination module includes: a first selection unit, used to select an entry from the first data dictionary in turn to obtain first combination data corresponding to the entry, wherein the first combination data includes first sub-dimensional data corresponding to the entry in the first business dimension data, and first sub-indicator data corresponding to the entry in the first business indicator data; a second selection unit, used to obtain second combination data corresponding to the matching entry of the entry from the second data dictionary, wherein the second combination data includes second sub-dimensional data corresponding to the matching entry in the second business dimension data, and second sub-indicator data corresponding to the matching entry in the second business indicator data; a determination unit, used to determine a target comparison result of the first combination data and the second combination data, wherein the target comparison result is used to indicate whether the first combination data and the second combination result are consistent, wherein the first comparison result includes the target comparison result.
[0123] Optionally, the first selection unit includes: a first acquisition sub-unit, used to acquire business dimension data of at least one business dimension corresponding to the entry in the first data dictionary, and obtain first sub-dimension data; a second acquisition sub-unit, used to acquire business indicator data of at least one business indicator corresponding to the entry in the first data dictionary, and obtain first sub-indicator data; and a combination sub-unit, used to combine the first sub-dimension data and the first sub-indicator data to obtain first combination data.
[0124] Optionally, the device also includes: a first sending module, used to send first indication information to the target terminal device after determining a first comparison result of the first data dictionary and the second data dictionary, if the first comparison result is used to indicate that the first data dictionary and the second data dictionary are consistent, wherein the first indication information is used to indicate that the target business system upgrade is successful; a second sending module, used to send second indication information to the target terminal device, if the second comparison result is used to indicate that the first data dictionary and the second data dictionary are inconsistent, wherein the second indication information is used to indicate that the target business system upgrade has failed.
[0125] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0126] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned business data processing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0127] Figure 5 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 communicate with each other through the communication bus 504, wherein,
[0128] Memory 503, used for storing computer programs;
[0129] The processor 501 is used to execute the computer program stored in the memory 503 to implement the following steps:
[0130] S1, obtaining a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is a target indicator accuracy;
[0131] S2, obtaining a second data dictionary corresponding to the second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator accuracy is the target indicator accuracy;
[0132] S3, determining a first comparison result between the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0133] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0134] The communication interface is used for communication between the above electronic device and other devices.
[0135] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0136] As an example, Figure 5 As shown, the memory 502 may include but is not limited to the first acquisition module 401, the second acquisition module 402, and the first determination module 403 in the business data processing device. In addition, it may also include but is not limited to other module units in the business data processing device, which will not be repeated in this example.
[0137] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0138] In addition, the above-mentioned electronic device also includes: a display for displaying the processing results of the business data.
[0139] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0140] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only. The device for implementing the above-mentioned product sales forecasting method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 5 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.
[0141] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0142] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the method for processing business data.
[0143] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0144] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0145] S1, obtaining a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is a target indicator accuracy;
[0146] S2, obtaining a second data dictionary corresponding to the second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator accuracy is the target indicator accuracy;
[0147] S3, determining a first comparison result between the first data dictionary and the second data dictionary, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent.
[0148] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0149] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0150] According to another aspect of the embodiments of the present application, a computer program product or a computer program is also provided, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the business data processing method in any of the above embodiments.
[0151] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0152] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application 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, which is stored in a storage medium and includes several instructions for one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the method for processing business data in each embodiment of the present application.
[0153] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0154] In the several embodiments provided in the present application, it should be understood that the disclosed consumer end can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0155] 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 solution provided in this embodiment.
[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0157] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing business data, characterized in that: The method comprises: Acquire a first data dictionary corresponding to the first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator precision is a target indicator precision; Acquire a second data dictionary corresponding to second business data, wherein the second business data is business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator precision is the target indicator precision; Determining a first comparison result between the first data dictionary and the second data dictionary includes: selecting one entry from the first data dictionary in turn to obtain first combination data corresponding to the entry, wherein the first combination data includes first sub-dimensional data corresponding to the entry in the first business dimension data and first sub-indicator data corresponding to the entry in the first business indicator data; obtaining second combination data corresponding to a matching entry of the entry from the second data dictionary, wherein the second combination data includes second sub-dimensional data corresponding to the matching entry in the second business dimension data and second sub-indicator data corresponding to the matching entry in the second business indicator data; determining a target comparison result between the first combination data and the second combination data, wherein the target comparison result is used to indicate whether the first combination data and the second combination data are consistent, wherein the first comparison result includes the target comparison result, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent; After obtaining the second data dictionary corresponding to the second business data, the method further includes: obtaining the number of first business categories of the first business data and the number of second business categories of the second business data; determining a second comparison result of the number of the first business categories and the number of the second business categories, wherein the second comparison result is used to indicate whether the number of the first business categories is equal to the number of the second business categories.
2. The method according to claim 1, characterized in that After determining a second comparison result of the first number of service categories and the second number of service categories, the method further includes: When the second comparison result indicates that the number of the first service types is not equal to the number of the second service types, it is determined that the target service system upgrade has failed.
3. The method according to claim 1, characterized in that The selecting one entry from the first data dictionary in turn to obtain first combination data corresponding to the entry includes: Acquire business dimension data of at least one business dimension corresponding to the entry in the first data dictionary to obtain the first sub-dimension data; Acquire business indicator data of at least one business indicator corresponding to the entry in the first data dictionary to obtain the first sub-indicator data; The first sub-dimension data and the first sub-indicator data are combined to obtain the first combined data.
4. The method according to any one of claims 1 to 3, characterized in that After determining the first comparison result between the first data dictionary and the second data dictionary, the method further includes: When the first comparison result indicates that the first data dictionary and the second data dictionary are consistent, sending first indication information to the target terminal device, wherein the first indication information is used to indicate that the target service system is successfully upgraded; In a case where the second comparison result is used to indicate that the first data dictionary and the second data dictionary are inconsistent, second indication information is sent to the target terminal device, wherein the second indication information is used to indicate that the upgrade of the target business system has failed.
5. A device for processing business data, characterized in that: The device comprises: A first acquisition module is used to acquire a first data dictionary corresponding to first business data, wherein the first business data is business data before the target business system is upgraded, and the first data dictionary includes first business dimension data and first business indicator data whose indicator accuracy is a target indicator accuracy; A second acquisition module is used to acquire a second data dictionary corresponding to the second business data, wherein the second business data is the business data after the target business system is upgraded, and the second data dictionary includes second business dimension data and second business indicator data whose indicator accuracy is the target indicator accuracy; The first determination module, for determining a first comparison result between the first data dictionary and the second data dictionary, comprises: selecting one entry from the first data dictionary in sequence to obtain first combination data corresponding to the entry, wherein the first combination data comprises first sub-dimension data corresponding to the entry in the first business dimension data, and first sub-index data corresponding to the entry in the first business indicator data; obtaining second combination data corresponding to a matching entry of the entry from the second data dictionary, wherein the second combination data comprises second sub-dimension data corresponding to the matching entry in the second business dimension data, and second sub-index data corresponding to the matching entry in the second business indicator data; determining a target comparison result between the first combination data and the second combination data, wherein the target comparison result is used to indicate whether the first combination data and the second combination data are consistent, wherein the first comparison result comprises the target comparison result, wherein the first comparison result is used to indicate whether the first data dictionary and the second data dictionary are consistent; The device also includes: a third acquisition module, used to obtain the first business type number of the first business data and the second business type number of the second business data after obtaining the second data dictionary corresponding to the second business data; a second determination module, used to determine a second comparison result of the first business type number and the second business type number, wherein the second comparison result is used to indicate whether the first business type number is equal to the second business type number.
6. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is used to execute the steps of the business data processing method according to any one of claims 1 to 4 by running the computer program stored in the memory.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the steps of the method for processing business data described in any one of claims 1 to 4 when running.
Citation Information
Patent Citations
Business data fluctuation processing method and device
CN108829638A
Index-based data stream statistics method, server and storage medium
CN109189861A