Data processing method, device, medium and program product
By processing the account level and random numbers of financial information data, the problem that the desensitized financial information data does not meet the loan balance is solved, and the validity and security of the data are improved, making it useful for verifying the functions of the accounting system.
Patent Information
- Application Number
- CN202110634362.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-07
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-06-07
AI Technical Summary
The desensitized financial information data obtained in the prior art does not meet the borrowing and loan balance and cannot be used to verify the accounting processing function of the accounting system, resulting in the low validity of the desensitized financial information data.
By obtaining the financial information data to be desensitized from the information database, and reassigning the balance data according to the account level and random numbers, ensuring that the desensitized financial information data meets the preset conditions, such as the summary of the debit balance data equals the summary of the credit balance data, and the balance data at any account level is equal to the sum of multiple balance data below it.
It improves the effectiveness of desensitized financial information data, enables it to be used to verify the accounting processing function of the accounting system, and at the same time enhances the data security to prevent undesensitized data from being reversed through the desensitized data.
Smart Images

Figure CN113221179B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, medium and program product. Background Art
[0002] When testing the accounting system, it is necessary to desensitize the real, undisclosed financial information data to generate test data, and use the test data to test the accounting system. Desensitizing the financial information data can effectively prevent the economic losses and risks caused by the leakage of financial information data during the test process, and effectively protect the property safety. Therefore, how to desensitize the financial information data is the key.
[0003] At present, the desensitization processing of financial information data mainly involves random desensitization of the financial information data. Specifically, the credit balance data and debit balance data in the financial information data are randomly transformed into other values, so as to obtain new credit balance data and debit balance data and generate desensitized financial information data.
[0004] However, the desensitized financial information data obtained through the above method does not meet the credit and debit balance requirement and cannot be used to verify the accounting processing function of the accounting system, resulting in low validity of the desensitized financial information data. Summary of the invention
[0005] The present application provides a data processing method, device, medium and program product to solve the problem that the obtained desensitized financial information data does not meet the credit and debit balance and cannot be used to verify the accounting processing function of the accounting system, resulting in low effectiveness of the desensitized financial information data.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0007] Obtaining financial information data to be desensitized from an information database, wherein the financial information data includes an account level, balance data, and information attributes, wherein the account level includes a credit account level and a debit account level, the balance data includes credit balance data and debit balance data, and the information attributes include credit and debit;
[0008] The balance data is reassigned according to the subject level, the information attribute and the random number to obtain the desensitized financial information data, and the desensitized financial information data meets the preset conditions, which include that the desensitized debit balance data summary is equal to the desensitized credit balance data summary, and the desensitized balance data of any subject level is equal to the sum of multiple balance data under any subject level, the credit balance data is summarized as the sum of all first credit balance data of the first credit subject level, and the debit balance data is summarized as the sum of all first debit balance data of the first debit subject level;
[0009] Output the desensitized financial information data.
[0010] In a possible design of the first aspect, when the information attribute is a credit, re-assigning the balance data according to the account level, the information attribute and the random number includes:
[0011] Add the random number to the credit balance data summary to obtain the desensitized credit balance data summary;
[0012] Re-assign all first credit balance data to obtain desensitized first credit balance data, and the sum of all desensitized first credit balance data is equal to the summary of the desensitized credit balance data;
[0013] Traverse all the second credit balance data under all the desensitized first credit balance data, reassign all the second credit balance data, and obtain the desensitized second credit balance data, where any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under any desensitized first credit balance data;
[0014] Traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data. Any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data under any desensitized second credit balance data.
[0015] In another possible design of the first aspect, when the information attribute is a debit, reassigning the balance data according to the account level, the information attribute and the random number includes:
[0016] Adding the random number to the debit balance data summary to obtain the desensitized debit balance data summary;
[0017] Re-assign all first debit balance data to obtain desensitized first debit balance data, and the sum of all desensitized first debit balance data is equal to the summary of the desensitized debit balance data;
[0018] Traversing all second debit balance data under all desensitized first debit balance data, reassigning all second debit balance data, and obtaining desensitized second debit balance data, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under any desensitized first debit balance data;
[0019] Traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data. Any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data under any desensitized second debit balance data.
[0020] In another possible design of the first aspect, after obtaining the financial information data to be desensitized from the information database, the method further includes:
[0021] According to the information name of the financial information data to be desensitized and the subject level, a subject level association relationship between the multi-level financial information data is established.
[0022] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0023] An acquisition module, used for acquiring financial information data to be desensitized from an information database, wherein the financial information data includes an account level, balance data and information attributes, wherein the account level includes a credit account level and a debit account level, the balance data includes credit balance data and debit balance data, and the information attributes include credit and debit;
[0024] A processing module, used for re-assigning the balance data according to the subject level, the information attribute and the random number, and obtaining the desensitized financial information data, wherein the desensitized financial information data satisfies preset conditions, wherein the preset conditions include that the desensitized debit balance data summary is equal to the desensitized credit balance data summary, and the desensitized balance data of any subject level is equal to the sum of multiple balance data under any subject level, the credit balance data is summarized as the sum of all first credit balance data of the first credit subject level, and the debit balance data is summarized as the sum of all first debit balance data of the first debit subject level;
[0025] An output module is used to output the desensitized financial information data.
[0026] In a possible design of the second aspect, the processing module is specifically configured to:
[0027] Add the random number to the credit balance data summary to obtain the desensitized credit balance data summary;
[0028] Re-assign all first credit balance data to obtain desensitized first credit balance data, and the sum of all desensitized first credit balance data is equal to the summary of the desensitized credit balance data;
[0029] Traverse all the second credit balance data under all the desensitized first credit balance data, reassign all the second credit balance data, and obtain the desensitized second credit balance data, where any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under any desensitized first credit balance data;
[0030] Traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data. Any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data under any desensitized second credit balance data.
[0031] In another possible design of the second aspect, the processing module is specifically configured to:
[0032] Adding the random number to the debit balance data summary to obtain the desensitized debit balance data summary;
[0033] Re-assign all first debit balance data to obtain desensitized first debit balance data, and the sum of all desensitized first debit balance data is equal to the summary of the desensitized debit balance data;
[0034] Traversing all second debit balance data under all desensitized first debit balance data, reassigning all second debit balance data, and obtaining desensitized second debit balance data, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under any desensitized first debit balance data;
[0035] Traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data. Any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data under any desensitized second debit balance data.
[0036] In yet another possible design of the second aspect, the processing module is further configured to:
[0037] According to the information name of the financial information data to be desensitized and the subject level, a subject level association relationship between the multi-level financial information data is established.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor, wherein the processor is used to implement the first aspect and the methods provided by various possible designs when executing the computer program instructions.
[0039] In a fourth aspect, an embodiment of the present application may provide a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect and the methods provided by various possible designs.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the first aspect and the methods provided by various possible designs.
[0041] The data processing method, device, medium and program product provided in the embodiments of the present application, the electronic device obtains the financial information data to be desensitized from the information database, reassigns the balance data according to the subject level and the random number, obtains the desensitized financial information data, and outputs the desensitized financial information data. In this scheme, the electronic device processes the balance data using the subject level, so that the desensitized financial information data meets the preset conditions, can be used to test the test system, and effectively improves the validity of the desensitized financial information data. Not only that, it is impossible to reversely obtain the un-desensitized financial information data through the desensitized financial information data, which effectively protects the security of the account information and the business information that has not been disclosed by the enterprise, and improves the security of the desensitized financial information data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of an application scenario of the data processing method provided in an embodiment of the present application;
[0043] Figure 2 A flowchart of a first embodiment of a data processing method provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of the subject level association relationship provided in the embodiment of the present application;
[0045] Figure 4 A flowchart of a second embodiment of a data processing method provided in an embodiment of the present application;
[0046] Figure 5 A flowchart of a third embodiment of the data processing method provided in the present application;
[0047] Figure 6 A flowchart of a fourth embodiment of a data processing method provided in an embodiment of the present application;
[0048] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0050] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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 are within the scope of protection of this application.
[0052] Before introducing the embodiments of the present application, the application scenarios of the embodiments of the present application are first explained:
[0053] Before the developed system is officially put into use, it is necessary to test the system to verify the integrity of its various functions. The test data in the testing process usually comes from real data in actual production, and real data often contains a lot of sensitive information, such as corporate financial status data and account information data. Therefore, before the system test, it is necessary to desensitize the real data and use the desensitized real data as test data.
[0054] Desensitization refers to the deformation of certain sensitive information (such as personal ID number) through desensitization rules, making the sensitive information lose its sensitivity and realizing reliable protection of sensitive privacy data. When developing and testing the system, if real data from production is used as test data, the sensitive information in these data needs to be desensitized.
[0055] Take the accounting system as an example. Financial information data is confidential information before being made public and is highly sensitive. Since the current accounting principle is the debit-credit accounting method, financial information data has certain internal rules, namely, debit-credit balance, which means that there must be a debit and a credit, and the debit and credit must be equal. Among them, the debit-credit accounting method is a double-entry accounting method that uses debit and credit as accounting symbols to reflect the increase and decrease of economic activities.
[0056] Therefore, when testing the accounting system, it is necessary to desensitize the real, undisclosed financial information data to generate test data, and use the test data to test the accounting system. Desensitizing financial information data means transforming the balance data of financial information data into other amounts, so that the un-desensitized financial information data cannot be obtained through the desensitized financial information data. Desensitizing financial information data can effectively prevent economic losses and risks caused by the leakage of financial information data during the testing process, and effectively protect property safety. Therefore, how to desensitize financial information data is the key.
[0057] At present, there are mainly the following ways to desensitize financial information data:
[0058] First, the balance data of the financial information data is multiplied by the same value at the same time, so as to achieve the purpose of desensitizing the financial information data. However, if the value is an integer, it is easy to infer the un-demensitized financial information data based on the desensitized financial information data (for example, the un-demensitized financial information data can be obtained by finding the common divisor of the balance data of each financial information data, or by comparing with the previously disclosed financial information data). If the value is not an integer, the decimal point of the balance data after desensitization may change. For example, the decimal point of the un-demensitized balance data is 2, and the decimal point of the desensitized balance data is 3, which seriously affects the subsequent use of the desensitized financial information data. If the excess digits of the desensitized balance data are discarded by rounding, the desensitized balance data may no longer have a debit-credit balance, resulting in the inability to use the desensitized financial information data to verify the accounting system's accounting processing functions (such as total score verification, debit-credit balance verification, etc.), and the effectiveness of the desensitized financial information data is low.
[0059] Second, desensitizing financial information data mainly involves random desensitization of financial information data. Specifically, the credit balance data and debit balance data in the financial information data are randomly transformed into other values, thereby obtaining new credit balance data and debit balance data, and generating desensitized financial information data. However, the desensitized financial information data does not meet the credit and debit balance requirements.
[0060] In response to the above problems, the invention of this application is conceived as follows: in the process of desensitizing financial information data, there is no way to ensure the balance of credits and debits of the financial information data during the processing, resulting in the fact that the desensitized financial information data obtained cannot be used to verify the accounting processing function of the accounting system, and the effectiveness is poor. Based on this, the inventor found that if the account level of each financial information data can be obtained, and a certain value is added to the original balance data of each financial information data according to the account level, so that the balance data after desensitization meets the balance of credits and debits, the problem that the desensitized financial information data in the prior art cannot be used to verify the accounting processing function of the accounting system can be solved, thereby improving the effectiveness of the desensitized financial information data, and at the same time improving the security of the desensitized financial information data.
[0061] Exemplarily, the data processing method provided in the embodiment of the present application can be applied to Figure 1 In a schematic diagram of an application scenario shown in FIG. Figure 1 The following is a schematic diagram of an application scenario of the data processing method provided in the embodiment of the present application, which is used to solve the above technical problems. Figure 1 As shown, the application scenario may include: a terminal device 11 and a server 12 , and may also include an information database 13 connected to the server 12 .
[0062] For example, in Figure 1 In the application scenario shown, a large amount of financial information data to be desensitized is stored in the information database 13, and the server 12 can obtain the financial information data to be desensitized from the information database, and execute the program code of the data processing method to obtain the desensitized financial information data. The server 12 can also send the obtained financial information data to be desensitized to the terminal device 11, so that the terminal device 11 executes the program code of the data processing method to obtain the desensitized financial information data.
[0063] It should be noted that the attached Figure 1 This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1 does not limit the equipment included in Figure 1 The positional relationship between the devices in the Figure 1 In the embodiment, the information database 13 can be an external storage relative to the server 12. In other cases, the information database 13 can also be placed in the server 12.
[0064] In actual application, since the terminal device 11 is also a processing device with data processing capability, the above Figure 1The server 12 in the application scenario shown can also be implemented by the terminal device 11. In the embodiment of the present application, the server 12 and the terminal device 11 for data processing can be collectively referred to as electronic devices.
[0065] Optionally, the embodiments of the present application are explained with the execution subject of the data processing method being an electronic device, for example, a background service platform.
[0066] The technical solution of the present application is described in detail below through specific embodiments.
[0067] It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0068] Figure 2 The following is a flow chart of the first embodiment of the data processing method provided in the present application. Figure 2 As shown, the data processing method may include the following steps:
[0069] S101: Obtain the financial information data to be desensitized from the information database.
[0070] In this step, for a given service platform, when there is a need for data processing, the electronic device can obtain the financial information data to be desensitized from the information database.
[0071] The financial information data includes account level, balance data and information attributes. The account level includes credit account level and debit account level. The balance data includes credit balance data and debit balance data. The information attributes include credit and debit.
[0072] Optionally, balance data refers to the data of accounting account balance; credit account level refers to the account level with balance on the credit side; debit account level refers to the account level with balance on the debit side; credit balance data refers to the amount of credit balance on the account, which is the symmetrical balance on the debit side; debit balance data refers to how much funds are left on the debit side.
[0073] In one possible implementation, an electronic device obtains financial information data to be desensitized from an information database. If the information attributes of the financial information data to be desensitized include both credit and debit, the financial information data to be desensitized can be divided into two financial information data, one financial information data having an information attribute of credit and the other financial information data having an information attribute of debit.
[0074] Among them, the electronic device can establish a subject level association relationship between multi-level financial information data based on the information name and subject level of the financial information data to be desensitized.
[0075] Exemplarily, the electronic device obtains the financial information data to be desensitized, and establishes the subject-level association relationship between the multi-level financial information data according to the information name and accounting standards of the financial information data to be desensitized. The electronic device obtains the financial information data of the second level, and establishes the association relationship with the first-level financial information data according to the information name and accounting standards in the financial information data; further, the electronic device obtains the financial information data of the third level, and establishes the association relationship with the second-level financial information data according to the accounting standards and the information name in the financial information data, and so on, until all the financial information data are associated with at least one other financial information data.
[0076] Exemplarily, the subject level can be level one, level two, level three, etc., wherein the level one subject is the level two subject, the level two subject is the level three subject, and so on. If the current subject level does not have a level one subject, the subject level can be sub-account.
[0077] Optionally, the electronic device may also generate a subject level relationship table based on the subject level association relationship between the multi-level financial information data, and store it in the information database.
[0078] By way of example, the financial information data to be desensitized has the information names of Subject 1, Subject 2, Subject 2, Subject 1-1, Subject 1-2, Subject 1-1 Sub-account 1, and Subject 1-1 Sub-account 2 as an example for explanation. Figure 3 This is a schematic diagram of the subject level association relationship provided in the embodiment of this application. Figure 3 As shown, the electronic device establishes an association relationship between subject 1 and subject 1-1 and between subject 1 and subject 1-2 according to accounting standards, and establishes an association relationship between subject 1-1 and subject 1-1 sub-account 1 and between subject 1-1 and subject 1-1 sub-account 2.
[0079] S102: Re-assign the balance data according to the account level and the random number to obtain the desensitized financial information data.
[0080] In this step, after the electronic device obtains the financial information data to be desensitized, in order to ensure the confidentiality of the financial information data, it is necessary to reassign the balance data of the financial information data to be desensitized and obtain the desensitized financial information data, so as to facilitate the subsequent testing of the system to be tested based on the desensitized financial information data and prevent the risks brought by the leakage of the desensitized financial information data.
[0081] Among them, the desensitized financial information data meets the preset conditions, which include that the summary of desensitized debit balance data is equal to the summary of desensitized credit balance data, and the balance data of any account level after desensitization is equal to the sum of multiple balance data under any account level.
[0082] Among them, the credit balance data is summarized as the sum of all the first credit balance data with the first level of the credit account level, and the debit balance data is summarized as the sum of all the first debit balance data with the first level of the debit account level.
[0083] For example, the desensitized financial information data may be as shown in Table 1:
[0084] Table 1
[0085]
[0086] Among them, it can be seen from Table 1 that the debit balance summary is 1900, which is equal to the credit balance summary. The balance data of account 4-1 = the balance data of account 4-1-1 + the balance data of account 4-1-2 + the balance data of account 4-1-3, the balance data of account 4 = the balance data of account 4-1 + the balance data of account 4-2, and the balance data of account 4-1-3 = the balance data of account 4-1-3 sub-account 1 + the balance data of account 4-1-3 sub-account 2. Among them, 4-1-1, 4-1-2, and 4-1-3 are subordinate accounts of account 4-1, and 4-1 and 4-2 are subordinate accounts of account 4.
[0087] S103: Output the desensitized financial information data.
[0088] In this step, the electronic device obtains the desensitized financial information data, and also needs to output the desensitized financial information data to facilitate subsequent testing of the system to be tested.
[0089] Exemplarily, the electronic device can output the desensitized financial information data to an information database, can output the desensitized financial information data to other data storage devices connected to the electronic device, and can also output the desensitized financial information data to other data storage devices connected to the system to be tested. This can be set according to actual conditions, and the embodiments of the present application do not impose specific restrictions on this.
[0090] The data processing method provided in the embodiment of the present application is that the electronic device obtains the financial information data to be desensitized from the information database, reassigns the balance data according to the subject level and the random number, obtains the desensitized financial information data, and outputs the desensitized financial information data. In this scheme, the electronic device processes the balance data using the subject level so that the desensitized financial information data meets the preset conditions and can be used to test the test system, which effectively improves the validity of the desensitized financial information data. Not only that, the un-desensitized financial information data cannot be obtained by inferring the desensitized financial information data, which effectively protects the security of the account information and the business information that has not been disclosed by the enterprise, and improves the security of the desensitized financial information data.
[0091] Based on any of the above embodiments, Figure 4 The following is a flow chart of the second embodiment of the data processing method provided in the present application. Figure 4 As shown, S102 can be implemented by the following steps:
[0092] S201: Add a random number to the credit balance data summary to obtain the desensitized credit balance data summary.
[0093] In this step, since the balance data includes credit balance data and debit balance data, the electronic device needs to process the credit balance data and the debit balance data separately.
[0094] Among them, the credit balance data is summarized as the sum of all first credit balance data with the credit account level being level one.
[0095] In a specific implementation, the electronic device may perform desensitization processing on the credit balance data. The electronic device may sum all first credit balance data with a credit account level of one to obtain a credit balance data summary. Afterwards, the electronic device randomly generates a random number, adds the credit balance data summary to the random number, and thereby obtains a desensitized credit balance data summary.
[0096] Exemplarily, the electronic device may limit the number of digits of the random number to be equal to the number of digits of the credit balance data summary, and may also impose other restrictions on the random number. The restrictions may be imposed based on actual circumstances, and the present application does not impose specific restrictions on this.
[0097] S202: reassign all first credit balance data to obtain desensitized first credit balance data.
[0098] In this step, after desensitizing the first credit balance data, it is necessary to ensure that the desensitized credit balance data meets the preset conditions.
[0099] In a specific implementation, the electronic device needs to obtain all first credit balance data, add a value to each first credit balance data, and obtain the desensitized first credit balance data.
[0100] Among them, the sum of the values added to all the first credit balance data is equal to the random number, and the sum of all the anonymized first credit balance data is equal to the summary of the anonymized credit balance data.
[0101] S203: traverse all second credit balance data under all desensitized first credit balance data, reassign all second credit balance data, and obtain desensitized second credit balance data.
[0102] In this step, after desensitizing all first credit balance data, it is necessary to desensitize all second credit balance data under the desensitized first credit balance data.
[0103] Among them, any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under the desensitized first credit balance data.
[0104] In a specific implementation, the electronic device obtains multiple second credit balance data under any first credit balance data based on the subject level association relationship between the multi-level financial information data, adds a numerical value to each second credit balance data in the multiple second credit balance data, and obtains the desensitized second credit balance data. The electronic device needs to process all the second credit balance data under all the desensitized first credit balance data to obtain all the desensitized second credit balance data. Among them, the numerical value added before any first credit balance data is equal to the sum of the numerical values added to all the second credit balance data under the first credit balance data.
[0105] Exemplarily, the electronic device may limit the value added to each second credit balance data to not be a negative number, or not be 0, or to be an integer, etc. The limitation may be made according to actual conditions, and the present application does not impose any specific limitation on this.
[0106] S204: traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data.
[0107] In this step, after desensitizing all the second credit balance data, it is necessary to desensitize all the third credit balance data below the desensitized second credit balance data.
[0108] Among them, any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data below the desensitized second credit balance data.
[0109] It should be understood that the electronic device can also traverse all third credit balance data under all desensitized second credit balance data. After that, the electronic device can also traverse all fourth credit balance data under all desensitized third credit balance data, etc., until the current credit balance data has no subordinate credit balance data, and then the desensitization process is terminated.
[0110] The data processing method provided in the embodiment of the present application is that the electronic device adds a random number to the credit balance data summary, obtains the desensitized credit balance data summary, reassigns all the first credit balance data, obtains the desensitized first credit balance data, traverses all the second credit balance data of the subordinate of the desensitized first credit balance data, reassigns all the second credit balance data, obtains the desensitized second credit balance data, traverses all the third credit balance data of the subordinate of the desensitized second credit balance data, reassigns all the third credit balance data, and obtains the desensitized third credit balance data. In this scheme, the electronic device reassigns the credit balance data summary, and processes the subordinate credit balance data step by step according to the desensitized credit balance data summary, so that the desensitized credit balance data can meet the preset conditions, effectively ensuring the validity of the credit balance data.
[0111] Based on any of the above embodiments, Figure 5 This is a flow chart of the third embodiment of the data processing method provided in the present application. Figure 5 As shown, S102 can be implemented by the following steps:
[0112] S301: Add a random number to the debit balance data summary to obtain the desensitized debit balance data summary.
[0113] In this step, since the balance data includes debit balance data and credit balance data, the electronic device needs to process the debit balance data and the credit balance data separately.
[0114] Among them, the debit balance data is summarized as the sum of all first debit balance data with the debit account level being level one.
[0115] In a specific implementation, the electronic device may perform desensitization processing on the debit balance data. The electronic device may sum all the first debit balance data with the first debit account level to obtain the debit balance data summary. Afterwards, the electronic device randomly generates a random number, adds the debit balance data summary to the random number, and thereby obtains the desensitized debit balance data summary.
[0116] S302: reassign all first debit balance data to obtain desensitized first debit balance data.
[0117] In this step, after desensitizing the first debit balance data, it is necessary to ensure that the desensitized debit balance data meets the preset conditions.
[0118] In a specific implementation, the electronic device needs to obtain all first debit balance data, add a value to each first debit balance data, and obtain the desensitized first debit balance data.
[0119] Among them, the sum of the values added to all the first debit balance data is equal to the random number, and the sum of all the desensitized first debit balance data is equal to the summary of the desensitized debit balance data.
[0120] S303: traverse all second debit balance data under all desensitized first debit balance data, reassign all second debit balance data, and obtain desensitized second debit balance data.
[0121] In this step, after desensitizing all first debit balance data, it is necessary to desensitize all second debit balance data that are subordinate to the desensitized first debit balance data.
[0122] Among them, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under the desensitized first debit balance data.
[0123] In a specific implementation, the electronic device obtains multiple second debit balance data under any first debit balance data based on the subject level association relationship between the multi-level financial information data, and can add a value to each of the multiple second debit balance data to obtain the desensitized second debit balance data. The electronic device needs to process all the second debit balance data under all the desensitized first debit balance data to obtain all the desensitized second debit balance data. Among them, the value added before any first debit balance data is equal to the sum of the values added to all the second debit balance data under the first debit balance data.
[0124] S304: traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data.
[0125] In this step, after desensitizing all the second debit balance data, it is necessary to desensitize all the third debit balance data below the desensitized second debit balance data.
[0126] Among them, any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data below the desensitized second debit balance data.
[0127] It should be understood that the electronic device can also traverse all third debit balance data under all desensitized second debit balance data. After that, the electronic device can also traverse all fourth debit balance data under all desensitized third debit balance data, etc., until the current debit balance data has no subordinate debit balance data, and then the desensitization process is terminated.
[0128] The data processing method provided by the embodiment of the present application is that the electronic device adds a random number to the debit balance data summary, obtains the debit balance data summary after desensitization, reassigns all the first debit balance data, obtains the first debit balance data after desensitization, traverses all the second debit balance data of the subordinate of the first desensitized debit balance data, reassigns all the second debit balance data, obtains the second debit balance data after desensitization, traverses all the third debit balance data of the subordinate of the second debit balance data after desensitization, reassigns all the third debit balance data, and obtains the third debit balance data after desensitization. In this scheme, the electronic device reassigns the debit balance data summary, and processes the subordinate debit balance data step by step according to the desensitized debit balance data summary, so that the desensitized debit balance data can meet the preset conditions, effectively ensure the validity of the debit balance data, and cannot reversely infer the un-desensitized debit balance data based on the desensitized debit balance data, thereby improving the security of the debit balance data after desensitization.
[0129] Exemplarily, based on any of the above embodiments, the method may further include the following steps: taking the credit balance data as an example, the electronic device obtains the credit balance data for which there is no subordinate credit balance data, or obtains the credit balance data for the account level as a separate household, and adds a numerical value to each credit balance data to obtain each desensitized credit balance data. Then, the credit balance data of the superior of each desensitized credit balance data is obtained, and a numerical value is added to the superior credit balance data, so that the desensitized superior credit balance data is equal to the sum of all the desensitized credit balance data of the subordinate of the desensitized superior credit balance data, and so on, until a numerical value is added to the credit balance data summary to obtain the desensitized credit balance data summary.
[0130] Afterwards, the electronic device executes the processing method in the third embodiment on the debit balance data, wherein the random number in the third embodiment needs to be equal to the value added to the summary of the credit balance data.
[0131] Based on any of the above embodiments, Figure 6 The flowchart of the fourth embodiment of the data processing method provided in the present application is as follows. Figure 6 As shown, the data processing method can be implemented by the following steps:
[0132] Step 1: Obtain the financial information data to be desensitized;
[0133] Step 2: Check whether there is financial information data with information attributes including both credit and debit. If yes, jump to step 3; if no, jump to step 4.
[0134] Step 3: divide the financial information data to be desensitized into two financial information data, and jump to step 5;
[0135] Step 4: Preprocess the financial information data to be desensitized according to its information attributes;
[0136] Step 5: Obtain the account level and balance data of the financial information data to be desensitized;
[0137] Step 6: According to the information name of the financial information data to be desensitized, establish the subject-level association relationship between the multi-level financial information data and generate a subject-level relationship table.
[0138] Step 7: Re-assign the desensitized financial information data with the information attribute of debit according to the account level and the random number to obtain the desensitized debit balance data;
[0139] Step 8: Re-assign the financial information data to be desensitized whose information attribute is the creditor according to the subject level and the random number, and obtain the desensitized credit balance data;
[0140] Step 9. Desensitization processing is completed and financial information data is output.
[0141] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0142] Figure 7 This is a schematic diagram of the structure of the data processing device provided in the embodiment of the present application. Figure 7 As shown, the data processing device includes:
[0143] The acquisition module 71 is used to acquire the financial information data to be desensitized from the information database, wherein the financial information data includes the account level, the balance data and the information attribute, wherein the account level includes the credit account level and the debit account level, the balance data includes the credit balance data and the debit balance data, and the information attribute includes the credit and the debit;
[0144] Processing module 72 is used to reassign the balance data according to the subject level, the information attribute and the random number to obtain the desensitized financial information data, and the desensitized financial information data meets the preset conditions, and the preset conditions include that the desensitized debit balance data summary is equal to the desensitized credit balance data summary, and the balance data of any subject level after desensitization is equal to the sum of multiple balance data under any subject level, the credit balance data is summarized as the sum of all first credit balance data of the first credit subject level, and the debit balance data is summarized as the sum of all first debit balance data of the first debit subject level.
[0145] The output module 73 is used to output the desensitized financial information data.
[0146] In a possible design of the embodiment of the present application, the processing module 73 is specifically used to:
[0147] Add the random number to the credit balance data summary to obtain the desensitized credit balance data summary;
[0148] Re-assign all first credit balance data to obtain desensitized first credit balance data, and the sum of all desensitized first credit balance data is equal to the summary of the desensitized credit balance data;
[0149] Traverse all the second credit balance data under all the desensitized first credit balance data, reassign all the second credit balance data, and obtain the desensitized second credit balance data, where any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under any desensitized first credit balance data;
[0150] Traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data. Any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data under any desensitized second credit balance data.
[0151] In another possible design of the embodiment of the present application, the processing module 73 is specifically used to:
[0152] Adding the random number to the debit balance data summary to obtain the desensitized debit balance data summary;
[0153] Re-assign all first debit balance data to obtain desensitized first debit balance data, and the sum of all desensitized first debit balance data is equal to the summary of the desensitized debit balance data;
[0154] Traversing all second debit balance data under all desensitized first debit balance data, reassigning all second debit balance data, and obtaining desensitized second debit balance data, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under any desensitized first debit balance data;
[0155] Traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data. Any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data under any desensitized second debit balance data.
[0156] In another possible design of the embodiment of the present application, the processing module 73 is further used to:
[0157] According to the information name of the financial information data to be desensitized and the subject level, a subject level association relationship between the multi-level financial information data is established.
[0158] The data processing device provided in the embodiments of the present application can be used to execute the data processing method in any of the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.
[0159] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0160] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include: a processor 81, a memory 82, and computer program instructions stored in the memory 82 and executable on the processor 81. When the processor 81 executes the computer program instructions, the data processing method provided in any of the aforementioned embodiments is implemented.
[0161] Optionally, the electronic device may further include an interface for interacting with other devices.
[0162] Optionally, the above-mentioned components of the electronic device may be connected via a system bus.
[0163] The memory 82 may be a separate storage unit or a storage unit integrated in the processor. The number of processors may be one or more.
[0164] It should be understood that the processor 81 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present application can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0165] The system bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The system bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory may include random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.
[0166] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated as: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.
[0167] The electronic device provided in the embodiments of the present application can be implemented as a terminal device or a server, and can be used to execute the data processing method provided in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0168] An embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the above-mentioned data processing method.
[0169] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0170] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0171] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the above-mentioned data processing method can be implemented.
[0172] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: include: Obtaining financial information data to be desensitized from an information database, wherein the financial information data includes an account level, balance data, and information attributes, wherein the account level includes a credit account level and a debit account level, the balance data includes credit balance data and debit balance data, and the information attributes include credit and debit; The balance data is reassigned according to the subject level, the information attribute and the random number to obtain the desensitized financial information data, and the desensitized financial information data meets the preset conditions, which include that the desensitized debit balance data summary is equal to the desensitized credit balance data summary, and the desensitized balance data of any subject level is equal to the sum of multiple balance data under any subject level, the credit balance data is summarized as the sum of all first credit balance data of the first credit subject level, and the debit balance data is summarized as the sum of all first debit balance data of the first debit subject level; Outputting the desensitized financial information data; When the information attribute is a credit, the re-assignment of the balance data according to the account level, the information attribute and the random number includes: Add the random number to the credit balance data summary to obtain the desensitized credit balance data summary; Re-assign all first credit balance data to obtain desensitized first credit balance data, and the sum of all desensitized first credit balance data is equal to the summary of the desensitized credit balance data; Traverse all the second credit balance data under all the desensitized first credit balance data, reassign all the second credit balance data, and obtain the desensitized second credit balance data, where any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under any desensitized first credit balance data; Traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data. Any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data under any desensitized second credit balance data.
2. The method according to claim 1, characterized in that When the information attribute is a debit, re-assigning the balance data according to the account level, the information attribute and the random number includes: Adding the random number to the debit balance data summary to obtain the desensitized debit balance data summary; Re-assign all first debit balance data to obtain desensitized first debit balance data, and the sum of all desensitized first debit balance data is equal to the summary of the desensitized debit balance data; Traversing all second debit balance data under all desensitized first debit balance data, reassigning all second debit balance data, and obtaining desensitized second debit balance data, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under any desensitized first debit balance data; Traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data. Any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data under any desensitized second debit balance data.
3. The method according to claim 1, characterized in that After obtaining the financial information data to be desensitized from the information database, the method further includes: According to the information name of the financial information data to be desensitized and the subject level, a subject level association relationship between the multi-level financial information data is established.
4. A data processing device, characterized in that: include: An acquisition module, used for acquiring financial information data to be desensitized from an information database, wherein the financial information data includes an account level, balance data and information attributes, wherein the account level includes a credit account level and a debit account level, the balance data includes credit balance data and debit balance data, and the information attributes include credit and debit; A processing module, used for re-assigning the balance data according to the subject level, the information attribute and the random number, and obtaining the desensitized financial information data, wherein the desensitized financial information data satisfies preset conditions, wherein the preset conditions include that the desensitized debit balance data summary is equal to the desensitized credit balance data summary, and the desensitized balance data of any subject level is equal to the sum of multiple balance data under any subject level, the credit balance data is summarized as the sum of all first credit balance data of the first credit subject level, and the debit balance data is summarized as the sum of all first debit balance data of the first debit subject level; An output module, used to output the desensitized financial information data; When the information attribute is a credit, the processing module is specifically used to: Add the random number to the credit balance data summary to obtain the desensitized credit balance data summary; Re-assign all first credit balance data to obtain desensitized first credit balance data, and the sum of all desensitized first credit balance data is equal to the summary of the desensitized credit balance data; Traverse all the second credit balance data under all the desensitized first credit balance data, reassign all the second credit balance data, and obtain the desensitized second credit balance data, where any desensitized first credit balance data is equal to the sum of multiple desensitized second credit balance data under any desensitized first credit balance data; Traverse all third credit balance data under all desensitized second credit balance data, reassign all third credit balance data, and obtain desensitized third credit balance data. Any desensitized second credit balance data is equal to the sum of multiple desensitized third credit balance data under any desensitized second credit balance data.
5. The device according to claim 4, characterized in that When the information attribute is a debit, the processing module is specifically used to: Adding the random number to the debit balance data summary to obtain the desensitized debit balance data summary; Re-assign all first debit balance data to obtain desensitized first debit balance data, and the sum of all desensitized first debit balance data is equal to the summary of the desensitized debit balance data; Traversing all second debit balance data under all desensitized first debit balance data, reassigning all second debit balance data, and obtaining desensitized second debit balance data, any desensitized first debit balance data is equal to the sum of multiple desensitized second debit balance data under any desensitized first debit balance data; Traverse all third debit balance data under all desensitized second debit balance data, reassign all third debit balance data, and obtain desensitized third debit balance data. Any desensitized second debit balance data is equal to the sum of multiple desensitized third debit balance data under any desensitized second debit balance data.
6. The device according to claim 4, characterized in that The processing module is further used for: According to the information name of the financial information data to be desensitized and the subject level, a subject level association relationship between the multi-level financial information data is established.
7. An electronic device comprising: A processor, a memory, and computer program instructions stored in the memory and executable on the processor, wherein the processor is used to implement the data processing method according to any one of claims 1 to 3 when executing the computer program instructions.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the data processing method according to any one of claims 1 to 3 when executed by a processor.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it is used to implement the data processing method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Data desensitization system and method
CN107766741A
Method and device for leveling subjects in financial general ledger report table
CN111951092A