Data storage method based on code protection
Patent Information
- Application Number
- CN202210804561.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-07-08
AI Technical Summary
上述方式虽然能够快速按照预定模式对数据信息进行整体的编译,但是其同时存在编译后的数据信息容易被反编译而导致代码泄露的风险
[0024] Extract all the code files contained in the data information section, and use these as the code files that need to be fed back.
Smart Images

Figure CN115220729B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of data storage management, and in particular to a data storage method based on code protection. Background Technology
[0002] Currently, to securely protect and store different types of data, such as code, the common practice is to compile the entire data set before deploying it online. While this method allows for rapid compilation of the data according to a predetermined pattern, it also carries the risk of the compiled data being easily decompiled, leading to code leaks. Furthermore, when the data volume is large, the compilation workload is correspondingly increased, resulting in prolonged compilation times and low efficiency. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a data storage method based on code protection. This method identifies target information requiring code conversion from uploaded raw data and marks the target information. Based on the marking results, it performs code conversion on the corresponding target information using a specific conversion mode to obtain corresponding code files, and then stores these code files separately. Upon receiving a data retrieval request, it determines the data information portion requiring feedback and its corresponding code file. After restoring the code file, it packages it together with the data content associated with the original data and sends it back. This method first identifies the target information requiring code conversion from the raw data and then performs code conversion on the target information. It does not require code conversion of the entire raw data, reducing the workload and time required for code conversion. Furthermore, since the code files obtained after code conversion are irregularly distributed within the data information, this reduces the probability of data being cracked, improving data storage security and reliability.
[0004] This invention provides a data storage method based on code protection, which includes the following steps:
[0005] Step S1: Obtain the raw data information uploaded by the user terminal through the storage terminal, analyze and process the raw data information to determine the target information contained in the raw data information; and mark all target information in the raw data information.
[0006] Step S2: Based on the marking results of the target information, determine the conversion mode for code conversion of the target information; based on the conversion mode, compile each piece of target information into a corresponding code file;
[0007] Step S3: Collect the code files corresponding to all target information and store all code files separately; when the storage terminal receives a data information acquisition request, determine the data information part that the storage terminal needs to return based on the data information acquisition request;
[0008] Step S4: Based on the data information section, determine the code file that needs to be fed back, restore the code file that needs to be fed back, and package it together with the data content associated with the original data information for feedback.
[0009] Furthermore, in step S1, the raw data information uploaded by the user terminal is obtained through the storage terminal, and the raw data information is analyzed and processed to determine the target information contained in the raw data information, specifically including:
[0010] When a user terminal uploads raw data information to a storage terminal, the storage terminal first stores the raw data information in a preset cache area and extracts the user terminal's terminal identity information from the raw data information; wherein, the terminal identity information refers to hardware device identity information or user account identity information.
[0011] Determine whether the terminal identity information belongs to the identity information included in the preset whitelist. If yes, transfer the original data information from the preset cache area to the preset storage area; otherwise, directly delete the original data information from the preset cache area.
[0012] The original data information located in the preset storage area is subjected to semantic recognition processing, and the recognized keywords are used as target information.
[0013] Furthermore, in step S1, marking all target information in the original data information specifically includes:
[0014] Determine the sequential position information and data bit quantity of each keyword in the original data information, and add the sequential position information and data bit quantity to their corresponding keywords to mark all target information.
[0015] Furthermore, in step S2, determining the conversion mode for code conversion of the target information based on the marking result of the target information specifically includes:
[0016] If the data bit size of the target information is greater than or equal to a preset bit size threshold, the target information is compiled into a .class file; if the data bit size of the target information is less than the preset bit size threshold, the target information is compiled into a .cpp file.
[0017] Furthermore, in step S2, compiling each target information into a corresponding code file according to the conversion mode specifically includes:
[0018] Based on the sequence position information, each target information is compiled and converted into a corresponding .class file or .cpp file in sequence.
[0019] Furthermore, in step S3, collecting the code files corresponding to all target information and distinguishing and storing all code files specifically includes:
[0020] Collect the code files corresponding to all target information, and determine the constant strings included in each code file. Then, store all code files separately based on the constant strings. The constant strings refer to the strings corresponding to the file type identifiers contained in the header of the code files.
[0021] Furthermore, in step S3, after the storage terminal receives a data information acquisition request, the specific data information portion that the storage terminal needs to return includes, based on the data information acquisition request:
[0022] When the storage terminal receives a data information acquisition request, it extracts the creation time corresponding to the data information to be acquired from the data information acquisition request; then, based on the creation time, it filters the data information portion that matches the creation time from the preset storage range of the storage terminal, and uses this as the data information portion that needs to be fed back; wherein, the data information portion is at least a part of the original data information that has been converted by code stored in the preset storage range.
[0023] Furthermore, in step S4, based on the data information portion, the code file that needs to be fed back is determined, and after restoring the code file that needs to be fed back, together with its data content associated with the original data information, it is packaged and fed back. This specifically includes:
[0024] Extract all the code files contained in the data information section, and use these as the code files that need to be fed back.
[0025] All extracted code files are sequentially restored to obtain corresponding restored data information. The restored data information, together with the data content associated with the original data information, are then packaged and fed back.
[0026] Compared to existing technologies, this code-protected data storage method identifies the target information requiring code conversion from the uploaded raw data and marks the target information. Based on the marking results, it performs code conversion on the corresponding target information using a specific conversion mode to obtain corresponding code files, and then stores the code files separately. Upon receiving a data information retrieval request, it determines the data information portion that needs to be returned and its corresponding code file. After restoring the code file that needs to be returned, it packages it together with the data content associated with the original data and returns it. This method first identifies the target information requiring code conversion from the raw data and then performs code conversion on the target information. It does not require code conversion of the entire raw data, reducing the workload and time required for code conversion. Furthermore, since the code files obtained from code conversion are irregularly distributed within the data information, it reduces the probability of data information being cracked and improves the security and reliability of data storage.
[0027] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0028] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart illustrating the data storage method based on code protection provided by the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] See Figure 1This is a flowchart illustrating a code-protected data storage method provided in an embodiment of the present invention. The code-protected data storage method includes the following steps:
[0033] Step S1: Obtain the raw data information uploaded by the user terminal through the storage terminal, analyze and process the raw data information to determine the target information contained in the raw data information, and mark all target information in the raw data information.
[0034] Step S2: Based on the marking results of the target information, determine the conversion mode for code conversion of the target information; based on the conversion mode, compile each piece of target information into a corresponding code file;
[0035] Step S3: Collect the code files corresponding to all target information and store all code files separately; when the storage terminal receives a data information acquisition request, determine the data information part that the storage terminal needs to return based on the data information acquisition request;
[0036] Step S4: Based on the data information section, determine the code file that needs to be fed back, restore the code file that needs to be fed back, and package it together with the data content associated with the original data information for feedback.
[0037] The beneficial effects of the above technical solution are as follows: This code-protected data storage method determines the target information that needs to be converted from the uploaded raw data information and marks the target information; based on the marking results, it performs code conversion on the corresponding target information using a specific conversion mode to obtain the corresponding code file, and stores the code file separately; after receiving the data information retrieval request, it determines the data information part that needs to be fed back and its corresponding code file that needs to be fed back; after restoring the code file that needs to be fed back, it packages and feeds it back together with the data content associated with the original data information; the above method first determines the target information that needs to be converted from the raw data information, and then performs code conversion on the target information. It does not require code conversion of the entire raw data information, which reduces the workload and time required for code conversion. Furthermore, since the code files obtained from code conversion are irregularly distributed in the data information, this can reduce the probability of data information being cracked and improve the storage security and reliability of data.
[0038] Preferably, in step S1, the raw data information uploaded by the user terminal is obtained through the storage terminal, and the raw data information is analyzed and processed to determine the target information contained in the raw data information, specifically including:
[0039] When a user terminal uploads raw data information to a storage terminal, the storage terminal first stores the raw data information in a preset cache area and extracts the user terminal's terminal identity information from the raw data information; wherein, the terminal identity information refers to hardware device identity information or user account identity information;
[0040] Determine whether the terminal's identity information belongs to the identity information included in the preset whitelist. If so, transfer the original data information from the preset cache area to the preset storage area; otherwise, delete the original data information directly from the preset cache area.
[0041] The original data information located in the preset storage area is subjected to semantic recognition processing, and the identified keywords are used as target information.
[0042] The beneficial effects of the above technical solution are as follows: When a user terminal uploads raw data information that needs to be compiled to a storage terminal, the raw data information is first temporarily stored in a preset cache area. Then, it is determined whether the raw data information belongs to a user terminal with specified terminal identity information. If so, the raw data information is transferred from the preset cache area to a preset storage area for permanent storage; otherwise, the raw data information is directly deleted. In this way, the preset cache area, as a temporary storage space for raw data information, acts as an intermediary, preventing unqualified raw data information from being directly stored in the preset storage space, thus avoiding waste of storage space. Furthermore, semantic recognition processing, i.e., keyword recognition processing, is performed on the raw data information in the preset storage space to obtain all keywords present in the raw data information.
[0043] Preferably, in step S1, marking all target information in the original data information specifically includes:
[0044] Determine the sequential position information and data bit quantity of each keyword in the original data information, and add the sequential position information and data bit quantity to the corresponding keyword to mark all target information.
[0045] The beneficial effects of the above technical solution are as follows: the position and data bit quantity of each keyword in the original data information are not the same. By using the sequential position information of each keyword in the original data information and its respective data bit quantity as marking features, each keyword can be uniquely marked, which facilitates accurate positioning of the keyword.
[0046] Preferably, in step S2, determining the conversion mode for code conversion of the target information based on the marking result of the target information specifically includes:
[0047] If the data bit size of the target information is greater than or equal to the preset bit size threshold, the target information is compiled into a .class file; if the data bit size of the target information is less than the preset bit size threshold, the target information is compiled into a .cpp file.
[0048] The beneficial effects of the above technical solution are as follows: by using the above method, based on a preset bit amount threshold, two types of target information with different data bit amounts can be compiled and converted into different types of files. This can improve the efficiency of compiling and converting target information while ensuring the reliability of compiling and converting target information.
[0049] Preferably, in step S2, compiling each target information into a corresponding code file according to the conversion mode specifically includes:
[0050] Based on this sequential position information, each target information is compiled and converted into the corresponding .class file or .cpp file in turn.
[0051] The beneficial effects of the above technical solution are as follows: by using the above method and taking the sequential position information corresponding to each keyword as the basis, it is possible to ensure that each target information is compiled and converted without omission, thus avoiding the occurrence of incomplete compilation and conversion of target information.
[0052] Preferably, in step S3, collecting the code files corresponding to all target information and distinguishing and storing all code files specifically includes:
[0053] Collect the code files corresponding to all target information, and determine the constant strings included in each code file. Then, distinguish and store all code files according to the constant strings. The constant string refers to the string corresponding to the file type identifier contained in the header of the code file.
[0054] The beneficial effects of the above technical solution are as follows: by using the constant strings included in each code file as the type identifier of the code file, all code files can be effectively and accurately distinguished, thereby improving the accuracy of subsequent code file screening.
[0055] Preferably, in step S3, after the storage terminal receives a data information acquisition request, the specific data information portion that the storage terminal needs to return includes, based on the data information acquisition request:
[0056] When the storage terminal receives a data information retrieval request, it extracts the creation time corresponding to the data information to be retrieved from the data information retrieval request; then, based on the creation time, it filters the data information portion that matches the creation time from the preset storage range of the storage terminal, and uses this as the data information portion that needs to be fed back; wherein, the data information portion is at least a part of the original data information that has been converted by code stored in the preset storage range.
[0057] The beneficial effects of the above technical solution are as follows: by using the creation time of the data information as a benchmark, the required data information can be quickly located from the preset storage area, thus eliminating the need to retrieve all data information from the preset storage area and improving the accuracy of data information retrieval.
[0058] Preferably, in step S4, based on the data information portion, the code file that needs to be fed back is determined, and after restoring the code file that needs to be fed back, together with its data content associated with the original data information, it is packaged and fed back. Specifically, this includes:
[0059] Extract all the code files contained in this data information section, and use these as the code files that need to be fed back.
[0060] All extracted code files are restored sequentially to obtain the corresponding restored data information. The restored data information, together with the data content associated with the original data information, is then packaged and fed back.
[0061] The beneficial effects of the above technical solution are as follows: through the above method, the extracted code file can be effectively restored, and the restored data information together with the data content associated with the original data information can be packaged and fed back, so that the packaged feedback data can fully reflect the authenticity of the original data information.
[0062] As can be seen from the above embodiments, this code-protected data storage method determines the target information that needs to be converted from the uploaded raw data information and marks the target information; according to the marking results, it performs code conversion on the corresponding target information using a specific conversion mode to obtain the corresponding code file, and stores the code file separately; after receiving a data information acquisition request, it determines the data information part that needs to be fed back and its corresponding code file that needs to be fed back; after restoring the code file that needs to be fed back, it packages and feeds it back together with the data content associated with the original data information; the above method first determines the target information that needs to be converted from the raw data information, and then performs code conversion on the target information. It does not require code conversion of the entire raw data information, which reduces the workload and time required for code conversion. Furthermore, since the code files obtained from code conversion are irregularly distributed in the data information, this can reduce the probability of data information being cracked and improve the storage security and reliability of data.
[0063] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A data storage method based on code protection, characterized in that, It includes the following steps: Step S1: Obtain the raw data information uploaded by the user terminal through the storage terminal, analyze and process the raw data information, and determine the target information contained in the raw data information; And all target information is marked in the original data information; wherein, the step of obtaining the original data information uploaded by the user terminal through the storage terminal, analyzing and processing the original data information, and determining the target information contained in the original data information specifically includes: when the user terminal uploads the original data information to the storage terminal, the storage terminal first stores the original data information in a preset cache area, and extracts the terminal identity information of the user terminal from the original data information; wherein, the terminal identity information refers to hardware device identity information or user account identity information; determining whether the terminal identity information belongs to the identity information included in the preset whitelist, if so, the original data information is transferred from the preset cache area to the preset storage area; if not, the original data information is directly deleted from the preset cache area; The original data information located in the preset storage area is subjected to semantic recognition processing, and the recognized keywords are used as target information. Step S2: Based on the marking results of the target information, determine the conversion mode for code conversion of the target information; based on the conversion mode, compile each piece of target information into a corresponding code file; wherein, determining the conversion mode for code conversion of the target information based on the marking results of the target information specifically includes: if the data bit size of the target information is greater than or equal to a preset bit size threshold, then compile the target information into a .class file; if the data bit size of the target information is less than the preset bit size threshold, then compile the target information into a .cpp file; Step S3: Collect the code files corresponding to all target information and store all code files separately; when the storage terminal receives a data information acquisition request, determine the data information part that the storage terminal needs to return based on the data information acquisition request; Step S4: Based on the data information section, determine the code file that needs to be fed back, restore the code file that needs to be fed back, and package it together with the data content associated with the original data information for feedback.
2. The data storage method based on code protection as described in claim 1, characterized in that: In step S1, marking all target information in the original data information specifically includes: Determine the sequential position information and data bit quantity of each keyword in the original data information, and add the sequential position information and data bit quantity to their corresponding keywords to mark all target information.
3. The data storage method based on code protection as described in claim 2, characterized in that: In step S2, compiling each target information into a corresponding code file according to the conversion mode specifically includes: Based on the sequence position information, each target information is compiled and converted into a corresponding .class file or .cpp file in sequence.
4. The data storage method based on code protection as described in claim 3, characterized in that: In step S3, collecting the code files corresponding to all target information and distinguishing and storing all code files specifically includes: Collect the code files corresponding to all target information, and determine the constant strings included in each code file. Then, store all code files separately based on the constant strings. The constant strings refer to the strings corresponding to the file type identifiers contained in the header of the code files.
5. The data storage method based on code protection as described in claim 4, characterized in that: In step S3, after the storage terminal receives a data information acquisition request, it determines, based on the data information acquisition request, that the specific data information portion that the storage terminal needs to return includes: When the storage terminal receives a data information acquisition request, it extracts the creation time corresponding to the data information to be acquired from the data information acquisition request; then, based on the creation time, it filters the data information portion that matches the creation time from the preset storage range of the storage terminal, and uses this as the data information portion that needs to be fed back; wherein, the data information portion is at least a part of the original data information that has been converted by code stored in the preset storage range.
6. The data storage method based on code protection as described in claim 5, characterized in that: In step S4, based on the data information portion, the code file that needs to be fed back is determined, and after restoring the code file that needs to be fed back, together with its data content associated with the original data information, it is packaged and fed back. Specifically, this includes: Extract all the code files contained in the data information section, and use these as the code files that need to be fed back. All extracted code files are sequentially restored to obtain corresponding restored data information. The restored data information, together with the data content associated with the original data information, are then packaged and fed back.
Citation Information
Patent Citations
Program code conversion method and related equipment
CN112667240A
Code protection method and device, electronic equipment and readable storage medium
CN112966228A