CN116226921A - Desensitization processing method and device - Google Patents

Desensitization processing method and device Download PDF

Info

Publication number
CN116226921A
CN116226921A CN202310255891.4A CN202310255891A CN116226921A CN 116226921 A CN116226921 A CN 116226921A CN 202310255891 A CN202310255891 A CN 202310255891A CN 116226921 A CN116226921 A CN 116226921A
Authority
CN
China
Prior art keywords
desensitization
preconfigured
annotation
lifecycle
section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310255891.4A
Other languages
Chinese (zh)
Inventor
苏宇
苏泽华
丁颖
方嘉慈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310255891.4A priority Critical patent/CN116226921A/en
Publication of CN116226921A publication Critical patent/CN116226921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a desensitization processing method and device, relates to the technical field of information security, and can be used in the financial field or other technical fields. The method comprises the following steps: acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result. The apparatus performs the above method. The desensitization processing method and device provided by the embodiment of the invention can reduce repeated codes, flexibly configure and efficiently realize desensitization of information.

Description

Desensitization processing method and device
Technical Field
The invention relates to the technical field of information security, in particular to a desensitization processing method and device.
Background
In one item of the daily development process, the A cluster is responsible for information display (the information generally displayed is desensitized, such as an identity card number partial mask, and the like), the information source of the A cluster needs to be obtained by removing the B cluster, the A initiates a request to the B, when the B returns information, the B can desensitize sensitive information, such as wallet id, identity card, and the like, when the sensitive information needs to be called, the desensitizing tool class needs to be called for desensitizing the sensitive information, and then the desensitized information is returned to the A. If the information is directly desensitized according to the service code, the number of services related to the sensitive information in the B cluster is very complicated, and the number of desensitized tool classes need to be called in the corresponding service code before responding to the A.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a desensitizing treatment method and device, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a desensitizing treatment method, including:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
Wherein the tangent plane comprises a tangent point; correspondingly, the calling the section according to the preconfigured annotation comprises the following steps:
determining the position for calling the tangent plane through the tangent point;
and searching an annotation identification field according to the position, and calling a tangent plane through the annotation identification field.
Wherein the section further comprises a section identification field; correspondingly, before the step of determining the position of calling the tangent plane through the tangent point, the desensitizing processing method further comprises the following steps:
and determining that the current class is the section through the section identification field.
Wherein, the desensitizing the return value of the desensitizing field comprises:
and calling a desensitization tool class to desensitize the return value of the desensitization field.
Wherein the preconfigured annotations are also preconfigured with life cycles of the annotations; correspondingly, the desensitization treatment method further comprises the following steps:
and controlling timeliness of the preconfigured annotation according to the life cycle.
Wherein the lifecycle comprises a first lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling timeliness of the preconfigured annotations according to the first lifecycle; wherein the first life cycle is that the annotation is only reserved in the source file, and the annotation is abandoned when the Java file is compiled into a class file.
Wherein the lifecycle comprises a second lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the second lifecycle; wherein the second lifecycle is that the annotation is kept to the class file, but the annotation is discarded when the class file is loaded.
Wherein the lifecycle comprises a third lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the third lifecycle; wherein the third lifecycle is that the annotation is not only reserved to the class file, but still exists after the class file is loaded.
In one aspect, the present invention provides a desensitizing treatment apparatus comprising:
an acquisition unit for acquiring a preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
a calling unit for calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
the desensitization unit is used for acquiring desensitization fields in the tangential plane, carrying out desensitization treatment on return values of the desensitization fields, and outputting desensitization treatment results.
In still another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory complete communication with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions capable of performing the method of:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
Embodiments of the present invention provide a non-transitory computer readable storage medium comprising:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform the method of:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
The desensitization processing method and device provided by the embodiment of the invention acquire preconfigured notes in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; the method can reduce repeated codes and flexibly configure, and efficiently realize desensitization of information.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
fig. 1 is a schematic flow chart of a desensitizing treatment method according to an embodiment of the invention.
FIG. 2 is a schematic illustration of a preconfiguration of preconfigured annotations provided by an embodiment of the present invention.
FIG. 3 is a schematic illustration of a pre-written section provided by an embodiment of the present invention.
FIG. 4 is a schematic illustration of obtaining preconfigured annotations provided by an embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating the effect of the desensitizing treatment method according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a desensitizing apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be arbitrarily combined with each other.
Description of related terms:
spring: is a framework for open source java programming, and is a lightweight container for managing the life cycle of beans.
Annotation (Annuation): annotations were introduced by JDK1.5 and later versions and can be used to create documents, track dependencies in code, and even perform basic compile-time checks.
Tangent plane oriented programming (AOP): a technique for implementing unified maintenance of program functions by precompiled means and dynamic agents during run-time.
Class file: the class file is named as a Java class file, and Java is mainly suitable for a network in terms of platform independence and network mobility. Its tasks in terms of platform independence are: the Java program is provided with a binary form of service independent of the underlying host platform.
The method comprises the following steps: the method is a piece of code for performing a specific function, similar to functions in other languages. The method is used to define behavioral characteristics and functional implementation of the class or instance of the class. The method is an abstraction of class and object behavior features. The method is very similar to a function in a process-oriented. In the process, the function is the most basic unit, and the whole program consists of function calls. In object-oriented, the basic unit of the whole program is a class, and the method is subordinate to the class and the object.
Fig. 1 is a schematic flow chart of a desensitizing method according to an embodiment of the present invention, and as shown in fig. 1, the desensitizing method according to an embodiment of the present invention includes:
step S1: acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method.
Step S2: calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field.
Step S3: and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
In the above step S1, the apparatus acquires a preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method. The apparatus may be a computer device performing the method and may comprise, for example, a server. It should be noted that the data acquisition and analysis according to the embodiments of the present invention are authorized by the client. Taking transaction service as an example, the transaction service may include a plurality of methods, each method may correspond to information requiring desensitization, for example, in a credit transaction process, the information requiring desensitization may include a user account and a user mobile phone number, etc., the user account and the user mobile phone number may be the same or different in desensitization policy, for example, digits except for the last four digits in the user account may be hidden, digits from the 4 th to the 7 th digits in the user mobile phone number may be hidden, etc.
The target method may be a method corresponding to the user account and the user mobile phone number, or a method corresponding to only the user account or the user mobile phone number.
As shown in fig. 2, the pre-configuration of the pre-configured annotations is explained first:
an annotation is defined first, the @ target represents the application range of the pre-configured annotation, the application range can be applied to a METHOD or an interface, the METHOD is illustrated as an example in the embodiment of the present invention, and as shown in fig. 2, "METHOD" indicates that the application range of the annotation is applicable to the METHOD, which means that the annotation can only be applied to the METHOD.
The preconfigured annotations are also preconfigured with life cycles of the annotations; correspondingly, the desensitization treatment method further comprises the following steps:
and controlling timeliness of the preconfigured annotation according to the life cycle.
The lifecycle includes a first lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling timeliness of the preconfigured annotations according to the first lifecycle; wherein the first life cycle is that the annotation is only reserved in the source file, and the annotation is abandoned when the Java file is compiled into a class file.
The lifecycle includes a second lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the second lifecycle; wherein the second lifecycle is that the annotation is kept to the class file, but the annotation is discarded when the class file is loaded.
The lifecycle includes a third lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the third lifecycle; wherein the third lifecycle is that the annotation is not only reserved to the class file, but still exists after the class file is loaded.
The description is as follows:
the @ Retention represents the life cycle of the annotation, i.e. the time frame reserved, and is divided into three categories:
the comments remain only in the source file, and when the Java file is compiled into a class file, the comments are discarded.
The remarks policy class file, the annotations are reserved to the class file, but jvm is discarded when the class file is loaded, which is the default lifecycle.
The remarks are not only saved to the class file, but remain after jvm loads the class file.
As shown in fig. 2, when it is necessary to acquire annotation information at run-time, "remarkationpolicy.
As shown in fig. 2 @ document means that annotation information is kept. apiId is an attribute of the annotation, which may be added as needed.
As shown in fig. 3, a pre-written slice is described as follows:
and calling a desensitization tool class in the section, and uniformly processing the desensitization fields.
The @ Aspect indicates that the current class is a cut plane, the @ Pointcut indicates a tangent point, which indicates where the cut plane needs to be called, and the specified tangent point is the custom annotation Ccaps, and all annotation methods related to Ccaps can reach the cut plane. In code that desensitizes content in a cut, all services annotated with Ccaps will desensitize before the content returns.
As shown in fig. 4, the preconfigured annotation "@ cca" is obtained during execution of the target method.
In the step S2, the device calls a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field.
The tangent plane comprises a tangent point; correspondingly, the calling the section according to the preconfigured annotation comprises the following steps:
determining the position for calling the tangent plane through the tangent point;
and searching an annotation identification field according to the position, and calling a tangent plane through the annotation identification field.
The section also comprises a section identification field; correspondingly, before the step of determining the position of calling the tangent plane through the tangent point, the desensitizing processing method further comprises the following steps:
and determining that the current class is the section through the section identification field.
The following is described in connection with fig. 3:
the section identification field is @ Aspect, the current class is determined to be the section through @ Aspect, the tangent point is @ Pointcut, the position for calling the section is determined through @ Pointcut, the annotation identification field ccapi is searched at the position, and the section is called through the annotation identification field ccapi.
In the step S3, the device acquires the desensitization field in the tangent plane, performs desensitization processing on the return value of the desensitization field, and outputs the desensitization processing result. As shown in FIG. 3, the desensitization field in the cut surface is the ("Map < String, object >) join.
The desensitizing the return value of the desensitizing field comprises the following steps:
and calling a desensitization tool class to desensitize the return value of the desensitization field. The desensitization tool class is the "dealDesentation" in FIG. 3.
As shown in fig. 5, the beneficial effects of the desensitizing treatment method provided by the embodiment of the invention are as follows:
in the existing method, each desensitization class needs to call a desensitization tool class respectively to realize information desensitization processing, the desensitization classes need to call the tangent planes, and the tangent planes call the desensitization tool class uniformly, so that information efficient desensitization is realized.
The method provides common unified standardization processing for desensitizing sensitive fields, improves coding efficiency, reduces redundant repeated codes and only needs to write one section of desensitization codes.
By the method, the code return content of the Spring engineering can be modified, including but not limited to log desensitization, such as public transformation of various code classes such as adding a time stamp to the return content.
The method is quick and efficient, and has little change to the original code.
The desensitization processing method provided by the embodiment of the invention uses the custom annotation of spring + aop to program for the section, adds the custom annotation in the method needing desensitization, then realizes aop analysis of the defined annotation, and the realization content of the annotation can be custom and processes the field needing desensitization.
The desensitization processing method provided by the embodiment of the invention obtains preconfigured notes in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; the method can reduce repeated codes and flexibly configure, and efficiently realize desensitization of information.
Further, the tangent plane includes a tangent point; correspondingly, the calling the section according to the preconfigured annotation comprises the following steps:
determining the position for calling the tangent plane through the tangent point; the description of the embodiments may be referred to above, and will not be repeated.
And searching an annotation identification field according to the position, and calling a tangent plane through the annotation identification field. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can conveniently realize the calling of the section.
Further, the slice further comprises a slice identification field; correspondingly, before the step of determining the position of calling the tangent plane through the tangent point, the desensitizing processing method further comprises the following steps:
and determining that the current class is the section through the section identification field. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can further conveniently realize the calling of the section.
Further, the desensitizing the return value of the desensitizing field includes:
and calling a desensitization tool class to desensitize the return value of the desensitization field. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can efficiently realize information desensitization processing.
Further, the preconfigured annotations are also preconfigured with life cycles of the annotations; correspondingly, the desensitization treatment method further comprises the following steps:
and controlling timeliness of the preconfigured annotation according to the life cycle. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can effectively control the timeliness of annotation.
Further, the lifecycle includes a first lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling timeliness of the preconfigured annotations according to the first lifecycle; wherein the first life cycle is that the annotation is only reserved in the source file, and the annotation is abandoned when the Java file is compiled into a class file. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
Further, the lifecycle includes a second lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the second lifecycle; wherein the second lifecycle is that the annotation is kept to the class file, but the annotation is discarded when the class file is loaded. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
Further, the lifecycle includes a third lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the third lifecycle; wherein the third lifecycle is that the annotation is not only reserved to the class file, but still exists after the class file is loaded. The description of the embodiments may be referred to above, and will not be repeated.
The desensitization processing method provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
It should be noted that, the desensitization processing method provided by the embodiment of the invention can be used in the financial field and any technical field except the financial field, and the application field of the desensitization processing method is not limited by the embodiment of the invention.
Fig. 6 is a schematic structural diagram of a desensitization processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the desensitization processing apparatus according to an embodiment of the present invention includes an obtaining unit 601, a calling unit 602, and a desensitization unit 603, where:
the acquiring unit 601 is configured to acquire a preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; the calling unit 602 is configured to call a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; the desensitizing unit 603 is configured to obtain a desensitizing field in the section, perform desensitizing processing on a return value of the desensitizing field, and output a desensitizing result.
Specifically, the acquiring unit 601 in the device is configured to acquire a preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; the calling unit 602 is configured to call a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; the desensitizing unit 603 is configured to obtain a desensitizing field in the section, perform desensitizing processing on a return value of the desensitizing field, and output a desensitizing result.
The desensitization processing device provided by the embodiment of the invention acquires the preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method; calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field; the method can reduce repeated codes and flexibly configure, and efficiently realize desensitization of information.
Further, the tangent plane includes a tangent point; accordingly, the calling unit 602 is specifically configured to:
determining the position for calling the tangent plane through the tangent point;
and searching an annotation identification field according to the position, and calling a tangent plane through the annotation identification field.
The desensitization processing device provided by the embodiment of the invention can conveniently call the section.
Further, the slice further comprises a slice identification field; correspondingly, before the step of determining the position of invoking the tangent plane through the tangent point, the desensitizing processing apparatus is further configured to:
and determining that the current class is the section through the section identification field.
The desensitization processing device provided by the embodiment of the invention can further conveniently call the section.
Further, the desensitizing unit 603 is specifically configured to:
and calling a desensitization tool class to desensitize the return value of the desensitization field.
The desensitization processing device provided by the embodiment of the invention can efficiently realize information desensitization processing.
Further, the preconfigured annotations are also preconfigured with life cycles of the annotations; correspondingly, the desensitizing treatment device is also used for:
and controlling timeliness of the preconfigured annotation according to the life cycle.
The desensitization processing device provided by the embodiment of the invention can effectively control the timeliness of annotation.
Further, the lifecycle includes a first lifecycle; correspondingly, the desensitizing treatment device is also specifically used for:
controlling timeliness of the preconfigured annotations according to the first lifecycle; wherein the first life cycle is that the annotation is only reserved in the source file, and the annotation is abandoned when the Java file is compiled into a class file.
The desensitization processing device provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
Further, the lifecycle includes a second lifecycle; correspondingly, the desensitizing treatment device is also specifically used for:
controlling the timeliness of the preconfigured annotations according to the second lifecycle; wherein the second lifecycle is that the annotation is kept to the class file, but the annotation is discarded when the class file is loaded.
The desensitization processing device provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
Further, the lifecycle includes a third lifecycle; correspondingly, the desensitizing treatment device is also specifically used for:
controlling the timeliness of the preconfigured annotations according to the third lifecycle; wherein the third lifecycle is that the annotation is not only reserved to the class file, but still exists after the class file is loaded.
The desensitization processing device provided by the embodiment of the invention can further flexibly control the timeliness of annotation.
The embodiment of the present invention provides a process flow of the embodiment of the desensitization processing apparatus, which may be specifically used to execute the above embodiments of the method, and the functions thereof are not described herein in detail, and reference may be made to the detailed description of the above embodiments of the method.
Fig. 7 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the present invention, as shown in fig. 7, where the electronic device includes: a processor (processor) 701, a memory (memory) 702, and a bus 703;
wherein, the processor 701 and the memory 702 complete communication with each other through the bus 703;
the processor 701 is configured to invoke the program instructions in the memory 702 to perform the methods provided in the above method embodiments, for example, including:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
The present embodiment provides a computer-readable storage medium storing a computer program that causes the computer to execute the methods provided by the above-described method embodiments, for example, including:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description of the present specification, reference to the terms "one embodiment," "one particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (11)

1. A desensitizing treatment method, characterized by comprising:
acquiring preconfigured annotations in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
and obtaining a desensitization field in the section, carrying out desensitization treatment on a return value of the desensitization field, and outputting a desensitization treatment result.
2. The desensitizing treatment according to claim 1, wherein said cut surface includes a tangent point; correspondingly, the calling the section according to the preconfigured annotation comprises the following steps:
determining the position for calling the tangent plane through the tangent point;
and searching an annotation identification field according to the position, and calling a tangent plane through the annotation identification field.
3. The desensitizing treatment method according to claim 2, wherein said cut surface further comprises a cut surface identification field; correspondingly, before the step of determining the position of calling the tangent plane through the tangent point, the desensitizing processing method further comprises the following steps:
and determining that the current class is the section through the section identification field.
4. The desensitization processing method according to claim 1, wherein said desensitizing the return value of the desensitization field comprises:
and calling a desensitization tool class to desensitize the return value of the desensitization field.
5. A method of desensitising a computer system according to any one of claims 1 to 4, wherein said preconfigured annotations are also preconfigured with annotated lifecycles; correspondingly, the desensitization treatment method further comprises the following steps:
and controlling timeliness of the preconfigured annotation according to the life cycle.
6. The desensitization process according to claim 5, wherein said lifecycle comprises a first lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling timeliness of the preconfigured annotations according to the first lifecycle; wherein the first life cycle is that the annotation is only reserved in the source file, and the annotation is abandoned when the Java file is compiled into a class file.
7. The desensitizing treatment method according to claim 5, wherein said lifecycle comprises a second lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the second lifecycle; wherein the second lifecycle is that the annotation is kept to the class file, but the annotation is discarded when the class file is loaded.
8. The desensitizing treatment method according to claim 5, wherein said lifecycle comprises a third lifecycle; accordingly, said controlling the timeliness of said preconfigured annotations according to said lifecycle comprises:
controlling the timeliness of the preconfigured annotations according to the third lifecycle; wherein the third lifecycle is that the annotation is not only reserved to the class file, but still exists after the class file is loaded.
9. A desensitizing treatment device, comprising:
an acquisition unit for acquiring a preconfigured annotation in the process of executing the target method; the target method is a method requiring desensitization treatment, and the application range of the preconfigured annotation is suitable for the method;
a calling unit for calling a section according to the preconfigured annotation; the section is a pre-written program for uniformly processing the desensitization field;
the desensitization unit is used for acquiring desensitization fields in the tangential plane, carrying out desensitization treatment on return values of the desensitization fields, and outputting desensitization treatment results.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed by the processor.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN202310255891.4A 2023-03-10 2023-03-10 Desensitization processing method and device Pending CN116226921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310255891.4A CN116226921A (en) 2023-03-10 2023-03-10 Desensitization processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310255891.4A CN116226921A (en) 2023-03-10 2023-03-10 Desensitization processing method and device

Publications (1)

Publication Number Publication Date
CN116226921A true CN116226921A (en) 2023-06-06

Family

ID=86587320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310255891.4A Pending CN116226921A (en) 2023-03-10 2023-03-10 Desensitization processing method and device

Country Status (1)

Country Link
CN (1) CN116226921A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116595590A (en) * 2023-07-19 2023-08-15 智慧眼科技股份有限公司 Data desensitization method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116595590A (en) * 2023-07-19 2023-08-15 智慧眼科技股份有限公司 Data desensitization method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106462412B (en) Structure identification of dynamically generated pattern-based classes
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
CN108228188B (en) View component processing method, electronic device and readable storage medium
US11521137B2 (en) Deployment of self-contained decision logic
CN106778351B (en) Data desensitization method and device
CN111966357B (en) Operating system application compiling method and device and electronic equipment
CN106557307B (en) Service data processing method and system
CN116226921A (en) Desensitization processing method and device
CN113987337A (en) Search method, system, equipment and storage medium based on componentized dynamic arrangement
CN114861218A (en) Data desensitization method and device
US10325002B2 (en) Web service framework
CN111045746A (en) Code expansion method and framework
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
CN113778564A (en) Method, equipment and storage medium for efficiently executing EVM intelligent contract
CN111338613A (en) Front-end point burying method and device based on jsp
US7779430B2 (en) Method, system, and article of manufacture for providing service components
CN113704618B (en) Data processing method, device, equipment and medium based on deep learning model
CN117519691B (en) Application processing method, device, computer equipment and storage medium
CN110764745A (en) Variable transmission and collection method, device and computer readable storage medium
CN111198899A (en) Development system and method for entity rendering in application program
CN117950684A (en) Inspection task execution processing method and device
CN117056317A (en) Data processing method, device, equipment and computer readable storage medium
CN117762386A (en) Service processing method, device, electronic equipment and computer readable medium
CN117032794A (en) Reconstruction transcoding method, device, equipment and medium of JSP version code
CN115904343A (en) Front-end application style processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination