Data queue secure storage method and device, equipment, storage medium and server
By introducing independent encrypted memory into the server, the data queue is segmented, transformed and encoded, the problem of poor security of server data encryption storage is solved, and high isolation data security storage is achieved.
Patent Information
- Application Number
- CN202510324665.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, server data encrypted storage has great security risks, especially the encrypted data share the same memory or storage platform with other data, and the security is poor.
The data queue is divided, transformed and encoded by independent encrypted memory, and multiple second data segments are generated through the data transformation equation, and encoded according to the frequency of occurrence, and stored in an independent encrypted memory area.
It improves the isolation and security of data, ensures that data is encrypted and processed in an independent storage area, avoids the risk of decryption of the server's own processor, and enhances the security of data.
Smart Images

Figure CN120372673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption storage, and particularly to a method, device, equipment, storage medium and server for secure storage of a data queue. Background Art
[0002] Server security involves multiple aspects. Among them, the integrity, confidentiality and availability of data are the keys for the server to operate securely. Currently, the main measures for server data security are as follows: Encryption: Encrypt sensitive data stored on the server (such as user information, financial data, etc.), including static data encryption (such as using disk encryption technology) and dynamic data encryption (such as using the SSL / TLS protocol during data transmission).
[0003] Regular backup: Develop a perfect backup strategy, regularly back up important data, and store the backup data in a safe place (such as offline storage or off-site backup) so that the data can be recovered in time when it is lost or damaged.
[0004] Data recovery test: Regularly conduct data recovery tests to ensure the availability and integrity of the backup data and avoid problems when actually recovering data.
[0005] In terms of data encryption, the mainstream technology still uses encryption algorithms to convert and store data. The problems brought by using these technologies are that encrypted data and other data are stored in the same memory or storage platform, and are decrypted by the server's own processor during decryption, and are generally encrypted and decrypted by common algorithms, resulting in poor security.
[0006] Based on this, it is necessary to develop and design a method for secure storage of a data queue. Summary of the Invention
[0007] Embodiments of the present invention provide a method, device, equipment, storage medium and server for secure storage of a data queue, which are used to solve the problem that there are relatively large security risks in server data encryption storage in the prior art.
[0008] In a first aspect, embodiments of the present invention provide a server, including: The server is provided with an encrypted memory, and the encrypted memory is signal-connected to the processor of the server; When the processor of the server sends an instruction to store the first data queue to the encrypted memory, the encrypted memory encrypts and stores the first data queue by splitting the first data queue into multiple first data segments, transforming the first data segments to generate multiple second data segments, and then splitting and encoding the multiple second data segments respectively, and sends encryption method information to the server. When the processor of the server sends a second data queue reading instruction and encryption method information to the encrypted memory, after the encryption method information is verified and passed, the encrypted memory restores the second data queue according to the encryption method information and sends the second data queue to the processor of the server.
[0009] In a second aspect, an embodiment of the present invention provides a method for secure storage of a data queue. The method for secure storage of the data queue includes: Obtain a first data queue; Perform a first split on the first data queue to obtain multiple first data segments and the number of the first segments, where the number of the first segments is the number of data segments that appear in the multiple first data segments; According to the number of the first segments and a data transformation equation, transform each first data segment respectively to obtain multiple second data segments, and split each second data segment respectively to obtain multiple third data segments; Encode the multiple third data segments according to the occurrence frequency of the third data segments to obtain multiple first encodings, and store the multiple first encodings and an encoding instruction constructed by multiple coefficients of the data transformation equation.
[0010] In a possible implementation manner, the data transformation equation is:
[0011] In the formula, is the second data segment, is the total number of right shifts, is the th first coefficient, is the first data segment, is the amount of right-shifted data, is the th first constant, is the right shift operation, is the left shift operation, is the function for obtaining the data length.
[0012] In a possible implementation manner, the step of transforming each first data segment respectively according to the number of the first segments and the data transformation equation to obtain multiple second data segments includes: Obtain the data transformation equation; Input each first data segment into the data transformation equation respectively to obtain a plurality of first intermediate data segments, where each first intermediate data segment corresponds to a first data segment; Split each first intermediate data segment respectively to obtain a plurality of second intermediate data segments; Determine the number of second segments according to the plurality of second intermediate data segments, where the number of second segments is the number of data segments that appear in the plurality of second intermediate data segments; Determine an optimization threshold according to the number of first segments and the number of second intermediate data segments split from the first intermediate data segments; If the number of second segments is greater than the optimization threshold, optimize the coefficients of the data transformation equation, and input each first data segment into the optimized data transformation equation respectively to obtain a plurality of second data segments; Otherwise, use the plurality of first intermediate data segments as the plurality of second data segments.
[0013] In a possible implementation manner, the optimizing the coefficients of the data transformation equation includes: Obtain and initialize a plurality of coefficient arrays; Substitute the plurality of coefficient arrays into the data transformation equation respectively to obtain a plurality of process equations; For each process equation, obtain a first optimization value respectively, and add the first optimization value to an optimization value queue; If there is a value less than the optimization target among the plurality of first optimization values, use the process equation corresponding to the target optimization value as the optimized data transformation equation, where the target optimization value is the minimum value among the plurality of first optimization values; Otherwise, for each process equation, adjust the multiple coefficients of the equation according to the target optimization value and the minimum value in the corresponding optimization value queue, and jump to the step of obtaining a first optimization value for each process equation respectively and adding the first optimization value to the optimization value queue.
[0014] In a possible implementation manner, the obtaining a first optimization value for each process equation respectively and adding the first optimization value to the optimization value queue includes: Input each first data segment into the process respectively to obtain a plurality of third intermediate data segments, where each third intermediate data segment corresponds to a first data segment; Split each third intermediate data segment respectively to obtain a plurality of fourth intermediate data segments; Determine a first optimization value according to the plurality of fourth intermediate data segments, where the first optimization value is the ratio of the number of data segments that appear in the plurality of fourth intermediate data segments to the optimization threshold; Among them, determining the optimization threshold according to the number of the second intermediate data segments segmented from the number of the first segment and the first intermediate data segment includes: Determining the optimization threshold according to the first equation, the number of the first segment, and the number of the second intermediate data segments segmented from the first intermediate data segment, where the first equation is:
[0015] In the formula, is the optimization threshold, is a proportionality coefficient greater than 1, is the number of the second intermediate data segments segmented from the first intermediate data segment, is the number of the first segment.
[0016] In a possible implementation manner, encoding the multiple third data segments according to the occurrence frequency of the third data segments to obtain multiple first encodings includes: Counting the data segments that appear in the multiple third data segments, and taking the appeared data segments as typical segments; Counting the number of times each typical data segment appears in the multiple third data segments to obtain multiple occurrence frequencies; Allocating encoding lengths to each typical segment according to the multiple occurrence frequencies, where the encoding length is negatively correlated with the occurrence frequency of the typical segment; Allocating a unique encoding to each typical segment based on the encoding length.
[0017] In a third aspect, an embodiment of the present invention provides a data queue secure storage device for implementing the data queue secure storage method described in the above second aspect or any possible implementation manner of the second aspect. The data queue secure storage device includes: A data queue acquisition module for acquiring a first data queue; A queue segmentation module for performing a first segmentation on the first data queue to obtain multiple first data segments and the number of the first segment, where the number of the first segment is the number of the data segments that appear in the multiple first data segments; A data transformation module for respectively transforming each first data segment according to the number of the first segment and the data transformation equation to obtain multiple second data segments, and respectively segmenting each second data segment to obtain multiple third data segments; And, An encoding and storage module for encoding the multiple third data segments according to the occurrence frequency of the third data segments to obtain multiple first encodings, and storing the multiple first encodings and the encoding instructions constructed by the multiple coefficients of the data transformation equation.
[0018] Fourthly, an embodiment of the present invention provides an electronic device, including a memory and a processor. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, the steps of the method described in the second aspect above or any possible implementation manner of the second aspect are implemented.
[0019] Fifthly, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the method described in the second aspect above or any possible implementation manner of the second aspect are implemented.
[0020] The beneficial effects of the embodiment of the present invention compared with the prior art are as follows: An embodiment of the present invention discloses a method for securely storing a data queue. Description of the Drawings
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the prior art descriptions. Obviously, the following-described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 is a flowchart of the method for securely storing a data queue provided by the embodiment of the present invention; Figure 2 is a schematic diagram of the process of obtaining a third data segment by splitting and transforming a first data queue provided by the embodiment of the present invention; Figure 3 is a functional block diagram of the data queue secure storage device provided by the embodiment of the present invention; Figure 4 is a functional block diagram of the electronic device provided by the embodiment of the present invention. Detailed Embodiments
[0023] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0024] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will be described through specific embodiments with reference to the drawings.
[0025] The following is a detailed description of the embodiments of the present invention. This example is implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. However, the protection scope of the present invention is not limited to the following embodiments.
[0026] In the first aspect of the embodiment of the present invention, a server is provided. The server is provided with an encrypted memory, and the encrypted memory is signal-connected to the processor of the server. When the processor of the server sends an instruction to store the first data queue to the encrypted memory, the encrypted memory encrypts and stores the first data queue by dividing the first data queue into multiple first data segments, transforming the first data segments to generate multiple second data segments, and respectively dividing and encoding the multiple second data segments, and sends encryption method information to the server. When the processor of the server sends a second data queue reading instruction and encryption method information to the encrypted memory, after the encryption method information is verified and passed, the encrypted memory restores the second data queue through the encryption method information and sends the second data queue to the processor of the server.
[0027] Exemplarily, in the first aspect of the embodiment of the present invention, a server is provided. There is a memory with an encryption function inside the server, and some data related to security can be stored through this memory.
[0028] When the memory receives a storage instruction and a data queue to be stored from the processor, it divides the data queue, generates new data segments through data transformation for the obtained data segments, further divides the newly generated data segments into smaller data segments, encodes these smaller data segments, and finally stores these encodings, and at the same time returns the encryption information required to generate the new data segments.
[0029] When the memory receives a data reading request and encryption information from the processor, the memory verifies the encryption information. When the encryption information is correct, it reads out the stored data and restores it to a data queue, and sends the restored queue back to the processor.
[0030] The advantage of this is that the memory uses its own built-in processor to encrypt data. The program used in the encryption process is not executed by the server's own processor, and the data is stored in an independent storage area rather than a general storage area. Therefore, the degree of data isolation is high and the security is guaranteed. Figure 1 It is a flowchart of the data queue secure storage method provided in the second aspect of the embodiment of the present invention.
[0031] As Figure 1As shown, it shows the implementation flowchart of the data queue secure storage method provided by the second aspect of the embodiment of the present invention, which is described in detail as follows: In step 101, obtain the first data queue.
[0032] In step 102, perform a first segmentation on the first data queue to obtain a plurality of first data segments and the number of the first segments, where the number of the first segments is the number of data segments that appear in the plurality of first data segments.
[0033] In step 103, perform transformation on each first data segment according to the number of the first segments and the data transformation equation to obtain a plurality of second data segments, and perform segmentation on each second data segment to obtain a plurality of third data segments.
[0034] In some embodiments, the data transformation equation is:
[0035] In the formula, is the second data segment, is the total number of right shifts, is the th first coefficient, is the first data segment, is the amount of right-shifted data, is the th first constant, is the right shift operation, is the left shift operation, is the function to obtain the data length.
[0036] In some embodiments, the performing transformation on each first data segment according to the number of the first segments and the data transformation equation to obtain a plurality of second data segments includes: Obtain the data transformation equation; Input each first data segment into the data transformation equation respectively to obtain a plurality of first intermediate data segments, where each first intermediate data segment corresponds to a first data segment; Perform segmentation on each first intermediate data segment respectively to obtain a plurality of second intermediate data segments; Determine the number of the second segments according to the plurality of second intermediate data segments, where the number of the second segments is the number of data segments that appear in the plurality of second intermediate data segments; Determine the optimization threshold according to the number of the first segments and the number of the second intermediate data segments segmented from the first intermediate data segments; If the quantity of the second segments is greater than the optimization threshold, optimize the coefficients of the data transformation equation, and input each first data segment into the optimized data transformation equation respectively to obtain a plurality of second data segments; Otherwise, use the plurality of first intermediate data segments as the plurality of second data segments.
[0037] In some embodiments, the optimizing the coefficients of the data transformation equation includes: Obtain and initialize a plurality of coefficient arrays; Substitute the plurality of coefficient arrays into the data transformation equation respectively to obtain a plurality of process equations; For each process equation, obtain a first optimization value respectively, and add the first optimization value to an optimization value queue; If there is a value less than the optimization target among the plurality of first optimization values, use the process equation corresponding to the target optimization value as the optimized data transformation equation, where the target optimization value is the minimum value among the plurality of first optimization values; Otherwise, for each process equation, adjust the plurality of coefficients of the equation according to the target optimization value and the minimum value in the corresponding optimization value queue, and jump to the step of obtaining a first optimization value for each process equation respectively and adding the first optimization value to the optimization value queue.
[0038] In some embodiments, the obtaining a first optimization value for each process equation respectively and adding the first optimization value to the optimization value queue includes: Input each first data segment into the process respectively to obtain a plurality of third intermediate data segments, where each third intermediate data segment corresponds to a first data segment; Split each third intermediate data segment respectively to obtain a plurality of fourth intermediate data segments; Determine a first optimization value according to the plurality of fourth intermediate data segments, where the first optimization value is the ratio of the number of data segments that appear among the plurality of fourth intermediate data segments to the optimization threshold; Wherein, the determining the optimization threshold according to the quantity of the first segments and the quantity of the second intermediate data segments split from the first intermediate data segments includes: Determine the optimization threshold according to a first equation, the quantity of the first segments, and the quantity of the second intermediate data segments split from the first intermediate data segments, where the first equation is:
[0039] In the formula, is the optimization threshold, is a proportionality coefficient greater than 1, is the quantity of the second intermediate data segments split from the first intermediate data segments, is the quantity of the first paragraph.
[0040] Exemplarily, as Figure 2 shown, the embodiments of this aspect are intended to provide a method for data different from existing data encryption technologies, and its features include data shift transformation and encoded data reduction. The transformation method adopted during data transformation is related to the data itself, and the encoded data and the original data are not in one-to-one correspondence (one encoding may correspond to multiple original data, and one original data may correspond to multiple encodings), and data space is saved.
[0041] To achieve the above object, the embodiments of the present invention divide the first data queue 201 into multiple first data segments 202, and these multiple first data segments 202 are transformed into second data segments 204 through a data transformation equation 203. These second data segments 204 are further divided into third data segments 205, and these third data segments 205 have a high repetition rate. These third data segments 205 are encoded to complete data encryption.
[0042] Specifically, the second data segment is obtained by transforming the first data segment through the following equation:
[0043] In the formula, is the second data segment, is the total number of right shifts, is the th first coefficient, is the first data segment, is the right shift data amount, is the th first constant, is the right shift operation, is the left shift operation, is the function for obtaining the data length.
[0044] It can be seen that there are multiple coefficients in this equation. Since the second data segment will ultimately be divided into third data segments, the selection of these coefficients determines the repetition rate of the third data segments. And the higher the repetition rate of the third data segments, the better the encryption effect, and after encoding, the data is smaller, saving storage space.
[0045] The number of data segments appearing in multiple third data segments indicates the repetition rate of the third data segments. For example, for 1000 third data segments, if the third data segments with the same value are regarded as one appearing data segment, then the data repetition rate will be higher when 400 data segments appear than when 600 data segments appear.
[0046] That is to say, the coefficients in the above equation can regulate the number of data segments appearing in the third data segment. Then, if optimized, how many data segments can appear at least? In fact, the number of data segments in the optimal case can be calculated. Based on this optimum, we can determine an optimization threshold. According to this optimization threshold target, the coefficients of the equation are adjusted. The optimization threshold adopted by the present invention is:
[0047] In the formula, is the optimization threshold, is a proportionality coefficient greater than 1, is the number of second intermediate data segments segmented from the first intermediate data segment, is the number of the first segment.
[0048] After all the first data segments are input into the above data conversion equation to obtain the second data segment, the embodiment of the present invention pre-segments the obtained second data segment and counts the number of data segments obtained by segmentation (data segments expressing the same value are regarded as one data segment). If it is larger than the above threshold, the coefficients of the equation are adjusted; otherwise, the data segments obtained by pre-segmentation are used as the third data segment.
[0049] In terms of adjusting the coefficients of the equation, the present invention initializes multiple coefficient arrays, substitutes these multiple coefficient arrays into the data transformation equation respectively to obtain multiple process equations. Then, for each process equation, its first optimization value is calculated and added to the optimization value queue. If there is a value less than the optimization target among the multiple first optimization values, the process equation corresponding to the target optimization value is used as the optimized data transformation equation, and the target optimization value is the minimum value among the multiple first optimization values; if there is no value less than the optimization target among the multiple first optimization values, for each process equation, multiple coefficients of the equation are adjusted according to the target optimization value and the minimum value in the corresponding optimization value queue, and the process of obtaining the first optimization value is repeated.
[0050] In terms of obtaining the first optimization value, the present invention inputs each first data segment into the process respectively to obtain multiple third intermediate data segments, and then segments each third intermediate data segment respectively to obtain multiple fourth intermediate data segments; finally, the ratio of the number of data segments appearing in the multiple fourth intermediate data segments to the optimization threshold is used as the first optimization value.
[0051] In terms of adjusting multiple coefficients of the equation according to the target optimization value and the minimum value in the corresponding optimization value queue, the following formula is applied in one scenario:
[0052] In the formula, is the adjusted coefficient, is the coefficient before adjustment, is the first adjustment ratio, is the target optimization value, is the second adjustment ratio, is the coefficient of the equation corresponding to the minimum value in the optimization value queue.
[0053] After multiple rounds of optimization, the above equation can be used as a data conversion equation.
[0054] In step 104, the multiple third data segments are encoded according to the occurrence frequency of the third data segments to obtain multiple first encodings, and the multiple first encodings and the encoding instructions constructed by the multiple coefficients of the data transformation equation are stored.
[0055] In some embodiments, step 104 includes: In some embodiments, the encoding of the multiple third data segments according to the occurrence frequency of the third data segments to obtain multiple first encodings includes: Count the data segments that appear in the multiple third data segments, and use the data segments that appear as typical segments; Count the number of times each typical data segment appears in the multiple third data segments to obtain multiple occurrence frequencies; Allocate encoding lengths to each typical segment according to the multiple occurrence frequencies, where the encoding length is negatively correlated with the occurrence frequency of the typical segment; Allocate a unique encoding to each typical segment based on the encoding length.
[0056] Exemplarily, the data segments and the number of occurrences obtained from the foregoing steps are counted. The data segment with the most occurrences is allocated a shorter encoding length. For example, the 256 data segments with the most occurrences are allocated an 8-bit binary encoding; while the data segments with fewer occurrences are allocated a shorter encoding. For example, the 65536 data segments with fewer occurrences are allocated a 16-bit binary encoding. Then, a unique encoding is allocated to each data segment according to the encoding length. For example, the 256 data segments with the most occurrences are sorted according to the number of occurrences. The earlier the encoding value, the larger it is, and the later the encoding value, the smaller it is.
[0057] After encoding is completed, the third data segments can be encoded correspondingly, and then the encoding is stored. After the storage is completed, the coefficients of the data transformation equation are constructed into an array and sent to the server. When decoding is required, the encoding is restored to the third data segment through the encoding-third data segment comparison, and then the data is restored through the inverse process of the data transformation equation.
[0058] Embodiment of the data queue secure storage method of the present invention. First, a first data queue is obtained; then, the first data queue is segmented once to obtain a plurality of first data segments and the number of the first segments, where the number of the first segments is the number of data segments that appear in the plurality of first data segments; then, each first data segment is transformed according to the number of the first segments and a data transformation equation to obtain a plurality of second data segments, and each second data segment is segmented to obtain a plurality of third data segments; finally, the plurality of third data segments are encoded according to the occurrence frequency of the third data segments to obtain a plurality of first encodings, and the plurality of first encodings and encoding instructions constructed by a plurality of coefficients of the data transformation equation are stored. The embodiment of the present invention is provided with an independent encryption memory, and the encryption operation process does not require a server, and data transformation and data encoding are used to encrypt and store data. Therefore, the isolation degree is high and data security is guaranteed.
[0059] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0060] The following is the device embodiment of the present invention. For the details not described in detail, reference can be made to the corresponding method embodiment above.
[0061] Figure 3 It is a functional block diagram of the data queue secure storage device provided by the embodiment of the present invention. Referring to Figure 3 , the data queue secure storage device includes: a data queue acquisition module 301, a queue segmentation module 302, a data transformation module 303, and an encoding and storage module 304, where: The data queue acquisition module 301 is used to acquire a first data queue; The queue segmentation module 302 is used to segment the first data queue once to obtain a plurality of first data segments and the number of the first segments, where the number of the first segments is the number of data segments that appear in the plurality of first data segments; The data transformation module 303 is used to transform each first data segment according to the number of the first segments and a data transformation equation to obtain a plurality of second data segments, and segment each second data segment to obtain a plurality of third data segments; The encoding and storage module 304 is used to encode the plurality of third data segments according to the occurrence frequency of the third data segments to obtain a plurality of first encodings, and store the plurality of first encodings and encoding instructions constructed by a plurality of coefficients of the data transformation equation.
[0062] Figure 4 It is a functional block diagram of the electronic device provided by the embodiment of the present invention. AsFigure 4 As shown, the electronic device 4 of this embodiment includes: a processor 400 and a memory 401, and a computer program 402 that can run on the processor 400 is stored in the memory 401. When the processor 400 executes the computer program 402, the steps in the above-mentioned various data queue secure storage methods and embodiments are implemented, such as Figure 1 the steps 101 to 104 shown.
[0063] Exemplarily, the computer program 402 can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 401 and executed by the processor 400 to complete the present invention.
[0064] The electronic device 4 can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device 4 may include, but is not limited to, a processor 400 and a memory 401. Those skilled in the art can understand that Figure 4 it is only an example of the electronic device 4 and does not constitute a limitation on the electronic device 4. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the electronic device 4 may further include an input / output device, a network access device, a bus, etc.
[0065] The so-called processor 400 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0066] The memory 401 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 401 may also be an external storage device of the electronic device 4, such as a plug-in hard disk equipped on the electronic device 4, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 401 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 401 is used to store the computer program 402 and other programs and data required by the electronic device 4. The memory 401 may also be used to temporarily store data that has been output or is to be output.
[0067] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0068] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0069] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0070] In the embodiments provided by the present invention, it should be understood that the disclosed device / electronic device and method can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. 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 displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0071] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0072] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0073] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method and device embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0074] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A server, characterized in that, The server is provided with an encrypted memory, and the encrypted memory is signal-connected to the processor of the server; When the processor of the server sends an instruction to store the first data queue to the encrypted memory, the encrypted memory encrypts and stores the first data queue by splitting the first data queue into multiple first data segments, transforming the first data segments to generate multiple second data segments, and respectively splitting and encoding the multiple second data segments, and sends encryption method information to the server; When the processor of the server sends a second data queue reading instruction and encryption method information to the encrypted memory, after the encryption method information is verified and passed, the encrypted memory restores the second data queue through the encryption method information and sends the second data queue to the processor of the server.
2. A data queue secure storage method, characterized in that, An encrypted memory applied to the server as described in claim 1, the data queue secure storage method includes: Obtain the first data queue; Perform a first split on the first data queue to obtain multiple first data segments and the number of the first segments, where the number of the first segments is the number of data segments appearing in the multiple first data segments; Respectively transform each first data segment according to the number of the first segments and the data transformation equation to obtain multiple second data segments, and respectively split each second data segment to obtain multiple third data segments; Encode the multiple third data segments according to the occurrence frequency of the third data segments to obtain multiple first encodings, and store the multiple first encodings and the encoding instructions constructed by multiple coefficients of the data transformation equation.
3. The data queue secure storage method according to claim 2, wherein The data transformation equation is: Wherein, is the second data segment, is the total number of right shifts, is the th first coefficient, is the first data segment, is the amount of data shifted to the right, is the th first constant, is the right shift operation, is the left shift operation, is the function for obtaining the data length.
4. The data queue secure storage method according to claim 2, wherein, The step of respectively transforming each first data segment according to the number of the first segments and the data transformation equation to obtain multiple second data segments includes: Obtain the data transformation equation; Respectively input each first data segment into the data transformation equation to obtain multiple first intermediate data segments, where each first intermediate data segment corresponds to a first data segment; Respectively split each first intermediate data segment to obtain multiple second intermediate data segments; Determine the number of the second segments according to the multiple second intermediate data segments, where the number of the second segments is the number of data segments appearing in the multiple second intermediate data segments; Determine the optimization threshold according to the number of the first segments and the number of second intermediate data segments split from the first intermediate data segments; If the number of the second segments is greater than the optimization threshold, optimize the coefficients of the data transformation equation, and respectively input each first data segment into the optimized data transformation equation to obtain multiple second data segments; Otherwise, use the multiple first intermediate data segments as the multiple second data segments.
5. The data queue secure storage method according to claim 4, wherein, The step of optimizing the coefficients of the data transformation equation includes: Obtain and initialize multiple coefficient arrays; Respectively substitute the multiple coefficient arrays into the data transformation equation to obtain multiple process equations; For each process equation, respectively obtain a first optimization value and add the first optimization value to the optimization value queue; If there is a value less than the optimization target among multiple first optimization values, the process equation corresponding to the target optimization value is used as the optimized data transformation equation, where the target optimization value is the minimum value among the multiple first optimization values; Otherwise, for each process equation, adjust multiple coefficients of the equation according to the target optimization value and the minimum value in the corresponding optimization value queue, and jump to the step of respectively obtaining a first optimization value for each process equation and adding the first optimization value to the optimization value queue.
6. The data queue secure storage method according to claim 5, characterized in that, The step of respectively obtaining a first optimization value for each process equation and adding the first optimization value to the optimization value queue includes: Input each first data segment into the process respectively to obtain multiple third intermediate data segments, where each third intermediate data segment corresponds to a first data segment; Respectively segment each third intermediate data segment to obtain multiple fourth intermediate data segments; Determine a first optimization value according to the multiple fourth intermediate data segments, where the first optimization value is the ratio of the number of data segments that appear in the multiple fourth intermediate data segments to the optimization threshold; Among them, the step of determining the optimization threshold according to the number of the first segments and the number of second intermediate data segments segmented from the first intermediate data segment includes: Determine the optimization threshold according to the first equation, the number of the first segments, and the number of second intermediate data segments segmented from the first intermediate data segment, where the first equation is: Wherein, is the optimization threshold value, is a proportionality coefficient greater than 1, is the number of the second intermediate data segments segmented from the first intermediate data segment, is the number of the first segment.
7. The data queue secure storage method according to any one of claims 2-6, characterized in that, The step of encoding the multiple third data segments according to the appearance frequency of the third data segments to obtain multiple first encodings includes: Count the data segments that appear in the multiple third data segments and use the data segments that appear as typical segments; Count the number of times each typical data segment appears in the multiple third data segments to obtain multiple appearance frequencies; Allocate a coding length to each typical segment according to the multiple appearance frequencies, where the coding length is negatively correlated with the appearance frequency of the typical segment; Allocate a unique code to each typical segment based on the coding length.
8. A data queue secure storage device, characterized in that, For implementing the data queue secure storage method according to any one of claims 2-7, the data queue secure storage device includes: A data queue acquisition module for acquiring a first data queue; A queue segmentation module for performing a first segmentation on the first data queue to obtain multiple first data segments and the number of the first segments, where the number of the first segments is the number of data segments that appear in the multiple first data segments; A data transformation module for respectively transforming each first data segment according to the number of the first segments and the data transformation equation to obtain multiple second data segments, and respectively segmenting each second data segment to obtain multiple third data segments; And, An encoding and storage module for encoding the multiple third data segments according to the appearance frequency of the third data segments to obtain multiple first encodings, and storing the multiple first encodings and the encoding instructions constructed by the multiple coefficients of the data transformation equation.
9. An electronic device, comprising a memory and a processor, wherein a computer program that can run on the processor is stored in the memory, characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 2 to 7 above are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 2 to 7 above are implemented.
Citation Information
Patent Citations
Method and Apparatus for Secure Storing of Private Data on User Devices in Telecommunications Networks
US20080294911A1