A data modification method, device, equipment and storage medium
By identifying and replacing the initial characters of non-confidential characters in the database, the problem of storage exceptions when desensitized data is modified is solved, ensuring the accuracy and reliability of data processing.
Patent Information
- Application Number
- CN202410171170.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-02-06
AI Technical Summary
When modifying and saving desensitized data in the database, it may cause data storage abnormalities and affect the accuracy of subsequent data processing.
By responding to the modification command, read and determine the type of the modified character. If it is a non-confidential character, obtain its corresponding initial character, replace the initial character in the database to achieve accurate modification, and establish the relationship between the modified character and the initial character. Correspondence to prevent modification errors caused by desensitization of confidential characters.
It ensures the accuracy of data modification, avoids non-confidential character modification errors caused by desensitization of confidential characters, and improves the accuracy and reliability of database data processing.
Smart Images

Figure CN118069631B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security, and in particular to a data modification method, device, equipment and storage medium. Background Art
[0002] When the data extracted from the database by a user with insufficient authority contains confidential data, the confidential data is desensitized so that the confidential part or all is not displayed to the user, so as to achieve the purpose of keeping the data content confidential. However, after the user changes all or part of the extracted non-confidential data, when the modified data is stored in the database, the modified data does not correspond to the original data in the database, resulting in the modification error in the database, which affects the subsequent processing of non-confidential data. Summary of the invention
[0003] In view of this, the present application provides a data modification method, device, equipment and storage medium, the main purpose of which is to solve the problem of data storage anomalies that may be caused when restoring and modifying data containing desensitized data and saving it in a database.
[0004] To achieve the above objectives, the present application discloses a data modification method in a first aspect, the method comprising:
[0005] In response to the modification instruction, reading the modified character corresponding to the modification instruction;
[0006] Determine the character type corresponding to the modified character, the character type comprising: confidential character and non-confidential character;
[0007] When the modified character is a non-confidential character, obtaining an initial character corresponding to the modified character in the database;
[0008] The original character is replaced with the modified character in the database.
[0009] In a second aspect of the present application, an embodiment provides a data modification device, the device comprising:
[0010] A reading module, configured to read, in response to a modification instruction, a modified character corresponding to the modification instruction;
[0011] A determination module, used for determining the character type corresponding to the modified character, the character type including: a confidential character and a non-confidential character;
[0012] an obtaining module, for obtaining, in the database, an initial character corresponding to the modified character when the modified character is a non-confidential character;
[0013] A replacement module is used to replace the initial character with the modified character in the database.
[0014] In a third aspect of the present application, an electronic device is provided, including:
[0015] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods disclosed in the first aspect.
[0016] In a fourth aspect of the present application, an embodiment provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0017] In summary, according to the technical solution disclosed in the present application, in order to solve the problem of abnormal data storage that may be caused when restoring and modifying data containing desensitized data and saving it in a database, the present application discloses a data modification method, device, equipment and storage medium, which responds to the modification instruction, reads the modified characters corresponding to the modification instruction, and the modified characters are characters in the target string; determines the character type corresponding to the modified characters, and the character types include: confidential characters and non-confidential characters; when the modified characters are non-confidential characters, obtains the initial characters corresponding to the modified characters in the database; replaces the initial characters with the modified characters in the database. By accurately reading the modified characters and according to the type of the modified characters, the initial characters corresponding to the modified characters are accurately identified in the database, and at the same time, the modified characters at this time are emphasized as non-confidential characters. After the accurate identification of the initial characters is achieved, the replacement of the initial characters is completed by relying on the modified characters to achieve the modification of the characters in the database. When modifying non-confidential characters, the technical solution of the present application establishes a corresponding relationship between the modified characters and the corresponding initial characters in the database to directly replace the initial characters with the modified characters, thereby preventing the non-confidential characters in the database from being modified incorrectly due to the desensitization restoration of the confidential characters when confidential characters exist in the data, affecting the accuracy of the data in the database, and further affecting the subsequent processing and acquisition of the data in the database.
[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the embodiments of the present application 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.
[0021] Figure 1 A flow chart of a data modification method provided by an embodiment of the present application is shown;
[0022] Figure 2 The method of displaying data extracted from a database provided in an embodiment of the present application is shown.
[0023] Figure 3 The modified character replacement database modification process provided by the embodiment of the present application is shown;
[0024] Figure 4 A structural diagram of a data modification device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0026] In order to solve the problem of data storage anomalies that may be caused when restoring and modifying data containing desensitized data and saving it in a database. The present application provides the following embodiments to solve the above problem:
[0027] This embodiment provides a data modification method, such as Figure 1 FIG. 1 is a flowchart of the method of this embodiment, and the method of this embodiment may specifically include the following steps:
[0028] Step 101, in response to a modification instruction, read the modified character corresponding to the modification instruction.
[0029] In the content of this embodiment, the relevant content of character modification is proposed. When modifying characters, the modification of characters is completed according to the modification instructions, and modified characters are generated. In the content of this embodiment, the execution object of the modification instructions is the display characters, and the display characters are characters extracted from the database and used to be displayed to the user. Specifically, a corresponding display platform or query platform can be set as a user terminal, and the user can extract data from the database through the user terminal, and further realize the display of the extracted data. Character display is performed on the display platform or the query platform, and the user's character modification instructions are further supported to realize the modification of part or all of the characters in the display characters, and the characters generated according to the modification instructions are used as modified characters.
[0030] Specifically, as shown in the above embodiment, the display characters of the execution modification instruction are obtained from the database, and the specific steps of extracting the display characters are as follows: before responding to the modification instruction and reading the modified characters corresponding to the modification instruction, the method also includes:
[0031] According to the user's query instruction, determine the original string corresponding to the query instruction in the database; verify whether there is a confidential character in the original string; if there is a confidential character in the original string, desensitize the confidential character in the original string and generate a display string;
[0032] In response to the modification instruction, reading the modified character corresponding to the modification instruction includes:
[0033] In response to the modification instruction, the target character in the display character string is modified, and the modified target character is used as the modified character; and the modified character is read.
[0034] In the content of this embodiment, the display characters are extracted from the database. The user sends a data extraction instruction to the database through a display platform or a query platform that has a data connection with the database, and extracts the data corresponding to the query instruction from the database storing the data. The data stored in the database is the original data, and the user can extract the original data from the database through the user terminal to realize the extraction and display of the original data. When executing the query instruction, the original character string corresponding to the query instruction needs to be located in the database first, so that the extracted and displayed characters are the characters required by the user. Secondly, the character type of the original character string is identified. In order to achieve the confidentiality of the data in the database, the user should provide data services with different confidentiality levels for different users. In order to adapt the extraction and display of the characters, this embodiment proposes to identify the character type in the original character string after locating the original character string, and determine whether there is a confidential character in the original character string. In this embodiment, the recognition method for identifying confidential characters in the original character string can be dynamically changed, and the confidential characters corresponding to different users correspond to the confidentiality level of the user. When there is a confidential character in the original character string, the extracted original character is desensitized and displayed, and the desensitized confidential character can also be displayed in conjunction with the non-confidential character in the original character string.
[0035] In the process of extracting data from a database and displaying data, the extracted and displayed data may be a set of data, and the extracted set of data includes multiple data types, for example, Figure 2 As shown, Figure 2 Indicates a display data format. Figure 2 The method of displaying the data extracted from the database is listed in the figure. In this embodiment, the user extracts a kind of personnel information from the database, and the personnel information contains multiple types of data, including: personnel number (ID), personnel name (name), personnel address (address) and personnel telephone (telephone). At the same time, in the user authority of the current extraction and display of data, the personnel number, personnel name and personnel address are non-confidential data and can be displayed directly, and the personnel telephone data is confidential data. Therefore, in the displayed data, the personnel telephone is displayed in the form of a replacement symbol to achieve the purpose of keeping the personnel telephone confidential from the current user.
[0036] In the process of extracting data from the database and displaying the data, the user can perform extraction and display operations through the user terminal, and there is data communication between the user terminal and the database. The user terminal initiates a query instruction to the database based on the user's control, and determines the original string corresponding to the query execution in the database. For example, if the user needs to query the personnel information of "Zhang San" in the database, the user can enter or click the search option corresponding to "Zhang San" in the user terminal, issue a query instruction to the database, and search for data related to "Zhang San" in the database. At this time, the characters related to the data of "Zhang San" are used as the original string.
[0037] In order to display the telephone number of the personnel in the database in the form of a replacement symbol, before the replacement symbol is displayed, the relevant steps of character desensitization are further included. For example, for the current user, the telephone number of the personnel is confidential, so the characters representing the telephone number are confidential characters. Before display, the confidential characters need to be desensitized. Therefore, the confidential characters are desensitized in the original character string to generate a display character string, including:
[0038] Identify the character type of the confidential character in the original character string; determine the desensitization type corresponding to the character type; desensitize the confidential character according to the desensitization type to generate a display character string.
[0039] On the basis of desensitizing confidential content to prevent users from being able to read content beyond their permission, in the content of this embodiment, with respect to the execution method of data desensitization, this embodiment further proposes the selection of desensitization methods for different character types.
[0040] In the database, the stored data exists in a variety of character formats, such as numeric characters, Chinese characters or English characters. The above characters are combined and correspond to each other to represent rich data content. For example, in the personnel information listed above, the character format used to represent the personnel information includes at least: Chinese characters and numeric characters, so as to realize the storage of personnel numbers, personnel names, personnel addresses and personnel telephone numbers.
[0041] When performing a desensitization operation, the desensitization method also needs to correspond to the character format. When performing a desensitization operation, the desensitization methods that can be used include:
[0042] (1) Mask desensitization solution: Use the mask desensitization protection method (i.e. 12345678910 is desensitized to 123******10) to meet the desensitization requirements.
[0043] (2) Fixed mapping scheme: Use a fixed mapping desensitization protection method (taking the telephone number 01234567890 as an example, a fixed mapping method is used for the telephone number 01234567890).
[0044] (3) Encryption scheme: Use additional encryption protection methods for confidential characters.
[0045] In this embodiment, illustratively, when the characters representing a person's phone number are used as confidential characters, a mask desensitization scheme is used to perform a desensitization operation on the phone number. For example, the middle 6 digits of an 11-digit phone number are represented by a mask. For example, when the phone number in the database is 12345678910, when the person's information is displayed, the person's phone number read by the user is 12*******10, and the user cannot obtain the person's accurate phone number, thereby achieving the purpose of keeping the user confidential.
[0046] When the characters representing a person's address are to be kept confidential, that is, when the person's address "Beijing" needs to be hidden when displayed, the confidential characters can be additionally encrypted. For example, random characters can be generated and displayed. Users cannot obtain the person's exact address, thereby achieving the purpose of keeping the information confidential for users.
[0047] When displaying data in the database, the client further supports users to modify the data displayed on the client. Users can modify any data displayed within the scope of their authority. For example, the address of a person extracted from the database is "Beijing City", and the user initiates a modification instruction for "Beijing City" to "Shanghai City". At this time, "Shanghai City" is treated as the modified character.
[0048] Step 102, determining the character type corresponding to the modified character, the character type including: confidential character and non-confidential character.
[0049] After obtaining the modified characters generated by the user performing the modification action, the character type of the modified characters is further identified. In the content of this embodiment, when extracting data from the database and displaying the data, the displayed data has a certain fixed format. For example, for the displayed personnel information of Zhang San, it can be displayed as:
[0050] No.: 001
[0051] Name: Zhang San
[0052] Address: Beijing
[0053] Tel: 12*******10
[0054] Among them, Zhang San's phone number is displayed after being desensitized as a confidential character. The original characters in the database are filled into the corresponding fixed positions and displayed. During the display process, the complete display and desensitized display of the characters are determined according to the character type. When modifying the characters, the character type can be determined according to the execution position of the modification action.
[0055] Step 103: when the modified character is a non-confidential character, an initial character corresponding to the modified character is obtained from a database.
[0056] When the modified characters are non-confidential characters, the correspondence between the modified characters and the initial characters in the database is realized. Wherein, the original character string includes the initial characters. In the process of extracting data from the database, when the data contains confidential characters, it is necessary to perform a desensitization operation on the confidential characters, and then further display the extracted characters. However, when the extracted characters contain both confidential characters and non-confidential characters, the confidential characters are desensitized. For example, personnel information is extracted from the database, and the personnel information includes: personnel number (ID), personnel name (name), personnel address (address) and personnel telephone (telephone). When the personnel telephone is used as confidential data, the personnel telephone is desensitized. When modifying the personnel information, the modified characters are generated, and when the personnel information is a group of data, the modified characters are at least one data in the group of data. When the modified characters are saved to the database, due to the modification of the data, the original characters in the database do not correspond to the modified characters, so that the corresponding relationship between the two cannot be confirmed, and it is difficult to modify the data in the database, which may cause errors in modifying the data in the database. Therefore, the content of this embodiment proposes that when modifying the modified character, after identifying the modified character as a non-confidential character, the modified character is connected with the corresponding initial character in the database to obtain it.
[0057] When the extracted personnel information is an information group, the data type extracted by the information group from the database contains both confidential characters and non-confidential characters. The confidential characters need to be desensitized during extraction, and the desensitized characters need to be restored when modifying and saving the data in the information group. When the modified characters are non-confidential characters, a connection relationship between the modified characters and the corresponding initial characters can be directly established, thereby preventing the personnel information generated by the information group from being unable to establish a corresponding relationship with the initial character string in the database, and preventing modification errors that may be caused by mismatching the saving process.
[0058] In a possible embodiment, after desensitizing the confidential characters according to the desensitization type to generate the target character string, the method further includes:
[0059] If there are non-confidential characters in the original character string, determine a first mapping relationship between the non-confidential characters in the original character string and the display character string; determine a second mapping relationship between the confidential characters in the original character string and the display character string; and establish a character mapping table by combining the first mapping relationship and the second mapping relationship.
[0060] In the present embodiment content, in the extraction and display process of the initial character string, it is necessary to desensitize the confidential characters therein to generate the target character string. And in order to search the initial character string, the present embodiment proposes, after the extraction of the initial character string, to set up a character mapping table. Wherein, non-confidential characters and confidential characters are recorded respectively in the character string, and the desensitization type of the confidential characters. Through this character mapping table, a corresponding relationship between the characters in a user terminal and a database is set up, wherein, the corresponding relationship between the non-confidential characters is a first mapping relationship, and the corresponding relationship between the confidential characters is a second mapping relationship, in conjunction with two kinds of mapping relationships, a character mapping table is set up. In a feasible implementation manner, the character mapping table set up is a kind of API mapping table (Application Programming Interface, application programming interface), and the character mapping table sets up the API connection relationship between the user terminal and the database.
[0061] In a possible embodiment, combining the first mapping relationship and the second mapping relationship to establish a character mapping table includes:
[0062] A first identifier is selected based on the first mapping relationship; a second identifier is selected based on the second mapping relationship; and a character mapping table is established by combining the first identifier and the second identifier.
[0063] When there are many confidential characters and non-confidential characters, the present embodiment further proposes to mark the mapping relationship with an identifier. Since the mapping relationship corresponds to the character type, the character mapping table generated by combining the first identifier and the second identifier can quickly determine the character type corresponding to the character when the character type needs to be read, so that the relevant steps after the type determination are quickly executed when the character is modified.
[0064] In a possible embodiment, obtaining the original character corresponding to the modified character in the database includes:
[0065] Determine a target character corresponding to the modified character; and search the database for an initial character corresponding to the target character according to the first mapping relationship recorded in the character mapping table.
[0066] After the character mapping table is established, when searching for a target character corresponding to a modified character in the specification, the target character can be quickly searched according to the character mapping table.
[0067] After the data is extracted, a character mapping table is established based on the correspondence between the extracted data and the data in the database, so that when the characters are subsequently modified through the user end, the correspondence between the modified characters and the target characters in the database can be quickly found without traversing the database for search. At the same time, when the modified characters are non-confidential characters and belong to the character group, when modifying the database, it is avoided to be affected by the restoration operation of the desensitized characters, thereby causing data modification errors.
[0068] Step 104, replace the original characters with the modified characters in the database.
[0069] After searching the database for the target character corresponding to the modified character through the character mapping table, the target character can be quickly replaced.
[0070] like Figure 3 The modified characters shown replace the initial character modification process in the database. The user modifies the address in the personnel information, for example, from "Beijing" to "Shanghai". "Shanghai" is a modified character and a non-confidential character. When modifying the corresponding characters in the database, in order to avoid the mismatch between the non-confidential data and the original character string when the personnel information is modified as a whole, and the need to further perform restoration of the desensitized telephone number, which may easily cause address modification errors, the character mapping table is used to quickly and accurately replace the target characters, which can prevent address modification errors that may be caused by desensitizing and restoring the telephone number, and also improve replacement efficiency.
[0071] In the technical solution of this embodiment, when modifying non-confidential characters, a correspondence between the modified characters and the corresponding initial characters in the database is established to directly replace the initial characters with the modified characters, thereby preventing the non-confidential characters in the database from being modified incorrectly due to the desensitization restoration of the confidential characters when there are confidential characters in the data, affecting the accuracy of the data in the database, and further affecting the subsequent processing and acquisition of the data in the database.
[0072] This embodiment provides a data modification device, such as Figure 4 As shown, it is a structural diagram of the device of this embodiment, including: a reading module 41, a determining module 42, an obtaining module 43 and a replacing module 44;
[0073] A reading module 41, configured to read, in response to a modification instruction, a modified character corresponding to the modification instruction;
[0074] A determination module 42, configured to determine a character type corresponding to the modified character, wherein the character type includes: a confidential character and a non-confidential character;
[0075] An obtaining module 43, for obtaining, in the database, an initial character corresponding to the modified character when the modified character is a non-confidential character;
[0076] The replacement module 44 is used to replace the initial character with the modified character in the database.
[0077] In a possible embodiment, the data modification device further includes an extraction module 40, which is used to:
[0078] According to the query instruction of the user, determining in the database an original character string corresponding to the query instruction;
[0079] Verify whether the original character string contains a secret character;
[0080] If there are confidential characters in the original character string, desensitize the confidential characters in the original character string to generate a display character string;
[0081] The reading module 41 is used to: modify the target character in the display character string in response to the modification instruction, and use the modified target character as the modified character;
[0082] Read the modified character.
[0083] In a possible embodiment, the extraction module 40 is specifically configured to:
[0084] identifying a character type of the secret character in the original character string;
[0085] Determine a desensitization type corresponding to the character type;
[0086] The confidential characters are desensitized according to the desensitization type to generate a display character string.
[0087] In a possible embodiment, the data modification device further includes an establishment module 45, which is used to:
[0088] If the non-confidential character exists in the original character string, determining a first mapping relationship between the non-confidential character in the original character string and the display character string;
[0089] Determine a second mapping relationship between the secret character and the original character string;
[0090] A character mapping table is established by combining the first mapping relationship and the second mapping relationship.
[0091] In a possible embodiment, a module 45 is established for:
[0092] Selecting a first identifier based on the first mapping relationship;
[0093] Selecting a second identifier based on the second mapping relationship;
[0094] A character mapping table is established by combining the first identifier and the second identifier.
[0095] In a possible embodiment, the obtaining module 43 is specifically used to:
[0096] determining a target character corresponding to the modified character;
[0097] According to the first mapping relationship recorded in the character mapping table, the initial character corresponding to the target character is searched in the database.
[0098] In a possible embodiment, the replacement module 44 is used to:
[0099] Based on the modified character, modify the mapping relationship in the character mapping table, the mapping relationship including the first mapping relationship and / or the second mapping relationship;
[0100] The modified character mapping table is used to replace the initial characters in the database to obtain modified characters.
[0101] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0102] Based on the above Figure 1 The method shown, and Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device that can be configured on the vehicle (such as a new energy vehicle) side, and the device includes at least one processor and a memory that is communicatively connected to the at least one processor; the memory is used to store instructions that can be executed by at least one processor, and the instructions are executed by at least one processor, and the processor is used to execute a computer program to implement the above-mentioned Figure 1 The method shown.
[0103] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0104] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0105] Based on the above Figure 1 The method shown, the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method corresponding to any embodiment is implemented. The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned entity device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the information processing entity device.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or by hardware. By applying the scheme of this embodiment, compared with the current prior art, this embodiment responds to the modification instruction, reads the modified characters corresponding to the modification instruction, and the modified characters are characters in the target string; determines the character type corresponding to the modified characters, and the character types include: confidential characters and non-confidential characters; when the modified characters are non-confidential characters, obtains the initial characters corresponding to the modified characters in the database; replaces the initial characters with the modified characters in the database. By accurately reading the modified characters and according to the type of the modified characters, the initial characters corresponding to the modified characters are accurately identified in the database, and at the same time, the modified characters at this time are emphasized as non-confidential characters. After the accurate identification of the initial characters is achieved, the replacement of the initial characters is completed by relying on the modified characters to achieve the modification of the characters in the database. When modifying non-confidential characters, the technical solution of the present application establishes a correspondence between the modified characters and the corresponding initial characters in the database to directly replace the initial characters with the modified characters, thereby preventing the non-confidential characters in the database from being modified incorrectly due to the desensitization restoration of the confidential characters when confidential characters exist in the data, thereby affecting the accuracy of the data in the database and further affecting the subsequent processing and acquisition of the data in the database.
[0107] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0108] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A data modification method, characterized in that: include: According to the query instruction of the user, determining the original character string corresponding to the query instruction in the database; Verify whether the original character string contains a secret character; If there are confidential characters in the original character string, desensitize the confidential characters in the original character string to generate a display character string, wherein the display character string includes the desensitized confidential characters and / or a combined display of the desensitized confidential characters and non-confidential characters in the original character string; If the non-confidential character exists in the original character string, determining a first mapping relationship between the non-confidential character in the original character string and the display character string; Determine a second mapping relationship between the secret character and the original character string; Combining the first mapping relationship and the second mapping relationship, establishing an API character mapping table, including: selecting a first identifier based on the first mapping relationship; selecting a second identifier based on the second mapping relationship; combining the first identifier and the second identifier to establish an API character mapping table, wherein the API character mapping table is used to establish an API connection relationship between a user terminal and a database; In response to the modification instruction, reading the modified character corresponding to the modification instruction includes: in response to the modification instruction, modifying the target character in the display string, using the modified target character as the modified character; reading the modified character; Determining a character type corresponding to the modified character, the character type including: a confidential character and a non-confidential character, including: determining the character type corresponding to the modified character according to an execution position of the modification action; When the modified character is a non-confidential character, obtaining an initial character corresponding to the modified character in the database; Replacing the initial character with the modified character in the database includes: based on the modified character, modifying the mapping relationship in the API character mapping table, the mapping relationship including the first mapping relationship and / or the second mapping relationship; using the modified API character mapping table to replace the initial character in the database to obtain the modified character.
2. The method according to claim 1, characterized in that The step of desensitizing the confidential characters in the original character string to generate a display character string includes: identifying a character type of the secret character in the original character string; Determine a desensitization type corresponding to the character type; The confidential characters are desensitized according to the desensitization type to generate a display character string.
3. The method according to claim 1, characterized in that The obtaining the initial character corresponding to the modified character in the database comprises: determining a target character corresponding to the modified character; According to the first mapping relationship recorded in the API character mapping table, an initial character corresponding to the target character is searched in the database.
4. A data modification device, characterized in that: include: A first determination module, configured to determine an original character string corresponding to a query instruction in a database according to a query instruction of a user; A verification module, used for verifying whether there is a confidential character in the original character string; a desensitization module, configured to desensitize the confidential characters in the original character string if there are any confidential characters in the original character string, and generate a display character string, wherein the display character string includes the desensitized confidential characters and / or a joint display of the desensitized confidential characters and non-confidential characters in the original character string; A second determination module is configured to determine a first mapping relationship between the non-confidential character in the original character string and the display character string if the non-confidential character exists in the original character string; Determine a second mapping relationship between the secret character and the original character string; Combining the first mapping relationship and the second mapping relationship, establishing an API character mapping table, including: selecting a first identifier based on the first mapping relationship; selecting a second identifier based on the second mapping relationship; combining the first identifier and the second identifier to establish an API character mapping table, wherein the API character mapping table is used to establish an API connection relationship between a user terminal and a database; The reading module is used to respond to the modification instruction and read the modified character corresponding to the modification instruction, including: responding to the modification instruction, modifying the target character in the display string, and using the modified target character as the modified character; reading the modified character; A third determination module is used to determine the character type corresponding to the modified character, the character type including: confidential characters and non-confidential characters, including: determining the character type corresponding to the modified character according to the execution position of the modification action; an obtaining module, for obtaining, in the database, an initial character corresponding to the modified character when the modified character is a non-confidential character; A replacement module, used for replacing the initial character with the modified character in the database, comprises: based on the modified character, modifying the mapping relationship in the API character mapping table, the mapping relationship including the first mapping relationship and / or the second mapping relationship; using the modified API character mapping table to replace the initial character in the database to obtain the modified character.
5. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Sensitive word filtering method and device, computer equipment and storage medium
CN109684469A
RFC file modification method and device, storage medium and terminal
CN111008006A
Data processing method, electronic equipment and storage medium
CN112580094A
Data processing method, device and equipment and readable storage medium
CN113946862A
Sensitive data processing method and device and computer readable storage medium
CN114896633A
