User data processing method and system, electronic device, and storage medium

By slicing multidimensional user data into two-dimensional matrices and performing DNA encoding and operations, combined with a chaotic scrambling algorithm, the problems of low efficiency and insufficient security of traditional data encryption are solved, achieving efficient and secure multidimensional user data processing.

CN116680720BActive Publication Date: 2026-03-24GU YUAN (SHANGHAI) CULTURE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional data encryption technologies are inefficient and lack sufficient security for multi-dimensional user data, and cannot effectively protect user privacy.

Method used

By transforming multidimensional user data into multiple two-dimensional matrices, using DNA encoding technology to encode and operate on the two-dimensional matrices to generate a second DNA encoding matrix, and then encrypting the DNA mask matrix using a chaotic scrambling algorithm, secure data storage and restoration are achieved.

Benefits of technology

It improves the encryption efficiency of multidimensional user data, enhances data security, broadens the application scenarios of DNA encoding technology, and can effectively hide and protect multidimensional user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680720B_ABST
    Figure CN116680720B_ABST
Patent Text Reader

Abstract

The application discloses a user data processing method and system, an electronic device and a storage medium, and comprises the following steps: acquiring first user data of multiple data dimensions of a target user, and generating multi-dimensional user data according to the data dimensions and the first user data; generating a first multi-dimensional matrix according to the multi-dimensional user data, and performing slice processing on the first multi-dimensional matrix to obtain multiple two-dimensional matrices of a target data dimension; performing DNA coding on each two-dimensional matrix according to a preset DNA coding rule to obtain a first DNA coding matrix and a corresponding coding bit number matrix; selecting a corresponding DNA mask matrix according to the coding bit number matrix, and performing DNA operation on the DNA mask matrix and the first DNA coding matrix to obtain a second DNA coding matrix; generating a second multi-dimensional matrix according to the target data dimension and the second DNA coding matrix, and storing the second multi-dimensional matrix. The application improves the encryption efficiency of multi-dimensional user data, enhances the security of user data, and can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a user data processing method and system, electronic device and storage medium. Background Technology

[0002] In the internet age, user data often involves multiple data dimensions, has a complex structure, and involves user privacy, requiring encryption protection. Traditional data encryption technologies are inefficient for multi-dimensional user data and rely heavily on system computing power. Therefore, there is an urgent need for an efficient and secure data processing method to encrypt multi-dimensional user data. Summary of the Invention

[0003] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0004] Therefore, one objective of this invention is to provide a user data processing method that improves the encryption efficiency of multi-dimensional user data and enhances the security of user data.

[0005] Another objective of this invention is to provide a user data processing system.

[0006] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of the present invention include:

[0007] In a first aspect, embodiments of the present invention provide a user data processing method, comprising the following steps:

[0008] Obtain first user data of multiple data dimensions of the target user, and generate multidimensional user data based on the data dimensions and the first user data;

[0009] A first multidimensional matrix is ​​generated based on the multidimensional user data, and the first multidimensional matrix is ​​sliced ​​to obtain multiple two-dimensional matrices of the target data dimension.

[0010] DNA encoding is performed on each of the two-dimensional matrices according to the preset DNA encoding rules to obtain the first DNA encoding matrix and the corresponding encoding bit matrix;

[0011] Select the corresponding DNA mask matrix based on the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix;

[0012] A second multidimensional matrix is ​​generated based on the target data dimension and the second DNA coding matrix, and the second multidimensional matrix is ​​stored.

[0013] Furthermore, in one embodiment of the present invention, the step of acquiring first user data of multiple data dimensions of the target user and generating multidimensional user data based on the data dimensions and the first user data specifically includes:

[0014] Obtain first user data, which includes multiple data values ​​and corresponding dimension value labels, wherein the dimension value labels include dimension values ​​of multiple data dimensions;

[0015] Multiple data dimensions of the first user data are determined based on the dimension value labels, and then multiple dimension axes of the first user data are constructed based on the data dimensions.

[0016] Based on the dimension values, the coordinates of the corresponding data values ​​on each dimension axis are determined to obtain the multidimensional user data.

[0017] Furthermore, in one embodiment of the present invention, the step of generating a first multidimensional matrix based on the multidimensional user data and slicing the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension specifically includes:

[0018] Based on the data values ​​of the multidimensional user data, the first matrix element at the corresponding position in the first multidimensional matrix is ​​determined to obtain the first multidimensional matrix;

[0019] Several preset target data dimensions are obtained, and the first multidimensional matrix is ​​sliced ​​several times according to the target data dimensions to obtain multiple two-dimensional matrices.

[0020] Furthermore, in one embodiment of the present invention, the step of encoding each of the two-dimensional matrices according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding coding bit matrix specifically includes:

[0021] Determine the first matrix element at each position in the two-dimensional matrix;

[0022] For each element of the first matrix in the two-dimensional matrix, each element is converted into a binary number, and the binary number is split to obtain multiple two-bit binary numbers, thereby generating a first binary number matrix;

[0023] For each two-bit binary number in the first binary number matrix, each two-bit binary number is converted into a corresponding encoded value according to the DNA encoding rule to generate the first DNA encoding matrix;

[0024] The number of bits for encoding the first matrix element is determined based on the number of two-bit binary numbers corresponding to the first matrix element, and the encoding bit matrix is ​​generated based on the number of bits for encoding.

[0025] Furthermore, in one embodiment of the present invention, the step of selecting a corresponding DNA mask matrix based on the coding bit matrix and performing DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain a second DNA coding matrix specifically includes:

[0026] A corresponding DNA mask matrix is ​​selected based on the coding bit matrix. The number of rows in the DNA mask matrix is ​​the same as the number of rows in the coding bit matrix, and the number of columns in the DNA mask matrix is ​​the same as the number of columns in the coding bit matrix. The DNA mask matrix includes multiple second matrix elements, each of which is composed of a number of coding values ​​arranged in order. The number of coding values ​​in the second matrix elements corresponds one-to-one with the coding bits in the coding bit matrix.

[0027] The second matrix element in the DNA mask matrix is ​​replaced with the corresponding coding value sequence, and the filling process is performed according to the preset filling coding value to obtain the third DNA coding matrix;

[0028] DNA operations are performed on the encoded values ​​at each position in the first DNA coding matrix and the corresponding encoded values ​​at the third DNA coding matrix to obtain DNA operation values, and the second DNA coding matrix is ​​generated based on the DNA operation values.

[0029] The DNA operations include at least one of DNA addition, DNA subtraction, and DNA XOR operations.

[0030] Furthermore, in one embodiment of the present invention, the step of generating a second multidimensional matrix based on the target data dimension and the second DNA coding matrix specifically comprises:

[0031] The second DNA coding matrix is ​​stacked several times according to the target data dimension to generate the second multidimensional matrix.

[0032] Furthermore, in one embodiment of the present invention, the user data processing method further includes the following steps:

[0033] The matrix elements in the DNA mask matrix are scrambled using a chaotic scrambling algorithm to obtain an encrypted mask matrix, which is then stored.

[0034] Secondly, embodiments of the present invention provide a user data processing system, including:

[0035] A multidimensional user data generation module is used to acquire first user data of multiple data dimensions of a target user, and generate multidimensional user data based on the data dimensions and the first user data.

[0036] The slicing module is used to generate a first multidimensional matrix based on the multidimensional user data, and to slice the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension.

[0037] The DNA encoding module is used to encode each of the two-dimensional matrices according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding encoding bit matrix.

[0038] The DNA operation module is used to select the corresponding DNA mask matrix according to the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix;

[0039] The second multidimensional matrix generation module is used to generate a second multidimensional matrix based on the target data dimension and the second DNA coding matrix, and to store the second multidimensional matrix.

[0040] Thirdly, embodiments of the present invention provide an electronic device, the electronic device including a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing communication between the processor and the memory, wherein the program, when executed by the processor, implements the user data processing method as described in the first aspect above.

[0041] Fourthly, embodiments of the present invention also provide a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the user data processing method as described in the first aspect above.

[0042] The advantages and beneficial effects of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention:

[0043] This invention acquires first user data of multiple data dimensions of a target user, generates multidimensional user data based on the data dimensions and the first user data, generates a first multidimensional matrix based on the multidimensional user data, slices the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimensions, performs DNA encoding on each two-dimensional matrix according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding encoding bit matrix, selects a corresponding DNA mask matrix based on the encoding bit matrix, performs DNA operations on the DNA mask matrix and the first DNA encoding matrix to obtain a second DNA encoding matrix, and then generates a second multidimensional matrix based on the target data dimensions and the second DNA encoding matrix, and stores the second multidimensional matrix. This invention transforms multidimensional user data into multiple two-dimensional matrices through slicing, reducing the complexity of multidimensional user data processing and improving data processing efficiency. It utilizes DNA encoding technology to perform DNA encoding and DNA operations on the two-dimensional matrices to obtain a second DNA encoding matrix, which effectively hides the original user data. Furthermore, the data can be restored using corresponding DNA encoding rules and DNA mask matrices, enhancing user data security. By generating an encoding bit matrix, it overcomes the limitation of traditional DNA encoding technology, which can only be used for encrypting two-dimensional image pixel values. It enables DNA encoding and DNA operations on multidimensional user data with high data values, broadening the application scenarios of DNA encoding technology. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart of the steps of a user data processing method provided in an embodiment of the present invention;

[0046] Figure 2 A flowchart of step S101 provided in an embodiment of the present invention;

[0047] Figure 3 A flowchart of step S102 provided in an embodiment of the present invention;

[0048] Figure 4 A flowchart of step S103 provided in an embodiment of the present invention;

[0049] Figure 5 A flowchart of step S104 provided in an embodiment of the present invention;

[0050] Figure 6 A flowchart of step S105 provided in an embodiment of the present invention;

[0051] Figure 7 Another flowchart of the user data processing method provided in this embodiment of the invention;

[0052] Figure 8 This is a schematic diagram of the structure of a user data processing system provided in an embodiment of the present invention;

[0053] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0054] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. It should be noted that although functional modules are divided in the system schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system schematic diagram or the order in the flowchart. The step numbers in the following embodiments are only set for ease of explanation and do not limit the order between steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0055] In the description of this invention, "multiple" means two or more. The use of "first" and "second" is for distinguishing technical features only and should not be construed as indicating or implying relative importance, the number of indicated technical features, or the order of the indicated technical features. Furthermore, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0056] The user data processing method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the user data processing method, but is not limited to the above forms.

[0057] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0058] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards of the relevant countries and regions. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data for the proper functioning of the embodiments of this application obtained.

[0059] In some optional embodiments, different recommendation content libraries can be established for different user groups. For example, for teenagers, to help them establish correct worldviews, outlooks on life, and values, the recommendation content library may include social sciences, humanities and history, literary works, philosophy of life, etc.; for university students, the recommendation content library may include movies, sports news, science and technology journals, immersive scenario game experiences, plot creative designs, etc.; for middle-aged people, the recommendation content library may include investment and financial management, home products, emotional problem counseling, emotion management courses, children's education, etc. It should be noted that the above content is only an example illustrating a specific implementation scenario of the recommendation content library of the present invention and should not be considered as a limitation of the present invention. In specific implementations, the construction of the recommendation content library can be carried out according to the actual situation.

[0060] like Figure 1 The diagram shown is a flowchart of a user data processing method provided in an embodiment of the present invention. (Refer to...) Figure 1 This invention provides a user data processing method, which specifically includes the following steps:

[0061] S101. Obtain first user data for multiple data dimensions of the target user, and generate multidimensional user data based on the data dimensions and the first user data.

[0062] Specifically, taking the consumption data of a target user for a specific product in a specific region within a certain time period as an example, this consumption data involves three data dimensions: time, region, and product, as well as the data values ​​of the consumption data. If traditional data storage methods are used, it is necessary to separately construct labels for the three data dimensions of time, region, and product to identify and store the data values, resulting in a complex data structure that is not conducive to the statistical analysis and retrieval of user data. This embodiment of the invention generates multidimensional user data based on the data dimensions of user data. This multidimensional user data can be used for the statistical analysis and retrieval of user data.

[0063] In some optional embodiments, different data dimensions can be established for different user groups. Taking consumption data as an example, for teenagers, to help them establish correct worldviews, values, and outlooks on life, multiple data dimensions for extracurricular reading materials can be established, including social sciences, humanities and history, literary works, and philosophical works. For university students, multiple data dimensions for consumer products can be established, including movies, sports news, science and technology journals, immersive scenario game experiences, and plot creative designs. For middle-aged people, multiple data dimensions for consumer services can be established, including investment and financial management, home furnishing products, emotional problem counseling, emotional management courses, and children's education. It should be noted that the above content is only used as an example to illustrate specific implementation scenarios of data dimensions in the embodiments of the present invention and should not be considered as a limitation of the embodiments of the present invention. In specific implementations, the selection of data dimensions can be diversified according to the actual situation.

[0064] Reference Figure 2 As an optional implementation, the step of acquiring first user data with multiple data dimensions of the target user and generating multidimensional user data based on the data dimensions and the first user data specifically includes:

[0065] S1011. Obtain the first user data, which includes multiple data values ​​and corresponding dimension value labels. The dimension value labels include the dimension values ​​of multiple data dimensions.

[0066] S1012. Determine multiple data dimensions of the first user data based on the dimension value labels, and then construct multiple dimension axes of the first user data based on the data dimensions.

[0067] S1013. Determine the coordinates of the corresponding data values ​​on each dimension axis based on the dimension values ​​to obtain multidimensional user data.

[0068] Specifically, taking the consumption data of a target user for a specific product in a specific region within a certain time period as an example, such as "the consumption amount for clothing products in Region 1 in March was 3500", the corresponding data value is 3500, and the corresponding dimension value labels are March, Region 1, and clothing products. In this way, we can determine the multiple data dimensions of this consumption data as time, region, and product. Then, we construct the dimension axes for time, region, and product respectively, and mark the dimension values ​​on the dimension axes one by one according to the dimension labels of all consumption data. Then, we determine the coordinates of the corresponding data value on each dimension axis according to the dimension value label of each consumption data. For example, in "the consumption amount for clothing products in Region 1 in March was 3500", the coordinate of the data value 3500 on the time dimension axis is March, the coordinate on the region dimension axis is Region 1, and the coordinate on the product dimension axis is clothing products, thus obtaining multi-dimensional user data (three-dimensional data in this example).

[0069] It is understandable that the user consumption data in the above example only has three dimensions. However, the implementation of this embodiment of the invention does not rely on a visualized three-dimensional graphical structure. Even when faced with user data with more dimensions, multidimensional data can still be generated according to the method provided in this embodiment of the invention. For example, in the above example, if the username of the target user is added as a new data dimension, then the user consumption data of multiple different users can generate four-dimensional multidimensional user data.

[0070] S102. Generate a first multidimensional matrix based on the multidimensional user data, and slice the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension.

[0071] Reference Figure 3 As an optional implementation, the step of generating a first multidimensional matrix based on multidimensional user data and slicing the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension specifically includes:

[0072] S1021. Determine the first matrix element at the corresponding position in the first multidimensional matrix based on the data values ​​of the multidimensional user data, and obtain the first multidimensional matrix.

[0073] S1022. Obtain several preset target data dimensions, and perform several slice operations on the first multidimensional matrix according to the target data dimensions to obtain multiple two-dimensional matrices.

[0074] Specifically, the data space of multidimensional user data contains data values ​​corresponding to different dimension value labels. By converting the data values ​​into matrix elements at the corresponding positions according to the position in the data space, the corresponding first multidimensional matrix can be generated. This first multidimensional matrix is ​​the matrix representation of the multidimensional user data.

[0075] In this embodiment of the invention, the slicing of a multidimensional matrix is ​​essentially the process of cutting the multidimensional matrix along a certain data dimension. Taking the multidimensional matrix with the three data dimensions of time, region, and product as an example, when the target data dimension is region, the multidimensional matrix slices corresponding to region one, region two, region three, etc. are cut in sequence. Since the internal data of these multidimensional matrix slices are consistent in the region dimension, the result is a two-dimensional matrix of the corresponding region.

[0076] It's understandable that the multidimensional matrix in the example above is a three-dimensional matrix. Therefore, only one target data dimension needs to be set to complete the slicing process and obtain multiple two-dimensional matrices. However, for multidimensional matrices with higher dimensions, more target data dimensions need to be set to perform slicing sequentially. Each target data dimension can be used to reduce the dimensionality of the multidimensional matrix once, until it is reduced to a two-dimensional matrix. For example, taking a multidimensional matrix with four data dimensions—user, time, region, and product—as an example, the target data dimensions can be set to user and region. First, three-dimensional matrix slices corresponding to user one, user two, user three, etc., can be extracted sequentially. Then, for each user, two-dimensional matrix slices corresponding to region one, region two, region three, etc., can be extracted sequentially.

[0077] It should be noted that the target data dimension can be set according to the data statistics requirements, and the embodiments of the present invention do not limit this.

[0078] S103. Perform DNA encoding on each two-dimensional matrix according to the preset DNA encoding rules to obtain the first DNA encoding matrix and the corresponding encoding bit matrix.

[0079] Specifically, DNA is composed of four bases: adenine (A), guanine (G), cytosine (C), and thymine (T). A and T are complementary, as are G and C. Similarly, the binary numbers 0 and 1 are complementary. Therefore, in DNA coding, 00, 01, 10, and 11 can be used to represent the four bases (i.e., the coding values), resulting in a total of 4! = 24 coding schemes. Based on the complementarity rules of DNA bases, there are eight valid coding schemes, as shown in Table 1 below.

[0080]

[0081] Table 1

[0082] In this embodiment of the invention, one DNA encoding rule can be randomly selected from the encoding rules corresponding to these eight encoding methods for DNA encoding of the two-dimensional matrix. After determining the selected encoding rule, it is necessary to identify the selected encoding rule, as shown in the encoding method identification in the table above.

[0083] Traditional DNA encoding technology is mostly used in image encryption because the pixel values ​​of grayscale images are all within the integer range of 0-255. A decimal pixel value can be converted into an eight-bit binary number. Then, according to the selected DNA encoding rules, the eight-bit binary number is converted into four DNA encoding values, so that the pixel value of each pixel in the image information can be represented in the form of a matrix of DNA encoding values.

[0084] In this embodiment of the invention, DNA encoding technology is applied to user data. Taking the consumption data "the consumption amount of clothing products in Region 1 in March was 3500" as an example, the binary form of the data value 3500 is 110110101100. If encoding method one is used, the corresponding DNA encoding is GCGGTA. It can be seen that this encoding value has six bits, which is different from the fixed four bits of traditional image encoding. Therefore, this embodiment of the invention introduces the concept of a coding bit matrix. The coding bit matrix records the number of bits of the data value at the corresponding position. On the one hand, it facilitates the selection of the DNA mask matrix later, and on the other hand, it can realize the reconstruction of DNA encoded data.

[0085] Reference Figure 4 As an optional implementation, the step of encoding each two-dimensional matrix according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding coding bit matrix specifically includes:

[0086] S1031. Determine the first matrix element at each position in the two-dimensional matrix;

[0087] S1032. For each element of the first matrix in the two-dimensional matrix, convert each element of the first matrix into a binary number, and then perform a splitting process on the binary number to obtain multiple two-bit binary numbers, thereby generating a first binary number matrix.

[0088] S1033. For each two-bit binary number in the first binary number matrix, convert each two-bit binary number into the corresponding encoded value according to the DNA encoding rules to generate the first DNA encoding matrix.

[0089] S1034. Determine the number of bits in the encoding of the first matrix element based on the number of two-bit binary numbers corresponding to the first matrix element, and generate the encoding bit matrix based on the encoding bit number.

[0090] Specifically, suppose the generated two-dimensional matrix is ​​as follows:

[0091]

[0092] Among them, matrix element 3500 can be converted into the binary number 110110101100. After cutting, it can be obtained into six two-bit binary numbers 11, 01, 10, 10, 11 and 00. Then, according to the DNA encoding rules determined in the previous steps, these four two-bit binary numbers are converted into corresponding encoding values. Taking the DNA encoding rule corresponding to the first encoding method in Table 1 as an example, 3500 can be encoded as GCGGTA.

[0093] It should be recognized that decoding GCGGTA using the DNA encoding rules corresponding to the first encoding method in Table 1 can recover the binary number 110110101100, thus obtaining the original data value 3500 corresponding to the matrix element. However, using the DNA encoding rules corresponding to other encoding methods in Table 1 will yield completely different original data values. Therefore, different DNA encoding rules result in different encoding outcomes for the same data value; similarly, if a different DNA encoding rule is used for decoding, the original data value cannot be recovered. This property of DNA encoding increases its encoding diversity and the security of the data encryption process.

[0094] It should be noted that since different data values ​​have different numbers of bits after being converted into binary numbers, the number of bits in the encoded values ​​obtained by DNA encoding also varies. Taking the two-dimensional matrix shown above as an example, the encoded value of 3500 is GCGGTA, while the encoded value of 156 is GCTA. The two have different numbers of bits. Therefore, in this embodiment of the invention, 6 and 4 can be used to identify their encoding bits, respectively. After DNA encoding all the data values ​​in the two-dimensional matrix, the first DNA encoding matrix and the corresponding encoding bit matrix can be obtained.

[0095] In some optional embodiments, data values ​​with lower coding bit lengths can be padded. For example, the coding value of 156 is GCTA. In the DNA coding rule corresponding to coding mode one, A represents 00. After the coding padded data value 156 is processed, the coding value obtained can be AAGCTA, so that it can reach the same length as the coding value GCGGTA of 3500, which is convenient for subsequent DNA coding matrix operations.

[0096] S104. Select the corresponding DNA mask matrix according to the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix.

[0097] Reference Figure 5 As a further optional implementation, the step of selecting a corresponding DNA mask matrix based on the coding bit matrix and performing DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain a second DNA coding matrix specifically includes:

[0098] S1041. Select the corresponding DNA mask matrix according to the coding bit matrix. The number of rows in the DNA mask matrix is ​​the same as the number of rows in the coding bit matrix, and the number of columns in the DNA mask matrix is ​​the same as the number of columns in the coding bit matrix. The DNA mask matrix includes multiple second matrix elements, and the second matrix elements are composed of several coding values ​​sorted together. The number of coding values ​​in the second matrix elements corresponds one-to-one with the coding bit in the coding bit matrix.

[0099] S1042. Replace each element of the second matrix in the DNA mask matrix with the corresponding coding value sequence, and perform filling processing according to the preset filling coding value to obtain the third DNA coding matrix.

[0100] S1043. Perform DNA operations on the coding values ​​at each position in the first DNA coding matrix and the corresponding coding values ​​in the third DNA coding matrix to obtain DNA operation values, and generate a second DNA coding matrix based on the DNA operation values.

[0101] DNA operations include at least one of DNA addition, DNA subtraction, and DNA XOR operations.

[0102] Specifically, taking the DNA coding rule corresponding to the first coding method in Table 1 as an example, let's assume the generated first DNA coding matrix is:

[0103]

[0104] Assume the generated encoding bit matrix is ​​as follows:

[0105]

[0106] Based on this coding bit matrix, the corresponding DNA mask matrix can be selected or randomly generated as follows:

[0107]

[0108] Replace each element of the second matrix in the DNA mask matrix with the corresponding coding value sequence, and perform padding according to the preset padding coding values ​​to obtain the third DNA coding matrix as follows:

[0109]

[0110] The third DNA coding matrix is ​​then compared with the first DNA coding matrix using DNA operations. The third DNA coding matrix can be generated based on the DNA operation values ​​at the corresponding positions.

[0111] It is understandable that the rules of DNA operations correspond to the rules of DNA encoding. For the same operation, the eight encoding rules of DNA correspond to eight different operation results. Taking the DNA encoding rules corresponding to the first encoding method in Table 1 as an example, the corresponding DNA addition operation rules, DNA subtraction operation rules, and DNA XOR operation rules are shown in Tables 2, 3, and 4, respectively.

[0112]

[0113] Table 2

[0114]

[0115] Table 3

[0116]

[0117]

[0118] Table 4

[0119] It is understood that the DNA operation in the embodiments of the present invention may be any one of DNA addition, DNA subtraction and DNA XOR operation, or a combination of several, and the embodiments of the present invention do not limit this.

[0120] S105. Generate a second multidimensional matrix based on the target data dimension and the second DNA coding matrix, and store the second multidimensional matrix.

[0121] Reference Figure 6 Furthermore, as an optional implementation, the step of generating a second multidimensional matrix based on the target data dimension and the second DNA coding matrix specifically includes:

[0122] S1051. Based on the target data dimension, stack the second DNA coding matrix several times to generate a second multidimensional matrix.

[0123] Specifically, matrix stacking is the inverse process of matrix slicing. In this embodiment of the invention, each second DNA coding matrix is ​​stacked several times according to the target data dimension during slicing. The number of times the matrix is ​​stacked is the same as the number of target data dimensions. Each stacking can increase the dimension of the DNA coding matrix once, and finally the second multidimensional matrix is ​​obtained.

[0124] It is understandable that the second multidimensional matrix has already encrypted the data values ​​it contains. Storing this second multidimensional matrix completes the storage of the original multidimensional user data. Since DNA operations and DNA encoding are reversible processes, decryption only requires performing DNA inverse operations through the DNA mask matrix, and then decoding using the corresponding encoding rules to obtain the original user data.

[0125] Reference Figure 7 As an optional implementation, the user data processing method further includes the following steps:

[0126] S106. The matrix elements in the DNA mask matrix are scrambled using a chaotic scrambling algorithm to obtain an encrypted mask matrix, which is then stored.

[0127] Specifically, in this embodiment of the invention, the DNA mask matrix can be considered as the decryption key for the second multidimensional matrix, and therefore also needs to be encrypted and stored. This embodiment utilizes a chaotic scrambling algorithm to scramble the DNA mask matrix, achieving encryption of the DNA mask matrix without changing the data complexity, obtaining an encrypted mask matrix, and storing it, further improving the security of user data.

[0128] In some optional embodiments, the DNA mask matrix can be decoded using the aforementioned selected encoding rules, restored to a decimal mask matrix, and then scrambled and stored, further improving the security of user data.

[0129] The method steps of the embodiments of the present invention have been described above. It is understood that the embodiments of the present invention convert multidimensional user data into multiple two-dimensional matrices for subsequent processing through slicing, reducing the complexity of multidimensional user data processing and improving data processing efficiency; by using DNA encoding technology to perform DNA encoding and DNA operations on the two-dimensional matrix to obtain a second DNA encoding matrix, the original user data can be effectively hidden, and data restoration can be performed using corresponding DNA encoding rules and DNA mask matrices, enhancing the security of user data; by generating the encoding bit matrix, the limitation of traditional DNA encoding technology being only applicable to two-dimensional image pixel value encryption is overcome, enabling DNA encoding and DNA operations on multidimensional and high-value user data, thus broadening the application scenarios of DNA encoding technology.

[0130] like Figure 8 The diagram shown is a structural schematic of a user data processing system provided in an embodiment of the present invention. (Refer to...) Figure 8 This invention provides a user data processing system, comprising:

[0131] The multidimensional user data generation module is used to obtain first-dimensional user data of multiple data dimensions of the target user, and generate multidimensional user data based on the data dimensions and the first-dimensional user data.

[0132] The slicing module is used to generate a first multidimensional matrix based on multidimensional user data, and to slice the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension.

[0133] The DNA encoding module is used to encode each two-dimensional matrix according to a preset DNA encoding rule to obtain the first DNA encoding matrix and the corresponding encoding bit matrix.

[0134] The DNA operation module is used to select the corresponding DNA mask matrix according to the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix.

[0135] The second multidimensional matrix generation module is used to generate a second multidimensional matrix based on the target data dimension and the second DNA coding matrix, and to store the second multidimensional matrix.

[0136] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0137] This invention also provides an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned user data processing method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0138] like Figure 9 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of the present invention. (Refer to...) Figure 9 This invention provides an electronic device, comprising:

[0139] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0140] The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the user data processing method of the embodiments of this invention.

[0141] The input / output interface 903 is used to implement information input and output;

[0142] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0143] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);

[0144] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0145] This invention also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described user data processing method.

[0146] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0147] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 1 The method shown.

[0148] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0149] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0150] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0152] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the aforementioned program can be printed, because the aforementioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0153] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0154] In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0155] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0156] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A user data processing method, characterized in that, Includes the following steps: Obtain first user data of multiple data dimensions of the target user, and generate multidimensional user data based on the data dimensions and the first user data; A first multidimensional matrix is ​​generated based on the multidimensional user data, and the first multidimensional matrix is ​​sliced ​​to obtain multiple two-dimensional matrices of the target data dimension. DNA encoding is performed on each of the two-dimensional matrices according to the preset DNA encoding rules to obtain the first DNA encoding matrix and the corresponding encoding bit matrix; Select the corresponding DNA mask matrix based on the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix; A second multidimensional matrix is ​​generated based on the target data dimension and the second DNA coding matrix, and the second multidimensional matrix is ​​stored.

2. The user data processing method according to claim 1, characterized in that, The step of acquiring first user data with multiple data dimensions of the target user and generating multidimensional user data based on the data dimensions and the first user data specifically includes: Obtain first user data, which includes multiple data values ​​and corresponding dimension value labels, wherein the dimension value labels include dimension values ​​of multiple data dimensions; Multiple data dimensions of the first user data are determined based on the dimension value labels, and then multiple dimension axes of the first user data are constructed based on the data dimensions. Based on the dimension values, the coordinates of the corresponding data values ​​on each dimension axis are determined to obtain the multidimensional user data.

3. The user data processing method according to claim 2, characterized in that, The step of generating a first multidimensional matrix based on the multidimensional user data and slicing the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension specifically includes: Based on the data values ​​of the multidimensional user data, the first matrix element at the corresponding position in the first multidimensional matrix is ​​determined to obtain the first multidimensional matrix; Several preset target data dimensions are obtained, and the first multidimensional matrix is ​​sliced ​​several times according to the target data dimensions to obtain multiple two-dimensional matrices.

4. The user data processing method according to claim 3, characterized in that, The step of encoding each of the two-dimensional matrices according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding coding bit matrix specifically includes: Determine the first matrix element at each position in the two-dimensional matrix; For each element of the first matrix in the two-dimensional matrix, each element is converted into a binary number, and the binary number is split to obtain multiple two-bit binary numbers, thereby generating a first binary number matrix; For each two-bit binary number in the first binary number matrix, each two-bit binary number is converted into a corresponding encoded value according to the DNA encoding rule to generate the first DNA encoding matrix; The number of bits for encoding the first matrix element is determined based on the number of two-bit binary numbers corresponding to the first matrix element, and the encoding bit matrix is ​​generated based on the number of bits for encoding.

5. A user data processing method according to claim 4, characterized in that, The step of selecting the corresponding DNA mask matrix based on the coding bit matrix and performing DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix specifically includes: A corresponding DNA mask matrix is ​​selected based on the coding bit matrix. The number of rows in the DNA mask matrix is ​​the same as the number of rows in the coding bit matrix, and the number of columns in the DNA mask matrix is ​​the same as the number of columns in the coding bit matrix. The DNA mask matrix includes multiple second matrix elements, each of which is composed of a number of coding values ​​arranged in order. The number of coding values ​​in the second matrix elements corresponds one-to-one with the coding bits in the coding bit matrix. The second matrix element in the DNA mask matrix is ​​replaced with the corresponding coding value sequence, and the filling process is performed according to the preset filling coding value to obtain the third DNA coding matrix; DNA operations are performed on the encoded values ​​at each position in the first DNA coding matrix and the corresponding encoded values ​​at the third DNA coding matrix to obtain DNA operation values, and the second DNA coding matrix is ​​generated based on the DNA operation values. The DNA operations include at least one of DNA addition, DNA subtraction, and DNA XOR operations.

6. The user data processing method according to claim 3, characterized in that, The step of generating the second multidimensional matrix based on the target data dimension and the second DNA coding matrix specifically includes: The second DNA coding matrix is ​​stacked several times according to the target data dimension to generate the second multidimensional matrix.

7. A user data processing method according to any one of claims 1 to 6, characterized in that, The user data processing method further includes the following steps: The matrix elements in the DNA mask matrix are scrambled using a chaotic scrambling algorithm to obtain an encrypted mask matrix, which is then stored.

8. A user data processing system, characterized in that, include: A multidimensional user data generation module is used to acquire first user data of multiple data dimensions of a target user, and generate multidimensional user data based on the data dimensions and the first user data. The slicing module is used to generate a first multidimensional matrix based on the multidimensional user data, and to slice the first multidimensional matrix to obtain multiple two-dimensional matrices of the target data dimension. The DNA encoding module is used to encode each of the two-dimensional matrices according to a preset DNA encoding rule to obtain a first DNA encoding matrix and a corresponding encoding bit matrix. The DNA operation module is used to select the corresponding DNA mask matrix according to the coding bit matrix, and perform DNA operations on the DNA mask matrix and the first DNA coding matrix to obtain the second DNA coding matrix; The second multidimensional matrix generation module is used to generate a second multidimensional matrix based on the target data dimension and the second DNA coding matrix, and to store the second multidimensional matrix.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the user data processing method as described in any one of claims 1 to 7.

10. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the user data processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • DNA image encryption method based on cloud model and hyperchaotic system and system based on cloud model and hyperchaotic system

    CN106023051A

  • Image encryption method and system based on DNA coding, computer device and medium

    CN115842619A