Desensitization processing method, device, medium and electronic device

By identifying and processing the annotation identifiers in the target code during data transmission, the problem of large source program code changes and computing resource consumption caused by desensitization processing in the existing technology is solved, and efficient desensitization protection and rapid execution of sensitive data are achieved.

CN112307509BActive Publication Date: 2024-09-20BEIJING QIANDAIBAO PAYMENT TECH LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011123088.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-20
Publication Date
2024-09-20
Estimated Expiration
2040-10-20

AI Technical Summary

Technical Problem

The existing desensitization processing method adds auxiliary functions and fields in the source program code compilation stage, resulting in large code changes and increased computing resource consumption, which affects the performance of the application.

Method used

By intercepting the data transmission information between the server and other devices, it is identified whether the target code contains annotation identifiers. If it is included, the object type is determined and desensitized, without modifying the source program code, saving computing resources.

Benefits of technology

It achieves desensitization protection of sensitive data, ensures rapid execution of target code, saves equipment resources, and reduces the workload of modifying the source program code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112307509B
    Figure CN112307509B
Patent Text Reader

Abstract

This specification discloses a desensitization processing method, device, medium and electronic device, including: intercepting data processing information transmitted between a server and other devices, identifying whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, determining that the called target code contains an object to be desensitized, and determining the object type corresponding to the object to be desensitized; according to the object type, determining the attribute information corresponding to the object to be desensitized; using a set desensitization processing method, desensitizing the determined attribute information. Without making changes to the source program code, by intercepting data information to identify whether it contains the object to be desensitized, if it contains the object to be desensitized, initiating the desensitization process, it can ensure that the target code for data processing is executed quickly and save the device resources consumed by the execution, and can also ensure that sensitive data is desensitized and protected in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet information processing technology, and in particular to a desensitization processing method, device, medium and electronic device. Background Art

[0002] Data resources in various industries often contain a large amount of sensitive data and important data. Once these data are leaked or illegally used, irreparable losses will be caused.

[0003] In order to improve the data security of sensitive data and improve the protection mechanism of sensitive data, a method for desensitizing sensitive data is proposed. Among them, a common desensitizing method is annotation + code enhancement. That is, in the source code editing stage, the string data type is annotated; in the source code compilation stage, multiple auxiliary functions and auxiliary fields are added to the annotated string data type in the original source code through code enhancement, so that the compiled target application has the desensitization processing capability. When calling the target application, once the field content of the field corresponding to the annotated string data type is called, the desensitized content of the field can be directly output.

[0004] However, the above-mentioned desensitization processing method has the following defects in practical applications: due to the use of code enhancement in the source program code compilation stage, multiple auxiliary functions and auxiliary fields are added to the original source program code, which leads to major changes to the original source program code and also increases the computing resources consumed in the operation of the target application.

[0005] Therefore, this application proposes a desensitization processing method to solve the above problems and enhance the protection of sensitive data. Summary of the invention

[0006] This specification provides a desensitization processing method, equipment, medium and electronic equipment to partially solve the problems existing in the above-mentioned prior art.

[0007] This manual adopts the following technical solutions:

[0008] This manual provides a desensitization method, which comprises:

[0009] Intercept data processing information transmitted between servers and other devices;

[0010] Identifying whether the target code called by the data processing information includes a first annotation identifier;

[0011] If the judgment result is that the first annotation identifier is included, determining that the called target code contains the object to be desensitized, and determining the object type corresponding to the object to be desensitized;

[0012] Determine the attribute information corresponding to the object to be desensitized according to the object type;

[0013] Use the set desensitization processing method to desensitize the determined attribute information.

[0014] Optionally, the method further includes:

[0015] If the determination result is that the first annotation identifier is not included, determining whether the interface for transmitting the data processing information is a designated interface;

[0016] If the judgment result is a designated interface, extracting attribute information of the called object from the target code called by the data processing information through the designated interface;

[0017] The extracted attribute information is desensitized using the set desensitization method.

[0018] Optionally, extracting attribute information of the called object from the target code called by the data processing information through the designated interface specifically includes:

[0019] identifying, through the designated interface, from the target code called by the data processing information, whether the called object contains a second annotation identifier;

[0020] If it is determined that the called object contains the second annotation identifier, the attribute information of the attribute to be desensitized corresponding to the second annotation identifier is extracted according to the second annotation identifier.

[0021] Optionally, the method further includes:

[0022] If the judgment result is that it is not a designated interface, the execution result corresponding to the target code called by the data processing information is output.

[0023] Optionally, according to the object type, determining the attribute information corresponding to the object to be desensitized specifically includes:

[0024] According to the object type, identifying whether the object to be desensitized contains a second annotation identifier;

[0025] If it is determined that the object to be desensitized contains a second annotation identifier, determining the attribute corresponding to the second annotation identifier according to the second annotation identifier, and extracting attribute information of the determined attribute;

[0026] If it is determined that the object to be desensitized does not contain the second annotation identifier, all attributes corresponding to the object to be desensitized are determined according to the object type, and attribute information of all the determined attributes is extracted.

[0027] Optionally, according to the object type, determining the attribute information corresponding to the object to be desensitized specifically includes:

[0028] If the determined object type is a nested type, then according to the nesting logic corresponding to the nested type, field contents corresponding to the fields contained in the nested type are sequentially extracted;

[0029] The extracted field content is determined as the attribute information corresponding to the object to be desensitized.

[0030] Optionally, the attribute information corresponding to the object to be desensitized is desensitized using a set desensitization processing method, specifically including:

[0031] According to the attribute information corresponding to the object to be desensitized, query from the cache database whether there is a desensitization result corresponding to the attribute information of the object to be desensitized;

[0032] If it exists, the desensitized result is output;

[0033] If it does not exist, determine the type of attribute information corresponding to the object to be desensitized, and select a desensitization processing method corresponding to the determined type from the set desensitization processing methods; use the selected desensitization processing method to desensitize the attribute information corresponding to the object to be desensitized to obtain a desensitization result.

[0034] This specification provides a desensitization processing device, which includes:

[0035] an acquisition unit, used to intercept data processing information transmitted between the server and other devices;

[0036] An identification unit, used to identify whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, determining that the called target code contains an object to be desensitized, and determining the object type corresponding to the object to be desensitized;

[0037] A processing unit is used to determine the attribute information corresponding to the object to be desensitized according to the object type; and to perform desensitization processing on the determined attribute information using a set desensitization processing method.

[0038] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned desensitization processing method is implemented.

[0039] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the above-mentioned desensitization processing method when executing the program.

[0040] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0041] The desensitization processing method provided in this specification intercepts the data processing information when transmitting the data processing information between the server and other devices, and identifies whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains the object to be desensitized, and the object type corresponding to the object to be desensitized is determined; according to the object type, the attribute information corresponding to the object to be desensitized is determined; and the determined attribute information is desensitized using the set desensitization processing method. In other words, the desensitization processing scheme provided in this specification does not require changes to the source program code, but in the target code execution stage, it intercepts the data information transmitted between the server and other devices to identify whether the transmitted data information contains the object to be desensitized, and if the object to be desensitized is contained, the desensitization processing is initiated, which can not only ensure the rapid execution of the target code for data processing and save the device resources consumed by the execution, but also ensure timely desensitization protection of sensitive data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0043] Figure 1 A schematic diagram of a desensitization method provided in an embodiment of this specification;

[0044] Figure 2 A schematic diagram of a desensitization method provided in an embodiment of this specification;

[0045] Figure 3 A schematic diagram of the structure of a desensitization processing device provided in an embodiment of this specification;

[0046] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0047] Based on this, this specification provides a desensitization processing method, which intercepts the data processing information when transmitting the data processing information between the server and other devices, and identifies whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains the object to be desensitized, and the object type corresponding to the object to be desensitized is determined; according to the object type, the attribute information corresponding to the object to be desensitized is determined; and the determined attribute information is desensitized using the set desensitization processing method. In other words, the desensitization processing scheme provided by this specification does not require changes to the source program code, but in the target code execution stage, it intercepts the data information transmitted between the server and other devices to identify whether the transmitted data information contains the object to be desensitized, and if it contains the object to be desensitized, the desensitization processing is initiated, which can not only ensure the rapid execution of the target code for data processing and save the device resources consumed by the execution, but also ensure timely desensitization protection of sensitive data.

[0048] It should be noted that the first annotation identifier is recorded in the embodiment of this specification, and the first annotation identifier here is used to indicate that the identified target code contains the object to be desensitized; the second annotation identifier is recorded in the embodiment of this specification, and the second annotation identifier here is used to indicate that the identified object contains the attribute to be desensitized. In other words, the "first annotation identifier" and "second annotation identifier" recorded in the embodiment of this specification belong to different annotation identifiers, and the "first" and "second" here are used to distinguish different annotation identifiers, and have no ordering meaning.

[0049] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0050] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0051] Figure 1 A schematic diagram of a desensitization treatment method provided in an embodiment of this specification. The method can be described as follows.

[0052] Step 101: Intercept data processing information transmitted between a server and other devices.

[0053] In the embodiments provided in this specification, a large amount of data processing information is generated due to data interaction between the server and other devices, and these data processing information contains some sensitive data and / or important data. In order to ensure the data security of these sensitive data and / or important data, these data processing information can be intercepted by an interception tool or interception device before being transmitted over the network.

[0054] Subsequently, by identifying the intercepted data processing information, it is determined whether to use the desensitization processing solution provided in this specification to desensitize the content related to the data processing information.

[0055] Step 103: Identify whether the target code called by the data processing information contains a first annotation identifier.

[0056] The first annotation identifier is used to indicate that the called target code contains the object to be desensitized.

[0057] In the embodiments provided in the present specification, since objects that need to be desensitized can be marked in the source code during the source code editing stage, the objects contained in the target code corresponding to the generated source code are also marked during the source code compilation stage. In this way, it is possible to identify whether the called target code contains the object to be desensitized by the marked identifier.

[0058] For example, the first annotation is DesensitizedMark. If @DesensitizedMark is marked in front of a section of code, it means that the section of code contains objects to be desensitized.

[0059] For example: @DesensitizedMark

[0060] Public Class User{……} means that if the code Public Class User{……} is called, it means that the code Public Class User{} contains the object to be desensitized.

[0061] Specifically, the code content of the target code called by the data processing information is identified, and whether the target code is marked with a specified annotation identifier (i.e., the first annotation identifier) ​​is determined based on the identified code content. If yes, it means that the target code contains the first annotation identifier, triggering the execution of step 105; if not, it means that the target code does not contain the first annotation identifier.

[0062] Because in the source code editing stage, first, determine the objects that need to be desensitized; secondly, when editing the source code corresponding to the object that needs to be desensitized, add annotation tags to the source code to mark the object. This invisibly increases the workload of code editing and is prone to omissions in marking (that is, some desensitized objects that need to be marked, but no annotation tags are added to the source code corresponding to these desensitized objects).

[0063] In order to reduce the workload of annotation, in the embodiments provided in this specification, the specified interface (API interface) can be annotated, that is, an annotation mark is added to the specified one or more interfaces, that is, if the specified interface adds an annotation mark, it means that the target code called by the specified interface contains the object to be desensitized. When editing the source code corresponding to the object to be desensitized, the code content of the specified interface with the added annotation mark is added to the source code, so that once the source code is called, the specified interface will definitely be used, and since the specified interface is used, it means that the desensitized object contained in the source code needs to be desensitized.

[0064] Since there is a situation where the designated interface is annotated, if the judgment result in step 103 is that it does not contain the first annotation identifier, it is necessary to further determine whether the interface that transmits the data processing information is the designated interface; if the judgment result is the designated interface, the attribute information of the called object is extracted from the target code called by the data processing information through the designated interface; and the extracted attribute information is desensitized using the set desensitization processing method.

[0065] Specifically, first, through the designated interface, it is identified from the target code called by the data processing information whether the called object contains the second annotation identifier.

[0066] The second annotation identifier is used to indicate that the identified object contains attributes to be desensitized.

[0067] It should be noted that here "identifying whether the called object contains the second annotation identifier from the target code called by the data processing information through the specified interface" can utilize the reverse calling mechanism, that is, according to the data processing information, through the specified interface, reversely determine the target code called by the data processing information, and determine the called object contained in the target code, and then identify whether the object contains the second annotation identifier.

[0068] The "second annotation identifier" here has a different meaning from the "first annotation identifier". The second annotation identifier is used to represent the attribute to be desensitized, that is, if a certain attribute in the object is a sensitive attribute, then a second annotation identifier can be added to the attribute. For example: the second annotation identifier can be expressed as Desensitized. For example: Public Class User{@Desensitized(DesensitizedType.NAME)private String name;……}, the attribute to be desensitized is NAME (name).

[0069] Secondly, if it is determined that the called object contains a second annotation identifier, the attribute information of the attribute to be desensitized corresponding to the second annotation identifier is extracted according to the second annotation identifier.

[0070] If it is determined that the called object does not contain the second annotation identifier, the attribute information of all attributes corresponding to the called object is extracted, which means that all attributes of the called object are attributes to be desensitized.

[0071] Step 105: If the judgment result is that the first annotation identifier is included, it is determined that the called target code contains the object to be desensitized, and the object type corresponding to the object to be desensitized is determined.

[0072] In the embodiment provided in this specification, when it is determined that the called target code contains the first annotation identifier, it means that the target code contains the object to be desensitized. At this time, it can be determined that the called target code contains the object to be desensitized according to the code content of the target code. The object to be desensitized here can be one object or multiple objects, and the number of objects is not limited.

[0073] When it is determined that the called target code contains the object to be desensitized, the object type corresponding to the object to be desensitized can be further determined. Taking a Java program as an example, the object type here can include but is not limited to: String type, generic, inherited class, queue, nested class, etc.

[0074] Step 107: Determine the attribute information corresponding to the object to be desensitized according to the object type.

[0075] In the embodiment provided in this specification, it is identified whether the object to be desensitized contains a second annotation identifier according to the object type.

[0076] The second annotation identifier is used to indicate that the identified object contains attributes to be desensitized.

[0077] If it is determined that the object to be desensitized contains a second annotation identifier, the attribute corresponding to the second annotation identifier is determined according to the second annotation identifier, and the attribute information of the determined attribute is extracted. That is, the extracted attribute is the attribute of the second annotation identifier, which may not be all attributes. If all attributes are marked with the second annotation identifier, then the extracted attributes here can also be all attributes.

[0078] If it is determined that the object to be desensitized does not contain the second annotation identifier, all attributes corresponding to the object to be desensitized are determined according to the object type, and attribute information of all the determined attributes is extracted.

[0079] Specifically, if the determined object type is a String type, the field content corresponding to each field of the string type is read, and the read field content is determined as the attribute information corresponding to the object to be desensitized.

[0080] If the determined object type is a nested type, then according to the nesting logic corresponding to the nested type, field contents corresponding to the fields contained in the nested type are sequentially extracted;

[0081] The extracted field content is determined as the attribute information corresponding to the object to be desensitized.

[0082] The so-called nested type can be understood as an object containing another object. For example, the user class can contain multiple different attributes, and other objects can be nested, for example, the address class is nested in the user class, and the address class contains multiple different address attributes.

[0083] Assume that the user class contains name attribute, phone attribute, bank card number attribute and address class, and the address class contains home address attribute, company address attribute and school address attribute; then according to the nested logic corresponding to the user class, the field contents extracted in sequence are: name attribute, phone attribute, bank card number attribute, home address attribute, company address attribute and school address attribute.

[0084] Step 109: Desensitize the determined attribute information using the set desensitization processing method.

[0085] In the embodiment provided in this specification, first, according to the attribute information corresponding to the object to be desensitized, query from the cache database whether there is a desensitization result corresponding to the attribute information of the object to be desensitized;

[0086] Secondly, if it exists, the queried desensitization result is output; if it does not exist, the type of attribute information corresponding to the object to be desensitized is determined, and the desensitization processing method corresponding to the determined type is selected from the set desensitization processing methods; using the selected desensitization processing method, the attribute information corresponding to the object to be desensitized is desensitized to obtain the desensitization result.

[0087] The type of attribute information recorded here refers to the form of expression of the attribute information, such as text, numbers, characters, etc. Different forms of expression correspond to different desensitization processing methods, which can also be understood as different desensitization auxiliary functions called. The desensitization auxiliary function or desensitization processing method is not specifically limited here.

[0088] After obtaining the desensitization result through the desensitization processing method, the desensitization result is cached, which can avoid repeated desensitization of the same attribute information of the same object and save resources.

[0089] Optionally, when it is determined that the called target code does not contain the first annotation identifier and the transmission interface used is not the specified interface, the execution result corresponding to the target code called by the data processing information is output. That is, the data processing information does not contain desensitization information and does not need to be desensitized.

[0090] Through the technical solution provided in this specification, when data processing information is transmitted between a server and other devices, the data processing information is intercepted, and it is identified whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains an object to be desensitized, and the object type corresponding to the object to be desensitized is determined; according to the object type, the attribute information corresponding to the object to be desensitized is determined; and the determined attribute information is desensitized using the set desensitization processing method. In other words, the desensitization processing scheme provided in this specification does not require changes to the source program code, but in the target code execution stage, it intercepts the data information transmitted between the server and other devices to identify whether the transmitted data information contains an object to be desensitized, and if it contains an object to be desensitized, the desensitization processing is initiated, which can ensure that the target code for data processing is executed quickly, saving the device resources consumed by the execution, and can ensure that sensitive data is desensitized and protected in a timely manner.

[0091] Based on the same inventive concept, Figure 2 A schematic flow chart of a desensitization treatment method is provided for the embodiment of this specification. The method can be as follows.

[0092] Step 201: intercept data processing information transmitted between the server and other devices.

[0093] Step 203: Identify whether the target code called by the data processing information contains the first annotation identifier; if it does, execute step 205; if it does not, execute step 221.

[0094] Step 205: Determine whether the called target code contains an object to be desensitized, and determine the object type corresponding to the object to be desensitized.

[0095] Step 207: According to the object type, identify whether the object to be desensitized contains the second annotation identifier. If it contains the second annotation identifier, execute step 209; otherwise, execute step 211.

[0096] Step 209: According to the second annotation identifier, determine the attribute corresponding to the second annotation identifier, and extract the attribute information of the determined attribute. Jump to step 213.

[0097] Step 211: Determine all attributes corresponding to the object to be desensitized according to the object type, and extract attribute information of all determined attributes.

[0098] Step 213: According to the attribute information corresponding to the object to be desensitized, query from the cache database whether there is a desensitization result corresponding to the attribute information of the object to be desensitized. If yes, execute step 215; otherwise, execute step 217.

[0099] Step 215: Output the desensitization result obtained by querying.

[0100] Step 217: Determine the type of attribute information corresponding to the object to be desensitized, and select a desensitization processing method corresponding to the determined type from the set desensitization processing methods.

[0101] Step 219: Desensitize the attribute information corresponding to the object to be desensitized using the selected desensitization processing method to obtain a desensitization result.

[0102] Step 221: Determine whether the interface for transmitting the data processing information is a designated interface; if the determination result is a designated interface, execute step 223; otherwise, execute 229.

[0103] Step 223: through the designated interface, from the target code called by the data processing information, identify whether the called object contains the second annotation identifier; if so, execute step 225; otherwise, execute step 227.

[0104] Step 225: extracting the attribute information of the attribute to be desensitized corresponding to the second annotation identifier according to the second annotation identifier. Jump to 213.

[0105] Step 227: extract the attribute information of all attributes corresponding to the called object. Jump to 213.

[0106] Step 229: Output the execution result corresponding to the target code called by the data processing information.

[0107] The above is the desensitization processing method provided in the embodiments of this specification. Based on the same idea, this specification also provides corresponding equipment, storage media and electronic equipment.

[0108] Figure 3 This is a schematic diagram of the structure of a desensitization processing device provided in an embodiment of this specification, wherein the desensitization processing device includes: an acquisition unit 301, an identification unit 302 and a processing unit 303, wherein:

[0109] The acquisition unit 301 is used to intercept data processing information transmitted between the server and other devices;

[0110] The identification unit 302 is used to identify whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains an object to be desensitized, and the object type corresponding to the object to be desensitized is determined;

[0111] The processing unit 303 is used to determine the attribute information corresponding to the object to be desensitized according to the object type; and perform desensitization processing on the determined attribute information using the set desensitization processing method.

[0112] In another embodiment provided in this specification, the identification unit 302 is further configured to determine whether the interface for transmitting the data processing information is a designated interface if the determination result is that the first annotation identifier is not included;

[0113] The processing unit 303 is further used to extract the attribute information of the called object from the target code called by the data processing information through the designated interface if the judgment result is a designated interface; and perform desensitization processing on the extracted attribute information using a set desensitization processing method.

[0114] In another embodiment provided in this specification, the processing unit 303 extracts the attribute information of the called object from the code called by the data processing information through the specified interface, specifically including:

[0115] identifying, through the designated interface, from the target code called by the data processing information, whether the called object contains a second annotation identifier;

[0116] If it is determined that the called object contains the second annotation identifier, the attribute information of the attribute to be desensitized corresponding to the second annotation identifier is extracted according to the second annotation identifier.

[0117] In another embodiment provided in this specification, the processing unit 303 is further configured to output an execution result corresponding to the target code called by the data processing information if the judgment result is that the interface is not a designated interface.

[0118] In another embodiment provided in this specification, the processing unit 303 determines the attribute information corresponding to the object to be desensitized according to the object type, specifically including:

[0119] According to the object type, identifying whether the object to be desensitized contains a second annotation identifier;

[0120] If it is determined that the object to be desensitized contains a second annotation identifier, determining the attribute corresponding to the second annotation identifier according to the second annotation identifier, and extracting attribute information of the determined attribute;

[0121] If it is determined that the object to be desensitized does not contain the second annotation identifier, all attributes corresponding to the object to be desensitized are determined according to the object type, and attribute information of all the determined attributes is extracted.

[0122] In another embodiment provided in this specification, the processing unit 303 determines the attribute information corresponding to the object to be desensitized according to the object type, specifically including:

[0123] If the determined object type is a nested type, then according to the nesting logic corresponding to the nested type, field contents corresponding to the fields contained in the nested type are sequentially extracted;

[0124] The extracted field content is determined as the attribute information corresponding to the object to be desensitized.

[0125] In another embodiment provided in this specification, the processing unit 303 performs desensitization processing on the attribute information corresponding to the object to be desensitized using a set desensitization processing method, specifically including:

[0126] According to the attribute information corresponding to the object to be desensitized, query from the cache database whether there is a desensitization result corresponding to the attribute information of the object to be desensitized;

[0127] If it exists, the desensitized result is output;

[0128] If it does not exist, determine the type of attribute information corresponding to the object to be desensitized, and select a desensitization processing method corresponding to the determined type from the set desensitization processing methods; use the selected desensitization processing method to desensitize the attribute information corresponding to the object to be desensitized to obtain a desensitization result.

[0129] It should be noted that the desensitization processing device provided in the embodiment of this specification can be implemented by hardware or software, and the implementation method is not specifically limited here. The desensitization processing device intercepts the data processing information when transmitting the data processing information between the server and other devices, and identifies whether the target code called by the data processing information contains the first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains the object to be desensitized, and the object type corresponding to the object to be desensitized is determined; according to the object type, the attribute information corresponding to the object to be desensitized is determined; and the determined attribute information is desensitized using the set desensitization processing method. In other words, the desensitization processing scheme provided in this specification does not require changes to the source program code, but in the target code execution stage, it intercepts the data information transmitted between the server and other devices to identify whether the transmitted data information contains the object to be desensitized. If the object to be desensitized is contained, the desensitization processing is started, which can not only ensure the rapid execution of the target code for data processing and save the device resources consumed by the execution, but also ensure timely desensitization protection of sensitive data.

[0130] This specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can be used to perform the above Figure 1 Desensitization treatment methods provided.

[0131] based on Figure 1 The desensitization treatment method shown in the present specification also provides Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1The desensitization processing method. When transmitting data processing information between a server and other devices, the data processing information is intercepted, and it is identified whether the target code called by the data processing information contains a first annotation identifier; if the judgment result is that the first annotation identifier is contained, it is determined that the called target code contains an object to be desensitized, and the object type corresponding to the object to be desensitized is determined; according to the object type, the attribute information corresponding to the object to be desensitized is determined; and the determined attribute information is desensitized using a set desensitization processing method. In other words, the desensitization processing scheme provided in this specification does not require changes to the source program code, but in the target code execution stage, it intercepts the data information transmitted between the server and other devices to identify whether the transmitted data information contains the object to be desensitized, and if the object to be desensitized is contained, the desensitization processing is initiated, which can ensure that the target code for data processing is executed quickly, save the device resources consumed by the execution, and ensure that the sensitive data is desensitized and protected in time.

[0132] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0133] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0134] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0136] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0137] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0142] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

[0145] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0146] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0147] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0148] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A desensitization method, characterized in that: The method comprises: Intercept data processing information transmitted between servers and other devices; Identifying whether the target code called by the data processing information includes a first annotation identifier; If the judgment result is that the first annotation identifier is included, determining that the called target code contains the object to be desensitized, and determining the object type corresponding to the object to be desensitized; Determine the attribute information corresponding to the object to be desensitized according to the object type; specifically include: according to the object type, identify whether the object to be desensitized contains a second annotation identifier; if it is determined that the object to be desensitized contains the second annotation identifier, determine the attribute corresponding to the second annotation identifier according to the second annotation identifier, and extract the attribute information of the determined attribute; if it is determined that the object to be desensitized does not contain the second annotation identifier, determine all the attributes corresponding to the object to be desensitized according to the object type, and extract the attribute information of all the determined attributes; If the determination result is that the first annotation identifier is not included, determining whether the interface for transmitting the data processing information is a designated interface; If the judgment result is a designated interface, the attribute information of the called object is extracted from the target code called by the data processing information through the designated interface; specifically including: identifying whether the called object contains a second annotation identifier from the target code called by the data processing information through the designated interface; if it is determined that the called object contains the second annotation identifier, extracting the attribute information of the to-be-desensitized attribute corresponding to the second annotation identifier according to the second annotation identifier; If the judgment result is that it is not a designated interface, outputting the execution result corresponding to the target code called by the data processing information; The extracted attribute information is desensitized using the set desensitization method.

2. The method according to claim 1, characterized in that According to the object type, the attribute information corresponding to the object to be desensitized is determined, specifically including: If the determined object type is a nested type, then according to the nesting logic corresponding to the nested type, field contents corresponding to the fields contained in the nested type are extracted in sequence; The extracted field content is determined as the attribute information corresponding to the object to be desensitized.

3. The method according to claim 1, characterized in that Using the set desensitization processing method, desensitizing the attribute information corresponding to the object to be desensitized is performed, specifically including: According to the attribute information corresponding to the object to be desensitized, query from the cache database whether there is a desensitization result corresponding to the attribute information of the object to be desensitized; If it exists, the desensitized result is output; If it does not exist, determine the type of attribute information corresponding to the object to be desensitized, and select a desensitization processing method corresponding to the determined type from the set desensitization processing methods; use the selected desensitization processing method to desensitize the attribute information corresponding to the object to be desensitized to obtain a desensitization result.

4. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the desensitization processing method described in any one of claims 1 to 3 is implemented.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the desensitization processing method described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Information desensitization method, device and system

    CN108664812A

  • Data desensitization method and device

    CN109815742A

  • Sensitive data desensitization and inverse desensitization method and electronic equipment

    CN110688662A

  • Java annotation-based dynamic configuration data desensitization method

    CN111737746A

  • Intercepting sensitive data using hashed candidates

    US20180137303A1