Method, device and equipment for replacing and desensitizing Chinese name fields
By using a one-to-many mapping table and hash value calculation method, the reversibility and data leakage problems of Chinese name fields are solved, ensuring the relevance and security of name fields, and making it suitable for data analysis and mining.
Patent Information
- Application Number
- CN202510926315.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-11-18
AI Technical Summary
Existing methods for anonymizing Chinese name fields are reversible, leading to the risk of data leakage. Furthermore, in cases where the mapping relationship between some real data and anonymized data is leaked, the relevance and security of the data cannot be guaranteed.
A one-to-many mapping table is used as the basic mapping table. By calculating the hash value and offset of the name, the set of Chinese characters is randomly arranged to form an irreversible desensitization method, ensuring the relevance and security of the name field.
This approach maximizes the relevance of the name field and its application in data analysis and mining even in the event of a data breach, without affecting the use of the anonymized data, thus improving data security.
Smart Images

Figure CN120974528A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of data processing, and in particular, to a Chinese name field replacement and desensitization method, device and equipment. BACKGROUND
[0002] With the advent of the big data era, mining and analysis from big data can discover huge commercial value. However, these mining and utilization also bring huge security problems, for example, there may be personal name privacy data in the data, and therefore, how to protect these data in business analysis, development testing and audit supervision and other use processes becomes a very important security requirement. Generally, the privacy protection of personal names will choose a data desensitization method. Especially in cross-department information sharing, information publishing and other application scenarios, customer data often needs to be delivered to third-party institutions, untrusted departments, the public and the like, and the protection of customer privacy during the data delivery process is crucial. Names are a kind of representative user privacy information, and usually need to be desensitized.
[0003] The existing data desensitization methods mainly include three kinds:
[0004] 1. A data desensitization method based on format reservation is adopted, but the data cannot be restored after desensitization using this desensitization method, and the ciphertext obtained after the same plaintext is encrypted is also the same, which increases the risk of cracking.
[0005] 2. Common Chinese characters in names are generated into a mapping table, and the Chinese characters in the name are replaced one by one according to the mapping relationship in the mapping table, so as to finally achieve the purpose of replacement and desensitization. For security reasons, the mapping table needs to be replaced regularly. Or n mapping tables of commonly used Chinese characters in names are generated, and the position of the Chinese character in the name is taken modulo n to determine which mapping table to use for mapping, for example, for replacement and desensitization of “Zhang San”, the position of “Zhang” in the name is 1, the number of mapping tables is 3, and the result of the modulo operation is 1, so “Zhang” is replaced according to code table 1, and the rest of the Chinese characters are replaced in the same way. For security reasons, the mapping table needs to be replaced regularly.
[0006] The above two methods make the mapping results of the same name field the same, ensuring the correlation of the data, but the algorithm is too simple and has reversibility, and in the case of leakage of part of the real data and desensitized data, more desensitized data can be cracked according to the derived mapping relationship, and the security is low.
[0007] 3. The Chinese characters used in the name are directly randomly mapped to another Chinese character, although the algorithm is irreversible, but the name field loses the correlation.
[0008] Therefore, there is an urgent need for a method for replacing and desensitizing a Chinese name field to solve the problem of data leakage caused by the reversibility of the algorithm and the mapping relationship between the desensitized result and the real name in the prior art. SUMMARY
[0009] To solve the problem of data leakage caused by the mapping relationship between the desensitized result and the real name in the prior art, the embodiments of the present specification provide a method, device and equipment for replacing and desensitizing a Chinese name field, which can maximize the correlation of the Chinese name field and does not affect the data analysis and mining application after desensitization. The algorithm is irreversible and has high security. In the case of leakage of the mapping relationship between part of the real data and the desensitized data, it will not cause larger range of data leakage. In order to solve the above technical problems, the specific technical solutions of the present specification are as follows:
[0010] In one aspect, the embodiments of the present specification provide a method for replacing and desensitizing a Chinese name field, comprising,
[0011] Randomly arranging Chinese characters commonly used in names to form a one-to-many mapping basic mapping table, wherein the mapping table includes an original Chinese character set and at least one mapping Chinese character set;
[0012] Calculating the hash value of the real name to be desensitized, and performing modulo operation on the hash value and the number of non-repeated Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name;
[0013] Matching each Chinese character in the real name to be desensitized in the original Chinese character set, selecting the mapping Chinese character set corresponding to the Chinese character according to the position of the Chinese character in the name, and obtaining the desensitized Chinese character in the corresponding mapping Chinese character set according to the matching result of each Chinese character and its offset;
[0014] Obtaining the desensitized Chinese character of each Chinese character in the real name to be desensitized in turn, and combining the desensitized Chinese characters into the final desensitized name.
[0015] Further, the modulo operation on the hash value and the number of non-repeated Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name further comprises,
[0016] The formula for calculating the offset is:
[0017] Pt=(Hash(name+x)+Py)Mod Lm,
[0018] Wherein, Pt is the position of the desensitized Chinese character in the mapping Chinese character set; Py is the position of the Chinese character in the original Chinese character set before desensitization; x is a single random Chinese character concatenated with the real name to be desensitized; and Lm represents the length of the code table.
[0019] Further, the calculating the hash value of the real name to be de-sensitized comprises,
[0020] The hash value of the real name to be de-sensitized is calculated by using any one of MD5, SHA-1, SHA-256 or SHA-512 algorithm.
[0021] Further, the obtaining the de-sensitized Chinese character from the mapping Chinese character set according to the matching result of each Chinese character and the offset thereof further comprises,
[0022] The corresponding mapping Chinese character set is selected according to the position of each Chinese character in the real name in the real name;
[0023] The de-sensitized Chinese character is obtained by circularly moving in the mapping Chinese character set according to the matching result in the basic mapping table and the offset.
[0024] Further, the randomly arranging the commonly used Chinese characters in names to form a basic mapping table of one-to-many mapping further comprises,
[0025] The commonly used Chinese characters in names are collected and randomly sorted to generate the original Chinese character set;
[0026] The Chinese characters in the original Chinese character set are randomly shuffled to generate four different mapping Chinese character sets;
[0027] The original Chinese character set and the mapping Chinese character set are one-to-four mapped and integrated into the basic mapping table.
[0028] Further, the randomly arranging the commonly used Chinese characters in names to form a basic mapping table of one-to-many mapping further comprises,
[0029] The basic mapping table is periodically updated according to a preset period, and the original Chinese character set and the mapping Chinese character set are randomly shuffled.
[0030] In another aspect, the embodiments of the present specification also provide a Chinese name field replacement de-sensitization device, comprising,
[0031] A mapping table generating unit is configured to randomly arrange commonly used Chinese characters in names to form a basic mapping table of one-to-many mapping, and the mapping table comprises an original Chinese character set and at least one mapping Chinese character set;
[0032] An offset calculating unit is configured to calculate a hash value of a real name to be de-sensitized, and perform a modulo operation on the hash value and the number of non-repeated Chinese characters in the basic mapping table to obtain an offset of each Chinese character in the real name;
[0033] The Chinese character desensitization unit is configured to match each Chinese character in the real name to be desensitized in the original Chinese character set, and obtain a desensitized Chinese character in the mapping Chinese character set according to the matching result of each Chinese character and the offset thereof;
[0034] The desensitized name generation unit is configured to sequentially obtain the desensitized Chinese character of each Chinese character in the real name to be desensitized, and combine the desensitized Chinese characters into a final desensitized name.
[0035] In another aspect, the embodiments of the present specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory, and the processor implements the above method when executing the computer program.
[0036] Finally, the embodiments of the present specification also provide a computer storage medium having a computer program stored thereon, and the computer program is executed by the processor of the computer device to perform the above method.
[0037] By using the embodiments of the present specification, the relevance of the Chinese name field is maximally ensured, the data analysis and mining application after desensitization is not affected, even if part of the real data and the desensitized data mapping relationship is leaked, it will not cause larger range of data leakage. By randomly arranging the commonly used Chinese characters in the name to form a one-to-one mapping basic mapping table, then obtaining the real name to be desensitized and calculating the hash value, then performing a modulo operation according to the hash value and the number of non-repeated Chinese characters in the basic mapping table to obtain the offset, so as to ensure that the multiple calculation results are consistent when the offset of the same name is calculated multiple times based on the same basic mapping table, and after obtaining the offset of each Chinese character in the real name, the desensitized Chinese character is obtained by matching in the basic mapping table and according to the offset, and the final desensitized name is formed. The problem of the prior art that if the relevance of the data is ensured, the algorithm will have reversibility, and more desensitized data can be cracked according to the derived mapping relationship, and the security is low, and if random mapping is performed, the algorithm is irreversible, but the name field loses the relevance. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present specification, and other drawings can be obtained by those skilled in the art without creating any inventive labor.
[0039] Figure 1 The figure shows an implementation system schematic diagram of a Chinese name field replacement desensitization method according to an embodiment of the present specification;
[0040] Figure 2The diagram shown is a flowchart of a method for replacing and desensitizing a Chinese name field according to an embodiment of this specification.
[0041] Figure 3 The diagram illustrates the process by which desensitized Chinese characters are obtained from the mapped Chinese character set based on the matching result and offset of each Chinese character, as described in this embodiment of the specification.
[0042] Figure 4 The diagram illustrates the process of randomly arranging commonly used Chinese characters in a name to form a basic mapping table for a one-to-many mapping, as described in an embodiment of this specification.
[0043] Figure 5 The diagram shown is a flowchart of an embodiment of the replacement and desensitization of the Chinese name field in this specification.
[0044] Figure 6 The diagram shows an example of a text specification embodiment where the Chinese name field is replaced and desensitized.
[0045] Figure 7 The diagram shown is a structural schematic of a Chinese name field replacement and desensitization device according to an embodiment of this specification.
[0046] Figure 8 The diagram shown is a structural schematic of the computer device according to an embodiment of this specification.
[0047] [Explanation of Figure Markers]:
[0048] 101. Terminal;
[0049] 102. Server;
[0050] 701. Mapping table generation unit;
[0051] 702. Offset Calculation Unit;
[0052] 703. Chinese Character Desensitization Unit;
[0053] 704. Desensitized Name Generation Unit;
[0054] 802. Computer equipment;
[0055] 804. Processing equipment;
[0056] 806. Storage resources;
[0057] 808. Drive mechanism;
[0058] 810. Input / Output Module;
[0059] 812. Input devices;
[0060] 814. Output devices;
[0061] 816. Presentation equipment;
[0062] 818. Graphical User Interface;
[0063] 820. Network interface;
[0064] 822. Communication link;
[0065] 824. Communication bus. Detailed Implementation
[0066] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0067] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0068] like Figure 1 The diagram illustrates a system implementation method for replacing and de-identifying a Chinese name field according to an embodiment of this specification. It includes a terminal 101 and a server 102, with a communication connection established between the terminal 101 and the server 102 to enable data interaction. The terminal 101 can input its real name into the server 102. The server 102 calculates the offset of the real name based on a basic mapping table formed by randomly arranging commonly used Chinese characters, matches it in the basic mapping table, obtains the de-identified Chinese characters based on the offset, combines the de-identified Chinese characters into the final de-identified name, and sends it to the terminal 101 for display or storage.
[0069] In the embodiments of this specification, the server 102 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0070] In an optional embodiment, terminal 101 may include, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices. Optionally, the operating system running on the electronic device may include, but is not limited to, Android, iOS, Linux, and Windows.
[0071] It should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included, which are not limited in the embodiments of this specification.
[0072] To address the problems existing in the prior art, this specification provides a method, apparatus, device, and storage medium for replacing and desensitizing Chinese name fields. Figure 2 The diagram shows a flowchart of a method for replacing and desensitizing a Chinese name field according to an embodiment of this specification. The process of replacing and desensitizing the Chinese name field is described in the diagram. The order of steps listed in the embodiment is only one possible execution order among many steps and does not represent the only possible execution order. In actual system or device products, the methods shown in the embodiment or the accompanying drawings can be executed sequentially or in parallel. Specifically, as shown... Figure 2 As shown, the method may include:
[0073] Step 201: Randomly arrange commonly used Chinese characters in names to form a basic mapping table for one-to-many mapping, wherein the mapping table contains the original set of Chinese characters and at least one set of mapped Chinese characters;
[0074] Step 202: Calculate the hash value of the real name to be de-identified, and perform a modulo operation based on the hash value and the number of non-repeating Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name;
[0075] Step 203: Match each Chinese character in the real name to be desensitized in the original Chinese character set, select the corresponding mapping Chinese character set according to the position of each Chinese character in the name, and obtain the desensitized Chinese character in the corresponding mapping Chinese character set according to the matching result and offset of each Chinese character.
[0076] Step 204: Obtain the anonymized Chinese characters for each Chinese character in the real name to be anonymized, and combine the anonymized Chinese characters to form the final anonymized name.
[0077] The embodiments described in this specification ensure maximum consistency of the Chinese name field, without affecting the data analysis and mining applications after anonymization. Even if some mapping relationships between real and anonymized data are leaked, it will not cause a wider data leak. A one-to-one mapping table is formed by randomly arranging commonly used Chinese characters in the name. Then, the real name to be anonymized is obtained and its hash value is calculated. An offset is obtained by performing a modulo operation based on the hash value and the number of unique Chinese characters in the basic mapping table. This ensures consistent results when calculating the offset of the same name multiple times based on the same basic mapping table. After obtaining the offset of each Chinese character in the real name, it is matched in the basic mapping table, and the anonymized Chinese character is obtained based on the offset, forming the final anonymized name. This solves the problem in existing technologies where ensuring data consistency leads to reversibility of the algorithm, allowing for the cracking of more anonymized data based on the derived mapping relationship, resulting in lower security. Furthermore, while random mapping makes the algorithm irreversible, it causes the name field to lose its consistency.
[0078] In the embodiments of this specification, in order to obtain the offset of each Chinese character in the real name, it is necessary to perform a modulo operation based on the hash value and the number of non-repeating Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name. This further includes...
[0079] The formula for calculating the offset is:
[0080] Pt = (Hash(Name + x) + Py) Mod Lm,
[0081] Where Pt is the position of the de-identified Chinese character in the sub-code table; Py is the position of the original Chinese character in the key table; x is a single random Chinese character, concatenated with the real name to be de-identified; Lm represents the length of the code table.
[0082] Specifically, the real name to be desensitized is concatenated with a single random Chinese character x to generate a new string "name + x". This random Chinese character x remains constant in a single batch desensitization task, ensuring consistent desensitization results for the same names within the same batch and maintaining the consistency of the Chinese character distribution before and after desensitization. Let the position of the Chinese character before desensitization in the basic mapping table (Key table) be Py; let the total length of the basic mapping table be Lm (i.e., the number of non-repeating Chinese characters in the code table). The target position Pt of the Chinese character after desensitization in the sub-code table is calculated by the following formula:
[0083] Pt = (Hash(name + x) + Py) Mod Lm.
[0084] Among them, Pt represents the position of the Chinese character in the sub-code table after desensitization; Py represents the position of the Chinese character in the key table before desensitization; x represents a single random Chinese character, which is concatenated with the name to play the role of confusing the encryption algorithm. This random Chinese character remains unchanged in a single batch desensitization, so that the Chinese character distribution after desensitization can be consistent with that before desensitization; Lm represents the length of the code table; Mod represents the modulo operation; Hash represents the hashing operation on the complete name.
[0085] Specifically, any one of the MD5, SHA-1, SHA-256 or SHA-512 algorithms can be used to calculate the hash value Hash of the real name to be desensitized.
[0086] According to an embodiment of the present specification, in order to enable the same Chinese character in different positions in the name to be mapped to different independent sets through position-associated set partitioning, avoiding the risk of a single mapping table being cracked, as Figure 3 shown, obtaining the desensitized Chinese character in the mapped Chinese character set according to the matching result of each Chinese character and its offset further includes
[0087] Step 301: Select the corresponding mapped Chinese character set according to the position of each Chinese character in the real name in the real name;
[0088] Step 302: Perform a circular shift within the mapped Chinese character set according to the matching result in the basic mapping table and the offset to obtain the desensitized Chinese character.
[0089] Specifically, according to the position of the Chinese character before desensitization in the name, the mapped Chinese character set to be used is determined. For example, for "Zhang San", the position of the Chinese character "Zhang" before desensitization in the name is 1, then the Chinese character after desensitization needs to be found in the corresponding "First Mapped Chinese Character Set".
[0090] According to an embodiment of the present specification, in order to achieve different mapping results for the same Chinese character in different names and have the same desensitization result for the same name field in different tables, ensuring the data correlation between tables. As Figure 4As shown in the figure, the basic mapping table that randomly arranges common Chinese characters in names to form a one-to-many mapping further includes
[0091] Step 401: Collect the common Chinese characters in names and randomly sort them to generate the original Chinese character set.
[0092] Step 402: Randomly shuffle the Chinese characters in the original Chinese character set to generate four different mapped Chinese character sets.
[0093] Step 403: Perform a one-to-four mapping of the original Chinese character set and the mapped Chinese character sets, and integrate them into the basic mapping table.
[0094] Specifically, for code table preparation, first collect the common Chinese characters in names and form a set. Then randomly shuffle the Chinese characters in the set. The finally formed code table contains one original Chinese character set and four mapped Chinese character sets, which are specifically used to adapt to most names with 2 to 4 characters. Desensitize the characters in different positions of the name through different mapped Chinese character sets, thereby effectively avoiding the problem of information leakage easily caused by names with specific structures. For example, if a name in the form of ABB is desensitized in the same mapping table by traditional methods, the desensitized result will also be a name in the form of ABB. However, through the method in this specification, the second and third characters will be desensitized in different mapped Chinese character sets, so the corresponding desensitized results will also be different, thus ensuring that the final desensitized name will not be similar in structure to the original name.
[0095] According to an embodiment of this specification, in order to ensure the security of the desensitization method, the basic mapping table that randomly arranges common Chinese characters in names to form a one-to-many mapping further includes
[0096] Regularly update the basic mapping table at a preset period, and randomly shuffle the original Chinese character set and the mapped Chinese character sets.
[0097] Exemplarily, one original Chinese character set and four mapped Chinese character sets all completely cover all common name Chinese characters, as shown in Table 1.
[0098] Chinese character position number 1 2 3 4 5 6 7 8 ... Original Chinese character set Zhang San Li Er Guo Wen ... Tao First mapped Chinese character set Zhao Si Pan Yun Feng ... Second mapped Chinese character set Wang Fu Gui Long Xu Ting ... Fourth mapped Chinese character set Yue Tong Feng Gao Jing Song ... Figure 5 Figure 6 Figure 7 Figure 8 Figures 2 to 4 Figures 2 to 4 ...
[0099] Table 1 Mapped Chinese Character Sets
[0100] Then as shown, after completing the code table preparation, find the position of the Chinese character to be desensitized in the original Chinese character set. For example, the position of "Zhang" in the key table is 1. Use the following formula to calculate the position number of the corresponding desensitized Chinese character.
[0101] Pt = (Hash(name + x) + Py) Mod Lm.
[0102] Among them, Pt represents the position in the sub-code table of the desensitized Chinese characters; Py represents the position of the Chinese character in the key table before desensitization; x represents a single random Chinese character, which is concatenated with the name to play the role of confusing the encryption algorithm. This random Chinese character remains unchanged in a single batch desensitization, so that the distribution of the desensitized Chinese characters can be the same as that before desensitization; Lm represents the length of the code table; Hash represents performing a hash operation on the complete name, and algorithms such as MD5, SHA-1, SHA-256, and SHA-512 can be used; Mod represents performing a modulo operation. According to the position of the Chinese character before desensitization in the name, determine the set of mapped Chinese characters to be used. As shown, for example: Zhangx. The position of the Chinese character "Zhang" before desensitization in the name is 1, then it is necessary to find the desensitized Chinese character in the "first set of mapped Chinese characters". Use the calculated result as the position number to find the desensitized Chinese character in the first set of mapped Chinese characters. Perform desensitization processing on the remaining Chinese characters in the name in sequence. Obtain the final desensitized name.
[0103] The embodiment of this specification also provides a device for replacing and desensitizing Chinese name fields, as shown, including
[0104] A mapping table generation unit 701, configured to randomly arrange common Chinese characters in a name to form a basic mapping table with a one-to-many mapping. The mapping table includes a set of original Chinese characters and at least one set of mapped Chinese characters;
[0105] An offset calculation unit 702, configured to calculate the hash value of the real name to be desensitized, and perform a modulo operation according to the hash value and the number of non-repeated Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name;
[0106] A Chinese character desensitization unit 703, configured to match each Chinese character in the real name to be desensitized in the set of original Chinese characters, and obtain the desensitized Chinese character in the set of mapped Chinese characters according to the matching result of each Chinese character and its offset;
[0107] A desensitized name generation unit 704, configured to sequentially obtain the desensitized Chinese characters of each Chinese character in the real name to be desensitized, and combine the desensitized Chinese characters into a final desensitized name.
[0108] Since the principle of the above device for solving problems is similar to the above method, the implementation of the above device can refer to the implementation of the above method, and the repeated parts will not be elaborated.
[0109] As The diagram illustrates the structure of a computer device according to an embodiment of this specification. The apparatus described in this specification can be the computer device in this embodiment, executing the methods described above. The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 802 may also include any storage resource 806 for storing information of any kind, such as code, settings, data, etc. Without limitation, for example, the storage resource 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Furthermore, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource may represent a fixed or removable component of the computer device 802. In one case, when the processing device 804 executes associated instructions stored in any storage resource or combination of storage resources, the computer device 802 can perform any operation of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any storage resource, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0110] Computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input device 812) and providing various outputs (via output device 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), input device 812, and output device 814 may be omitted, and the device may function solely as a computer device within a network. Computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0111] Communication link 822 can be implemented in any way, such as via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, or any combination thereof. Communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0112] Corresponding to In addition to the methods described above, embodiments of this specification also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the methods described above.
[0113] This specification also provides computer-readable instructions, wherein when a processor executes the instructions, the program therein causes the processor to perform the following... The method shown.
[0114] It should be understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.
[0115] It should also be understood that, in the embodiments of this specification, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this specification generally indicates that the preceding and following related objects have an "or" relationship.
[0116] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.
[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0118] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0119] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described in this specification, depending on actual needs.
[0120] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0121] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] This specification uses specific embodiments to illustrate the principles and implementation methods of this specification. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this specification. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this specification. Therefore, the content of this specification should not be construed as a limitation of this specification.
Claims
1. A method for replacing and desensitizing Chinese name fields, characterized in that, The method includes, A basic mapping table for one-to-many mapping is formed by randomly arranging commonly used Chinese characters in names. The mapping table contains the original set of Chinese characters and at least one set of mapped Chinese characters. Calculate the hash value of the real name to be de-identified, and perform a modulo operation based on the hash value and the number of non-repeating Chinese characters in the basic mapping table to obtain the offset of each Chinese character in the real name; Match each Chinese character in the real name to be desensitized in the original Chinese character set; select the corresponding mapped Chinese character set according to the position of each Chinese character in the name; and obtain the desensitized Chinese character in the corresponding mapped Chinese character set according to the matching result and offset of each Chinese character. The anonymized Chinese characters for each character in the real name to be anonymized are obtained sequentially, and the anonymized Chinese characters are combined to form the final anonymized name.
2. The method for replacing and desensitizing Chinese name fields as described in claim 1, characterized in that, The offset of each Chinese character in the real name is obtained by performing a modulo operation based on the hash value and the number of unique Chinese characters in the basic mapping table. This further includes... The formula for calculating the offset is: Pt = (Hash(Name + x) + Py) Mod Lm, Where Pt is the position of the desensitized Chinese character in the mapped Chinese character set; Py is the position of the unsensitized Chinese character in the original Chinese character set; x is a single random Chinese character, concatenated with the real name to be desensitized; Lm represents the length of the code table.
3. The method for replacing and desensitizing Chinese name fields as described in claim 2, characterized in that, Calculate the hash value of the real name to be anonymized include, The hash value of the real name to be anonymized is calculated using any one of the following algorithms: MD5, SHA-1, SHA-256, or SHA-512.
4. The method for replacing and desensitizing Chinese name fields as described in claim 1, characterized in that, Based on the matching result of each Chinese character and its offset, the desensitized Chinese characters are further obtained from the mapped Chinese character set, including: Select the corresponding set of mapped Chinese characters based on the position of each Chinese character in the real name; Based on the matching results in the basic mapping table and the offset, the desensitized Chinese characters are obtained by cyclically moving within the mapped Chinese character set.
5. The method for replacing and desensitizing Chinese name fields as described in claim 1, characterized in that, The basic mapping table, which randomly arranges commonly used Chinese characters in names to form a one-to-many mapping, further includes... The original set of Chinese characters is generated by randomly sorting the commonly used Chinese characters in names. The Chinese characters in the original set of Chinese characters are randomly shuffled to generate four different sets of mapped Chinese characters. The original set of Chinese characters and the mapped set of Chinese characters are mapped one-to-four to form the basic mapping table.
6. The method for replacing and desensitizing Chinese name fields as described in claim 1, characterized in that, The basic mapping table, which randomly arranges commonly used Chinese characters in names to form a one-to-many mapping, further includes... The basic mapping table is updated periodically according to a preset cycle, and the original set of Chinese characters and the mapped set of Chinese characters are randomly shuffled.
7. A device for replacing and desensitizing Chinese name fields, characterized in that, The device also includes, The mapping table generation unit is used to randomly arrange commonly used Chinese characters in a name to form a basic mapping table for a one-to-many mapping. The mapping table contains an original set of Chinese characters and at least one set of mapped Chinese characters. The offset calculation unit is used to calculate the hash value of the real name to be de-identified, and to obtain the offset of each Chinese character in the real name by performing a modulo operation based on the hash value and the number of non-repeating Chinese characters in the basic mapping table. The Chinese character desensitization unit is used to match each Chinese character in the real name to be desensitized in the original Chinese character set, and to obtain the desensitized Chinese character in the mapped Chinese character set according to the matching result and offset of each Chinese character. The desensitized name generation unit is used to sequentially obtain the desensitized Chinese characters for each Chinese character in the real name to be desensitized, and combine the desensitized Chinese characters into the final desensitized name.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.