Data storage method, device, server and storage medium based on cloud server

By performing rewritten statement encryption processing and authorization confirmation on data in the cloud server, the problem of low data security efficiency and encryption and decryption delays in the cloud computing environment is solved, and efficient and confidential storage and processing of data are achieved.

CN112732745BActive Publication Date: 2024-10-18STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110050559.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-14
Publication Date
2024-10-18
Estimated Expiration
2041-01-14

AI Technical Summary

Technical Problem

In a cloud computing environment, user data is out of physical control after being uploaded to the cloud server, which can easily lead to large-scale privacy data leaks due to platform breaches or leakage of account keys. Existing data security methods are inefficient and have long encryption and decryption delays.

Method used

The data is stored by rewriting the statement. By encrypting the SQL statement in the cloud server, the encryption key is generated and the data is encrypted and stored to ensure data confidentiality, and the data is processed according to authorization confirmation and decryption when accessing the request. to improve processing efficiency.

Benefits of technology

It improves data processing efficiency, ensures the confidentiality of data storage, prevents data leakage, and reduces encryption and decryption delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112732745B_ABST
    Figure CN112732745B_ABST
Patent Text Reader

Abstract

The present application discloses a data storage method, device, server and storage medium based on a cloud server. The method may include the cloud server storing data in a rewriting statement manner, the cloud server receiving an access request, and the cloud server returning the stored data according to the access request. This implementation method can improve the data processing efficiency and ensure the confidentiality of data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data protection, and in particular to a data storage method, device, server and storage medium based on a cloud server. Background Art

[0002] Cloud server platforms are often used to store data because of their massive storage and powerful computing capabilities. However, once user data is uploaded to the cloud server platform, it is out of the user's physical control. If the cloud server platform is hacked by criminals or the user account key is leaked, it will lead to large-scale user privacy data leakage. At present, in the field of cloud computing data security, data security-related data protection methods still have problems such as low efficiency and large delays in data encryption and decryption. Summary of the invention

[0003] The present application provides a method, device, terminal and storage medium for installing multiple servers, which can improve data processing efficiency and ensure the confidentiality of data storage.

[0004] In a first aspect, an embodiment of the present application provides a data storage method based on a cloud server, the method comprising:

[0005] The cloud server stores data by rewriting statements;

[0006] The cloud server receives the access request;

[0007] The cloud server returns the stored data based on the access request.

[0008] In a second aspect, an embodiment of the present application further provides a data storage device, the device comprising:

[0009] A storage module, used for storing data in the form of rewriting statements;

[0010] A receiving module, used for receiving an access request;

[0011] The sending module is used to return the stored data according to the access request.

[0012] In a third aspect, an embodiment of the present application further provides a cloud server, the cloud server comprising:

[0013] A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a data storage method based on a cloud server as provided in an embodiment of the present application is implemented.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a cloud server-based data storage method as provided in an embodiment of the present application is implemented.

[0015] The present application provides a data storage method, device, server and storage medium based on a cloud server. The method may include the cloud server storing data in the form of rewriting statements, the cloud server receiving access requests, and the cloud server returning the stored data according to the access requests. This implementation method can improve data processing efficiency and ensure the confidentiality of data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of a data storage method based on a cloud server in an embodiment of the present application;

[0017] Figure 2 It is a flow chart of a method for storing data by rewriting statements in a cloud server in an embodiment of the present application;

[0018] Figure 3 is a flow chart of a method in which a cloud server in an embodiment of the present application returns stored data according to an access request;

[0019] Figure 4 is a schematic diagram of the structure of a data storage device in an embodiment of the present application;

[0020] Figure 5 It is a schematic diagram of the structure of the cloud server in the embodiment of the present application. DETAILED DESCRIPTION

[0021] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0022] In addition, in the embodiments of the present application, words such as "optionally" or "exemplarily" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "optionally" or "exemplarily" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "optionally" or "exemplarily" is intended to present related concepts in a specific way.

[0023] Figure 1 The present invention provides a flowchart of a data storage method based on a cloud server, which can be applied to scenarios where a cloud server platform stores massive amounts of data, such as Figure 1As shown, the method may include but is not limited to the following steps:

[0024] S101. The cloud server stores data by rewriting statements.

[0025] Exemplarily, the statements involved in the embodiments of the present application may be structured query language (SQL), that is, this step may be understood as rewriting the SQL statement. It is well known to those skilled in the art that SQL statements may be used to access databases, servers, etc., to operate on the data stored therein. In this step, the data may be encrypted and stored by rewriting the SQL statement, thereby ensuring the confidentiality of the data stored in the cloud server.

[0026] For example, when the data owner interacts with the cloud server and stores the data to be saved in the cloud server, the SQL statement is rewritten. Then, when other users obtain the statement, they cannot determine the data content or data location targeted by the statement, thereby achieving the purpose of data protection.

[0027] S102: The cloud server receives an access request.

[0028] When any user registered on the cloud server platform accesses the cloud server, he can send an access request to the cloud server. By way of example, in the embodiments of the present application, different access control permissions are granted to different users. For example, the data owner is granted the permission to add, delete, modify, and query data, the first-level data accessor is granted the permission to add, modify, and query data, and the second-level data accessor is granted the permission to query data.

[0029] S103: The cloud server returns the stored data according to the access request.

[0030] The cloud server can return the corresponding access data stored to users with different access control permissions based on the access requests sent by them.

[0031] The embodiment of the present application provides a data storage method based on a cloud server, including: the cloud server stores data in a rewriting statement manner, the cloud server receives an access request, and the cloud server returns the stored data according to the access request. This implementation method can improve data processing efficiency and ensure the confidentiality of data storage.

[0032] In one example, when a data owner interacts with a cloud server and stores data in the cloud server, the cloud server may initialize function interface parameters (e.g., encryption function interface parameters), such as initializing function name, function input, function output, and the like.

[0033] Exemplarily, taking initializing an encryption function as an example, the encryption function interface table may be as shown in Table 1.

[0034] Table 1

[0035]

[0036]

[0037] like Figure 2 As shown, the implementation method of storing data in the form of rewriting statements in the above step S101 may include but is not limited to the following steps:

[0038] S201. The cloud server modifies parameter information in the original statement.

[0039] S202: The cloud server updates the original statement to the modified statement.

[0040] S203: The cloud server stores the data according to the modified statement.

[0041] In an example, the parameter information may include field names, etc. Then, the implementation method of step S201 may include the cloud server generating an encryption key, and encrypting the field name in the original statement according to the encryption key to generate an encrypted field.

[0042] Optionally, the method of generating the encryption key may include: the cloud server concatenates the user login password with the field name to generate a string, and uses the concatenated string as the encryption key of the field name. In this way, encryption keys for different fields can be generated, and the encryption results of the same field name are different.

[0043] For example, taking the create (CREATE) type statement in the SQL statement as an example, assuming that the table creation function is completed based on the CREATE type statement, the above encryption key can be the encryption key of the column name in the table, the encryption key of the column data, etc.

[0044] The following takes the CREATE type statement to complete the table creation function as an example to further describe the above process in detail. The details are as follows:

[0045]

[0046] The input of the above process is the original SQL statement, and the output is the rewritten SQL statement. By storing data based on the rewritten statement, data encryption can be achieved, thereby improving data processing efficiency while ensuring the confidentiality of data storage.

[0047] In another example, the implementation of the above step S201 may further include: the cloud server obtains an encryption key and encrypts the data type in the original statement according to the encryption key to generate ciphertext data.

[0048] For example, assume that the original statement in the above step S201 is an INSERT type statement in an SQL statement. The INSERT statement is mainly used to rewrite and replace data record values. Then the cloud server can call an encryption interface function to encrypt the field data.

[0049] Taking the INSERT type statement as an example below, the rewriting storage process in the embodiments of the present application will be further described in detail as follows:

[0050]

[0051] Similarly, the input of the above process is the original SQL statement, and the output is the rewritten SQL statement. Storing data based on the rewritten statement can achieve data encryption, thereby improving data processing efficiency while ensuring the confidentiality of data storage.

[0052] In another example, the implementation of the above step S201 may include: the cloud server selects a supported type of ciphertext field according to the selection condition operation type and replaces the selection condition operation type in the original statement with the ciphertext field.

[0053] For example, assume that the original statement in the embodiments of the present application is a SELECT type statement in an SQL statement. This statement may contain multiple query conditions and requires numerical operations when making condition judgments. Then when rewriting based on the SELECT statement, different ciphertext values can be selected for replacement according to the query conditions. For example, if the SQL statement contains a restriction condition of "age < 30", the rewritten restriction condition can be modified to "XXXOPE < EncOPE(30, key)", where XXX is the encrypted field name of the age field.

[0054] Exemplarily, the above implementation process may include:

[0055]

[0056]

[0057] Same as the above CREATE statement and INSERT statement, the input of the above process is the original SQL statement, and the output is the rewritten SQL statement. Storing data based on the rewritten SELECT statement can achieve data encryption, thereby improving data processing efficiency while ensuring the confidentiality of data storage.

[0058] like Figure 3 As shown, in one example, in the above step S103, the implementation method of the cloud server returning the stored data according to the access request may include but is not limited to the following steps:

[0059] S301: The cloud server authorizes and confirms the access request.

[0060] After the cloud server receives the data access request sent by the user, it can verify the access request. If the verification is passed, it means that the access request has been authorized and confirmed by the cloud server.

[0061] S302. The cloud server calculates the ciphertext result according to the ciphertext data segment corresponding to the access request after authorization confirmation.

[0062] After the cloud server determines that the access request is passed, it can calculate the ciphertext data segment of the request to obtain the ciphertext result.

[0063] S303: The cloud server decrypts the ciphertext result to obtain the stored data.

[0064] S304: The cloud server returns the stored data.

[0065] In the above implementation, the cloud server returns the stored data to the user only after the user's access request is authorized and confirmed. This implementation ensures the confidentiality of the data stored in the cloud server.

[0066] Figure 4 A data storage device provided in an embodiment of the present application, such as Figure 4 As shown, the device includes: a storage module 401, a receiving module 402, and a sending module 403;

[0067] Wherein, the storage module is used to store data in the form of rewriting statements;

[0068] A receiving module, used for receiving an access request;

[0069] The sending module is used to return the stored data according to the access request.

[0070] In one example, the storage module may include a modification unit, an update unit, and a storage unit;

[0071] Wherein, the modification unit is used to modify the parameter information in the original sentence;

[0072] An update unit, used to update the original statement to the modified statement;

[0073] A storage unit is used to store data according to the modified statement.

[0074] In one example, the modification unit is used to generate an encryption key, and encrypt the field name in the original statement according to the encryption key to generate an encrypted field.

[0075] Optionally, the modification unit may generate an encrypted field by concatenating the user login password with the field name to generate a character string, and using the concatenated character string as an encryption key for the field name.

[0076] In one example, the modification unit is used to obtain an encryption key, and encrypt the data type in the original sentence according to the encryption key to generate ciphertext data.

[0077] In an example, the modification unit may be used to select a ciphertext field that supports the selection condition operation type according to the selection condition operation type, and to replace the selection condition operation type in the original sentence according to the ciphertext field.

[0078] In one data type, the sending module may include a confirmation unit, a calculation unit, a decryption unit, and a sending unit;

[0079] Wherein, the confirmation unit is used to confirm the authorization of the access request;

[0080] A calculation unit, used to calculate a ciphertext result according to the ciphertext data segment corresponding to the access request after authorization confirmation;

[0081] A decryption unit, used to decrypt the ciphertext result to obtain the stored data;

[0082] The sending unit is used to return the stored data.

[0083] The data storage device provided in the embodiment of the present application can execute the present application Figures 1 to 3 The cloud server-based data storage method provided in the embodiment has the corresponding functional modules and beneficial effects of the execution method.

[0084] Figure 5 A schematic diagram of the structure of a cloud server provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the cloud server includes a processor 501, a memory 502, an input device 505 and an output device 504; the number of processors 501 in the cloud server can be one or more. Figure 5 A processor 501 is taken as an example; the processor 501, the memory 502, the input device 505 and the output device 504 in the cloud server can be connected by a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0085] The memory 502 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules. Figure 1 The processor 501 executes the software programs, instructions and modules stored in the memory 502 to execute various functional applications and data processing of the cloud server, that is, to implement the above-mentioned data storage method based on the cloud server.

[0086] The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the cloud server, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 502 may further include a memory remotely arranged relative to the processor 501, and these remote memories may be connected to the device / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0087] The input device 505 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 504 may include a display device such as a display screen.

[0088] The embodiment of the present application further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a data storage method based on a cloud server when executed by a computer processor, the method comprising:

[0089] The cloud server stores data by rewriting statements;

[0090] The cloud server receives the access request;

[0091] The cloud server returns the stored data based on the access request.

[0092] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application is not limited to the method operations described above, and can also execute the cloud server-based data storage method provided in any embodiment of the present application.

[0093] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0094] It is worth noting that in the embodiment of the above-mentioned data storage device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0095] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A data storage method based on a cloud server, characterized in that: include: The cloud server stores data by rewriting statements; The cloud server receives an access request; The cloud server returns the stored data according to the access request; The cloud server stores data in a manner of rewriting statements, including: The cloud server modifies parameter information in the original statement; The cloud server updates the original statement to a modified statement; The cloud server stores the data according to the modified statement; The cloud server modifies the parameter information in the original statement, including: The cloud server selects a ciphertext field that supports the type according to the selection condition operation type; The cloud server replaces the selection condition operation type in the original statement according to the ciphertext field; The cloud server returns the stored data according to the access request, including: The cloud server returns the stored corresponding access data to the users according to the access requests sent by the users with different access rights; The cloud server modifies the parameter information in the original statement, further comprising: The cloud server generates an encryption key; The cloud server encrypts the field name in the original sentence according to the encryption key to generate an encrypted field; The cloud server generates an encryption key, including: The cloud server concatenates the user login password with the field name to generate a character string; Using the concatenated character string as the encryption key of the field name; The cloud server initializes encryption function interface parameters, including: initialization function name, function input, and function output; The cloud server modifies the parameter information in the original statement, further comprising: The cloud server obtains the encryption key; The cloud server encrypts the data type in the original sentence according to the encryption key to generate ciphertext data; The cloud server returns the stored data according to the access request, including: The cloud server performs authorization confirmation on the access request; The cloud server calculates the ciphertext result according to the ciphertext data segment corresponding to the access request after the authorization confirmation; The cloud server decrypts the ciphertext result to obtain the stored data; The cloud server returns the stored data; The cloud server performs authorization confirmation on the access request, including: The cloud server receives the data access request sent by the user and performs verification. If the verification is successful, it means that the data access request has passed the authorization confirmation of the cloud server.

2. A data storage device, characterized in that: include: A storage module, used for storing data in the form of rewriting statements; A receiving module, used for receiving an access request; A sending module, used for returning the stored data according to the access request; The storage module includes a modification unit, an update unit and a storage unit; Wherein, the modification unit is used to modify the parameter information in the original sentence; The updating unit is used to update the original statement to a modified statement; The storage unit is used to store the data according to the modified statement; The modification unit is specifically configured to select a ciphertext field supporting the selected condition operation type according to the selected condition operation type, and replace the selected condition operation type in the original sentence according to the ciphertext field; The sending module is specifically used to return the stored corresponding access data to the users according to the access requests sent by the users with different access rights; The modification unit is further used to generate an encryption key, and encrypt the field name in the original statement according to the encryption key to generate an encrypted field; The modification unit generates the encrypted field by concatenating the user login password with the field name to generate a character string, and using the concatenated character string as the encryption key of the field name; Among them, the cloud server initializes the encryption function interface parameters, including: initialization function name, function input, function output; The modification unit is used to obtain the encryption key, and encrypt the data type in the original sentence according to the encryption key to generate ciphertext data; The sending module includes a confirmation unit, a calculation unit, a decryption unit and a sending unit; Wherein, the confirmation unit is used to perform authorization confirmation on the access request; The calculation unit is used to calculate the ciphertext result according to the ciphertext data segment corresponding to the access request after the authorization confirmation; The decryption unit is used to decrypt the ciphertext result to obtain the stored data; The sending unit is used to return the stored data; The confirmation unit is specifically used to receive and verify the data access request sent by the user. If the verification is successful, it means that the data access request has passed the authorization confirmation of the cloud server.

3. A cloud server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the cloud server-based data storage method as claimed in claim 1 is implemented.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cloud server-based data storage method as claimed in claim 1 is implemented.

Citation Information

Patent Citations

  • Data encryption / decryption and desensitization operation engine and working method thereof

    CN108509805A