CN116595590A - Data desensitization method, device, computer equipment and storage medium - Google Patents

Data desensitization method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116595590A
CN116595590A CN202310885516.8A CN202310885516A CN116595590A CN 116595590 A CN116595590 A CN 116595590A CN 202310885516 A CN202310885516 A CN 202310885516A CN 116595590 A CN116595590 A CN 116595590A
Authority
CN
China
Prior art keywords
data
desensitization
desensitized
code block
segmentation
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
CN202310885516.8A
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.)
Athena Eyes Co Ltd
Original Assignee
Athena Eyes Co Ltd
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 Athena Eyes Co Ltd filed Critical Athena Eyes Co Ltd
Priority to CN202310885516.8A priority Critical patent/CN116595590A/en
Publication of CN116595590A publication Critical patent/CN116595590A/en
Pending legal-status Critical Current

Links

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
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/313Logic programming, e.g. PROLOG programming language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • 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)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the field of data processing, and discloses a data desensitizing method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: obtaining a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking the logic code block to be subjected to data desensitization; acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block; judging the data quantity of the data to be desensitized to obtain a judging result; and according to the judging result and the desensitizing rule, carrying out data desensitizing on the data to be desensitized to obtain a desensitizing result, and improving the operation efficiency of the system by adopting the application.

Description

Data desensitization method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a data desensitizing method, apparatus, computer device, and storage medium.
Background
With the development of internet technology, various basic technology iterations are continuously updated, the business functions of the system are frequently changed, and the requirements of the system on data privacy security and data sensitive words are gradually strict.
Existing data desensitization methods typically perform data desensitization by fixed desensitization rules. When the on-line environment of the system needs to change the desensitization rule, the system needs to be suspended and the desensitization rule needs to be changed.
The inventors have realized in the course of implementing the present application that there are at least the following problems with the existing approaches: the system is required to be suspended for modification due to modification of the desensitization rule, so that the system has the technical problem of low operation efficiency.
Disclosure of Invention
The embodiment of the application provides a data desensitizing method, a data desensitizing device, computer equipment and a storage medium, so as to improve the operation efficiency of a system.
In order to solve the above technical problems, an embodiment of the present application provides a data desensitizing method, including:
obtaining a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking the logic code block to be subjected to data desensitization;
acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block;
judging the data quantity of the data to be desensitized to obtain a judging result;
and according to the judging result and the desensitization rule, carrying out data desensitization on the data to be desensitized to obtain a desensitization result.
In order to solve the above technical problem, an embodiment of the present application further provides a data desensitizing apparatus, including:
the logic code block acquisition module is used for acquiring a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking that the logic code block needs to be subjected to data desensitization;
the data to be desensitized is used for acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block;
the judging module is used for judging the data quantity of the data to be desensitized to obtain a judging result;
and the data desensitization module is used for carrying out data desensitization on the data to be desensitized according to the judging result and the desensitization rule to obtain a desensitization result.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of the data desensitizing method described above when executing the computer program.
To solve the above technical problem, embodiments of the present application further provide a computer-readable storage medium storing a computer program that implements the steps of the above data desensitizing method when executed by a processor.
According to the data desensitization method, the device, the computer equipment and the storage medium, the data to be desensitized is obtained by obtaining the logic code block containing the data desensitization annotation class based on the parameter entering information of the logic code block, and the data quantity judgment is carried out on the data to be desensitized, so that the judgment result is obtained. And according to the judgment result and the desensitization rule, carrying out data desensitization on the data to be desensitized to obtain a desensitization result. Through the steps, unified data desensitization processing is realized, the working time of writing repeated codes by developers is reduced, the working efficiency is accelerated, and meanwhile, the operation efficiency of the system is improved through configuring and modifying the pre-configured desensitization rule.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a data desensitization method of the present application;
FIG. 3 is a schematic diagram of the architecture of one embodiment of a data desensitizing apparatus according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, as shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Eperts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Eperts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the data desensitizing method provided by the embodiment of the application is executed by a server, and accordingly, the data desensitizing device is arranged in the server.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements, and the terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.
Referring to fig. 2, fig. 2 shows a data desensitizing method according to an embodiment of the present application, and the method is applied to the server in fig. 1 for illustration, and is described in detail as follows:
s201, obtaining a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking the logic code block to be subjected to data desensitization.
In particular, annotations are a special way of tool encapsulation, which can only be invoked, whose constructors are encapsulated.
Here, the data desensitization annotation class is defined as a logical code block that needs to be subjected to data desensitization. For example, there is a logical code block 1, a logical code block 2, and a logical code block 3, where logical code block 1 is marked as a data desensitization annotation class, then logical code block 1 needs to be data desensitized.
A logical code block refers to a logical code block of encapsulated packages, classes, methods, etc., which may be used to implement a specific function, including, but not limited to, a function, a method, a functional module, etc.
Preferably, the encapsulated logic code block is a java method.
The logical code blocks containing the data desensitization annotation class are obtained through the data desensitization annotation class, unified data desensitization processing is realized, the working time of writing repeated codes by developers is reduced, and the working efficiency is accelerated.
S202, acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block.
Specifically, the parameter entry information refers to parameter input information of the logic code block.
The data to be desensitized are the data which need to be desensitized.
For example, assume that a logical code block is a method, the parameter information of the logical code block is (parameter a, parameter B), the parameter a corresponds to the file a, the parameter B corresponds to the file B, the parameter information is the parameter a and the parameter B, and the data to be desensitized are the data in the file a and the file B.
The data to be desensitized is obtained through the parameter entering information, unified data desensitization processing is realized, the working time of writing repeated codes by developers is reduced, and the working efficiency is accelerated.
S203, judging the data quantity of the data to be desensitized to obtain a judging result.
Specifically, the above-mentioned data amount judgment refers to judgment of the data amount size of the data to be desensitized.
S204, data desensitization is carried out on the data to be desensitized according to the judging result and the desensitization rule, and a desensitization result is obtained.
Specifically, the above-mentioned desensitization rule is a pre-configured desensitization rule. The desensitization rule includes, but is not limited to, desensitization rule data, desensitization rule code, and desensitization rule display symbol.
It should be noted here that the desensitization rules may be configured and dynamically modified. By configuring and dynamically modifying the desensitization rules, the flexibility and expansibility of the data desensitization processing are improved.
And selecting a proper desensitization mode according to the judgment result, and performing data desensitization on the data to be desensitized based on the desensitization rule to obtain a desensitization result.
In this embodiment, through the above steps, unified data desensitization processing is realized, the working time for writing repeated codes by a developer is reduced, the working efficiency is accelerated, and meanwhile, the operation efficiency of the system is improved by configuring and modifying the pre-configured desensitization rule.
In some optional implementations of the present embodiment, prior to S201, the data desensitizing method further includes:
a data desensitization entity annotation class is created, and the data desensitization entity annotation class is defined as a field in a logical code block, wherein data desensitization is needed.
A data desensitization annotation class is created, which is defined as a logical code block that needs to be subjected to data desensitization.
Specifically, the fields in the data desensitization entity annotation class include, but are not limited to, data type, data encoding, start subscript, end subscript, desensitization character.
The data desensitization entity annotation class is defined as a field in the logical code block, which needs to be subjected to data desensitization. For example, the data fields related to the logic code block are field 1, field 2 and field 3, wherein, the field 1 is marked as a data desensitization entity annotation class, and the data corresponding to the field 1 needs to be subjected to data desensitization.
The data desensitization annotation class is defined as a logical code block that needs to be subjected to data desensitization. For example, there is a logical code block 1, a logical code block 2, and a logical code block 3, where logical code block 3 is marked as a data desensitization annotation class, then it is determined that logical code block 3 needs to be data desensitized.
In the embodiment, by creating the data desensitization entity annotation class and the data desensitization annotation class, unified data desensitization processing is realized, the working time of writing repeated codes by developers is reduced, and the working efficiency is accelerated.
In some optional implementations of the present embodiment, after S201, before S202, the data desensitizing method further includes:
and executing the logic code block to obtain an execution return value.
And taking the object corresponding to the execution return value as the entry information of the logic code block.
Specifically, the logic code block marked with the data desensitization annotation class is intercepted in an AOP (Aspect Oriented Programming, tangent plane oriented programming) mode, the content of the intercepted logic code block is executed, and the return value of the logic code block is obtained, namely the return value is executed. And calling a data desensitization method of the data desensitization class, and taking the detailed information object of the intercepted logic code block and the object corresponding to the execution return value as the entry information of the logic code block.
It should be noted that, the data desensitization class is defined as obtaining data to be desensitized corresponding to the logical code block.
The data desensitization class obtains the return result data of the logic code block through the parameter entering information of the logic code block, obtains the data source corresponding to the return result data through a java reflection mode, obtains all field arrays of the data source, circulates the field arrays, judges whether the fields have data desensitization entity annotation class, and if the fields are marked as the data desensitization entity annotation class, takes the fields into the record field arrays as data to be desensitized.
In the embodiment, the execution return value is obtained by executing the logic code block, and the object corresponding to the execution return value is used as the entry information of the logic code block, so that unified data desensitization processing is realized, the working time of writing repeated codes by a developer is reduced, and the working efficiency is accelerated.
In some optional implementations of the present embodiment, S202 includes:
and acquiring a data source corresponding to the entry information of the logic code block in a java reflection mode.
And taking the data corresponding to the field marked as the annotation class of the data desensitizing entity in the data source as the data to be desensitized.
Specifically, the java reflection mode refers to a method and a device for dynamically loading a class and acquiring detailed information of the class when a program runs, so as to operate the attribute and the method of the class or the object. The essence is a manner of obtaining various information of an object by decompiling the object after the java virtual machine obtains the object.
And acquiring a data source corresponding to the parameter entering information of the logic code block in a java reflection mode, acquiring all field arrays of the data source, circulating the field arrays, judging whether fields exist data desensitization entity annotation classes, and if the fields exist, marking the fields as the data desensitization entity annotation classes, taking the fields into the record field arrays as data to be desensitized.
In the embodiment, the data to be desensitized is obtained through the mode, unified data desensitization processing is achieved, working time for writing repeated codes by developers is shortened, and working efficiency is improved.
In some optional implementations of the present embodiment, S204 includes:
and S2041, performing data desensitization on the data to be desensitized based on a desensitization rule when the data volume is lower than the preset segmentation data volume as a judgment result, so as to obtain a desensitization result.
And S2042, when the data amount is not lower than the preset segmentation data amount as a judgment result, carrying out data segmentation on the data to be desensitized to obtain at least two segmentation data.
And S2043, performing data desensitization on all the segmentation data based on the desensitization rule to obtain a desensitization result.
For step S2041, specifically, when the data size is lower than the preset divided data size, the data to be desensitized is not horizontally divided, the data to be desensitized is directly desensitized, the configured desensitization rule is queried through the desensitization rule coding field, and the data to be desensitized is desensitized based on the desensitization rule, so as to obtain the desensitization result.
For step S2042, specifically, when the data size is not less than the preset divided data size as a result of the determination, the data division desensitization class is called, and the data to be desensitized is subjected to data division to obtain at least two divided data.
The data segmentation desensitization class is defined as a data segmentation desensitization method and is used for carrying out data segmentation on data to be desensitized.
The data segmentation desensitization class includes, but is not limited to, the number of segmentations, the size of the segmented data.
Further, the data partitioning method defined by the data partitioning desensitization class is an asynchronous method.
When the judgment result is that the data quantity is not lower than the preset segmentation data quantity, asynchronous data segmentation is carried out on the data to be desensitized based on the thread pool, so that at least two segmentation data are obtained, wherein the segmentation data comprise segmentation sequence marks.
For step S2043, it is specifically: and based on the desensitization rule, carrying out data desensitization on each piece of segmentation data to obtain a segmentation desensitization result corresponding to the segmentation data. And splicing the segmentation desensitization results corresponding to all the segmentation data according to the segmentation sequence marks of each segmentation data to obtain the desensitization results.
Defining a thread pool through the data segmentation desensitization class, segmenting the data to be desensitized according to the number of threads, and marking each segmented data according to the segmentation sequence. The method comprises the steps of submitting data segmentation desensitization asynchronous tasks to a plurality of threads, performing data desensitization on currently allocated segmentation data in each task, obtaining segmentation desensitization results corresponding to each task when the data desensitization tasks of the segmentation data in all the tasks are completed, and splicing the segmentation desensitization results corresponding to all the segmentation data according to segmentation sequence marks of each segmentation data to obtain the desensitization results.
In this embodiment, through the above steps, a large amount of data desensitization execution time can be reduced, and the execution efficiency of the system can be improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 3 shows a schematic block diagram of a data desensitizing apparatus in one-to-one correspondence with the data desensitizing method of the above embodiment. As shown in fig. 3, the data desensitizing apparatus includes a logical code block acquisition module 31, a data to be desensitized acquisition module 32, a judgment module 33, and a data desensitizing module 34. The functional modules are described in detail as follows:
the logic code block obtaining module 31 is configured to obtain a logic code block including a data desensitization annotation class, where the data desensitization annotation class is used to mark that the logic code block needs to be subjected to data desensitization.
The data to be desensitized acquisition module 32 is configured to acquire data to be desensitized based on the parameter entering information of the logic code block, where the data to be desensitized is a data source of the logic code block.
The judging module 33 is configured to judge the data amount of the data to be desensitized, so as to obtain a judging result.
The data desensitization module 34 is configured to perform data desensitization on the data to be desensitized according to the judgment result and the desensitization rule, so as to obtain a desensitization result.
In some alternative implementations of the present embodiment, before the logical code block obtaining module 31, the data desensitizing apparatus includes:
the first creating module is used for creating a data desensitization entity annotation class which is defined as a field needing data desensitization in the logic code block.
And the second creation module is used for creating a data desensitization annotation class which is defined as a logic code block needing data desensitization.
In some alternative implementations of the present embodiment, after the logic code block acquisition module 31, and before the data to be desensitized acquisition module 32, the data desensitizing apparatus further includes:
and the execution return value determining module is used for executing the logic code block to obtain an execution return value.
And the parameter entering information determining module is used for taking the object corresponding to the execution return value as parameter entering information of the logic code block.
In some alternative implementations of the present embodiment, the data acquisition module to be desensitized 32 includes:
the data source acquisition unit is used for acquiring a data source corresponding to the entry information of the logic code block in a java reflection mode.
And the data to be desensitized acquisition unit is used for taking the data corresponding to the field marked as the annotation class of the data desensitizing entity in the data source as the data to be desensitized.
In some alternative implementations of the present embodiment, the data desensitization module 34 includes:
and the first desensitization result acquisition unit is used for carrying out data desensitization on the data to be desensitized based on the desensitization rule when the judgment result is that the data volume is lower than the preset segmentation data volume, so as to obtain the desensitization result.
And the segmentation unit is used for carrying out data segmentation on the data to be desensitized to obtain at least two segmentation data when the judgment result is that the data volume is not lower than the preset segmentation data volume.
And the second desensitization result acquisition unit is used for carrying out data desensitization on all the segmentation data based on the desensitization rule to obtain a desensitization result.
In some optional implementations of the present embodiment, the partitioning unit includes:
and the asynchronous segmentation unit is used for carrying out asynchronous data segmentation on the data to be desensitized based on the thread pool to obtain at least two segmentation data when the judgment result is that the data volume is not lower than the preset segmentation data volume, wherein the segmentation data comprises segmentation sequence marks.
In some optional implementations of this embodiment, the second desensitization result acquisition unit includes:
the segmentation desensitization result acquisition unit is used for carrying out data desensitization on each piece of segmentation data based on the desensitization rule to obtain a segmentation desensitization result corresponding to the segmentation data.
And the splicing unit is used for splicing the segmentation desensitization results corresponding to all the segmentation data according to the segmentation sequence marks of each segmentation data to obtain the desensitization results.
For specific limitations of the data desensitizing device, reference may be made to the limitations of the data desensitizing method hereinabove, and no further description is given here. The various modules in the data desensitizing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only a computer device 4 having a component connection memory 41, a processor 42, a network interface 43 is shown in the figures, but it is understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used for storing an operating system and various application software installed on the computer device 4, such as program codes for controlling electronic files, etc. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute a program code stored in the memory 41 or process data, such as a program code for executing control of an electronic file.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The present application also provides another embodiment, namely, a computer-readable storage medium storing an interface display program executable by at least one processor to cause the at least one processor to perform the steps of the data desensitization method as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. A method of desensitizing data, the method comprising:
obtaining a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking the logic code block to be subjected to data desensitization;
acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block;
judging the data quantity of the data to be desensitized to obtain a judging result;
and according to the judging result and the desensitization rule, carrying out data desensitization on the data to be desensitized to obtain a desensitization result.
2. A method of data desensitization according to claim 1, wherein prior to said obtaining a logical code block containing a data desensitization annotation class, said method further comprises:
creating a data desensitization entity annotation class, wherein the data desensitization entity annotation class is defined as a field needing data desensitization in the logic code block;
a data desensitization annotation class is created, which is defined as a logical code block that needs to be data desensitized.
3. The data desensitization method according to claim 1, wherein after said obtaining a logical code block containing a data desensitization annotation class, said entering information based on said logical code block, before obtaining data to be desensitized, said method further comprises:
executing the logic code block to obtain an execution return value;
and taking the object corresponding to the execution return value as the entry information of the logic code block.
4. The data desensitization method according to claim 2, wherein said step of acquiring data to be desensitized based on the entry information of said logical code blocks comprises:
obtaining a data source corresponding to the entry information of the logic code block in a java reflection mode;
and taking the data corresponding to the field marked as the annotation class of the data desensitizing entity in the data source as the data to be desensitized.
5. The data desensitization method according to claim 1, wherein the step of performing data desensitization on the data to be desensitized according to the judgment result and the desensitization rule to obtain a desensitization result comprises:
when the data quantity is lower than the preset segmentation data quantity as a judgment result, carrying out data desensitization on the data to be desensitized based on a desensitization rule to obtain a desensitization result;
when the judging result is that the data quantity is not lower than the preset segmentation data quantity, carrying out data segmentation on the data to be desensitized to obtain at least two segmentation data;
and based on the desensitization rule, carrying out data desensitization on all the segmentation data to obtain a desensitization result.
6. The data desensitizing method according to claim 5, wherein when the judging result is that the data amount is not lower than a preset division data amount, the step of performing data division on the data to be desensitized to obtain at least two division data includes:
and when the judgment result is that the data quantity is not lower than the preset segmentation data quantity, carrying out asynchronous data segmentation on the data to be desensitized based on a thread pool to obtain at least two segmentation data, wherein the segmentation data comprises segmentation sequence marks.
7. The method of data desensitization according to claim 5, wherein said step of data desensitizing said segmented data based on said desensitization rules to obtain desensitization results comprises:
based on a desensitization rule, carrying out data desensitization on each piece of segmentation data to obtain segmentation desensitization results corresponding to the segmentation data;
and splicing all segmentation desensitization results corresponding to the segmentation data according to the segmentation sequence marks of each segmentation data to obtain the desensitization results.
8. A data desensitizing apparatus, characterized in that the data desensitizing apparatus comprises:
the logic code block acquisition module is used for acquiring a logic code block containing a data desensitization annotation class, wherein the data desensitization annotation class is used for marking that the logic code block needs to be subjected to data desensitization;
the data to be desensitized is used for acquiring data to be desensitized based on the parameter entering information of the logic code block, wherein the data to be desensitized is a data source of the logic code block;
the judging module is used for judging the data quantity of the data to be desensitized to obtain a judging result;
and the data desensitization module is used for carrying out data desensitization on the data to be desensitized according to the judging result and the desensitization rule to obtain a desensitization result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements a data desensitization method according to any one of claims 1-7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements a data desensitization method according to any one of claims 1-7.
CN202310885516.8A 2023-07-19 2023-07-19 Data desensitization method, device, computer equipment and storage medium Pending CN116595590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310885516.8A CN116595590A (en) 2023-07-19 2023-07-19 Data desensitization method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310885516.8A CN116595590A (en) 2023-07-19 2023-07-19 Data desensitization method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116595590A true CN116595590A (en) 2023-08-15

Family

ID=87606705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310885516.8A Pending CN116595590A (en) 2023-07-19 2023-07-19 Data desensitization method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116595590A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414261A (en) * 2019-06-26 2019-11-05 北京三快在线科技有限公司 A kind of data desensitization method, device, equipment and readable storage medium storing program for executing
CN111191281A (en) * 2019-12-25 2020-05-22 平安信托有限责任公司 Data desensitization processing method and device, computer equipment and storage medium
CN112307509A (en) * 2020-10-20 2021-02-02 北京三快在线科技有限公司 Desensitization processing method, equipment, medium and electronic equipment
CN114491646A (en) * 2022-02-16 2022-05-13 平安普惠企业管理有限公司 Data desensitization method and device, electronic equipment and storage medium
CN115758464A (en) * 2022-11-29 2023-03-07 上海品顺信息科技有限公司 Data desensitization management method, device, medium and equipment based on configuration
CN116226921A (en) * 2023-03-10 2023-06-06 中国工商银行股份有限公司 Desensitization processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414261A (en) * 2019-06-26 2019-11-05 北京三快在线科技有限公司 A kind of data desensitization method, device, equipment and readable storage medium storing program for executing
CN111191281A (en) * 2019-12-25 2020-05-22 平安信托有限责任公司 Data desensitization processing method and device, computer equipment and storage medium
CN112307509A (en) * 2020-10-20 2021-02-02 北京三快在线科技有限公司 Desensitization processing method, equipment, medium and electronic equipment
CN114491646A (en) * 2022-02-16 2022-05-13 平安普惠企业管理有限公司 Data desensitization method and device, electronic equipment and storage medium
CN115758464A (en) * 2022-11-29 2023-03-07 上海品顺信息科技有限公司 Data desensitization management method, device, medium and equipment based on configuration
CN116226921A (en) * 2023-03-10 2023-06-06 中国工商银行股份有限公司 Desensitization processing method and device

Similar Documents

Publication Publication Date Title
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN109656807B (en) Information security-based interface mock testing method, device, equipment and storage medium
CN111639287A (en) Page processing method and device, terminal equipment and readable storage medium
CN112861057A (en) Page rendering method, device and equipment based on small program and storage medium
CN112817657B (en) Application program starting item loading method, device, system and storage medium
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN111782304A (en) Logic control method and device for paging loading data, computer equipment and medium
CN114691188A (en) Compatibility evaluation method, device, equipment and storage medium
CN116610354A (en) Parameter verification method, device, computer equipment and storage medium
CN111367799B (en) Method, device, medium and electronic equipment for locating source code breakdown position
CN106775608B (en) Method and device for realizing independent system process
CN113656044B (en) Android installation package compression method and device, computer equipment and storage medium
CN116595590A (en) Data desensitization method, device, computer equipment and storage medium
CN112764729B (en) Application software development method, device, computer equipment and readable storage medium
CN115291839A (en) Localization method of virtual method type API of JAVA card, electronic equipment and medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN113448585A (en) Optimization method and device for thread pool, electronic equipment and storage medium
CN116302847B (en) Dynamic acquisition method and device of abnormal information, computer equipment and medium
CN114756180B (en) Method and device for distributing coverage writing data blocks, computer equipment and storage medium
CN117785181A (en) Code execution method, device, equipment and storage medium thereof
CN116017069A (en) Software program package loading method and device, computer equipment and storage medium
CN118113376A (en) Application program starting method for controlling miner lamp and related equipment
CN117193880A (en) Code loading method, device and equipment of application program and storage medium
CN114385499A (en) Test case generation method and device, computer equipment and storage medium
CN117972256A (en) Linkage form generation method and device, electronic equipment and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230815