Data storage methods, apparatus, devices and computer-readable storage media

By encrypting and concatenating multiple pages of data, the problem of SQL injection attacks in data storage is solved, achieving higher security and protection.

CN115438356BActive Publication Date: 2025-10-28CHINA UNIONPAY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211011489.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-10-28
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In existing technologies, data stored in databases is vulnerable to attacks such as SQL injection, leading to data leaks and low security.

Method used

Each page of data in a multi-page dataset is encrypted separately to obtain multiple encrypted messages. These encrypted messages are then concatenated into the target encrypted message and stored in an unstructured manner to prevent SQL injection attacks.

Benefits of technology

Encryption and concatenation processes improve data storage security, prevent the impact of attacks such as SQL injection, and enhance data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115438356B_ABST
    Figure CN115438356B_ABST
Patent Text Reader

Abstract

This application discloses a data storage method, apparatus, device, and computer-readable storage medium. The data storage method includes acquiring target data, which comprises multiple pages of data; encrypting each page of the multiple pages of data to obtain multiple encrypted information corresponding to the multiple pages of data; concatenating the multiple encrypted information to obtain target encrypted information corresponding to the target data; and storing the target encrypted information. The data storage method according to the embodiments of this application can improve the security of data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to a data storage method, apparatus, device and computer-readable storage medium. Background Technology

[0002] With the ever-increasing volume of data, storage is required in various scenarios. Improving data storage security has become one of the key issues to be addressed in data storage.

[0003] In existing technologies, after acquiring data, the device typically stores the data in a database in the form of a structured table, and then retrieves and queries the data using SQL queries when needed.

[0004] While database services offer the advantage of high efficiency for users, they are also vulnerable to attacks such as SQL injection, which can lead to data leaks and compromise data storage security. Summary of the Invention

[0005] This application provides a data storage method, apparatus, device, and computer-readable storage medium that can improve the security of data storage.

[0006] In a first aspect, embodiments of this application provide a data storage method, the method comprising:

[0007] Acquire target data, which includes multiple pages of data;

[0008] Each page of data in the multi-page data is encrypted separately to obtain multiple encrypted information corresponding to the multi-page data;

[0009] The multiple encrypted information are concatenated to obtain the target encrypted information corresponding to the target data;

[0010] Store the target encrypted information.

[0011] Secondly, embodiments of this application provide a data storage device, the device comprising:

[0012] An acquisition module is used to acquire target data, which includes multiple pages of data.

[0013] An encryption module is used to encrypt each page of data in the multi-page data separately to obtain multiple encrypted messages corresponding to the multi-page data;

[0014] The splicing module is used to splice the multiple encrypted information to obtain target encrypted information corresponding to the target data;

[0015] A storage module is used to store the target encrypted information.

[0016] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;

[0017] When the processor executes the computer program instructions, it implements the steps of the data storage method as described in any embodiment of the first aspect.

[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps of the data storage method as described in any embodiment of the first aspect.

[0019] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the steps of the data storage method as described in any embodiment of the first aspect.

[0020] The data storage method, apparatus, device, and computer-readable storage medium in this application improve data security by encrypting each page of data in a multi-page dataset separately. By concatenating the encrypted information, the target encrypted information is obtained, making it easier to store. Therefore, by storing the target encrypted information in an unstructured manner, it is possible to avoid attacks such as SQL injection, thereby improving data storage security. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating a data storage method provided in one embodiment of this application;

[0023] Figure 2 This is a flowchart illustrating a data storage method provided in another embodiment of this application;

[0024] Figure 3 This is a flowchart illustrating a data storage method provided in yet another embodiment of this application;

[0025] Figure 4 This is a schematic diagram of the structure of a data storage device provided in one embodiment of this application;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0027] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0029] In existing technologies, after acquiring data, devices typically store it in a database in the form of structured tables, and then use SQL statements to retrieve the data. However, the process of using SQL statements to query data is vulnerable to attacks such as SQL injection, leading to data leakage and thus resulting in low data storage security.

[0030] To address the problems of the prior art, embodiments of this application provide a data storage method, apparatus, device, and computer-readable storage medium. The data storage method provided in this application embodiment is described first below.

[0031] Figure 1 This is a schematic flowchart of a data storage method provided in one embodiment of this application. Figure 1 As shown, this data storage method may specifically include the following steps:

[0032] S110. Obtain the target data, which includes multiple pages of data;

[0033] S120. Encrypt each page of data in the multi-page data separately to obtain multiple encrypted messages corresponding to the multi-page data;

[0034] S130. Concatenate multiple encrypted messages to obtain target encrypted information corresponding to the target data;

[0035] S140, Store target encrypted information.

[0036] Therefore, by encrypting each page of data in a multi-page dataset separately, data security can be improved. By concatenating the encrypted information, the target encrypted information is obtained, making it easier to store. Based on this, storing the target encrypted information in an unstructured manner can avoid the impact of attacks such as SQL injection, thereby improving data storage security.

[0037] The specific implementation methods for each of the above steps are described below.

[0038] In some implementations, in S110, the target data can be any data acquired by the device, and all or part of the data in the target data may need to be encrypted. Furthermore, the target data can be multi-page data, i.e., data from multiple data pages, with each data page containing multiple data entries. Here, the target data may, for example, include transaction log data.

[0039] Taking the target data as data retrieved from a server or other device as an example, in some specific cases, if the amount of data queried by the user exceeds the amount of data that can be included in each data page, the target data can include multiple pages of data. For example, if the user queries 50 records of data, and each page can include 20 records, then the target data can include 3 pages of data.

[0040] Therefore, in order to obtain the target data, in some embodiments, the above-mentioned S110 may specifically include:

[0041] Send a data query request to the target server. The data query request includes data query conditions. The data query request is used to instruct the target server to retrieve the target data according to the data query conditions.

[0042] Receive the target data returned by the target server.

[0043] Here, taking a batch query scenario of bank transaction records as an example, the data query conditions can be, for example, company name, transaction time, transaction method, identity identifier, bank card number, etc. The target server can be the bank's server.

[0044] As an example, after the target server receives a data query request from the user's electronic device, it can query the target data that meets the requirements based on the data query conditions in the request. After retrieving the target data, the target server can determine whether pagination is needed based on pre-set pagination rules. If pagination is needed, it can perform pagination according to the preset rules, obtaining multiple pages of data, and returning these multiple pages to the user. Conversely, if pagination is not needed, a single page of data can be returned to the user.

[0045] In this way, the target data can be obtained by sending a data query request to the target server.

[0046] To enable the target server to paginate the target data according to pagination rules and obtain multiple pages of data, in some embodiments, the data query request may also include pagination rule information. Based on this, before sending the data query request to the target server, the following may also be included:

[0047] Receives a second input from the user to specify pagination rules;

[0048] In response to the second input, pagination rule information is generated. The pagination rule information is used to instruct the target server to process the target data into multiple pages according to the pagination rules.

[0049] Here, pagination rules can be based on factors such as data volume, time, location, and company name. If the pagination rule is based on data volume, it could be set to include n records per page, or n rows per page, where n can be a positive integer. If the pagination rule is based on time, it could be set to have one page corresponding to one month's data, or one page corresponding to one day's data, etc.

[0050] As an example, if the data query request includes pagination rule information, the target server can process the target data into multiple pages according to the pagination rule information in the data query request.

[0051] As another example, if the data query request does not include pagination rule information, the target server can paginate the target data according to the preset pagination rules to obtain multiple pages of data.

[0052] In this way, by responding to the second input used by the user to formulate pagination rules, pagination rule information is generated, enabling the target server to paginate the target data according to the pagination rules and obtain multiple pages of data.

[0053] In some implementations, in S120, a page of data can be encrypted to obtain encrypted information. The encrypted information can be a string of numbers, a string of letters, or a string composed of a mixture of numbers and letters. For example, the encrypted information can be represented as "ed64".

[0054] In some implementations, in S130, the target encrypted information can be formed by concatenating multiple encrypted information obtained from encrypting multiple pages of data.

[0055] In some specific examples, if the target data includes three pages of data, and the three encrypted messages corresponding to the three pages are "ed64", "ee35", and "674f" respectively, then the target encrypted message can be "ed64ee35674f". The encrypted message can be concatenated according to the page order or other rules.

[0056] In some embodiments, in S140, the target encrypted information can be stored after it is obtained.

[0057] Therefore, in order to facilitate the storage of encrypted data and further improve the security of stored data, in some embodiments, the above-mentioned S140 may specifically include:

[0058] Write the target encrypted information into the target file;

[0059] Store the target file.

[0060] Here, by writing the target encrypted information into a file and storing the target data in file form, compared to storing it in a database, it can avoid the impact of attack methods such as SQL injection, making it less susceptible to attack and thus further improving the security of the stored data.

[0061] Therefore, in order to accurately locate each page of data in a multi-page dataset while the data is encrypted, some implementations may include the following steps before storing the target file:

[0062] Write the page number information of the data page corresponding to each of the multiple encrypted messages, as well as the index position information of each of the multiple encrypted messages in the target encrypted message, into the target file.

[0063] Here, each encrypted message can correspond to a page number. Additionally, each encrypted message in the target encrypted information can correspond to an index position. This index position can include the start and end positions of the encrypted message. Thus, by using the index position information corresponding to each encrypted message, the position of each encrypted message within the target encrypted information can be quickly and accurately located, enabling rapid indexing and decryption when viewing the original data corresponding to each encrypted message later.

[0064] Therefore, when both the page number information and the index position information are written into the target file, the concatenation order of multiple encrypted information in the target encrypted information is not restricted.

[0065] In this way, by writing the page number information and index position information into the target file, it is possible to accurately locate each page of data in a multi-page dataset even with data encryption.

[0066] Therefore, in order to enable users to view the encrypted target data, in some embodiments, after storing the target file, the following may also be included:

[0067] Receive the user's first input for viewing the target data;

[0068] In response to the first input, read the target encryption information, page number information, and index position information from the target file;

[0069] Based on the index position information, the target encrypted information is split into multiple encrypted information;

[0070] Multiple encrypted messages are decrypted to obtain multiple pages of data;

[0071] Arrange and display data from multiple pages according to page number information.

[0072] Here, since the target data has been encrypted, in response to the user's first input to view the target data, the encrypted information can be split and decrypted to restore the target data.

[0073] In this way, by decrypting the target encrypted information based on page number information and index position information, and arranging and displaying multi-page data, users can view the encrypted target data.

[0074] To further improve the security of stored data, as another implementation of this application, this application also provides another implementation of the data storage method, as detailed in the following embodiments.

[0075] Please see Figure 2Another implementation of the data storage method provided in this application includes steps S210-S250, the specific steps of which are shown below.

[0076] S210. Obtain the target data, which includes multiple pages of data.

[0077] S220. According to the preset desensitization rules, each page of data in the multi-page data is desensitized separately to hide the sensitive data in the target data, and the desensitized multi-page data is obtained.

[0078] Here, sensitive data can be users' private data, such as names, ID card numbers, bank card numbers, etc. An anonymized ID card number could be displayed as, for example, "310*********0515**".

[0079] Based on this, sensitive data in the target data can be de-identified according to preset de-identification rules. These preset de-identification rules can be pre-defined fields belonging to sensitive data, along with specific de-identification methods, including but not limited to replacing sensitive data with preset characters.

[0080] For example, information recognition technology can be used on the target data to obtain the data corresponding to the fields that belong to sensitive data in the target data, and then each character in these data can be replaced with an asterisk (*) to complete the desensitization process.

[0081] S230. Encrypt each page of data in the multi-page data separately to obtain multiple encrypted messages corresponding to the multi-page data.

[0082] S240. Concatenate multiple encrypted messages to obtain target encrypted information corresponding to the target data.

[0083] S250, Store target encrypted information.

[0084] It should be noted that S210 is the same as S110 in the above embodiment, and S230 to S250 are the same as S120 to S140 in the above embodiment. For the sake of brevity, they will not be described in detail here.

[0085] Therefore, by desensitizing each page of data in a multi-page dataset, sensitive data within the target data can be hidden, further enhancing data storage security.

[0086] To better describe the overall solution, some specific examples are given based on the above embodiments.

[0087] For example, such as Figure 3 The flowchart illustrates a data storage method. This data storage method may include steps S310-S350, which will be explained in detail below.

[0088] S310. Obtain the target data, which includes multiple pages of data;

[0089] S320. Perform sensitive data desensitization on each page of data;

[0090] S330, Data encryption, obtaining encrypted information;

[0091] S340. Determine if there is an unencrypted data page. If yes, proceed to S320; otherwise, proceed to S350.

[0092] S350. Multiple encrypted information are concatenated to obtain target encrypted information corresponding to the target data.

[0093] In some specific examples, when the target data consists of multiple pages, each page can be processed separately. The processing order can be to first de-identify and encrypt one page, then perform the same de-identification and encryption on the next page, and so on, until all pages have been processed. Finally, the encrypted information can be concatenated to obtain the target encrypted information corresponding to the target data. The processing order for multiple pages is not limited.

[0094] In other specific examples, multiple pages of data can be anonymized and encrypted in parallel.

[0095] Therefore, by performing anonymization and encryption on each page of multi-page data separately, data security can be improved. By concatenating the encrypted information, the target encrypted information is obtained, making it easier to store. Based on this, storing the target encrypted information in an unstructured manner can avoid the impact of attacks such as SQL injection, thereby improving data storage security.

[0096] In addition, let's take the scenario of batch querying bank transaction records as an example to give some more examples.

[0097] In some examples, the electronic device can send a transaction history query request to a transaction history query interface provided by the bank. This request can include query conditions and other information, allowing the bank's server to retrieve the corresponding transaction history data based on these conditions. After retrieving the transaction history data, the bank's server can paginate the data according to preset or user-defined pagination rules, resulting in multiple pages of transaction history data. The bank's server can then perform de-identification and encryption processing on each page of transaction history data, obtaining encrypted information corresponding to each page. This encrypted information is then returned to the electronic device through the transaction history query interface. Upon receiving the encrypted information returned by the transaction history query interface, the electronic device can concatenate the multiple encrypted information retrieved and write it to a file for data storage.

[0098] In other examples, the bank's server can also directly return the multi-page transaction data to the electronic device through the transaction query interface. The electronic device will then de-identify and encrypt the multi-page transaction data, and concatenate the multiple encrypted messages before writing them into a file for data storage.

[0099] It should be noted that the application scenarios described in the above embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0100] Based on the same inventive concept, this application also provides a data storage device. (Specifically combined with...) Figure 4 Please provide a detailed explanation.

[0101] Figure 4 This is a schematic diagram of the structure of a data storage device provided in one embodiment of this application.

[0102] like Figure 4 As shown, the data storage device 400 may include:

[0103] Acquisition module 410 is used to acquire target data, which includes multiple pages of data;

[0104] The encryption module 420 is used to encrypt each page of data in the multi-page data separately to obtain multiple encrypted messages corresponding to the multi-page data.

[0105] The splicing module 430 is used to splice multiple encrypted information to obtain target encrypted information corresponding to the target data;

[0106] Storage module 440 is used to store target encrypted information.

[0107] The data storage device 400 described above will be described in detail below:

[0108] In some embodiments, the data storage device 400 may further include:

[0109] The desensitization module is used to desensitize each page of data in the multi-page data according to preset desensitization rules before encrypting each page of data in the multi-page data to obtain multiple encrypted information corresponding to the multi-page data, so as to hide the sensitive data in the target data and obtain the desensitized multi-page data.

[0110] In some embodiments, the storage module 440 may specifically include:

[0111] The first writing submodule is used to write the target encrypted information into the target file;

[0112] The storage submodule is used to store the target files.

[0113] In some embodiments, the storage module 440 may further include:

[0114] The first writing submodule is used to write the page number information of the data pages corresponding to the multiple encrypted information, as well as the index position information of the multiple encrypted information in the target encrypted information, into the target file before storing the target file.

[0115] In some embodiments, the storage module 440 may further include:

[0116] The receiving submodule is used to receive the user's first input for viewing the target data after the target file has been stored;

[0117] The read submodule is used to read target encrypted information, page number information, and index position information from the target file in response to the first input.

[0118] The splitting submodule is used to split the target encrypted information into multiple encrypted information based on the index position information;

[0119] The decryption submodule is used to decrypt multiple encrypted messages to obtain multiple pages of data;

[0120] The display submodule is used to arrange and display multi-page data according to page number information.

[0121] In some embodiments, the acquisition module 410 may specifically include:

[0122] The sending submodule is used to send a data query request to the target server. The data query request includes data query conditions and is used to instruct the target server to query and obtain the target data according to the data query conditions.

[0123] The first receiving submodule is used to receive the target data returned by the target server.

[0124] In some embodiments, the data query request may further include pagination rule information. Based on this, the acquisition module 410 may further include:

[0125] The second receiving submodule is used to receive the second input from the user to specify pagination rules before sending a data query request to the target server;

[0126] The generation submodule is used to generate pagination rule information in response to the second input. The pagination rule information is used to instruct the target server to process the target data into multiple pages according to the pagination rules.

[0127] In some embodiments, the data may include transaction log data.

[0128] Therefore, by encrypting each page of data in a multi-page dataset separately, data security can be improved. By concatenating the encrypted information, the target encrypted information is obtained, making it easier to store. Based on this, storing the target encrypted information in an unstructured manner can avoid the impact of attacks such as SQL injection, thereby improving data storage security.

[0129] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application.

[0130] The electronic device 500 may include a processor 501 and a memory 502 storing computer program instructions.

[0131] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0132] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.

[0133] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0134] The processor 501 implements any of the data storage methods described in the above embodiments by reading and executing computer program instructions stored in the memory 502.

[0135] In some examples, the electronic device 500 may also include a communication interface 503 and a bus 510. For example, Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.

[0136] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0137] Bus 510 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not as a limitation, bus 510 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0138] For example, the electronic device 500 can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc.

[0139] The electronic device 500 can execute the data storage method in the embodiments of this application, thereby achieving the combination Figures 1 to 4 The data storage method and apparatus described.

[0140] Furthermore, in conjunction with the data storage methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data storage methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.

[0141] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0142] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0143] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0144] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0145] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A data storage method, characterized in that, include: Acquire target data, which includes multiple pages of data; Each page of data in the multi-page data is encrypted separately to obtain multiple encrypted information corresponding to the multi-page data; The multiple encrypted information are concatenated to obtain the target encrypted information corresponding to the target data; Store the target encrypted information; The storage of the target encrypted information includes: Write the target encrypted information, the page number information of the data pages corresponding to the multiple encrypted information, and the index position information of the multiple encrypted information in the target encrypted information into a target file. The index position information includes the start position and end position corresponding to the encrypted information. The index position information is used to locate the encrypted information in the target encrypted information. The page number information is used to arrange and display the multiple pages of data. Store the target file.

2. The method according to claim 1, characterized in that, Before encrypting each page of data in the multi-page data to obtain multiple encrypted messages corresponding to the multi-page data, the method further includes: According to the preset desensitization rules, each page of data in the multi-page data is desensitized to hide the sensitive data in the target data, thus obtaining the desensitized multi-page data.

3. The method according to claim 1, characterized in that, After storing the target file, the method further includes: Receive the user's first input for viewing the target data; In response to the first input, the target encryption information, the page number information, and the index position information are read from the target file; Based on the index position information, the target encrypted information is split into the multiple encrypted information; The encrypted information is decrypted to obtain the multiple pages of data; The data from the multiple pages is arranged and displayed according to the page number information.

4. The method according to claim 1, characterized in that, The acquisition of target data includes: Send a data query request to the target server. The data query request includes data query conditions. The data query request is used to instruct the target server to query and obtain the target data according to the data query conditions. Receive the target data returned by the target server.

5. The method according to claim 4, characterized in that, The data query request also includes pagination rule information. Before sending the data query request to the target server, the method further includes: Receives a second input from the user to specify pagination rules; In response to the second input, the pagination rule information is generated, which instructs the target server to perform pagination processing on the target data according to the pagination rules to obtain multiple pages of data.

6. The method according to any one of claims 1-5, characterized in that, The data includes transaction log data.

7. A data storage device, characterized in that, The device includes An acquisition module is used to acquire target data, which includes multiple pages of data. An encryption module is used to encrypt each page of data in the multi-page data separately to obtain multiple encrypted messages corresponding to the multi-page data; The splicing module is used to splice the multiple encrypted information to obtain target encrypted information corresponding to the target data; A storage module is used to store the target encrypted information; The storage module is specifically used for: Write the target encrypted information, the page number information of the data pages corresponding to the multiple encrypted information, and the index position information of the multiple encrypted information in the target encrypted information into a target file. The index position information includes the start position and end position corresponding to the encrypted information. The index position information is used to locate the encrypted information in the target encrypted information. The page number information is used to arrange and display the multiple pages of data. Store the target file.

8. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the steps of the data storage method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the data storage method as described in any one of claims 1-6.

10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device causes the electronic device to perform the steps of the data storage method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Document processing method and system

    CN103179179A