CN113986342A - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN113986342A
CN113986342A CN202111238968.4A CN202111238968A CN113986342A CN 113986342 A CN113986342 A CN 113986342A CN 202111238968 A CN202111238968 A CN 202111238968A CN 113986342 A CN113986342 A CN 113986342A
Authority
CN
China
Prior art keywords
data
data processing
annotation information
request
variable
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
CN202111238968.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.)
Zhejiang Taimei Medical Technology Co Ltd
Original Assignee
Zhejiang Taimei Medical Technology 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 Zhejiang Taimei Medical Technology Co Ltd filed Critical Zhejiang Taimei Medical Technology Co Ltd
Priority to CN202111238968.4A priority Critical patent/CN113986342A/en
Publication of CN113986342A publication Critical patent/CN113986342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The specification provides a data processing method, a data processing device and electronic equipment. The method comprises the following steps: receiving a data processing request, wherein the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: a data storage request and a data read request; obtaining annotation information of the variable; under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; responding to the data processing request based on the target data. The workload of the code can be reduced to some extent.

Description

Data processing method and device and electronic equipment
Technical Field
The embodiment of the specification relates to the field of computer data processing, in particular to a data processing method, a corresponding device and an electronic device.
Background
With the continuous development of computer technology, the functions are continuously increased. As a result, computer software systems are becoming increasingly larger and the amount of code involved is also increasing. In particular, a computer software system may involve many functions, with code written separately by different developers. The different functional modules also respectively relate to different processing functions, and are integrated together to form a complete software program.
In some cases, different functional blocks or different functions may all call some of the same processing functions. Specifically, for example, some data format conversion functions, encryption functions, decryption functions, and the like. In the prior art, codes for calling corresponding processing functions are written in codes of different functional modules or functions. Therefore, certain repeated labor can be caused in the whole software program development process, and time and labor are wasted.
Disclosure of Invention
Embodiments of the present disclosure are directed to providing a data processing method, a data processing apparatus, and an electronic device that can improve software development efficiency.
An embodiment of the present specification provides a data processing method, including: receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: a data storage request and a data read request; obtaining annotation information of the variable; under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; responding to the data processing request based on the target data.
An embodiment of the present specification provides a data processing method, including: receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information; obtaining annotation information of the variable; under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a setting condition of the data processing request; a function responsive to the data processing request indication.
An embodiment of the present specification provides a data processing apparatus including: the receiving module is used for receiving a data processing request; wherein, the data processing request is attached with a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: a data storage request and a data read request; the annotation acquisition module is used for acquiring annotation information of the variables; the data processing module is used for processing the original data of the variables by using a specified data processing function to obtain target data under the condition that the annotation information comprises preset annotation information; wherein the specified data processing function corresponds to the preset annotation information; and the data storage module is used for responding to the data processing request based on the target data.
An embodiment of the present specification provides a data processing apparatus including: the request receiving module is used for receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information; the annotation acquisition module is used for acquiring annotation information of the variables; the data processing module is used for processing the original data of the variables by using a specified data processing function to obtain target data under the condition that the annotation information comprises preset annotation information; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a setting condition of the data processing request; and the data feedback module is used for responding to the function indicated by the data processing request.
An embodiment of the present specification provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data processing method according to the foregoing embodiment.
The present specification embodiments provide a computer storage medium storing computer program instructions which, when executed by a processor, implement the data processing method according to the foregoing embodiments.
According to the data processing method provided by the embodiment of the specification, annotation information is defined for the variable, so that when the original data of the variable needs to be processed, the value of the variable can be processed by automatically calling the appointed data processing function according to the annotation information. Thus, the method can be not used in each functional module related to the value taking of the variable, and can call the specified data processing function aiming at the original data. Particularly, when the original data may be some private data or sensitive information, when the value of the variable needs to be written into the database or read from the database, the original data may be corresponded to the designated data processing function through the preset annotation information. Therefore, the appointed data processing function corresponding to the preset annotation information can be called without the need of calling each function module related to the value of the variable, and the code amount can be reduced to a certain extent. Moreover, the condition that some data storage is not qualified due to the fact that program codes are missed to call the specified data processing function is avoided to a certain extent through the unified calling mode.
Drawings
Fig. 1 is a schematic diagram illustrating interaction between a client and a server in an example scenario of the present specification.
Fig. 2 is a schematic diagram illustrating an interaction flow between a client and a server in an example scenario of the present specification.
Fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure.
Fig. 5 is a schematic functional block diagram of a data processing apparatus according to an embodiment of the present disclosure.
Fig. 6 is a schematic functional block diagram of a data processing apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present invention.
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 invention belongs. The terminology used in the description is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The embodiment of the specification provides a data processing system. The data processing system may include clients and servers. The client may be an electronic device with network access capabilities. Specifically, for example, the client may be a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, a shopping guide terminal, a television, a smart speaker, a microphone, and the like. Wherein, wearable equipment of intelligence includes but not limited to intelligent bracelet, intelligent wrist-watch, intelligent glasses, intelligent helmet, intelligent necklace etc.. Alternatively, the client may be software that can run in the electronic device. The server may be an electronic device having a certain arithmetic processing capability. Which may have a network communication module, a processor, memory, etc. Of course, the server may also refer to software running in the electronic device. The server may be a distributed server, and may be a system having a plurality of processors, memories, network communication modules, and the like that cooperate with one another. Alternatively, the server may also be a server cluster formed by several servers. Or, with the development of scientific technology, the server can also be a new technical means capable of realizing the corresponding functions of the specification implementation mode. For example, it may be a new form of "server" implemented based on quantum computing.
Please refer to fig. 1 and fig. 2. In one particular scenario example, a user may log onto a system platform using a client. Specifically, the user can operate a login page provided by the client display system platform, fill in the related account, and complete login after performing identity authentication. In some cases, the user needs to complete the identity registration in the system platform before the login operation can be performed. In particular, the system platform may provide a registration page to the client. And the user inputs related information on the client according to the requirements of the registration page. Such as name, gender, address, identification number, phone number … …, etc. It will be appreciated that the registration information and login information will typically relate to personal privacy data of the user. Such as the user's name, identification number, contact address, etc.
After receiving the user triggers the submit button on the registration page, the client side can send the registration information to the system platform. After the system platform receives the registration information, corresponding variables can be initialized corresponding to the registration items in the registration information, and the variables are assigned according to the registration information. For some variables, such as name, mobile phone number, identification number, address and other information, annotation information of the variables is generated correspondingly when the corresponding variables are instantiated. For example, the annotation information of the name variable includes "desensitization", "restoration", and for example, the annotation information of the identification number includes "encryption" and "decryption", etc.
Specifically, the software program code of the system platform has code that defines name variables and also has code that defines annotations for the name variables. For example, the annotation information "desensitization" of the name variable may be added with "@ Desensize" for the name variable using the java programming language, or the annotation information "Encrypt" and "Decrypt" for the identification card number variable may be added with "@ Encrypt" and "@ Decrypt" for the identification card variable using the java programming language. So that when a variable is instantiated, the corresponding code annotating the information is also executed to be dependent on the variable.
A number of intermediate links may be provided in the system platform, such as receiving, assigning, identity verification, data specification verification, etc., all of which may involve processing of registration information submitted by the user. Before the registration information of the user is saved, the system platform calls annotation information of the variables and checks whether the annotation information of the variables comprises preset storage annotation information. Specifically, for example, the preset storage annotation information includes "encryption". When the identification number variable is checked, the fact that the annotation information of the identification number variable contains 'encryption' is found, so that the system platform calls an encryption processing function to encrypt the value of the identification number variable (namely, the identification number) and stores the data after the encryption processing. Similarly, similar checking is performed on the other variables, when the annotation information of the variables is found to include the preset annotation information, a corresponding specified data processing function is called, the values of the variables are processed, and after the processing is completed, the values are stored.
A database of the system platform receives a data read request for data in the database. The data read request may have an SQL query statement. The data read request may indicate that the stored identification number is read and that the identification number variable is to be assigned to data read from the database. The system platform can check the annotation information of the ID number variable and find that the annotation information of the ID number variable comprises 'decryption', so that the system platform calls a decryption processing function to decrypt the data read from the database to obtain the ID number and can assign the ID number to the ID number variable.
Please refer to fig. 3. The embodiment of the specification provides a data processing method. In some embodiments, the data processing method may be applied in a server. The data processing method may include the following steps.
Step S110: receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable identification represents a variable having annotation information. The data processing request includes at least one of: data storage requests and data read requests.
The data processing request may be used to indicate that the relevant data requires certain processing. Or, there are some program modules indicating that certain processing needs to be performed on the value of the variable represented by the variable identifier.
In some embodiments, the data storage request may indicate that storage is required for a value of the variable identification representation variable. For example, to a database. The data storage request may have a data format such that the data storage request itself may express multiple data meanings. For example, the data storage request may indicate its own task type, is a storage task, and may also express information such as variable identification that needs to be stored. The data storage request can be generated internally by the server, that is, after the data is processed by the related function in the server, the data storage request is generated to call the function of the data storage module, so as to realize the storage of the data. In some embodiments, the data storage request may also be issued by a client. That is, after the data can be processed in the client, a data storage request is sent to the server according to the network communication protocol.
In some embodiments, the data storage request may also be accompanied by a value of the variable represented by the variable identification. The value of the variable can be the original data. That is, the original data may be actual value data of the variable. In some cases, to avoid possible disclosure of private data, the values of the variables are processed to some extent. The raw data may be data that is related to the privacy of the user.
In some embodiments, the data processing request may be a data read request. The server receiving the data read request may indicate that the stored data has a need to be used. After being read from the database, the data are used by the corresponding functional module. The data read request may have a data format such that the data read request itself may express multiple data meanings. For example, a data read request may indicate its task type, which is a read task. In some embodiments, the data reading request may further have information such as a storage identifier in a data table where the data to be read is located. Specifically, for example, a query statement may be appended to the data read request. The query statement may have a storage identifier therein, and the read target data may belong to a type represented by the storage identifier. The storage identity may be a field of a data table in the database.
In some embodiments, the data read request may be generated internally by the server. That is, the function in the server may use the original data of the variable during the operation process, so a data read request is generated to call the data storage module to obtain the original data of the variable. Of course, in some embodiments, the data read request may be issued by the client. That is, the user may operate the client to access a web page involving some data presentation. At this point, the client may issue a data read request.
In some embodiments, the server may have a data storage module therein. The data storage module can interact with the database to realize the storage or reading of data. Receiving a data storage request, which may be understood as a data storage module being called, stores data. Receiving a data read request may be understood as a data storage module being invoked to read data according to a query statement.
In some embodiments, the server may be provided with a separate program module that may monitor whether there are calls to the data storage module by other functional modules. In the case that it is monitored that there is a data storage request issued by another functional module to call the data storage module, the data storage request may be intercepted, so that the data storage request is received by the program module. Of course, correspondingly, in the case that it is monitored that there is another functional module sending out a data reading request to call the data storage module, the data reading request may be intercepted. Of course, in some embodiments, the data reading request may also be intercepted after the database completes the data reading and before the feedback response to the data reading request is not completely completed, that is, the data read from the database is not fed back to the caller that issued the data reading request. In this way, the reception of the data read request by the program module is enabled. Of course, in some embodiments, the database may have some notification mechanism that may notify the individual program module after receiving a data storage request or a data read request. Of course, in some embodiments, a buried point may be provided in the database, and in the case of a read/write operation of the database, the buried point may be triggered to intercept a service request of the database. Specifically, for example, a data storage request or a data reading request of the database is intercepted.
The variable identification may be used to represent the variable. The variable can be determined according to the variable identifier, and the variable can be called to obtain the value of the variable, or the variable can be assigned. The variable identification may be a concrete representation of the variable. Specifically, the variable identification may be a variable name of the variable. Of course, the variable identifier may also be path information from which the variable is available. Variables may be accessed according to the path information.
In some embodiments, the data storage request may correspond to a variable identification. The raw data may be a value of a variable represented by the variable identification. In particular, the data storage request may be accompanied by a variable identification. An additional approach may include that the variable identification may be part of the data storage request content. Of course, it is also possible that the variable identifies the data that is ancillary to the data storage request. Accordingly, the raw data may be the actual value of the variable represented by the variable identifier. In some cases, the raw data may be raw data submitted to a server by a user operating a client. The raw data is assigned to a variable as an actual value of the variable. Of course, the raw data may also be result data generated during the operation of the functional module in the server.
In some embodiments, a variable identification of a variable that is assigned after target data is read may be determined from a data read request. The variable identifier may be a variable identifier corresponding to the data read request. Accordingly, the raw data may be the data stored in the database that the data read request requires to read.
The annotation information may serve as a functional tag for the variable. Adding annotation information to variables may be implemented accordingly, depending on the particular programming language employed. Specifically, for example, taking the programming language as Java language as an example, a format of "@ + annotation information" may be used near the code defining the variable to add annotation information to the variable, for example, "@ Encrypt" may express that the original data of the corresponding variable needs to be encrypted. The variable has the number of annotation information, can be configured according to actual requirements, and can be one or more. Of course, the programming language is not limited to the Java language, and similar functionality may be implemented using other programming languages. Specifically, for example, the programming language may be Python.
Step S112: obtaining annotation information of the variable.
In some embodiments, after the server receives the data processing request, the annotation information of the variable can be read according to the variable identification. Specifically, for example, in the case that the data processing request is a data storage request, annotation information corresponding to a variable identifier attached to the data storage request may be read. In the case where the data processing request is a data read request, annotation information of a variable to which the read data is assigned may be acquired. It will be appreciated that, in particular, for example, an array may be constructed, and annotation information for variables may be placed in the array, each annotation information being used as a datum in the array. Of course, a plurality of variables corresponding to one annotation information may be instantiated, and the corresponding annotation information may be copied. Of course, the annotation information may be integrated into a character string, and different annotation information may be separated by a designated symbol. For example, "&" is used to separate adjacent two annotation information.
In some embodiments, to facilitate management of annotation information, a data set of annotation information may be formed. The annotation information that the variable has after being instantiated can be put into the annotation information data set, and the corresponding relation between the variable identification and the annotation information is recorded. Of course, one annotation information may correspond to a plurality of variable identifiers, and one variable identifier may also correspond to a plurality of annotation information. Of course, the annotation information of each variable can be called by using the related function directly only according to the variable identification.
Step S114: and under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data. Wherein the specified data processing function corresponds to the preset annotation information.
The preset annotation information can be used as a tag, so that when the preset annotation information exists in the annotation information of the variable, a designated data processing function corresponding to the corresponding preset annotation information can be called. The number of the preset annotation information may be one or more. Specifically, the setting can be according to the requirement of specific data processing. For example, encryption, decryption, desensitization, restoration, formatting, and the like are required for data. Corresponding preset annotation information can be preset to match with the annotation information of the variable, and when the preset annotation information exists in the annotation information of the variable, a corresponding specified data processing function can be called to process the value of the variable.
In some embodiments, there may be a certain execution order between the designated data processing functions corresponding to different preset stored annotation information. For example, the preset annotation information may include "rounded" and "encrypted". At this time, the designated data processing function of the preset annotation information "get integer" may be called first, the data type of the original data is changed into integer first, and then the designated data processing function of the preset annotation information "encrypt" is called, and the original data changed into integer is encrypted.
In some embodiments, the annotation information of the variable may not have preset annotation information, and in this case, it may indicate that no processing is required on the original data.
The target data may be data after processing the original data. The target data and the original data naturally form a corresponding relationship. In some embodiments, when the data processing request is a data storage request, the original data may be a value of a variable represented by a variable identifier attached to the data storage request, and correspondingly, the target data may be data stored after the original data is processed. In the case where the data processing request is a data read request, the raw data may be data stored in a database to be read, and the target data may be data assigned to a variable after the raw data is processed by a specified processing function.
The designated data processing function may be a function for processing the raw data as necessary. So that the raw data can be stored in the database or read out from the database. The designated data processing function can set a corresponding data processing mode according to needs. Specifically, for example, the specified data processing function may be an encryption processing function that performs encryption processing on the original data. For example, the encryption processing function may be based on DES TripleDES algorithm, RC algorithm, or BlowFish algorithm, and will not be described in detail.
Step S116: responding to the data processing request based on the target data.
Having obtained the target data, the function indicated by the data processing request itself may be responded to. Specifically, for example, when the data processing request is a data storage request, the target data may be stored according to a storage rule of the database. Specifically, the database may be physically divided into data tables, and when storing the target data, a certain data storage rule needs to be followed, so that the target data can be read from the database according to a reasonable calling manner. Alternatively, for example, in the case where the data processing request is a data read request, the target data may be provided to the caller who issued the data read request after being obtained. Specifically, in some embodiments, the data storage module may send the feedback data by using the obtained feedback data as response information of the data reading request.
In some embodiments, the respective servers are provided with a way in which individual program modules intercept data processing requests. In the case that the data processing request is a data storage request, after the program module generates target data, the target data may replace original data in the previous data storage request, repackage the target data into the data storage request, and provide the data storage request to the data storage module. So that the data storage module can store the target data in response to the data storage request. In some embodiments, in a case where the data processing request is a data reading request, the obtained target data may be provided to the database by the program module, so that the database sends the target data to a caller of the data reading request as response information of the data reading request. Of course, the separate program module may also directly provide the target data to the caller of the data read request as the response information of the data read request.
According to the data processing method provided by the embodiment of the specification, annotation information is defined for the variable, so that when the original data of the variable needs to be processed, the value of the variable can be processed by automatically calling the appointed data processing function according to the annotation information. Thus, the method can be not used in each functional module related to the value taking of the variable, and can call the specified data processing function aiming at the original data. Particularly, when the original data may be some private data or sensitive information, when the value of the variable needs to be written into the database or read from the database, the original data may be corresponded to the designated data processing function through the preset annotation information. Therefore, the appointed data processing function corresponding to the preset annotation information can be called without the need of calling each function module related to the value of the variable, and the code amount can be reduced to a certain extent. Moreover, the condition that some data storage is not qualified due to the fact that program codes are missed to call the specified data processing function is avoided to a certain extent through the unified calling mode.
In some embodiments, the data processing request is a data storage request; the original data is the value of the variable. The preset annotation information may comprise desensitised annotation information. The designated data processing function comprises a desensitization processing function for desensitizing original data of the variable represented by the variable identifier. Correspondingly, the target data are stored according to the data storage request.
In this embodiment, the original data of the variable represented by the variable identifier may relate to some private data. For example, information relating to a contact address of an individual, a family situation, or an income situation. These data relate to the domain of personal privacy. If this data can be freely disseminated, it may cause great trouble to the user, as well as concern for non-compliance with relevant legal regulations. Desensitization processing is required for data that may be related to the privacy of the user to properly manage the user's personal information.
In the embodiment, desensitization processing can be performed on the private data by setting desensitization annotation information, so that the private data is prevented from being leaked. In the preset annotation information, desensitization annotation information may be included. Specifically, for example, a definition portion for preset annotation information in the code may have "@ detensize". Accordingly, the definition part of the code relating to the variable may also have "@ Desensize". Therefore, when the value of the variable is stored, the annotation information of the variable is matched with the preset annotation information, and the desensitization annotation information of the variable is obtained. And then a desensitization processing function can be called to process the value of the variable.
The desensitization processing function can process the value of the variable according to a certain desensitization processing rule. The desensitization processing function can replace at least part of the original data with the specified data to form target data. Thus, the original data will not be fully displayed when the target data is stored or displayed. Of course, the processing mode may be different when different raw data is processed. Specifically, for example, the variable represented by the variable identifier is a mobile phone number, and the intermediate data may be replaced with the specified data according to the calculation of the entire length of the mobile phone number. For example, the telephone number "12345678909" is processed to "123 × 8909". Alternatively, the variable represented by the variable identifier may be a name, and one or more words in the name may be selectively replaced with the specified data according to the length of the name. Specifically, for example, the original data has a length of two characters, and the data of the second character may be replaced with the specified data. For example, the name "zhang san" is processed as "zhang xi". The length of the characters is 3 or more, and the data of the middle characters can be selectively replaced by the designated data. For example, the name "lie four five six", may be treated as "lie x six", "lie x # six", or "lie four # six", etc.
In this embodiment, the designation data may be one designated character. In this way, at least part of the data of the original data can be replaced with the designated data when desensitizing the original data. Specifically, for example, the specified data may be selected from one or more of the following characters: "@", "#", "%", "^", "&", "-", etc.
Of course, in some cases, after the original data is stored, it may be necessary to display the data later. When storing data, the original data of the specified data replacement part can be stored separately in a certain position. As such, at the time of storage. After the desensitization function processing is performed on the target data, a part of the original data may be replaced with the specified data to form the target data. And storing the replaced part of original data separately. Thus, the privacy information of the user can be prevented from being leaked to a certain degree on the whole. The target data can be restored to the original data when necessary.
In this embodiment, the specified data may be obtained according to a certain algorithm mapping relationship with respect to the partial data in the original data, and the specified data may be stored after replacing the corresponding data. Therefore, when the original data needs to be displayed subsequently, the target data can be reversely deduced according to the algorithm mapping relation, and the original data is obtained again. Specifically, for example, the desensitization processing function may perform symmetric encryption on a part of the original data to obtain the target data. In this way, the partially encrypted data can be decrypted later when the original data needs to be used.
In some embodiments, the data processing request is a data storage request; the original data is the value of the variable; the preset annotation information comprises encrypted annotation information; the specified data processing function includes an encryption processing function that encrypts a value of a variable represented by the variable identifier. Correspondingly, the target data are stored according to the data storage request.
In this embodiment, the original data corresponding to the variable identifier may relate to some data that needs to be kept secret. Specifically, for example, information such as an identification number or a bank account number of the user is involved. Once leaked, the data may cause great loss to users. Therefore, it is necessary to perform encryption processing before storing into the database. Thus, the encrypted data is stored in the database. Even if the information of the database is leaked, the data needing to be kept secret can be ensured not to be directly leaked to a certain extent.
In this embodiment, when defining a variable, encryption comment information is provided for the variable, thereby realizing encryption processing of raw data. Specifically, for example, a definition part for storing annotation information preset in the code may have "@ Encrypt". Accordingly, the defined portion of the code, which relates to variables, may also have "@ Encrypt". Therefore, when the original data of the variable needs to be stored, an encryption processing function corresponding to the encrypted annotation information in the preset stored annotation information is called, and the original data of the variable is encrypted.
In this embodiment, the target data may be read after being stored in the database, and may be used. In some cases, it is also involved in the need to restore the target data in an encrypted state to the original data. So that the cryptographic processing function can be generated based on a symmetric cryptographic algorithm. Therefore, the decryption processing function can be set by utilizing the characteristic that the symmetric encryption algorithm can be decrypted, so that the encrypted target data can be decrypted to obtain the original data. In some embodiments, symmetric encryption algorithms may include, but are not limited to: DES TripleDES algorithm, RC algorithm, or BlowFish algorithm, etc. And will not be described in detail.
In some embodiments, the data processing request is a data read request, and the original data is stored data after desensitization processing corresponding to the variable; the preset annotation information comprises reduction annotation information; and the appointed processing function comprises a reduction processing function for reducing the original data to obtain target data. Correspondingly, the target data is fed back according to the data reading request.
In this embodiment, the annotation information of the variable identifier may include reduced annotation information; and the reduction annotation information corresponds to a reduction processing function, so that after the original data is read, the reduction processing function is called to process the original data based on the reduction annotation information to obtain target data.
The restore annotation information may correspond to desensitised annotation information. Therefore, the restoring processing function corresponding to the restoring annotation information and the desensitization processing function corresponding to the desensitization annotation information can form an opposite data processing process. In this way, the restoration processing function can restore the original data (stored data) to the target data. After the original data is obtained by restoring the processing function, the original data can be analyzed to determine the processing content of the original data.
In this embodiment, after the original data is read from the database, the original data may be fed back to the corresponding variable, or a certain data structure may be formed to receive the read original data. Whether the annotation information of the assigned variable has the restoration annotation information or not can be analyzed to judge whether the restoration processing function is called or not.
In this embodiment, the data attribute of the original data may be determined according to a field of a data table in which the target data is stored in the database. Further, the specific mode of the reduction treatment is determined. For example, the field of the data table is "name", and the data read can be considered a name. Therefore, the designated character in the data can be obtained, partial data which is independently stored by the desensitization processing function is searched, and after the partial data is substituted for the designated data in the original data, the target data corresponding to the original data can be obtained.
In this embodiment, part of the original data has been encrypted, so that the restore processing function needs to decrypt the encrypted part of the original data, thereby obtaining the target data. When the restoration processing function is set, decryption processing can be performed on the encryption mode of partial data according to the desensitization processing function. For example, there may be an encrypted key in the desensitization processing function and a decrypted key in the recovery processing function. Alternatively, a communication mechanism is provided between the restoration processing function and the desensitization processing function, so that after the desensitization processing function encrypts part of the data, the restoration processing function can be informed of information such as an encryption mode and an encryption key for the part of the data. So that the restoration processing function can decrypt the encrypted part of the original data, thus obtaining the target data.
In some embodiments, the data processing request is a data read request; the original data is stored data which corresponds to the variable and is subjected to encryption processing; the preset annotation information comprises the annotation information of the variable identifier and also comprises decrypted annotation information; the appointed processing function comprises a decryption processing function for decrypting the original data to obtain the target data. Correspondingly, the target data is fed back according to the data reading request.
In the present embodiment, the decryption processing function corresponds to decrypting the annotation information. The decryption processing function may decrypt the data obtained by the encryption processing function to obtain the target data. The encryption processing function and the decryption processing function can be correspondingly set in the program coding stage, so that the encryption processing function and the decryption processing function can cooperate with each other. The encryption processing function may perform encryption processing on data written in the database, and may perform decryption processing by the decryption processing function after the target data is read out from the database.
In the present embodiment, the symmetric encryption algorithm used in the encryption processing function is such that, after the data is encrypted, the data before encryption can be obtained by performing decryption processing with the key. In some embodiments, a certain linkage mechanism may be provided between the encryption processing function and the decryption processing function, and a key used by the encryption processing function may be fixed, so that a corresponding decryption key is also set in the decryption processing function. In some cases, the encryption key used by the encryption processing function may be randomly generated and notified to the decryption function, so that the decryption function may decrypt the data according to the encryption key corresponding to the data to obtain the data before encryption.
In this embodiment, the annotation information of the variable may have decrypted annotation information, which may indicate that the variable may be assigned by data read from the database. Before assignment, the variable has decryption annotation information, so that a decryption processing function is called to decrypt original data read from the database to obtain target data, and the target data can be assigned to the variable.
Please refer to fig. 4. The embodiment of the specification also provides a data feedback method. The data feedback method can be applied to a server. The data feedback method may include the following steps.
Step S120: receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable identification represents a variable having annotation information.
Step S122: obtaining annotation information of the variable.
Step S124: under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a set condition of the data processing request.
Step S126: a function responsive to the data processing request indication.
In the present embodiment, the specified data processing function may be a setting condition in response to a data processing request. It is understood that after receiving the data processing request, the specified data processing function needs to be executed in advance, and after the specified data processing function completes execution, the data processing request may be responded based on the target data output by the specified data processing function. In some embodiments, the data processing request may be responded to in accordance with the target data output by the specified data processing function only if the specified data processing function is successfully executed. Of course, in some embodiments, the specified data processing function is executed before responding to the function indicated by the data processing request. In responding to a data processing request, the target data does not necessarily have to be used. Such that specifying whether the data processing function was successfully executed does not necessarily result in an inability to respond to the data processing request.
In some embodiments, executing the specified data processing function is in response to a set condition of the data processing request, including one of: a function of responding to the data processing request indication only when the designated data processing function completes processing the original data to obtain target data; or, the target data is used as input data of the function responding to the data processing request indication. Specifically, for example, the data processing request may be a data read request, and the specified data processing function may be a decryption function. For example, the functional module that issued the data processing request performs the data accumulation function. At this time, after the data processing function is required to decrypt the read original data, the data reading request is responded, and the decrypted target data is provided to the functional module executing the data accumulation function. Alternatively, for example, the data processing request may be a data storage request and the specified data processing function may be an encryption function. And encrypting the original data by using the appointed data processing function to obtain target data. And providing the target data to a database indicated by the data storage request for storage.
Please refer to fig. 5. The embodiment of the specification provides a data processing device. The data processing apparatus includes: the system comprises a receiving module, an annotation acquisition module, a data processing module and a data response module.
The receiving module may be configured to receive a data processing request; wherein, the data processing request is attached with a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: data storage requests and data read requests.
The annotation acquisition module may be configured to acquire annotation information of the variable.
The data processing module may be configured to, when the annotation information includes preset annotation information, process the original data of the variable using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information.
The data response module may be to respond to the data processing request based on the target data.
In this embodiment, the functions and effects achieved by the data processing apparatus can be explained with reference to other embodiments, and are not described herein again. In some embodiments, different modules in this embodiment may be mapped to one or more different processors to execute corresponding processes, so as to implement corresponding functions.
Please refer to fig. 6. The embodiment of the specification also provides a data processing device. The data processing apparatus may include: the system comprises a request receiving module, an annotation obtaining module, a data processing module and a data response module.
The request receiving module may be configured to receive a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable identification represents a variable having annotation information.
The annotation acquisition module may be configured to acquire annotation information of the variable.
The data processing module may be configured to, when the annotation information includes preset annotation information, process the original data of the variable using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a set condition of the data processing request.
The response module may be configured to respond to the data processing request indicated functionality.
In this embodiment, the functions and effects achieved by the data processing apparatus can be explained with reference to other embodiments, and are not described herein again. In some embodiments, different modules in this embodiment may be mapped to one or more different processors to execute corresponding processes, so as to implement corresponding functions.
The embodiment of the specification also provides electronic equipment. The electronic device may include: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data processing method according to the foregoing embodiment.
Embodiments of the present specification also provide a computer storage medium storing computer program instructions, which when executed by a processor implement the data processing method according to the foregoing embodiments.
The present specification also provides a computer program product, which includes instructions that can be executed by a processor of a computer device to implement the method steps in the above embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and the like that are within the spirit and principle of the present invention are included in the present invention.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present description 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 description 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 disclosure may be described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 specification embodiments may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The implementation modes in the present specification are all described in a progressive manner, and the same and similar parts in the various embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A data processing method, comprising:
receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: a data storage request and a data read request;
obtaining annotation information of the variable;
under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information;
responding to the data processing request based on the target data.
2. The method of claim 1, wherein the data processing request is a data storage request; the original data is the value of the variable; the preset annotation information comprises desensitization annotation information; the designated data processing function comprises a desensitization processing function for desensitizing original data of the variable represented by the variable identification;
correspondingly, the step of responding to the data processing request based on the target data comprises:
and storing the target data according to the data storage request.
3. The method of claim 1, wherein the data processing request is a data storage request; the original data is the value of the variable; the preset annotation information comprises encrypted annotation information; the specified data processing function comprises an encryption processing function for encrypting the value of the variable represented by the variable identification;
correspondingly, in the step of responding to the data processing request based on the target data, the method comprises the following steps:
and storing the target data according to the data storage request.
4. The method of claim 1, wherein the data processing request is a data read request, and the raw data is data after stored desensitization processing; the preset annotation information comprises reduction annotation information; the designated processing function comprises a reduction processing function for reducing the original data to obtain target data;
correspondingly, in the step of responding to the data processing request based on the target data, the method comprises the following steps:
and feeding back the target data according to the data reading request.
5. The method of claim 1, wherein the data processing request is a data read request; the original data is stored data after encryption processing; the preset annotation information comprises decrypted annotation information; the appointed processing function comprises a decryption processing function for decrypting the original data to obtain target data;
correspondingly, in the step of responding to the data processing request based on the target data, the method comprises the following steps:
and feeding back the target data according to the data reading request.
6. A data processing method, comprising:
receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information;
obtaining annotation information of the variable;
under the condition that the annotation information comprises preset annotation information, processing the original data of the variables by using a specified data processing function to obtain target data; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a setting condition of the data processing request;
a function responsive to the data processing request indication.
7. The method of claim 6, wherein executing the specified data processing function is in response to a set condition of the data processing request, comprising one of:
a function of responding to the data processing request indication only when the designated data processing function completes processing the original data to obtain target data; or the like, or, alternatively,
the target data is used as input data of a function responding to the data processing request indication.
8. A data processing apparatus, comprising:
the receiving module is used for receiving a data processing request; wherein, the data processing request is attached with a variable identifier; wherein the variable represented by the variable identifier has annotation information; the data processing request includes at least one of: a data storage request and a data read request;
the annotation acquisition module is used for acquiring annotation information of the variables;
the data processing module is used for processing the original data of the variables by using a specified data processing function to obtain target data under the condition that the annotation information comprises preset annotation information; wherein the specified data processing function corresponds to the preset annotation information;
and the data response module is used for responding the data processing request based on the target data.
9. A data processing apparatus, comprising:
the request receiving module is used for receiving a data processing request; wherein, the data processing request corresponds to a variable identifier; wherein the variable represented by the variable identifier has annotation information;
the annotation acquisition module is used for acquiring annotation information of the variables;
the data processing module is used for processing the original data of the variables by using a specified data processing function to obtain target data under the condition that the annotation information comprises preset annotation information; wherein the specified data processing function corresponds to the preset annotation information; wherein the executing of the specified data processing function is in response to a setting condition of the data processing request;
and the response module is used for responding to the function indicated by the data processing request.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a data processing method as claimed in any one of claims 1 to 7.
CN202111238968.4A 2021-10-25 2021-10-25 Data processing method and device and electronic equipment Pending CN113986342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111238968.4A CN113986342A (en) 2021-10-25 2021-10-25 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111238968.4A CN113986342A (en) 2021-10-25 2021-10-25 Data processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113986342A true CN113986342A (en) 2022-01-28

Family

ID=79740775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111238968.4A Pending CN113986342A (en) 2021-10-25 2021-10-25 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113986342A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307509A (en) * 2020-10-20 2021-02-02 北京三快在线科技有限公司 Desensitization processing method, equipment, medium and electronic equipment
CN112685777A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Information desensitization method, apparatus, computer device and medium
CN112699403A (en) * 2020-12-28 2021-04-23 深圳前海微众银行股份有限公司 Data processing method, apparatus, medium, device, and program product
CN113254951A (en) * 2021-04-23 2021-08-13 天津车之家数据信息技术有限公司 Data processing method and computing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307509A (en) * 2020-10-20 2021-02-02 北京三快在线科技有限公司 Desensitization processing method, equipment, medium and electronic equipment
CN112699403A (en) * 2020-12-28 2021-04-23 深圳前海微众银行股份有限公司 Data processing method, apparatus, medium, device, and program product
CN112685777A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Information desensitization method, apparatus, computer device and medium
CN113254951A (en) * 2021-04-23 2021-08-13 天津车之家数据信息技术有限公司 Data processing method and computing device

Similar Documents

Publication Publication Date Title
CN108932297B (en) Data query method, data sharing method, device and equipment
CN112818380B (en) Backtracking processing method, device, equipment and system for business behaviors
CN107370730B (en) Login information processing method and equipment
CN110457912B (en) Data processing method and device and electronic equipment
US8539231B1 (en) Encryption key management
US11507683B2 (en) Query processing with adaptive risk decisioning
CN109347629B (en) Secret key transmission method and system based on shared security application, storage medium and equipment
CN111340631A (en) Asset transfer method, device, equipment and system
US8848922B1 (en) Distributed encryption key management
CN109583224B (en) User privacy data processing method, device, equipment and system
US8769302B2 (en) Encrypting data and characterization data that describes valid contents of a column
CN111125727A (en) Confusion circuit generation method, prediction result determination method, device and electronic equipment
US20210349743A1 (en) Systems and methods for converting record formats
CN112287376B (en) Method and device for processing privacy data
CN113282959A (en) Service data processing method and device and electronic equipment
US11947684B2 (en) Searching encrypted data
CN113095507A (en) Method, device, equipment and medium for training and predicting machine learning model
CN112182509A (en) Method, device and equipment for detecting abnormity of compliance data
CN113742370B (en) Data query method and statistical information ciphertext generation method of full-encryption database
CN113986342A (en) Data processing method and device and electronic equipment
KR101979320B1 (en) System and Method for automatic generation and execution of encryption SQL statements using meta-information and enterprise framework
CN116226900A (en) Database access method and device
US20220358237A1 (en) Secure data analytics
CN113836169A (en) Clickhouse-based data processing method, device and medium
CN111314057A (en) Private key using method and device depending on user input

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