Internet-oriented data migration management method and device
By encrypting data in packets and using different encryption methods according to data categories, the problem of insufficient security during data migration in the prior art is solved, and high security transmission of data during migration is achieved.
Patent Information
- Application Number
- CN202411821839.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-01-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing data migration methods fail to effectively protect data security when transmitting data on the Internet, and there is a risk of data leakage and tampering.
Provide an Internet-oriented data migration management method, which uses different encryption methods to be encrypted by grouping data and adopts different encryption methods according to the data category, including specific encryption processing of video data, image data and non-relational database data to ensure that the data is in Security during migration.
It significantly reduces the risk of data being attacked and leaked during the migration process, greatly improves the security of data migration, and is suitable for data migration between local servers, cloud platforms and distributed systems.
Smart Images

Figure CN119316530A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of data processing, and in particular, to an Internet-oriented data migration management method, apparatus, device, and computer-readable storage medium. Background Art
[0002] In the existing data migration methods, the load status of the instances in the cluster is monitored in real time, and the concurrent processes of the migration process are adjusted according to the data volume of the migration task, aiming to achieve data migration without user perception.
[0003] However, in the above process, there is no setting for data security. When the migration data is transmitted on the Internet, there is a risk of data leakage and tampering. Summary of the invention
[0004] According to the embodiments of the present application, a data migration management solution for the Internet is provided, which can encrypt data during the migration process and perform different encryption methods for different types of data, thereby effectively reducing the risk of data being acquired or leaked during the migration process, realizing encrypted data migration between local servers, cloud platforms, and distributed systems, and greatly improving the security of data migration.
[0005] In a first aspect of the present application, a data migration management method for the Internet is provided. The method comprises: Get the data to be migrated; The data to be migrated are grouped and encrypted according to the category of each group of data, including: If the data category is video data, encrypting the video data using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method; Send the encrypted data to the target cluster.
[0006] In a possible implementation manner, grouping the data to be migrated includes: Group based on time series and / or data categories.
[0007] In a possible implementation manner, encrypting the video data in a first encryption manner includes: In the constructed ciphertext image, read in the video frame by frame; Convert the input video frame into YUV format and separate the components; Embedding information in the first component to obtain an image of the second component containing the hidden information; Based on the first component and the second component, the three YUV channels are merged and converted into the original RGB format and output to the video file, thereby completing the encryption of the video data.
[0008] In a possible implementation, embedding information in the first component to obtain an image of the second component containing the hidden information includes: Divide the first component into image blocks; After the block division is completed, DCT transformation is performed to generate a matrix; Embedding information into intermediate frequency coefficients of the matrix; After embedding the information, an inverse DCT transform is performed to obtain an image of the second component containing the hidden information.
[0009] In a possible implementation, if the data category is image data, encrypting the image data using the second encryption method includes: Based on the image data, determining a plaintext image and an auxiliary encrypted image; Converting the plaintext image and the auxiliary encrypted image into two-dimensional matrices respectively; Based on the corresponding positions of the two-dimensional matrices of the two images, an XOR operation is performed to obtain a mixed image; The mixed image is subjected to diffusion and association scrambling processing to complete encryption of the image data.
[0010] In a possible implementation, the corresponding positions of the two-dimensional matrices of the two images include: The same position in the two-dimensional matrix of the two images, the position with the same number of rows + N and the same number of columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, the position with the same number of rows and + N columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, and / or the position with the number of rows + N and the number of columns + N in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image; wherein N is a positive integer.
[0011] In a possible implementation, the performing diffusion and associated scrambling processing on the mixed image to complete encryption of the image data includes: Generate random matrix for diffusion; Based on the random matrix for diffusion, the mixed image is diffused once, including: Based on the order from left to right and from top to bottom, the pixel value of each pixel point in the mixed image is XORed with the pixel value of the corresponding position of the random matrix for diffusion, so as to complete a diffusion of the mixed image; The image after the first diffusion is subjected to wavelet transform and then to secondary diffusion to obtain the final encrypted image.
[0012] In a second aspect of the present application, a data migration management device for the Internet is provided. The device comprises: An acquisition module is used to acquire data to be migrated; The encryption module is used to group the data to be migrated and encrypt each group of data according to the category of each group of data, including: If the data category is video data, encrypting the video data using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method; The migration module is used to send the encrypted data to the target cluster.
[0013] In a third aspect of the present application, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.
[0014] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present application is implemented.
[0015] The Internet-oriented data migration management method provided in the embodiment of the present application obtains the data to be migrated; groups the data to be migrated, and encrypts them separately according to the category of each group of data, including: if the data category is video data, encrypting the video data by a first encryption method; if the data category is image data, encrypting the image data by a second encryption method; if the data category is non-relational database data, converting the non-relational database data into JSON data in TXT format; converting the JSON data in TXT format into image data in picture mode; encrypting the image data by a second encryption method; and sending the encrypted data to the target cluster end, thereby greatly improving the security of data migration.
[0016] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein: Figure 1 is a flow chart of an Internet-oriented data migration management method according to an embodiment of the present application; Figure 2 is a block diagram of an Internet-oriented data migration management device according to an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of a terminal device or a server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0019] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0020] Figure 1 A flow chart of an Internet-oriented data migration management method according to an embodiment of the present disclosure is shown. The method comprises: S110: Acquire data to be migrated.
[0021] In some embodiments, tasks can be created based on user configuration, data to be migrated can be read from the source cluster, data integrity can be checked, the decrypted and restored data can be written to the target cluster, performance monitoring can be performed at the same time, and the migration strategy can be adjusted based on the monitoring data.
[0022] Specifically, the performance of each instance in the target cluster is obtained, and an instance is selected to perform the migration task based on the task requirements and the instance performance; the instance performance includes: instance CPU utilization, instance memory utilization, instance hard disk read speed, instance hard disk write speed, instance network uplink speed and / or instance network downlink speed and other indicators.
[0023] Define the total instance performance index = A*CPU utilization of the instance + B*memory utilization of the instance + C*disk read speed of the instance / maximum disk read speed + D*disk write speed of the instance / maximum disk write speed + E*network uplink speed of the instance + F*network downlink speed of the instance, where ABCDEF are the corresponding weights, which can be configured as required.
[0024] The idler instances can be used to execute more complex tasks, that is, the idler instances are used to execute tasks that involve migrating larger amounts of data.
[0025] In some embodiments, the status of the source cluster and the target cluster can be queried. When the number of clusters is small, the status of all clusters is sent to an instance of one cluster for statistics; when the number of clusters is large, the status of all clusters is recursively uploaded one by one.
[0026] The state of the cluster may include an idle state, a migration in progress state, and / or a migration paused state.
[0027] In some embodiments, duplicate data in the data to be migrated can be deleted, including: dividing the data file into blocks; calculating the simhash value and SHA-1 value of each data block; performing double clustering based on simhash; using the fingerprint of the data to complete the duplicate data deletion during the clustering process; and finally using the clustering results and the index of this article to complete the mapping.
[0028] Furthermore, the Hamming distance can be used to determine the similarity of the data block content and complete the clustering operation, and to perform detection and duplicate data deletion in the cluster corresponding to the data block.
[0029] To effectively reclaim the storage space in the source cluster, you can use the following two methods to perform migration and deletion: (1) Each time a portion of data (i.e., the preset capacity) is migrated, the corresponding data in the source cluster is deleted; (2) Migrate all data at once and then delete the data in the source cluster.
[0030] In some embodiments, the migrated data can be checked for integrity. Specifically, before migration, the storage module traverses all resource files in the data to be migrated and calculates the corresponding MD5 values; all MD5 values are integrated and saved in an XML file as a standard MD5 value; after migration to the target cluster, the storage module calculates the MD5 value after the data migration is completed and compares it with the standard MD5 value. If the two are the same, the data is considered complete.
[0031] S120, grouping the data to be migrated, and encrypting each group of data separately according to the category of each group of data.
[0032] In some embodiments, the data to be migrated may be grouped based on time series and / or data categories. For different data categories, an applicable encryption algorithm is respectively called to perform encryption.
[0033] If the data category is video data, the video data is encrypted using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method.
[0034] Specifically, if the data to be migrated is video data, it can be encrypted in the following manner: Generate a ciphertext image: Construct an initial ciphertext image (the image is a binary image with only two states of 0 / 255); preferably, randomly select 0 / 255 for each pixel in the initial ciphertext image.
[0035] The initial ciphertext image is divided into 8×8 blocks and then scrambled, and the initial ciphertext image is positionally scrambled according to a pseudo-random sequence to generate the final ciphertext image; Embed video carrier: Based on the final ciphertext image, the video is read in frame by frame, and the read video frames are converted into a YUV format and the components are separated.
[0036] Embed information in the brightness Y component, divide the Y component into 8*8 image blocks and perform DCT transformation to generate a matrix; embed information in the intermediate frequency coefficients of the matrix; perform inverse DCT transformation after embedding the information to obtain a Y component image containing hidden information; merge the three YUV channels and convert them into the original RGB format, output them to a video file, and obtain a video file.
[0037] The process of embedding information is as follows: Set the embedding strength. If the embedded pixel is 255, the embedding strength is a positive value. If the embedded pixel is 0, the embedding strength is a negative value.
[0038] After the DCT transform is performed on the image, the low-frequency area holds most of the details of the image, concentrated in the upper left corner of the image, and the high-frequency area holds the edge information of the image, concentrated in the lower right corner of the image. Using the DCT transform, the energy of the embedded image signal can be reasonably allocated to the transform while satisfying transparency.
[0039] If the data to be migrated is image data, it can be encrypted in the following way: If the data to be migrated is text data, the text data can be converted into image data in picture mode before encryption. That is, for text data such as EXCEL, PDF, TXT, etc., it can be converted into picture mode first, and then encrypted using the encryption method of image data. If the data to be migrated is relational database data, the relational database data can be converted into a SQL script in TXT format first, and then converted into image data in picture mode, and then encrypted after the conversion is completed; that is, for relational database data, such as Mysql, Oracle, Microsoft SQL Server, PostgreSQL, the data can be converted into a SQL script in TXT format, converted into picture mode as text data, and then encrypted using the encryption method of image data; If the data to be migrated is non-relational database data, the non-relational database data can be first converted into JSON data in TXT format, and then converted into image data in picture mode, and then encrypted after the conversion is completed; that is, for non-relational database data, such as MongoDB, Redis, and HBase, the data can be converted into JSON data in TXT format, and as text data, it can be first converted into picture mode, and then encrypted using the encryption method for image data.
[0040] Specifically, a plaintext image and an auxiliary encrypted image are selected from the image data, and the plaintext image and the auxiliary encrypted image are mixed once; diffusion and associated scrambling processing are performed on the mixed image to obtain an encrypted image.
[0041] The method of selecting the plaintext image and the auxiliary encrypted image includes traversing the image, selecting the plaintext image, and using the next image of the plaintext image as the auxiliary encrypted image.
[0042] The specific steps of mixing the plaintext image and the auxiliary encrypted image include: The plaintext image and the auxiliary encrypted image are respectively converted into two-dimensional matrices; based on the corresponding positions of the two-dimensional matrices of the two images, an XOR operation is performed to generate new pixel values at each position to obtain a mixed image.
[0043] Among them, the specific steps of XOR operation mixing are: ⑴. For the two-dimensional matrix of the plaintext image, perform an XOR operation on the pixel value of the point P(i, j) on the i-th row (i=1,3,5,…,N) and the j-th column (j=1,3,5,…,N) with the pixel value at the same position in the two-dimensional matrix of the auxiliary encrypted image to obtain a new pixel value; ⑵、For the two-dimensional matrix of the plaintext image, the pixel value of the point P(i, j) on the i-th row (i=1,3,5,…, Nodd) and the j-th column (j=2,4,6,…, Meven) is XORed with the pixel value at the position with the same number of rows + 1 and columns in the two-dimensional matrix of the auxiliary encrypted image to obtain a new pixel value; Nodd is the largest odd row of the two-dimensional matrix of the plaintext image, and Meven is the largest even column of the two-dimensional matrix of the plaintext image; ⑶. For the two-dimensional matrix of the plaintext image, perform an XOR operation on the pixel value of the point P(i, j) on the i-th row (i=2,4,6,…,Neven) and the j-th column (j=1,3,5,…,Modd) with the pixel value at the position with the same row number and column number +1 in the two-dimensional matrix of the auxiliary encrypted image to obtain a new pixel value; Neven is the largest even-numbered row of the two-dimensional matrix of the plaintext image, and Modd is the largest odd-numbered column of the two-dimensional matrix of the plaintext image; (4) For the two-dimensional matrix of the plaintext image, the pixel value of the point P(i, j) on the i-th row (i=2,4,6,…, N even) and the j-th column (j=2,4,6,…, M even) is XORed with the pixel value at the position where the row number +1 and the column number +1 in the two-dimensional matrix of the auxiliary encrypted image to obtain a new pixel value.
[0044] That is, the corresponding positions of the two-dimensional matrices of the two images include: The same position of the two-dimensional matrix of the two images, the position with the same number of rows + N and the same number of columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, the position with the same number of rows and + N columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, and / or the position with the number of rows + N and the number of columns + N in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image; wherein N is a positive integer; preferably, N is equal to 1.
[0045] The mixed image is diffused and associated with the scrambled image to obtain the encrypted image, which specifically includes: Generate random matrix for diffusion; Based on the random matrix for diffusion, the mixed image is diffused once, including: Based on the order from left to right and from top to bottom, the pixel value of each pixel point in the mixed image is XORed with the pixel value of the corresponding position of the random matrix for diffusion, so as to complete a diffusion of the mixed image; The image after the first diffusion is subjected to wavelet transform and then to secondary diffusion to obtain the final encrypted image.
[0046] Specifically, generate a random matrix for diffusion: Calculate the sum of the pixel values of the auxiliary encrypted image as the initial value; substitute it into the chaotic system to generate a chaotic sequence with a length matching the image, and then convert the chaotic sequence into a random matrix for diffusion according to the size requirement.
[0047] Diffusion-based first diffusion of the mixed image using a random matrix: The pixel value of each pixel point in the mixed image can be XORed with the pixel value of the corresponding position of the random matrix for diffusion in order from left to right and from top to bottom to obtain the image after the first diffusion.
[0048] Transform the image after the first diffusion: By using integer wavelet transform, the original image is transformed from the spatial domain to the integer wavelet domain for sparse representation, and the diluted image is obtained.
[0049] Furthermore, in order to enhance the sparse characteristics, the pixel points in the sparse image whose values are less than the threshold value can be set to 0.
[0050] The second diffusion process can be carried out in the same manner as the first diffusion process, and will not be described in detail here.
[0051] S130, sending the encrypted data to the target cluster end.
[0052] In some embodiments, the encrypted data is sent to the target cluster end, and the migrated data is decrypted through a decryption process corresponding to the encryption process to complete the migration of the data.
[0053] According to the embodiments of the present disclosure, the following technical effects are achieved: The migration strategy can be adjusted according to the instance status to improve migration efficiency. During the migration process, different data is encrypted in different ways, and not all types of data use a single encryption method, which improves data security. Furthermore, by adding migration task planning, duplicate data comparison and deletion, and data integrity verification capabilities, the migration method can meet the needs of more application scenarios.
[0054] In summary, the present disclosure introduces data encryption during the migration process and performs different encryption methods for different types of data, thereby reducing the risk of data being acquired or leaked during the migration process and improving security. The disclosure can be widely used in the following scenarios: 1. Migrate the relational database Mysql data from the cloud to the local computer room; 2. Migrate the non-relational database Redis data from the cloud to the local computer room; 3. Video, image, EXCEL, PDF, and TXT format file data are migrated from the cloud to the local computer room.
[0055] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0056] The above is an introduction to the method embodiment. The following is a further explanation of the scheme described in this application through an apparatus embodiment.
[0057] Figure 2 FIG. 4 shows a block diagram of an Internet-oriented data migration management device according to an embodiment of the present application, as shown in FIG. Figure 2 Shown include: An acquisition module 210 is used to acquire data to be migrated; The encryption module 220 is used to group the data to be migrated and encrypt each group of data according to the category of each group of data, including: If the data category is video data, encrypting the video data using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method; The migration module 230 is used to send the encrypted data to the target cluster end.
[0058] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0059] Figure 3 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.
[0060] like Figure 3As shown, the terminal device or server includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 into the random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the terminal device or server are also stored. The CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0061] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
[0062] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 309, and / or installed from the removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, the above-mentioned functions defined in the system of the present application are executed.
[0063] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0064] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0065] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.
[0066] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application.
[0067] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.
Claims
1. A data migration management method for the Internet, characterized in that: include: Get the data to be migrated; The data to be migrated are grouped and encrypted according to the category of each group of data, including: If the data category is video data, encrypting the video data using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method; Send the encrypted data to the target cluster.
2. The method according to claim 1, characterized in that The grouping of the data to be migrated includes: Group based on time series and / or data categories.
3. The method according to claim 1, characterized in that The adopting the first encryption method to encrypt the video data comprises: In the constructed ciphertext image, read in the video frame by frame; Convert the input video frame into YUV format and separate the components; Embedding information in the first component to obtain an image of the second component containing the hidden information; Based on the first component and the second component, the three YUV channels are merged and converted into the original RGB format and output to the video file, thereby completing the encryption of the video data.
4. The method according to claim 3, characterized in that The embedding of information in the first component to obtain an image of a second component containing hidden information comprises: Divide the first component into image blocks; After the block division is completed, DCT transformation is performed to generate a matrix; Embedding information into intermediate frequency coefficients of the matrix; After embedding the information, an inverse DCT transform is performed to obtain an image of the second component containing the hidden information.
5. The method according to claim 1, characterized in that If the data category is image data, encrypting the image data using a second encryption method includes: Based on the image data, determining a plaintext image and an auxiliary encrypted image; Converting the plaintext image and the auxiliary encrypted image into two-dimensional matrices respectively; Based on the corresponding positions of the two-dimensional matrices of the two images, an XOR operation is performed to obtain a mixed image; The mixed image is subjected to diffusion and association scrambling processing to complete encryption of the image data.
6. The method according to claim 5, characterized in that The corresponding positions of the two-dimensional matrices of the two images include: The same position in the two-dimensional matrix of the two images, the position with the same number of rows + N and the same number of columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, the position with the same number of rows and + N columns in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image, and / or the position with the number of rows + N and the number of columns + N in the two-dimensional matrix of the plaintext image and the auxiliary encrypted image; wherein N is a positive integer.
7. The method according to claim 6, characterized in that The diffusion and association scrambling processing of the mixed image to complete the encryption of the image data includes: Generate random matrix for diffusion; Based on the random matrix for diffusion, the mixed image is diffused once, including: Based on the order from left to right and from top to bottom, the pixel value of each pixel point in the mixed image is XORed with the pixel value of the corresponding position of the random matrix for diffusion, so as to complete a diffusion of the mixed image; The image after the first diffusion is subjected to wavelet transform and then to secondary diffusion to obtain the final encrypted image.
8. A data migration management device for the Internet, characterized in that: include: An acquisition module is used to acquire data to be migrated; The encryption module is used to group the data to be migrated and encrypt each group of data according to the category of each group of data, including: If the data category is video data, encrypting the video data using a first encryption method; If the data category is image data, encrypting the image data using a second encryption method; If the data category is non-relational database data, the non-relational database data is converted into JSON data in TXT format; the JSON data in TXT format is converted into image data in picture mode; and the image data is encrypted using a second encryption method; The migration module is used to send the encrypted data to the target cluster.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for digital video image copyright protection based on watermarks and encryption
CN102547254A
Data migration method and mobile terminal
CN106571980A
Medical data processing method and system, electronic equipment and medium
CN115495787A
Medical data sharing method and device based on block chain, equipment and storage medium
CN117409914A
Securing user-entered text in-transit
US10733325B1