Data processing method and device, storage medium and electronic device

By identifying the target identification field in the business data to determine the encryption strategy and selectively encrypting the data, the problem of poor storage device performance caused by low data processing efficiency in the existing technology is solved, and the encryption rate and processing efficiency are improved.

CN118551404BActive Publication Date: 2024-10-29ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411021332.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-29
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

In the existing technology, due to low data processing efficiency, the performance of the storage device is poor, which affects the speed and efficiency of read and write operations.

Method used

By identifying the target identification field in the business data to determine the target length field and encryption method, the business data is selectively encrypted to avoid excessive time-consuming caused by overall encryption and improve the encryption rate and processing efficiency.

Benefits of technology

It improves the encryption rate and processing efficiency of business data, reduces the performance loss of storage devices, and solves the problem of poor performance of storage devices caused by low data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551404B_ABST
    Figure CN118551404B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method and device, a storage medium and an electronic device. The method includes: obtaining business data generated by a target application, wherein the business data is allowed to be saved to a target storage device; when the business data includes a target identification field, determining a target length field and a target encryption method according to the target identification field, and using the target length field to determine a target business field associated with the target identification field in the business data, wherein the target length field is used to indicate the field length of the target business field; encrypting the target business field using the target encryption method to obtain a target encrypted field; determining the target identification field, the target length field and the target encryption field as encrypted data and saving them to a target storage device. The present application solves the technical problem of poor performance of storage devices due to low data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a data processing method and device, a storage medium, and an electronic device. Background Art

[0002] At present, in the related technologies, the business data is usually encrypted as a whole and then saved in the storage device. However, since the amount of business data is often large, the encryption operation of the business data takes too long and the data processing efficiency is low, which in turn affects the overall performance of the storage device and makes the speed and efficiency of the storage device's reading, writing and other operations too low. In summary, there is a technical problem in the related technologies that the performance of the storage device is poor due to low data processing efficiency.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device to at least solve the technical problem that the performance of the storage device is poor due to low data processing efficiency.

[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, comprising: obtaining business data generated by a target application, wherein the business data is allowed to be saved to a target storage device; when the business data includes a target identification field, determining a target length field and a target encryption method according to the target identification field, and using the target length field to determine a target business field associated with the target identification field in the business data, wherein the target length field is used to indicate the field length of the target business field; encrypting the target business field using the target encryption method to obtain a target encrypted field; determining the target identification field, the target length field and the target encryption field as encrypted data and saving them to the target storage device.

[0006] According to another aspect of an embodiment of the present application, a data processing device is also provided, including: an acquisition module, used to acquire business data generated by a target application, wherein the business data is allowed to be saved to a target storage device; a determination module, used to determine a target length field and a target encryption method according to a target identification field when the business data includes a target identification field, and use the target length field to determine a target business field associated with the target identification field in the business data, wherein the target length field is used to indicate the field length of the target business field; an encryption module, used to encrypt the target business field using the target encryption method to obtain a target encrypted field; and an execution module, used to determine the target identification field, the target length field and the target encryption field as encrypted data and save them to the target storage device.

[0007] Optionally, the device is also used to: after obtaining the business data generated by the target application, obtain a pre-set identification field set, a length field set and an encryption method set, wherein the length field set and the encryption method set include length fields and encryption methods corresponding to each identification field in the identification field set; and detect the business data to determine whether the target identification field exists.

[0008] Optionally, the device is used to determine the target length field and the target encryption method based on the target identification field when the business data includes a target identification field, and determine the target business field associated with the target identification field in the business data using the target length field in the following manner: when the business data includes a target identification field, determine the target length field from the length field set based on the target identification field, and determine the target encryption method from the encryption method set; determine the target business field associated with the target identification field in the business data using the target length field.

[0009] Optionally, the device is used to detect the business data to determine whether the target identification field exists in the following manner: detecting the business data according to a predetermined vocabulary library to determine the target vocabulary in the business data; when the type of the target vocabulary is the target type, determining that the target identification field exists; when the type of the target vocabulary is not the target type, determining that the target identification field does not exist.

[0010] Optionally, the device is also used to: after determining the target identification field, the target length field and the target encryption field as encrypted data and saving them to the target storage device, in response to the target application needing to use the business data, search for the encrypted data from the target storage device; when the encrypted data includes the target identification field, determine the target length field and the target decryption method according to the target identification field; determine the target encryption field according to the target length field; decrypt the target encryption field using the target decryption method to obtain the target business field; determine the target identification field and the target business field as the business data, and send them to the target application.

[0011] Optionally, the device is also used to: when the business data includes a first identification field and a second identification field, determine a first length field and a first encryption method according to the first identification field, wherein the target identification field includes a first identification field and a second identification field, the first identification field and the second identification field represent adjacent identification fields, and the first identification field is located before the second identification field; obtain a field distance between the first identification field and the second identification field; when the field length indicated by the first length field is greater than the field distance, use the field distance to determine a first business field associated with the first identification field in the business data, wherein the field distance is used to indicate the field length of the first business field; encrypt the first business field using the first encryption method to obtain a first encrypted field; determine the first identification field, the first length field and the first encryption field as first encrypted data and save them to the target storage device, wherein the encrypted data includes the first encrypted data.

[0012] Optionally, the device is used to encrypt the target business field using the target encryption method in the following manner to obtain a target encrypted field: determine the encryption level of the target business field according to the target identification field, wherein the target encryption method includes the encryption level; when the encryption level indicates a first level, use a first key of a first digit to encrypt the target business field to obtain the target encrypted field; when the encryption level indicates a second level, use a second key of a second digit to encrypt the target business field to obtain the target encrypted field, wherein the first level is lower than the second level, and the first digit is smaller than the second digit.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data processing method when running.

[0014] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above data processing method.

[0015] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data processing method through the computer program.

[0016] In an embodiment of the present application, the business data generated by the target application is obtained, wherein the business data is allowed to be saved to the target storage device; when the business data includes a target identification field, the target length field and the target encryption method are determined according to the target identification field, and the target business field associated with the target identification field in the business data is determined using the target length field, wherein the target length field is used to indicate the field length of the target business field; the target business field is encrypted using the target encryption method to obtain the target encryption field; the target identification field, the target length field and the target encryption field are determined as encrypted data and saved to the target storage device, that is, the encryption strategy of the business data (including the above-mentioned target length field and target encryption method) is determined using the target identification field, and then, the target business field in the business data is selectively encrypted, avoiding the encryption time consuming too long due to the overall encryption of the business data, and further improving the processing efficiency of the business data on the basis of improving the encryption rate of the business data, so that in the process of storing the encrypted business data in the target storage device, the technical effect of effectively reducing the performance loss of the target storage device is achieved, and then, the technical problem of poor performance of the storage device due to low data processing efficiency is solved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 is a schematic diagram of an application environment of an optional data processing method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of an optional data processing method according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of another optional data processing method according to an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of another optional data processing method according to an embodiment of the present application;

[0023] Figure 6 is a schematic structural diagram of an optional data processing device according to an embodiment of the present application;

[0024] Figure 7 is a schematic diagram of the structure of an optional data processing product according to an embodiment of the present application;

[0025] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] The present application is described below in conjunction with embodiments:

[0029] According to one aspect of an embodiment of the present application, a data processing method is provided. Optionally, in this embodiment, the data processing method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1 As shown, the server 101 is connected to the terminal device 103 via a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application 107 can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The terminal device 103 may be a terminal configured with an application, and may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (Virtual Reality, VR for short) terminal, an augmented reality (Augmented Reality, AR for short) terminal, a mixed reality (Mixed Reality, MR for short) terminal and other computer devices. The above-mentioned server may be a single server, or a server cluster consisting of multiple servers, or a cloud server.

[0030] Combination Figure 1 As shown, the above data processing method can be executed by an electronic device, which can be a terminal device or a server. The above data processing method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.

[0031] The above is only an example and is not specifically limited in this embodiment.

[0032] Optionally, as an optional implementation, as Figure 2 As shown, the method for processing the above data includes:

[0033] S202, obtaining business data generated by the target application, wherein the business data is allowed to be saved to the target storage device;

[0034] Optionally, in an embodiment of the present application, the target application may include but is not limited to game applications, social media applications, educational applications, business applications, music applications, etc. The target application may be run on terminal devices such as mobile phones, tablet computers or computers to provide users with functions such as entertainment, learning or business activities. The business data may include but is not limited to data input into the target application manually through touch operations performed on a touch screen, or through touch operations performed by input devices such as a mouse, keyboard, and stylus, and may also be business data acquired by the target application itself in the application background.

[0035] For example, taking the above-mentioned target application as an e-commerce application, the user enters the account name and password through the keyboard to log in to the e-commerce application, and the account name and password are used as the above-mentioned business data; the target application pulls the account name and account purchased items from the e-commerce application background, and accordingly, the account name and account purchased items are used as the above-mentioned business data.

[0036] Optionally, in an embodiment of the present application, the target storage device may include but is not limited to a magnetic disk, a solid state drive (SSD), an optical disk, a magnetic tape, etc.

[0037] In an exemplary embodiment, assuming that the target storage device is a disk on a terminal device used by a user to log in to the above-mentioned target application, the target application is a game application, and the business data is a game account name and a game account password entered by the player, then the game account name and the game account password are allowed to be saved to the disk.

[0038] S204, in the case where the business data includes a target identification field, determining a target length field and a target encryption mode according to the target identification field, and determining a target business field associated with the target identification field in the business data using the target length field, wherein the target length field is used to indicate a field length of the target business field;

[0039] Optionally, in an embodiment of the present application, the target identification field may be flexibly set, and the present application does not make any specific limitation thereto. It may include but is not limited to characters, numbers, special symbols, etc., and the target length field may also not be limited thereto.

[0040] In an exemplary embodiment, taking the target identification field as "telephone number" as an example, the number of digits in a telephone number is usually set between 7 and 15 digits. Therefore, the target length field can be determined to be 15 based on the target identification field. That is, the target length field can be greater than or equal to the actual field length of the target identification field, thereby ensuring the accuracy and completeness of the query and preventing data truncation or omission.

[0041] Furthermore, after determining the above-mentioned target length field, the above-mentioned business data can be queried based on the target length field to obtain the above-mentioned target business field, which is associated with the above-mentioned target identification field. For example, the target identification field is a telephone number, and the target business field is "12334455555", that is, the target business field is associated with the above-mentioned target identification field, which can be understood as the target business field is the specific information or data described by the target identification field.

[0042] Furthermore, the target encryption method can also be determined based on the target identification field. The target encryption method may include but is not limited to symmetric encryption algorithms, such as AES-CBC encryption algorithm, AES-OFB encryption algorithm, etc.; asymmetric encryption algorithms, such as RSA encryption algorithm, ECC encryption algorithm, etc., which are not limited in this application.

[0043] It can be understood that different target encryption methods can be determined based on the different target identification fields mentioned above. That is, in an embodiment of the present application, the target encryption method most suitable for encrypting the above-mentioned target business field can be determined based on the target identification field based on the actual business situation.

[0044] Exemplarily, taking the above-mentioned target identification field including "zip code, name" as an example, the zip code usually has 6 digits. For the accuracy of the address information, the target length field corresponding to the zip code can be determined to be 9 digits. Furthermore, since the target identification field is "zip code", considering data privacy and confidentiality, it is determined to use the symmetric encryption algorithm AES (Advanced Encryption Standard) as the above-mentioned target encryption method to encrypt the target business field corresponding to the zip code. Similarly, the name usually consists of two fields, surname and given name. For the encryption security of the name, the target length field corresponding to the name can be determined to be 5 digits. Furthermore, since the target identification field is "name", it is determined to use the hash MD5 encryption algorithm as the above-mentioned target encryption method to encrypt the target business field corresponding to the name.

[0045] It should be noted that the target length fields corresponding to different target identification fields may be the same or different. Similarly, the target encryption methods may be the same or different.

[0046] S206, encrypting the target business field using a target encryption method to obtain a target encrypted field;

[0047] Optionally, in an embodiment of the present application, the above-mentioned target encrypted field refers to a field after the target business field is encrypted.

[0048] In an exemplary embodiment, the target business field is "12345", and the target encryption method is the symmetric encryption algorithm AES. After encryption, the target encryption field is "Pj8GKfFV6KzQWmKgXw1j1w==".

[0049] S208, determining the target identification field, the target length field and the target encryption field as encrypted data and saving them to the target storage device.

[0050] Optionally, in an embodiment of the present application, the above-mentioned encrypted data may include but is not limited to data obtained by concatenating the above-mentioned target identification field, target length field and target encryption field.

[0051] For example, assuming that the target identification field is "mobile phone number", the target length field is 5, the target service field is "12345", and the target encryption field is "Pj8GKfFV6KzQWmKgXw1j1w==", it can be obtained that the above encrypted data is "mobile phone number 5Pj8GKfFV6KzQWmKgXw1j1w==".

[0052] It should be noted that the above-mentioned target identification field, target length field and target encryption field may include but are not limited to directly splicing the fields to obtain the above-mentioned encrypted data, wherein the order of splicing can be flexibly set and is not limited in this application.

[0053] In an exemplary embodiment, Figure 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application, wherein the encrypted data is "{target identification field}{target length field}{target encryption field}", and there may be multiple target identification fields. After encrypting the target business fields associated with each target identification field, they may be concatenated in sequence to obtain the encrypted data, such as Figure 3 As shown, the business data is "{data that does not need to be encrypted}{target identification field A}{target business field 1}{data that does not need to be encrypted}{target identification field B}{target business field 2}", and the corresponding encrypted data is "{data that does not need to be encrypted}{target identification field A}{target length field 1}{target encryption field 1}{data that does not need to be encrypted}{target identification field B}{target length field 2}{target encryption field 2}".

[0054] It should be noted that, in addition to directly concatenating the target identification field, the target length field and the target encryption field, they may also be concatenated in ways including but not limited to using separators, using marker bits, etc. to obtain the encrypted data.

[0055] Furthermore, after obtaining the encrypted data, the encrypted data may be saved to the target storage device, so as to facilitate subsequent operations such as reading the encrypted data from the target storage device and then decrypting the data to obtain corresponding business data.

[0056] In an exemplary embodiment, Figure 4 is a schematic diagram of an optional data processing method according to an embodiment of the present application, such as Figure 4 As shown, the encrypted data is read from the target storage device. Since the target identification field exists in the encrypted data, the corresponding target encryption method and the target encryption field can be directly determined based on the target identification field. The target encryption field is decrypted using the decryption algorithm corresponding to the encryption algorithm specified by the target encryption method to obtain the corresponding business data.

[0057] In yet another exemplary embodiment, Figure 5 is a schematic diagram of an optional data processing method according to an embodiment of the present application. The data processing method proposed in the present application may include but is not limited to being applied to the field of disk data processing. That is, in the case where the above-mentioned target storage device is a disk, such as Figure 5 This may include, but is not limited to:

[0058] S502, obtaining business data generated in the target application;

[0059] S504, determining whether the business data includes a preset target identification field, if yes, executing S506, otherwise executing S516, wherein the number of target identification fields is not limited;

[0060] S506, determining the corresponding target encryption mode and target length field based on the target identification field, including but not limited to pre-setting the mapping relationship between the target identification field and the target encryption mode, and the target identification field and the target length field. If not pre-set, it can also be determined in a random manner, which is not limited in this application;

[0061] S508, determining a target service field based on the target length field;

[0062] S510, encrypting a target business field using a target encryption method to obtain a target encrypted field;

[0063] S512, generating encrypted data using the target identification field, the target length field, and the target encryption field;

[0064] S514, saving the encrypted data to the disk;

[0065] S516, end.

[0066] Through the embodiment of the present application, the business data generated by the target application is obtained, wherein the business data is allowed to be saved to the target storage device; when the business data includes a target identification field, the target length field and the target encryption method are determined according to the target identification field, and the target business field associated with the target identification field in the business data is determined using the target length field, wherein the target length field is used to indicate the field length of the target business field; the target business field is encrypted using the target encryption method to obtain the target encryption field; the target identification field, the target length field and the target encryption field are determined as encrypted data and saved to the target storage device, that is, the encryption strategy of the business data (including the above-mentioned target length field and target encryption method) is determined using the target identification field, and then, the target business field in the business data is selectively encrypted, avoiding the encryption time consuming too long due to the overall encryption of the business data, and further improving the processing efficiency of the business data on the basis of improving the encryption rate of the business data, so that in the process of storing the encrypted business data in the target storage device, the technical effect of effectively reducing the performance loss of the target storage device is achieved, and then, the technical problem of poor performance of the storage device due to low data processing efficiency is solved.

[0067] As an optional scheme, after obtaining the business data generated by the target application, the method further includes: obtaining a pre-set identification field set, a length field set and an encryption method set, wherein the length field set and the encryption method set include length fields and encryption methods corresponding to each identification field in the identification field set; and detecting the business data to determine whether the target identification field exists.

[0068] Optionally, in an embodiment of the present application, the above-mentioned identification field set may include several of the above-mentioned identification fields, the above-mentioned length field set may include several of the above-mentioned length fields, the above-mentioned encryption method set may include several of the above-mentioned encryption methods, and the identification field set may include the above-mentioned target identification field.

[0069] It should be noted that any identification field in the above-mentioned identification field set can correspond to several length fields in the above-mentioned length field set that have a mapping relationship with the identification field. Similarly, any identification field in the above-mentioned identification field set can correspond to several encryption methods in the above-mentioned encryption method set that have a mapping relationship with the identification field.

[0070] Exemplarily, one of the above identification fields may correspond to one or more of the above identification fields. Similarly, one of the above identification fields may also correspond to one or more of the above encryption methods.

[0071] In an exemplary embodiment, the identification field set is {telephone number, name, address...}, the above-mentioned length field set is {1, 2...15}, and the above-mentioned encryption method set is {AES encryption method, MD5 encryption method, SHA-256 encryption method...}. Taking the identification field "telephone number" as an example, the identification field can correspond to the length field "11", the length field "12", the length field "15", and correspond to the encryption methods "AES encryption method" and "AES encryption method".

[0072] It should be noted that the different identification fields mentioned above may include but are not limited to corresponding to the same length field mentioned above and different length fields. Similarly, different identification fields may also include but are not limited to the same encryption method mentioned above and different encryption methods.

[0073] As an optional scheme, when the above-mentioned business data includes a target identification field, the target length field and the target encryption method are determined according to the above-mentioned target identification field, and the target business field associated with the above-mentioned target identification field in the above-mentioned business data is determined by using the above-mentioned target length field, including: when the above-mentioned business data includes a target identification field, the above-mentioned target length field is determined from the above-mentioned length field set according to the above-mentioned target identification field, and the above-mentioned target encryption method is determined from the above-mentioned encryption method set; and the above-mentioned target length field is used to determine the target business field associated with the above-mentioned target identification field in the above-mentioned business data.

[0074] Furthermore, it may include but is not limited to detecting each field in the above-mentioned business data. If it is found that the above-mentioned target identification field is included, then according to the target identification field, the above-mentioned length field corresponding to it is determined from the above-mentioned length field set, and the length field is used as the above-mentioned target length field, and the above-mentioned encryption method corresponding to it is determined from the above-mentioned encryption method set, and the encryption method is used as the above-mentioned target encryption method.

[0075] In an exemplary embodiment, the target identification field is "zip code". First, based on the target identification field being a zip code, the target length field can be determined to be 6 from the above-mentioned length field set; then, an encryption method suitable for encrypting the "zip code" is selected from the encryption method set, for example, the AES encryption method; finally, based on the target identification field being a "zip code", it can be determined that the target business field associated therewith is "123456".

[0076] It should be noted that if the identification field set does not include the above-mentioned target identification field, it can include but is not limited to randomly obtaining the above-mentioned length field corresponding to it from the above-mentioned length field set, and using the length field as the above-mentioned target length field. Similarly, if the identification field set does not include the above-mentioned target identification field, it can also include but is not limited to randomly obtaining the above-mentioned encryption method corresponding to it from the above-mentioned encryption method set, and using the encryption method as the above-mentioned target encryption method, thereby achieving a technical effect of more flexible encryption configuration.

[0077] As an optional scheme, the above-mentioned detection of the above-mentioned business data to determine whether the above-mentioned target identification field exists includes: detecting the above-mentioned business data according to a predetermined vocabulary library to determine the target vocabulary in the above-mentioned business data; when the type of the above-mentioned target vocabulary is the target type, determining that the above-mentioned target identification field exists; when the type of the above-mentioned target vocabulary is not the above-mentioned target type, determining that the above-mentioned target identification field does not exist.

[0078] Optionally, in an embodiment of the present application, the above-mentioned vocabulary library may include but is not limited to pre-settings, and may include several words. The above-mentioned target vocabulary is used to indicate the target identification field in the above-mentioned business data, and the above-mentioned target type may include but is not limited to pre-settings, for example, "telephone number type, address type, zip code type, password type, name type..."

[0079] Exemplarily, when the above target type is a telephone number type, the target word is "telephone number". If "telephone number" exists in the business data, it means that the business data includes a target identification field. Otherwise, if "telephone number" does not exist in the business data, it means that the business data does not include a target identification field.

[0080] Through the embodiments of the present application, business data is detected according to a predetermined vocabulary library to determine the target vocabulary in the business data. When the type of the target vocabulary is the target type, it is determined that a target identification field exists. When the type of the target vocabulary is not the target type, it is determined that the target identification field does not exist, thereby achieving the purpose of effectively identifying the target identification field in the above-mentioned business data.

[0081] As an optional scheme, after determining the above-mentioned target identification field, the above-mentioned target length field and the above-mentioned target encryption field as encrypted data and saving them to the above-mentioned target storage device, the above-mentioned method also includes: in response to the above-mentioned target application needing to use the above-mentioned business data, searching the above-mentioned encrypted data from the above-mentioned target storage device; in the case that the above-mentioned encrypted data includes the above-mentioned target identification field, determining the above-mentioned target length field and the target decryption method according to the above-mentioned target identification field; determining the above-mentioned target encryption field according to the above-mentioned target length field; decrypting the above-mentioned target encryption field using the above-mentioned target decryption method to obtain the above-mentioned target business field; determining the above-mentioned target identification field and the above-mentioned target business field as the above-mentioned business data, and sending them to the above-mentioned target application.

[0082] Exemplarily, after the encrypted data is saved to the target storage device, the encrypted data may be read from the target storage device and decrypted to obtain the business data as in the embodiment of the present application.

[0083] Specifically, first, encrypted data is searched from the target storage device according to the above-mentioned target identification field, and the encrypted data includes the above-mentioned target identification field. Accordingly, the target length field and the target encryption method can be obtained based on the target identification field. Further, the target encryption field corresponding to the target length field and the target decryption method corresponding to the target encryption method are obtained. The target encryption field is decrypted using the target decryption method to obtain the above-mentioned target business field. Furthermore, the above-mentioned business data is determined based on the above-mentioned target identification field and the target business field, and the business data is provided to the target application to perform corresponding business operations.

[0084] In an exemplary embodiment, the target identification field is "telephone number" and the encrypted data is "telephone number 11vnrwgbfnFebngrnv". After the user logs in to the target application, when the user needs to query the telephone number stored in the target storage device, the encrypted data can be obtained first. Then, the target identification field is determined to be "telephone number" from the encrypted data. Then, the target length field is obtained as 11 using the above-mentioned length field set, and the target encryption method is obtained as encryption method A using the above-mentioned encryption method set. It can be known that by using encryption method A to encrypt a field with a length of 11, the target encrypted field in the encrypted data (vnrwgbfnFebngrnv in the encrypted data) will be obtained. At this time, the decryption method corresponding to encryption method A is the above-mentioned target decryption method A. Therefore, the target encrypted field is decrypted using target decryption method A to obtain the target business field. Then, the target business field and the target business field are spliced ​​to obtain the above-mentioned business data as "telephone number: 12345673324". The business data can be further displayed on the interface of the target application.

[0085] As an optional scheme, the above method also includes: in the case that the above business data includes a first identification field and a second identification field, determining a first length field and a first encryption method according to the above first identification field, wherein the above target identification field includes the first identification field and the above second identification field, the above first identification field and the above second identification field represent adjacent identification fields, and the above first identification field is located before the above second identification field; obtaining the field distance between the above first identification field and the above second identification field; in the case that the field length indicated by the above first length field is greater than the above field distance, using the above field distance to determine the first business field associated with the above first identification field in the above business data, wherein the above field distance is used to indicate the field length of the above first business field; encrypting the above first business field using the above first encryption method to obtain a first encrypted field; determining the above first identification field, the above first length field and the above first encryption field as the first encrypted data and saving them to the above target storage device, wherein the above encrypted data includes the above first encrypted data.

[0086] Optionally, in an embodiment of the present application, the first identification field and the second identification field may be the same or different. The first identification field may correspond to a number of length fields in the length field set that have a mapping relationship with the identification field, that is, the first length field. Similarly, any one of the identification fields in the identification field set may correspond to a number of encryption methods in the encryption method set that have a mapping relationship with the identification field, that is, the first encryption method. Similarly, the second identification field may correspond to a number of length fields in the length field set that have a mapping relationship with the identification field, that is, the second length field. Similarly, any one of the identification fields in the identification field set may correspond to a number of encryption methods in the encryption method set that have a mapping relationship with the identification field, that is, the second encryption method.

[0087] It should be noted that the above-mentioned first length field and the second length field may be the same or different; the above-mentioned first encryption method and the second encryption method may be the same or different.

[0088] Exemplarily, the first identification field and the second identification field are adjacent identification fields, such as Figure 3 As shown, when the first identification field is the target identification field A, the second identification field is the target identification field B; or, when the first identification field is the target identification field B, the second identification field is the target identification field A.

[0089] Furthermore, after determining the first identification field and the second identification field, the distance between the first identification field and the second identification field can be calculated and recorded as the field distance, thereby determining the first business field using the field distance, that is, using the corresponding first encryption method to encrypt the first business field having a length of the field distance, and then obtaining the first encrypted field. The first encrypted data may include but is not limited to data obtained by concatenating the first identification field, the first field length, and the first encryption field, and the encrypted data includes the first encrypted data, that is, the first encrypted data can also be stored in the target storage device.

[0090] In an exemplary embodiment, if the above-mentioned target vocabulary is retrieved continuously in the above-mentioned business data, that is, as in the embodiment of the present application, there are adjacent first identification fields and second identification fields, and the data length (the above-mentioned field distance) a between the first identification field and the second identification field is less than the first length field b, then only the first business field of length a is encrypted to achieve the security of protecting sensitive information while avoiding excessive processing of business data and causing performance loss of the target storage device. In other words, only encrypting the first business field of length a can reduce the time and resource consumption of encryption processing while protecting the data, and maintain the readability and structural integrity of the business data to avoid damage to the data structure of the business data.

[0091] As an optional scheme, the above-mentioned target encryption method is used to encrypt the above-mentioned target business field to obtain the target encrypted field, including: determining the encryption level of the above-mentioned target business field according to the above-mentioned target identification field, wherein the above-mentioned target encryption method includes the above-mentioned encryption level; when the above-mentioned encryption level indicates the first level, the first key of the first digit is used to encrypt the above-mentioned target business field to obtain the above-mentioned target encrypted field; when the above-mentioned encryption level indicates the second level, the second key of the second digit is used to encrypt the above-mentioned target business field to obtain the above-mentioned target encrypted field, wherein the above-mentioned first level is lower than the above-mentioned second level, and the above-mentioned first digit is smaller than the above-mentioned second digit.

[0092] Optionally, in an embodiment of the present application, the above-mentioned encryption level can be understood as the strength of encryption of the above-mentioned target business field, which may include but is not limited to encrypting the target business field with high importance using a key with a high encryption level, and the above-mentioned first level is lower than the above-mentioned second level, that is, the strength of encryption of the above-mentioned target business field using the first key corresponding to the first level is weaker than the strength of encryption of the above-mentioned target business field using the second key corresponding to the second level.

[0093] It should be noted that the above different target business fields in one business data may be encrypted using keys of the same or different encryption levels.

[0094] Exemplarily, taking the first digit being 128 bits and the second digit being 192 bits as an example, the first level mentioned above may be a low level, and the low level may use a 128-bit first key to encrypt the target business field; the second level mentioned above may be a medium level, and the medium level may use a 192-bit second key to encrypt the target business field.

[0095] Furthermore, the above encryption level may also include but is not limited to setting a low level (the above first level), a medium level (the above second level), and a high level. For example, the low level uses a 128-bit key A (the above first key) to encrypt the target business field, the medium level uses a 192-bit key (the above second key) to encrypt the target business field, and the high level uses a 256-bit key to encrypt the target business field.

[0096] Through the embodiment of the present application, the encryption level of the target business field is determined according to the target identification field. When the encryption level indicates the first level, the target business field is encrypted using the first key of the first digit to obtain the target encrypted field. When the encryption level indicates the second level, the target business field is encrypted using the second key of the second digit to obtain the target encrypted field. This achieves the purpose of performing different encryption processing on the target business field according to different encryption levels, further reduces the encryption time, and thereby provides appropriate protection levels for different target business fields to ensure the security and confidentiality of business data.

[0097] Exemplarily, the data processing method proposed in the present application can be applied to the field of data security storage. By setting the (target identification field) and encryption strategy in advance, when the above-mentioned business data needs to be stored or loaded, the business data can be selectively encrypted or decrypted. When a large amount of business data is stored, the storage efficiency of the business data can be significantly improved and the performance occupancy of the above-mentioned target storage device can be reduced. At the same time, it can also support users to browse fields in the business data that do not need to be encrypted, so as to facilitate the screening of business data.

[0098] In an exemplary embodiment, it may include but is not limited to providing a configuration interface by the operating system, supporting user-level configuration of sensitive words (the above-mentioned target words), and saving them in a sensitive word library (the above-mentioned target word library). Each sensitive word has a corresponding encryption policy. When the target application is processing business, if business data that needs to be saved to the disk (the above-mentioned target storage device) is generated (for example, account password data in the configuration file, user personal identity data, etc.), then when storing the above-mentioned business data to the disk, the operating system will detect the business data. If sensitive words are identified in the business data, the encryption policy is used to encrypt the plaintext sensitive data corresponding to the sensitive words in the disk data (the above-mentioned target business field), so that the [plaintext sensitive data] in the business data is replaced by [ciphertext length + ciphertext sensitive data], where the expected encryption length is the above-mentioned target field length.

[0099] It should be noted that the length of [estimated encryption length + ciphertext sensitive data] may include but is not limited to being longer than the length of [plaintext sensitive data].

[0100] Furthermore, when the target application needs to load business data from the disk, the operating system will detect the encrypted data read from the disk. If sensitive words are identified in the encrypted data, the sensitive data will be decrypted according to the encryption strategy, and [expected encryption length + ciphertext sensitive data] will be replaced with [plaintext sensitive data], where the ciphertext sensitive data is the above-mentioned target encryption field.

[0101] Specifically, the encryption strategy in the embodiments of the present application may include but is not limited to:

[0102] S1, sensitive words, where sensitive words will not be encrypted or decrypted, that is, the same sensitive words exist in both encrypted data and business data, so that sensitive words can be used as target identification fields for encryption and decryption operations.

[0103] S2, estimated encryption length, is calculated based on sensitive words. For example, if the sensitive word is "mobile phone number", the estimated encryption length may be 15.

[0104] Among them, considering that there will be some symbols (such as colons, quotation marks, etc.) between sensitive words and ciphertext sensitive data, the expected encryption length can be longer than the actual encryption length of the ciphertext sensitive data; or, the expected encryption length can be equal to the actual encryption length, so some non-sensitive data after the sensitive data can also be encrypted; or, the actual encryption length can be smaller than the expected encryption length. Specifically, if continuous sensitive words are retrieved from the business data, and the data length a between two sensitive words is smaller than the expected encryption length b, then only the ciphertext sensitive data of length a can be encrypted.

[0105] S3, sensitivity level, low level (the first level mentioned above) uses a 128-bit (the first digit mentioned above) key (the first key mentioned above) to encrypt ciphertext sensitive data, medium level (the second level mentioned above) uses a 192-bit (the second digit mentioned above) key (the second key mentioned above) to encrypt ciphertext sensitive data, and high level uses a 256-bit key to encrypt ciphertext sensitive data.

[0106] S4, symmetric encryption algorithm mode (the above-mentioned target encryption method), such as AES-CBC, AES-OFB, etc., wherein, during the encryption process, it may include but is not limited to, using the key ID: the key may be obtained through the KMS service (Key Management Service) or the TPM firmware (Trusted Platform Module) of the operating system, and then the operating system connects to the KMS or TPM, and automatically returns the corresponding key ID after the key is successfully created; using the key: it may include but is not limited to the key provided by the user and set by the operating system, and the key is saved after being encrypted by the operating system, and, during the encryption process, a padding algorithm may also be used to further encrypt the above-mentioned target business field to ensure that the encrypted data is more secure and complete.

[0107] In another exemplary embodiment, when business data is written to the disk, the operating system can identify the ciphertext sensitive data through the sensitive vocabulary library, and automatically encrypt the ciphertext sensitive data according to the encryption policy, thereby achieving the purpose of selective data partition encryption; when loading business data from the disk, the operating system can identify the ciphertext sensitive data through the sensitive vocabulary library, and automatically decrypt the ciphertext sensitive data according to the decryption method corresponding to the encryption policy, and restore the business data, so as to effectively improve the storage efficiency of the business data and reduce the resource occupancy rate of the target storage device. Moreover, when storing business data, data that does not need to be encrypted can be directly stored in plain text, which is convenient for users to quickly identify the purpose of the business data and improve the efficiency of screening business data.

[0108] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0109] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0110] According to another aspect of the embodiment of the present application, a data processing device for implementing the above-mentioned data processing method is also provided. Figure 6 As shown, the device comprises:

[0111] An acquisition module 602 is used to acquire business data generated by a target application, wherein the business data is allowed to be saved in a target storage device;

[0112] A determination module 604 is used to determine a target length field and a target encryption mode according to the target identification field when the service data includes a target identification field, and to determine a target service field associated with the target identification field in the service data by using the target length field, wherein the target length field is used to indicate a field length of the target service field;

[0113] An encryption module 606 is used to encrypt the target business field using the target encryption method to obtain a target encrypted field;

[0114] The execution module 608 is used to determine the target identification field, the target length field and the target encryption field as encrypted data and save them to the target storage device.

[0115] As an optional solution, the above-mentioned device is also used to: after obtaining the business data generated by the target application, obtain a pre-set identification field set, a length field set and an encryption method set, wherein the length field set and the encryption method set include the length field and the encryption method corresponding to each identification field in the identification field set; and detect the business data to determine whether the target identification field exists.

[0116] As an optional scheme, the above-mentioned device is used to determine the target length field and the target encryption method according to the target identification field when the business data includes a target identification field, and use the target length field to determine the target business field associated with the target identification field in the business data: when the business data includes a target identification field, determine the target length field from a length field set according to the target identification field, and determine the target encryption method from an encryption method set; use the target length field to determine the target business field associated with the target identification field in the business data.

[0117] As an optional solution, the above-mentioned device is used to detect business data in the following manner to determine whether a target identification field exists: the business data is detected according to a predetermined vocabulary library to determine the target vocabulary in the business data; when the type of the target vocabulary is the target type, it is determined that a target identification field exists; when the type of the target vocabulary is not the target type, it is determined that the target identification field does not exist.

[0118] As an optional solution, the above-mentioned device is also used to: after determining the target identification field, target length field and target encryption field as encrypted data and saving them to the target storage device, in response to the target application needing to use the business data, search for the encrypted data from the target storage device; when the encrypted data includes the target identification field, determine the target length field and the target decryption method according to the target identification field; determine the target encryption field according to the target length field; decrypt the target encryption field using the target decryption method to obtain the target business field; determine the target identification field and the target business field as business data, and send them to the target application.

[0119] As an optional scheme, the above-mentioned device is also used for: when the business data includes a first identification field and a second identification field, determining a first length field and a first encryption method according to the first identification field, wherein the target identification field includes the first identification field and the second identification field, the first identification field and the second identification field represent adjacent identification fields, and the first identification field is located before the second identification field; obtaining the field distance between the first identification field and the second identification field; when the field length indicated by the first length field is greater than the field distance, determining the first business field associated with the first identification field in the business data using the field distance, wherein the field distance is used to indicate the field length of the first business field; encrypting the first business field using the first encryption method to obtain a first encrypted field; determining the first identification field, the first length field and the first encryption field as the first encrypted data and saving them to the target storage device, wherein the encrypted data includes the first encrypted data.

[0120] As an optional scheme, the above-mentioned device is used to encrypt the target business field using the target encryption method in the following manner to obtain the target encrypted field: determine the encryption level of the target business field according to the target identification field, wherein the target encryption method includes the encryption level; when the encryption level indicates the first level, use the first key of the first digit to encrypt the target business field to obtain the target encrypted field; when the encryption level indicates the second level, use the second key of the second digit to encrypt the target business field to obtain the target encrypted field, wherein the first level is lower than the second level, and the first digit is smaller than the second digit.

[0121] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0122] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0123] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program.

[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0125] Figure 7 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.

[0126] It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0127] like Figure 7 As shown, the computer system 700 includes a central processing unit 701 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 702 (ROM) or the program loaded from the storage part 708 to the random access memory 703 (RAM). Various programs and data required for system operation are also stored in the random access memory 703. The central processing unit 701, the read-only memory 702 and the random access memory 703 are connected to each other through a bus 704. The input / output interface 705 (Input / Output interface, i.e., I / O interface) is also connected to the bus 704.

[0128] The following components are connected to the input / output interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.

[0129] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processor 701, various functions defined in the system of the present application are executed.

[0130] In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the central processor 701, various functions provided by the embodiments of the present application are performed.

[0131] According to another aspect of the embodiment of the present application, an electronic device for implementing the above data processing method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program. The processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.

[0132] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0133] Optionally, in this embodiment, the above-mentioned processor can be configured to execute the methods in each embodiment of the present application through a computer program.

[0134] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations are shown.

[0135] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing method and device in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the above-mentioned data processing method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as business data. As an example, such as Figure 8 As shown, the memory 802 may include but is not limited to the acquisition module 602, determination module 604, encryption module 606 and execution module 608 in the data processing device. In addition, other module units in the data processing device may also be included but are not limited to, which will not be repeated in this example.

[0136] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0137] In addition, the electronic device further includes: a display 808 for displaying the business data; and a connection bus 810 for connecting various module components in the electronic device.

[0138] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0139] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the data processing method provided in various optional implementations of the above-mentioned data processing aspects.

[0140] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store data for executing the methods in various embodiments of the present application.

[0141] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0142] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0143] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for one or more electronic devices to execute all or part of the steps of the methods described in each embodiment of the present application.

[0144] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0145] In the several embodiments provided in the present application, it should be understood that the disclosed application can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0146] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0148] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire business data generated by a target application, wherein the business data is allowed to be saved to a target storage device; In the case where the service data includes a target identification field, determining a target length field and a target encryption mode according to the target identification field, and determining a target service field associated with the target identification field in the service data by using the target length field, wherein the target length field is used to indicate a field length of the target service field; Encrypt the target business field using the target encryption method to obtain a target encrypted field; Determine the target identification field, the target length field and the target encryption field as encrypted data and save them to the target storage device; The method also includes: when the business data includes a first identification field and a second identification field, determining a first length field and a first encryption method according to the first identification field, wherein the target identification field includes a first identification field and a second identification field, the first identification field and the second identification field represent adjacent identification fields, and the first identification field is located before the second identification field; obtaining a field distance between the first identification field and the second identification field; and when the field length indicated by the first length field is greater than the field distance, determining a first business field associated with the first identification field in the business data using the field distance, wherein the field distance is used to indicate the field length of the first business field.

2. The method according to claim 1, characterized in that: After acquiring the business data generated by the target application, the method further includes: Acquire a preset identification field set, a length field set, and an encryption mode set, wherein the length field set and the encryption mode set include a length field and an encryption mode corresponding to each identification field in the identification field set; The business data is detected to determine whether the target identification field exists.

3. The method according to claim 2, characterized in that In the case where the service data includes a target identification field, determining a target length field and a target encryption mode according to the target identification field, and determining a target service field associated with the target identification field in the service data by using the target length field, comprises: In the case where the service data includes a target identification field, determining the target length field from the length field set according to the target identification field, and determining the target encryption mode from the encryption mode set; The target service field associated with the target identification field in the service data is determined using the target length field.

4. The method according to claim 2, characterized in that: The detecting the service data to determine whether the target identification field exists includes: Detecting the business data according to a predetermined vocabulary library to determine target vocabulary in the business data; In the case where the type of the target vocabulary is a target type, determining that the target identification field exists; When the type of the target vocabulary is not the target type, it is determined that the target identification field does not exist.

5. The method according to claim 1, characterized in that After determining the target identification field, the target length field and the target encryption field as encrypted data and saving them to the target storage device, the method further includes: In response to the target application needing to use the service data, searching the target storage device for the encrypted data; In the case where the encrypted data includes the target identification field, determining the target length field and the target decryption mode according to the target identification field; Determining the target encryption field according to the target length field; Decrypt the target encrypted field using the target decryption method to obtain the target business field; The target identification field and the target service field are determined as the service data, and sent to the target application.

6. The method according to claim 1, characterized in that The method further comprises: Encrypt the first business field using the first encryption method to obtain a first encrypted field; The first identification field, the first length field, and the first encryption field are determined as first encrypted data and saved to the target storage device, wherein the encrypted data includes the first encrypted data.

7. The method according to claim 1, characterized in that The step of encrypting the target business field using the target encryption method to obtain a target encrypted field includes: determining an encryption level of the target service field according to the target identification field, wherein the target encryption mode includes the encryption level; When the encryption level is indicated as the first level, encrypting the target service field using the first key of the first digit to obtain the target encrypted field; When the encryption level indicates the second level, the target business field is encrypted using a second key of a second digit to obtain the target encrypted field, wherein the first level is lower than the second level, and the first digit is smaller than the second digit.

8. A data processing device, characterized in that: include: An acquisition module, used for acquiring business data generated by a target application, wherein the business data is allowed to be saved in a target storage device; a determination module, configured to determine a target length field and a target encryption mode according to the target identification field when the service data includes a target identification field, and to determine a target service field associated with the target identification field in the service data by using the target length field, wherein the target length field is used to indicate a field length of the target service field; An encryption module, used to encrypt the target business field using the target encryption method to obtain a target encrypted field; An execution module, configured to determine the target identification field, the target length field, and the target encryption field as encrypted data and save the encrypted data to the target storage device; The device is also used for: when the business data includes a first identification field and a second identification field, determining a first length field and a first encryption method according to the first identification field, wherein the target identification field includes a first identification field and a second identification field, the first identification field and the second identification field represent adjacent identification fields, and the first identification field is located before the second identification field; obtaining a field distance between the first identification field and the second identification field; and when the field length indicated by the first length field is greater than the field distance, determining a first business field associated with the first identification field in the business data using the field distance, wherein the field distance is used to indicate the field length of the first business field.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Data encryption method and device

    CN114980087A

  • Service data processing method and device of government affair system, server and storage medium

    CN115412234A