A data management method and system for online resource library
By dividing the online resource library into multiple sub-resource libraries and using a combination of multi-segment encryption chains and feature encryption chains for data encryption, the problem of low data security in the existing online resource library is solved and high-security data storage is achieved. and transmission.
Patent Information
- Application Number
- CN202410539444.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-04-30
AI Technical Summary
The data security of existing online resource libraries is low and cannot effectively protect sensitive data.
By dividing multiple sub-resource libraries in the online resource library according to the data security level, data is encrypted using a combination of multi-segment encryption chains and feature encryption chains to ensure high security during data storage and transmission.
It improves the security of data in the online resource library, reduces the difficulty of unified high-complexity encryption, and enhances data protection capabilities by utilizing the unique characteristic information of the data itself for encryption.
Smart Images

Figure CN118467785B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a data management method and system for an online resource library. Background Art
[0002] As the name implies, a resource library is a place where various resources are stored, managed and provided. In the digital age, resource libraries mostly refer to various databases, knowledge bases and document libraries on the Internet. The construction and use of resource libraries play an important role in the development and progress of society. It not only provides people with rich resources, but also provides convenience and support for the development and innovation of various industries.
[0003] The resource library can include a variety of content, such as documents, books, audio, video, pictures, software, data, etc. Through the resource library, people can quickly and conveniently obtain the required information and resources to meet various needs. The construction of the resource library requires a lot of time, manpower and financial resources, but its existence has played a very positive role in promoting the development of society and science and technology.
[0004] In the prior art, there are some specific resource libraries with confidentiality properties, such as biomedicine-related resource libraries and internal enterprise resource libraries. However, currently this type of resource library only encrypts and stores data through simple encryption algorithms, which has low security. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a data management method and system for an online resource library, aiming to solve the problem of low data security in the online resource library in the prior art.
[0006] The embodiment of the present invention is implemented as follows:
[0007] A data management method for an online resource library is used to manage data in the online resource library, wherein the online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each sub-resource library of different security levels is configured with an original encryption chain, and the method includes:
[0008] Acquire the security level of the uploaded data to be uploaded to the online resource library, and determine the target sub-resource library to which the uploaded data belongs from among the multiple sub-resource libraries according to the security level;
[0009] Acquire the uploaded data of the same security level in a preset time period, and determine a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data from the uploaded data;
[0010] Extracting each target data from the target data group respectively, and extracting characteristic attribute information of each target data respectively, and encrypting them respectively according to the characteristic attribute information to obtain multiple sub-encryption chains;
[0011] Determine a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule, add the characteristic encryption chain to the head of the original encryption chain, and break part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain;
[0012] The uploaded data is encrypted and stored in the target sub-resource library according to the data encryption chain.
[0013] Furthermore, in the data management method of the online resource library, the target data includes pictures, texts, audios and videos, and the steps of respectively extracting each target data in the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains include:
[0014] When the target data is a picture, preprocessing the picture, and performing hashing on the preprocessed picture using a preset hash algorithm to obtain a picture hash value;
[0015] The acquisition device code of the image is obtained, and a picture encryption sequence is obtained according to the acquisition device code and the picture hash value, and the picture encryption sequence is encrypted according to a preset encryption algorithm to obtain a picture encryption chain.
[0016] Furthermore, in the above-mentioned data management method for online resource library, the step of extracting each target data in the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes:
[0017] When the target data is text, obtaining the number of bytes of the text and the subject name in the text;
[0018] A text encryption sequence is determined according to the subject name and the number of bytes in the text, and the text encryption sequence is encrypted according to a preset encryption algorithm to obtain a text encryption chain.
[0019] Furthermore, in the above-mentioned data management method for online resource library, the step of extracting each target data in the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes:
[0020] When the target data is audio, obtaining the encoding format, sampling rate and playing time of the audio;
[0021] An audio encryption sequence is determined according to the encoding format, sampling rate and playing time of the audio, and the audio encryption sequence is encrypted according to a preset encryption algorithm to obtain an audio encryption chain.
[0022] Furthermore, in the above-mentioned data management method for online resource library, the step of extracting each target data in the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes:
[0023] When the target data is a video, obtaining the color space, frame rate, and playback duration of the video;
[0024] A video encryption sequence is determined according to the color space, frame rate and playback duration of the video, and the video encryption sequence is encrypted according to a preset encryption algorithm to obtain a video encryption chain.
[0025] Furthermore, in the above-mentioned online resource library data management method, the step of determining the characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule comprises:
[0026] Comparing the elements of each identical chain position of the plurality of sub-encryption chains, and deleting the chain positions with identical elements to obtain respective deleted sub-encryption chains;
[0027] Obtaining the length of the sub-encryption chain, and determining the intercepted length of the sub-encryption chain according to the number of the sub-encryption chains;
[0028] According to the length of the intercepted sub-encryption chain, an intercepted sub-encryption chain of the same length is intercepted from the removed sub-encryption chain, and all the intercepted sub-encryption chains are combined to obtain the characteristic encryption chain.
[0029] Furthermore, in the above-mentioned data management method for online resource library, the step of determining the target data group for encryption from the uploaded data according to a preset rule comprises:
[0030] Determining the number of types of data types of the target data group according to the security level of the uploaded data;
[0031] According to the number of categories, corresponding category data is determined from the uploaded data, and target data is selected from the category data to form the target data group.
[0032] Another object of the present invention is to provide a data management system for an online resource library, which is used to manage the data of the online resource library, wherein the online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each sub-resource library of different security levels is configured with an original encryption chain, and the system includes:
[0033] An acquisition module, configured to acquire a security level of the uploaded data to be uploaded to the online resource library, and determine a target sub-resource library to which the uploaded data belongs from among the multiple sub-resource libraries according to the security level;
[0034] a determination module, used for acquiring the uploaded data of the same security level in a preset time period, and determining a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data in the uploaded data;
[0035] An extraction module, used to extract each target data in the target data group, extract characteristic attribute information of each target data, and encrypt them according to the characteristic attribute information to obtain multiple sub-encryption chains;
[0036] An adding module, configured to determine a characteristic encryption chain according to the plurality of sub-encryption chains according to a preset rule, add the characteristic encryption chain to the head of the original encryption chain, and break part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain;
[0037] A storage module is used to encrypt and store the uploaded data in the target sub-resource library according to the data encryption chain.
[0038] The present invention obtains the security level of the uploaded data to be uploaded to the online resource library, determines the target sub-resource library to which the uploaded data belongs from multiple sub-resource libraries according to the security level; obtains the uploaded data of the same security level in a preset time period, determines the target data group for encryption from the uploaded data according to preset rules, and the target data group is composed of different types of data in the uploaded data; extracts each target data in the target data group, extracts the characteristic attribute information of each target data, and encrypts them according to the characteristic attribute information to obtain multiple sub-encryption chains; determines the characteristic encryption chain according to the multiple sub-encryption chains according to the preset rules, adds the characteristic encryption chain to the header of the original encryption chain, and breaks the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain the data encryption chain; encrypts the uploaded data according to the data encryption chain and stores it in the target sub-resource library, divides the resource library into security levels, reduces the difficulty of unified high-complex encryption, and uses the unique characteristic information of the data itself to encrypt the data, thereby improving the security of the data in the resource library. The problem of low data security in the online resource library in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of a data management method for an online resource library in a first embodiment of the present invention;
[0040] Figure 2 4 is a structural block diagram of a data management system for an online resource library in a third embodiment of the present invention.
[0041] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0042] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0043] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0045] The following will explain in detail how to improve the security of data in the online resource library in conjunction with specific embodiments and drawings.
[0046] Embodiment 1
[0047] See also Figure 1 , shown is a data management method for an online resource library in a first embodiment of the present invention, which is used to manage data in an online resource library. The online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each sub-resource library of a different security level is configured with an original encryption chain, and the method includes steps S10~S14.
[0048] Step S10, obtaining the security level of the uploaded data to be uploaded to the online resource library, and determining the target sub-resource library to which the uploaded data belongs from among the multiple sub-resource libraries according to the security level.
[0049] Among them, the online resource library is divided into multiple sub-resource libraries with different security levels according to different security levels. Each sub-resource library stores data with the same security level. For example, the security level requirements of the data can be divided into different security levels such as low security level, general security level and high security level. In practice, data will be uploaded to the online resource library from time to time to update the data in the online resource library. Therefore, after obtaining the uploaded data to be uploaded, its corresponding security level can be determined, and then the target sub-resource library where the data needs to be stored can be determined to achieve a reasonable classification of data storage. In specific implementation, the security level of the data can be actively calibrated before uploading the data. In addition, on the existing basis, different access permissions can be set after setting sub-resource libraries with different security levels. Only specific accounts or users can access data that requires a higher security level, thereby achieving security redundancy.
[0050] Step S11, obtaining the uploaded data of the same security level in a preset time period, and determining a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data from the uploaded data.
[0051] Among them, for data of the same security level that needs to be stored in the same sub-resource library, the same encryption algorithm can be used. Specifically, a target data group is obtained from the uploaded data, wherein the target data group is composed of data of multiple different data types, such as text, pictures, and videos, etc. The information in the target data group is used as an encryption element for the uploaded data. In specific implementation, the preset time period can be set according to actual conditions and is not limited here. In addition, in some optional embodiments of the present invention, the encryption time can also be determined by setting the amount of uploaded data. For example, when the amount of uploaded data reaches a threshold, encryption of the uploaded data begins.
[0052] More specifically, the step of determining the target data group for encryption from the uploaded data according to a preset rule includes:
[0053] Determining the number of types of data types of the target data group according to the security level of the uploaded data;
[0054] Determine corresponding type data from the uploaded data according to the number of types, and select target data from the type data to form the target data group:
[0055] Among them, the data type in the target data group for encryption can be determined according to different security levels. For example, for data with a higher security level, more types of data can be obtained from the uploaded data as the target data group, and for data with a lower security level, fewer types of data can be obtained from the uploaded data as the target data group. That is, according to different security levels, the types of data types in different target data groups are determined. For example, for data with a lower security level, one or two types of data can be selected to form a data group, while for data with a higher security level, multiple types of data can be selected to form a data group. In addition, since the uploaded data contains more than one data type of corresponding data, the uploaded data can be first classified according to the data type, and then the target data can be selected from multiple data in each data type. For example, after determining the data type, a data with a large data volume is selected as the target data of the data type as the target data group. Specifically, assuming that after classification, there are multiple pictures of data, the picture with the largest data volume is selected as part of the target data group.
[0056] Step S12, extracting each target data in the target data group respectively, and extracting the characteristic attribute information of each target data respectively, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains.
[0057] Among them, the target data group is composed of different types of data, each of which has its own unique characteristic information. The target data composed of the target data group are extracted respectively, and the characteristic information of the target data is extracted respectively. The encryption algorithm is used for each characteristic information to obtain the sub-encryption chain, which ensures the uniqueness and security of the encryption chain.
[0058] Step S13, determining a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule, adding the characteristic encryption chain to the head of the original encryption chain, and breaking part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain.
[0059] Among them, after determining multiple sub-encryption chains, a preset algorithm is used to merge the multiple sub-encryption chains to obtain a characteristic encryption chain. The characteristic encryption chain is added to the head of the original encryption chain to obtain a new encryption chain, and the part of the tail of the original encryption chain is cut according to the length of the characteristic encryption chain to obtain a data encryption chain. For example, the length of the original encryption chain is "16", and the length of the obtained characteristic encryption chain is "6". The two constitute a new encryption chain of "22". The "6" bits at the tail of the original encryption chain are cut off to obtain a data encryption chain of "16". Under the premise of realizing continuous updating of the encryption chain, the original length of the encryption chain is guaranteed.
[0060] In addition, in some optional embodiments of the present invention, the original encryption chain in the resource library can be actively set, or the encryption chain can be obtained by using an encryption algorithm based on information of data currently stored in the resource library as an encryption element.
[0061] Step S14: encrypt the uploaded data according to the data encryption chain and store it in the target sub-resource library.
[0062] Among them, the uploaded data is encrypted according to the obtained data encryption chain. In the specific implementation, a data encryption chain is configured for the uploaded data, and so on. As the data increases, the data encryption chain is used as the original encryption chain. The encryption chain of the next encrypted and stored uploaded data is updated again and used as the encryption chain of the updated part of the uploaded data, thereby realizing the secure storage of data.
[0063] In summary, the data management method of the online resource library in the above embodiment of the present invention obtains the security level of the uploaded data to be uploaded to the online resource library, determines the target sub-resource library to which the uploaded data belongs from multiple sub-resource libraries according to the security level; obtains the uploaded data of the same security level in a preset time period, determines the target data group for encryption from the uploaded data according to the preset rules, and the target data group is composed of different types of data in the uploaded data; extracts each target data in the target data group, and extracts the characteristic attribute information of each target data, and encrypts them according to the characteristic attribute information to obtain multiple sub-encryption chains; determines the characteristic encryption chain according to the multiple sub-encryption chains according to the preset rules, adds the characteristic encryption chain to the header of the original encryption chain, and breaks the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain the data encryption chain; encrypts the uploaded data according to the data encryption chain and stores it in the target sub-resource library, divides the resource library into security levels, reduces the difficulty of unified high-complex encryption, and uses the unique characteristic information of the data itself to encrypt the data, thereby improving the security of the data in the resource library. The problem of low data security in the online resource library in the prior art is solved.
[0064] Embodiment 2
[0065] The embodiment of the present invention also provides a data management method for an online resource library. The data management method for an online resource library provided in the embodiment of the present invention is different from the data management method for an online resource library provided in the first embodiment of the present invention in that:
[0066] The target data includes pictures, text, audio and video, and step S13 includes:
[0067] When the target data is a picture, preprocessing the picture, and performing hashing on the preprocessed picture using a preset hash algorithm to obtain a picture hash value;
[0068] The acquisition device code of the image is obtained, and a picture encryption sequence is obtained according to the acquisition device code and the picture hash value, and the picture encryption sequence is encrypted according to a preset encryption algorithm to obtain a picture encryption chain.
[0069] Among them, select a suitable image hash algorithm, such as Average Hash, Perceptual Hash, etc. Load the image for which the hash value is to be obtained into the memory. According to the selected hash algorithm, the image may need to be preprocessed, such as resizing, graying, etc. According to the selected hash algorithm, perform hash calculation on the preprocessed image data to generate a hash value. According to the image acquisition device encoding and the image hash value, obtain the image encryption sequence, and then use the preset encryption algorithm to encrypt the image encryption sequence to obtain the image encryption chain, wherein the preset algorithm can use MD5.
[0070] Step S13 also includes:
[0071] When the target data is text, obtaining the number of bytes of the text and the subject name in the text;
[0072] A text encryption sequence is determined according to the subject name and the number of bytes in the text, and the text encryption sequence is encrypted according to a preset encryption algorithm to obtain a text encryption chain.
[0073] Among them, the number of bytes of the text and the pinyin letters of the subject name in the text can be selected to obtain a text encryption sequence composed of letters and numbers. The text encryption sequence is encrypted by an encryption algorithm to obtain a text encryption chain. Preferably, the same encryption algorithm as the above picture can be used to obtain an encryption chain of the same length.
[0074] Step S13 also includes:
[0075] When the target data is audio, obtaining the encoding format, sampling rate and playing time of the audio;
[0076] An audio encryption sequence is determined according to the encoding format, sampling rate and playing time of the audio, and the audio encryption sequence is encrypted according to a preset encryption algorithm to obtain an audio encryption chain.
[0077] Among them, the audio encoding formats include MP3, WAV, and AAC. The sampling rate represents the number of samples per second, which is a number. The digital elements in the playback time are combined to obtain an audio encryption sequence composed of letters and numbers. The audio encryption sequence is encrypted by an encryption algorithm to obtain an audio encryption chain. Preferably, the same encryption algorithm as mentioned above can be used to obtain an encryption chain of the same length.
[0078] Step S13 also includes:
[0079] When the target data is a video, obtaining the color space, frame rate, and playback duration of the video;
[0080] A video encryption sequence is determined according to the color space, frame rate and playback duration of the video, and the video encryption sequence is encrypted according to a preset encryption algorithm to obtain a video encryption chain.
[0081] Among them, the color space is a way of describing the color in the video, such as RGB, YUV, the frame rate is a number, and the digital elements in the playback time are combined to obtain a video encryption sequence composed of letters and numbers. The video encryption sequence is encrypted by an encryption algorithm to obtain a video encryption chain. Preferably, the same encryption algorithm as mentioned above can be used to obtain encryption chains of the same length.
[0082] In addition, in some optional embodiments of the present invention, the step of determining a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule includes:
[0083] Comparing the elements of each identical chain position of the plurality of sub-encryption chains, and deleting the chain positions with identical elements to obtain respective deleted sub-encryption chains;
[0084] Obtaining the length of the sub-encryption chain, and determining the intercepted length of the sub-encryption chain according to the number of the sub-encryption chains;
[0085] According to the length of the intercepted sub-encryption chain, an intercepted sub-encryption chain of the same length is intercepted from the removed sub-encryption chain, and all the intercepted sub-encryption chains are combined to obtain the characteristic encryption chain.
[0086] Among them, the obtained sub-encryption chains are compared on the chain positions, and the elements in the same chain position with the same chain position are removed to obtain the eliminated sub-encryption chains after removing the same elements. The length to be intercepted from the eliminated sub-encryption chain is obtained according to the length of the sub-encryption chain and the number of added fusion feature encryption chains, and all the intercepted sub-encryption chains are spliced to obtain the feature encryption chain. For example, the sub-encryption chain is 16 bits and there are 4 sub-encryption chains in total. Then, 4 bits need to be extracted from each sub-encryption chain for fusion, for example, the first four bits or the last four bits of the sub-encryption chain are intercepted respectively, or four consecutive bits are randomly selected.
[0087] In summary, the data management method of the online resource library in the above embodiment of the present invention obtains the security level of the uploaded data to be uploaded to the online resource library, determines the target sub-resource library to which the uploaded data belongs from multiple sub-resource libraries according to the security level; obtains the uploaded data of the same security level in a preset time period, determines the target data group for encryption from the uploaded data according to the preset rules, and the target data group is composed of different types of data in the uploaded data; extracts each target data in the target data group, and extracts the characteristic attribute information of each target data, and encrypts them according to the characteristic attribute information to obtain multiple sub-encryption chains; determines the characteristic encryption chain according to the multiple sub-encryption chains according to the preset rules, adds the characteristic encryption chain to the header of the original encryption chain, and breaks the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain the data encryption chain; encrypts the uploaded data according to the data encryption chain and stores it in the target sub-resource library, divides the resource library into security levels, reduces the difficulty of unified high-complex encryption, and uses the unique characteristic information of the data itself to encrypt the data, thereby improving the security of the data in the resource library. The problem of low data security in the online resource library in the prior art is solved.
[0088] Embodiment 3
[0089] Please refer to FIG. 2, which shows the performance bonus distribution proposed in the third embodiment of the present invention.
[0090] A device for managing data in an online resource library, wherein the online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each sub-resource library of different security levels is configured with an original encryption chain, the device comprising:
[0091] The acquisition module 100 is used to acquire the security level of the uploaded data to be uploaded to the online resource library, and determine the target sub-resource library to which the uploaded data belongs from the multiple sub-resource libraries according to the security level;
[0092] A determination module 200 is used to obtain the uploaded data of the same security level in a preset time period, and determine a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data in the uploaded data;
[0093] The extraction module 300 is used to extract each target data in the target data group, extract the characteristic attribute information of each target data, and encrypt them according to the characteristic attribute information to obtain multiple sub-encryption chains;
[0094] An adding module 400 is used to determine a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule, add the characteristic encryption chain to the head of the original encryption chain, and break part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain;
[0095] The storage module 500 is used to encrypt and store the uploaded data in the target sub-resource library according to the data encryption chain.
[0096] Further, in some optional embodiments of the present invention, the target data includes pictures, texts, audios and videos, and the extraction module includes:
[0097] A first extraction unit, configured to preprocess the image when the target data is an image, and perform hashing on the preprocessed image using a preset hash algorithm to obtain an image hash value;
[0098] The acquisition device code of the image is obtained, and a picture encryption sequence is obtained according to the acquisition device code and the picture hash value, and the picture encryption sequence is encrypted according to a preset encryption algorithm to obtain a picture encryption chain.
[0099] Furthermore, in some optional embodiments of the present invention, the extraction module further includes:
[0100] A second extraction unit, for obtaining the number of bytes of the text and the subject name in the text when the target data is text;
[0101] A text encryption sequence is determined according to the subject name and the number of bytes in the text, and the text encryption sequence is encrypted according to a preset encryption algorithm to obtain a text encryption chain.
[0102] Furthermore, in some optional embodiments of the present invention, the extraction module further includes:
[0103] A third extraction unit, for obtaining a coding format, a sampling rate, and a playing time of the audio when the target data is audio;
[0104] An audio encryption sequence is determined according to the encoding format, sampling rate and playing time of the audio, and the audio encryption sequence is encrypted according to a preset encryption algorithm to obtain an audio encryption chain.
[0105] Furthermore, in some optional embodiments of the present invention, the extraction module further includes:
[0106] A fourth extraction unit, for obtaining a color space, a frame rate, and a playback duration of the video when the target data is a video;
[0107] A video encryption sequence is determined according to the color space, frame rate and playback duration of the video, and the video encryption sequence is encrypted according to a preset encryption algorithm to obtain a video encryption chain.
[0108] Further, in some optional embodiments of the present invention, the step of determining a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule includes:
[0109] Comparing the elements of each identical chain position of the plurality of sub-encryption chains, and deleting the chain positions with identical elements to obtain respective deleted sub-encryption chains;
[0110] Obtaining the length of the sub-encryption chain, and determining the intercepted length of the sub-encryption chain according to the number of the sub-encryption chains;
[0111] According to the length of the intercepted sub-encryption chain, an intercepted sub-encryption chain of the same length is intercepted from the removed sub-encryption chain, and all the intercepted sub-encryption chains are combined to obtain the characteristic encryption chain.
[0112] Further, in some optional embodiments of the present invention, the step of determining the target data group for encryption from the uploaded data according to a preset rule includes:
[0113] Determining the number of types of data types of the target data group according to the security level of the uploaded data;
[0114] According to the number of categories, corresponding category data is determined from the uploaded data, and target data is selected from the category data to form the target data group.
[0115] The functions or operation steps implemented when the above modules are executed are the same as those implemented in the above method.
[0116] The examples are basically the same and will not be repeated here.
[0117] Embodiment 4
[0118] Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above embodiments 1 to 2 are implemented.
[0119] Embodiment 5
[0120] Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the above-mentioned embodiments one to two when executing the program.
[0121] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0123] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0124] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0125] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0126] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A data management method for an online resource library, characterized in that: For managing data in an online resource library, the online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each sub-resource library of different security levels is configured with an original encryption chain, the method comprising: Acquire the security level of the uploaded data to be uploaded to the online resource library, and determine the target sub-resource library to which the uploaded data belongs from among the multiple sub-resource libraries according to the security level; Acquire the uploaded data of the same security level in a preset time period, and determine a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data from the uploaded data; Extracting each target data from the target data group respectively, and extracting characteristic attribute information of each target data respectively, and encrypting them respectively according to the characteristic attribute information to obtain multiple sub-encryption chains; Determine a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule, add the characteristic encryption chain to the head of the original encryption chain, and break part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain; Encrypting and storing the uploaded data in the target sub-resource library according to the data encryption chain; The step of determining a characteristic encryption chain according to the multiple sub-encryption chains according to a preset rule comprises: Comparing the elements of each identical chain position of the plurality of sub-encryption chains, and deleting the chain positions with identical elements to obtain respective deleted sub-encryption chains; Obtaining the length of the sub-encryption chain, and determining the intercepted length of the sub-encryption chain according to the number of the sub-encryption chains; According to the length of the intercepted sub-encryption chain, an intercepted sub-encryption chain of the same length is intercepted from the removed sub-encryption chain, and all the intercepted sub-encryption chains are combined to obtain the characteristic encryption chain.
2. The data management method of the online resource library according to claim 1, characterized in that: The target data includes pictures, texts, audios and videos. The steps of extracting each target data in the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains include: When the target data is a picture, preprocessing the picture, and performing hashing on the preprocessed picture using a preset hash algorithm to obtain a picture hash value; The acquisition device code of the image is obtained, and a picture encryption sequence is obtained according to the acquisition device code and the picture hash value, and the picture encryption sequence is encrypted according to a preset encryption algorithm to obtain a picture encryption chain.
3. The data management method of the online resource library according to claim 2, characterized in that: The step of extracting each target data from the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes: When the target data is text, obtaining the number of bytes of the text and the subject name in the text; A text encryption sequence is determined according to the subject name and the number of bytes in the text, and the text encryption sequence is encrypted according to a preset encryption algorithm to obtain a text encryption chain.
4. The data management method of the online resource library according to claim 3, characterized in that: The step of extracting each target data from the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes: When the target data is audio, obtaining the encoding format, sampling rate and playing time of the audio; An audio encryption sequence is determined according to the encoding format, sampling rate and playing time of the audio, and the audio encryption sequence is encrypted according to a preset encryption algorithm to obtain an audio encryption chain.
5. The data management method of the online resource library according to claim 4, characterized in that: The step of extracting each target data from the target data group, extracting characteristic attribute information of each target data, and encrypting them according to the characteristic attribute information to obtain multiple sub-encryption chains also includes: When the target data is a video, obtaining the color space, frame rate, and playback duration of the video; A video encryption sequence is determined according to the color space, frame rate and playback duration of the video, and the video encryption sequence is encrypted according to a preset encryption algorithm to obtain a video encryption chain.
6. The data management method for an online resource library according to any one of claims 1 to 5, characterized in that: The step of determining a target data group for encryption from the uploaded data according to a preset rule comprises: Determining the number of types of data types of the target data group according to the security level of the uploaded data; According to the number of categories, corresponding category data is determined from the uploaded data, and target data is selected from the category data to form the target data group.
7. A data management system for an online resource library, characterized in that: For managing data of an online resource library, the online resource library includes a plurality of sub-resource libraries divided according to data security levels, wherein each of the sub-resource libraries of different security levels is configured with an original encryption chain, and for implementing the data management method of the online resource library according to any one of claims 1 to 6, the system includes: An acquisition module, configured to acquire a security level of the uploaded data to be uploaded to the online resource library, and determine a target sub-resource library to which the uploaded data belongs from among the multiple sub-resource libraries according to the security level; a determination module, used for acquiring the uploaded data of the same security level in a preset time period, and determining a target data group for encryption from the uploaded data according to a preset rule, wherein the target data group is composed of different types of data in the uploaded data; An extraction module, used to extract each target data in the target data group, extract characteristic attribute information of each target data, and encrypt them according to the characteristic attribute information to obtain multiple sub-encryption chains; An adding module, configured to determine a characteristic encryption chain according to the plurality of sub-encryption chains according to a preset rule, add the characteristic encryption chain to the head of the original encryption chain, and break part of the tail of the original encryption chain according to the length of the characteristic encryption chain to obtain a data encryption chain; A storage module is used to encrypt and store the uploaded data in the target sub-resource library according to the data encryption chain.
8. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Industrial data tracking method and device based on block chain, equipment and medium
CN114547641A
FPE format retention encryption method and system based on SM4 cryptographic algorithm
CN116707765A
Data hierarchical encryption storage and desensitization query method, system, equipment and medium
CN117454422A