A data security processing method based on artificial intelligence

By adopting the isometric encoding and compensation encoding method based on artificial intelligence in data encoding, the problem that traditional encoding methods are difficult to adapt to data changes and insufficient security is solved, and higher encoding complexity and security are achieved, and the data is enhanced. protection.

CN119150330BActive Publication Date: 2025-02-14BEIJING ZHONGCARBON ARK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411621592.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-14
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Due to the static characteristics of traditional data encoding methods, it is difficult to adapt to the dynamic nature of data changes over time, resulting in the weakening of the encoding's security protection ability over time, and the long-term and stable statistical regularity of string content is easily recognized, increasing the risk of data privacy leakage.

Method used

Using iso-length encoding and compensation encoding methods based on artificial intelligence, we use random encoding of iso-length encoding by splitting sensitive data sequences, generating feature strings, calculating the possibility of suffix characters, selecting character sets and encoding lengths, generating compensation encodings, and random encodings in iso-length encodings Position insertion compensated encoding to improve the complexity and unpredictability of encoding.

Benefits of technology

It effectively conceals the statistical features of the original string, increases the difficulty of cracking, improves the complexity and security of encoding, and can effectively resist data tampering and man-in-the-middle attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150330B_ABST
    Figure CN119150330B_ABST
Patent Text Reader

Abstract

The present application discloses a data security processing method based on artificial intelligence, including: collecting sensitive data sequences, splitting the collected sensitive data sequences into several feasible character strings; generating characteristic character strings according to the obtained feasible character strings, obtaining the suffix characters of each characteristic character string, and obtaining the long character string of each characteristic character string according to the possibility of occurrence; selecting a character set and a coding length, and defining the coding structure; generating a compensation code according to the character set; generating an equal-length code according to the coding rules based on the obtained long character string, and if there are redundant positions in the generated equal-length code, selecting a compensation code from the compensation code library for filling; inserting characters at random positions of the equal-length code. The equal-length code and the compensation code make the statistical characteristics of the original character string hidden, increase the difficulty of cracking, and make the distribution of the compensation code difficult to predict by generating random positions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data security processing method based on artificial intelligence. Background Art

[0002] In the intersection of data processing and security protection, especially for encoding strategies for sensitive information, traditional methods mostly rely on static encoding frameworks and rules, such as basic substitution ciphers, hash operations, and standardized encoding algorithms. However, these traditional methods have shown certain limitations when dealing with current complex data parsing and cracking technologies, which mainly stem from their inherent static characteristics. Specifically, by analyzing the patterns and statistical characteristics of the encoded text, attackers may reveal clues to the original data, thereby increasing the risk of data leakage. Traditional encoding methods fail to fully consider the dynamic nature of data changes over time. In actual scenarios, sensitive data is often in constant change, and static encoding rules are difficult to adapt to such changes, resulting in the weakening of the security protection capabilities of the encoding over time. More seriously, for those string contents that remain stable for a long time, traditional encoding methods often cannot effectively conceal their statistical regularity, making these strings easy to identify and trace back to their original meanings, further increasing the risk of data privacy leakage.

[0003] For example, Chinese patent announcement number CN116933297 B discloses a financial sensitive risk data security protection method, which includes: collecting and obtaining a sensitive risk data sequence, obtaining a characteristic string according to the sensitive risk data sequence, obtaining all suffix characters of each characteristic string, determining the possibility of occurrence of the suffix character, and then obtaining a long string of each characteristic string; completing a dictionary update at each characteristic string according to the long string of each characteristic string, completing encryption of the sensitive risk data sequence to obtain ciphertext data. Then, the statistical information in the sensitive risk data sequence is hidden to improve encryption security.

[0004] By comparing the suffix characters in the characteristic string in the file, the attacker may discover the pattern by analyzing the suffix characters, thereby increasing the risk of cracking. The static encoding rules in the file are easy to become the target of cracker analysis due to their fixed structure. Summary of the invention

[0005] The present application provides a data security processing method based on artificial intelligence. By adopting equal-length coding and compensation coding, the statistical characteristics of the original string are concealed, which increases the difficulty of cracking. The random filling of the compensation code further increases the complexity and unpredictability of the code.

[0006] This application provides a data security processing method based on artificial intelligence, including:

[0007] S101, collecting a sensitive data sequence, and splitting the collected sensitive data sequence into a plurality of feasible character strings;

[0008] S102, generating a characteristic string according to the obtained feasible string, obtaining suffix characters of each characteristic string, and calculating the occurrence probability of each suffix character of each characteristic string;

[0009] S103, obtaining a long character string of each characteristic character string according to the occurrence probability;

[0010] S104, selecting a character set and a coding length, and defining a coding structure;

[0011] S105, generating a compensation code according to the character set selected in step S104, and storing the generated compensation code in a compensation code library;

[0012] S106, based on the obtained long character string, generate an equal-length code according to the encoding rule, if there are redundant positions in the generated equal-length code, select a compensation code from the compensation code library to fill; insert characters at random positions of the equal-length code;

[0013] S107, storing the generated long character string and its corresponding equal-length code in a dictionary, and encrypting and decrypting the sensitive risk data sequence according to the dictionary.

[0014] Preferably, the sensitive data sequence is split into several feasible character strings, a sliding window is preset, and the sliding window is a window with a fixed length. The left side of the preset sliding window is aligned with the first character of the sensitive data sequence. The preset sliding window is slid from left to right with one character as the sliding step until the right side of the sliding window is aligned with the last character of the sensitive data sequence, and the subsequence corresponding to the preset sliding window on the sensitive data sequence is recorded each time the preset sliding window slides.

[0015] Preferably, the strings whose frequency of occurrence of feasible strings is greater than a preset frequency threshold are taken as fixed strings, the intervals between adjacent positions of the fixed strings are calculated, a list containing all intervals is generated, the mean and standard deviation of all intervals are calculated, and the period distribution degree = .

[0016] Preferably, the specific steps of inserting characters at random positions of equal-length codes are:

[0017] S201, based on the equal-length code generated in step S106, select a number of random positions using a random number generator;

[0018] S202, selecting a compensation code from a compensation code library according to the selected random position, and inserting the selected compensation code into the random position of the equal-length code;

[0019] S203, verifying the generated equal-length code, and recording the code and its corresponding character string, allocation time and validity period in a database;

[0020] S204, restore the original character string according to the dictionary and the equal-length encoding.

[0021] Preferably, the dictionary is a predefined mapping table, which stores the correspondence between equal-length codes and original character strings. Each equal-length code has a unique key in the dictionary, and the corresponding value is the original character string. The key corresponding to the obtained equal-length code is input into the dictionary, and the dictionary is searched, and the dictionary finds the original character string corresponding to the key.

[0022] Preferably, the dictionary is a database that is passively updated according to changes in the string content over a period of time. Inserted characters refer to additional characters inserted into the original encoding. The steps of converting inserted characters are:

[0023] S301, setting a Rubik's Cube, wherein the Rubik's Cube has at least 26 faces, each face contains a small block representing an English letter or symbol, and creating a character table;

[0024] S302, generating a scrambled path based on a random algorithm, and determining a single movement path of each character from the main surface to the adjustment surface according to the position of the character on the scrambled path on the main surface;

[0025] S303, converting the character into a new character according to the single movement path and the preset direction in the character table;

[0026] S304, inserting the converted characters into the equal-length code to form a combined code;

[0027] S305, using the same magic cube and character table, according to the received scrambled path, reversely applying the conversion rule to restore the combined code to the original code.

[0028] Preferably, the preset direction is a first coordinate and a second coordinate in a comparison path.

[0029] Preferably, a dynamic coding is added to the original coding and the compensation coding.

[0030] Preferably, the step of dynamic encoding is added:

[0031] S401, judging whether to use original coding or compensation coding according to the hash value of the scrambled path;

[0032] S402, if the compensation code is selected in step S401, convert the characters in the original code into the compensation code according to the scrambling path and the conversion rule; if the original code is selected in step S401, convert the characters in the compensation code into the original code according to the scrambling path and the conversion rule;

[0033] S403, combining the selected code with the remaining parts into a final combined code;

[0034] S404, using the same Rubik's Cube structure, character table and conversion rules, according to the received scrambling path and encoding type selection, reversely apply the conversion rules, if the compensation code is used, restore the combined code to the original code; if the original code is used, restore the combined code to the compensation code.

[0035] Preferably, the scrambled path is the randomly scrambled state of the Rubik's Cube before each conversion, and each scrambled state corresponds to a unique path for determining the conversion result of the character.

[0036] One or more technical solutions provided in this application have at least the following technical effects or advantages: equal-length coding and compensation coding are used to conceal the statistical characteristics of the original string, increasing the difficulty of cracking, and the random filling of the compensation coding further increases the complexity and unpredictability of the coding;

[0037] By generating random positions, the distribution of compensation codes becomes difficult to predict. Even if attackers know the existence and possible functions of the codes, it is difficult for them to accurately locate these codes, which increases the difficulty of data protection and secure transmission. The combination of random position selection and compensation code insertion can significantly improve the security of data coding. In data transmission, this mechanism can effectively resist data tampering and man-in-the-middle attacks.

[0038] By plugging in additional characters and applying transformation rules based on the Rubik's Cube state and the character table, the complexity of the original code is significantly increased, making the code more difficult to crack or predict. Before each transformation, the Rubik's Cube is randomly shuffled to a new state to ensure that each code is unique, which eliminates statistical regularities and makes the code more difficult to analyze or pattern recognize. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of a data security processing method based on artificial intelligence of the present invention;

[0040] Figure 2 A schematic diagram of a process of inserting characters at random positions of equal-length codes according to an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of a process for converting plug-in characters according to an embodiment of the present invention;

[0042] Figure 4 The figure is a flowchart of adding dynamic encoding according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.

[0044] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.

[0046] Embodiment 1: Figure 1 The following is a flowchart of a data security processing method based on artificial intelligence according to an embodiment of the present invention, comprising the following steps:

[0047] S101, collecting a sensitive data sequence, and splitting the collected sensitive data sequence into a plurality of feasible character strings;

[0048] The database query tool MySQL is used to collect sensitive data to form a continuous string sequence, i.e., the sensitive data sequence. A sliding window is preset, which is a window with a fixed length. The left side of the preset sliding window is aligned with the first character of the sensitive data sequence. The preset sliding window is slid from left to right with one character as the sliding step until the right side of the sliding window is aligned with the last character of the sensitive data sequence. The subsequence corresponding to each sliding of the preset sliding window on the sensitive data sequence is recorded, the subsequence is traversed, and the starting position and the ending position are selected in turn. For each starting position, all substrings starting from the starting position and with a length from 1 to the remaining length of the subsequence are generated, thereby obtaining all substrings in the subsequence, setting a feasible string set, and for all generated substrings, all substrings are traversed to confirm whether the substring is in the feasible string set. If the substring is not in the feasible string set, the substring is added to the feasible string set. If the substring is in the feasible string set, the feasible string set is kept unchanged to obtain the final feasible string set.

[0049] S102, generating a characteristic string according to the obtained feasible string, obtaining suffix characters of each characteristic string, and calculating the occurrence probability of each suffix character of each characteristic string;

[0050] By using a hash table to count the frequency of occurrence of each feasible string in the sensitive data sequence, an empty hash table is created to store feasible strings and their corresponding number of occurrences. The key of the hash table is the feasible string, and the value is the number of times the string appears in the sensitive data sequence. The sensitive data sequence is traversed. When a feasible string is encountered, check whether the string already exists in the hash table. If it exists, add 1 to the value corresponding to the string; if it does not exist, add the string as a key to the hash table and initialize its corresponding value to 1; the string with an occurrence frequency greater than the preset frequency threshold is taken as a fixed string, and the sensitive data sequence is traversed to record the position of each fixed string, generate a list containing all position indexes, calculate the intervals between adjacent positions of the fixed string, generate a list containing all intervals, calculate the mean and standard deviation of all intervals, and the period distribution degree = , a fixed character string whose period distribution degree is greater than a preset period distribution degree threshold is called a feature character string.

[0051] Create an empty list in advance to store suffix characters, use the string matching algorithm (KMP algorithm) to find all the positions where the feature string appears in the sensitive data sequence, and for the position where the match is successful, check whether there are any characters after the position. If there are characters, the characters are called suffix characters, and the suffix characters are added to the pre-created empty list. If there are no characters (that is, the feature string appears at the end of the sensitive data sequence), add a special marker (such as None or an empty string), get all the suffix characters of the feature string, create a new dictionary, traverse all the suffix characters, count the frequency of the suffix characters, store the counted frequencies in the new dictionary, use a hash table to count the number of encodings, calculate the product of the frequency of the suffix character and the number of encodings, divide all the product values ​​by the sum of the products, and get the possibility of occurrence.

[0052] S103, obtaining a long character string of each characteristic character string according to the occurrence probability;

[0053] According to the obtained possibilities, the three largest suffix characters are selected as the preferred suffix characters of each characteristic string, and each preferred suffix character is concatenated after each characteristic string to obtain three long strings of each characteristic string.

[0054] S104, selecting a character set and a coding length, and defining a coding structure;

[0055] The character set includes letters, numbers, special symbols, etc. The code length refers to the number of characters in each code. In equal-length codes, the lengths of all codes are the same. The code structure includes a prefix, a body, and a suffix. The prefix is ​​used to identify the type or purpose of the code. The body is the main part of the code and contains most of the information. The suffix can be used for verification.

[0056] S105, generating a compensation code according to the character set selected in step S104, and storing the generated compensation code in a compensation code library;

[0057] Get the current timestamp, convert the timestamp into a string format, use the string format of the timestamp as the prefix of the code, use a pseudo-random number generator to generate a random number, combine the timestamp part and the random number part, compare the combined code with the character set and code length in step S104, and determine whether the code conforms to the character set and code length in step S104. If not, adjust the parameters of the random number generator or the format of the timestamp to ensure the validity of the code; establish a database, the database is used to store the compensation code, and the generated compensation code is entered into the compensation code library.

[0058] In some embodiments, a compensation code is generated for a book management system to provide an alternative when the book code is missing or conflicting. The character set and encoding rules are selected according to step S104. Now we will generate and store the compensation code according to step S105. Assuming that the current time is 14:30:45 on March 15, 2023, the timestamp we get is 20230315143045. Convert the timestamp 20230315143045 to a string format, that is, 20230315143045. Use a pseudo-random number generator to generate a random number, assuming it is 123456. Combine the timestamp string 20230315143045 with the random number 123456, and use the concatenation method to get the code 20230315143045123456. Check whether the code 20230315143045123456 meets the selected character set (assuming it is numbers and uppercase letters) and code length requirements (assuming it is 24 bits). In this example, the code meets the requirements. Repeat the above steps to generate multiple different compensation codes. For example, get the timestamp again (which may be different because the time is constantly changing) and combine it with a new random number to get another code; create a database table named CompensationCodes to store compensation codes. The table contains fields such as CodeID (coding ID, auto-increment primary key), CompensationCode (compensation code), GeneratedTime (generation time), Description (purpose description), etc. Enter the generated compensation code 20230315143045123456 into the CompensationCodes table, and record the generation time (such as 2023-03-15 14:30:45) and purpose description (such as "book code missing replacement").

[0059] S106, based on the obtained long character string, generate equal-length codes according to encoding rules, and if there are redundant positions in the generated equal-length codes, select compensation codes from the compensation code library to fill them;

[0060] The length of the equal-length code is set to 10. For the long character string generated in step S103, if the length of the long character string exceeds the set equal-length code length, the long character string is truncated from the beginning, and a part of the truncated long character string is used to generate the equal-length code. According to the encoding rules, a fixed prefix and two characters (or numbers) representing the attribute or classification are added to the long character string. The long character string generated according to the encoding rules is input into the hash algorithm MD5, and the hash value is regarded as a large integer and converted into the base representation of the required character set. For example, you can convert the hash value into Base36 representation (using letters AZ and numbers 0-9 as symbols), then take the first N characters of the result, truncate the converted sequence to the remaining six digits, and if the sequence length is less than six digits, select a compensation code from the compensation code library for filling.

[0061] S107, storing the generated long character string and its corresponding equal-length code in a dictionary, and encrypting and decrypting the sensitive risk data sequence according to the dictionary.

[0062] Construct a dictionary to store long strings and their corresponding equal-length codes. The key of the dictionary is the long string, and the value is its corresponding equal-length code. The encryption process is to convert the sensitive data sequence (which may be a long string or a group of long strings) into the corresponding equal-length code sequence. For each long string that needs to be encrypted, first look up its corresponding equal-length code in the dictionary. If the corresponding equal-length code is found, replace the long string with its equal-length code, and combine all the replaced equal-length codes in the original order to form an encrypted sensitive data sequence. The decryption process is to convert the encrypted equal-length code sequence back to the original sensitive data sequence. For each equal-length code that needs to be decrypted, first look up its corresponding long string in the dictionary. If the corresponding long string is found, replace the equal-length code with its corresponding long string, and combine all the replaced long strings in the original order to form a decrypted sensitive risk data sequence.

[0063] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0064] The encoded text uses equal-length coding and compensation coding, which hides the statistical characteristics of the original string and increases the difficulty of cracking. The random padding of the compensation code further increases the complexity and unpredictability of the coding, making it difficult for attackers to restore the original string through pattern analysis. By defining clear encoding rules and structures, fast encoding and decoding of strings can be achieved, ensuring that no performance bottlenecks will be caused when processing large amounts of data.

[0065] Embodiment 2: Based on the compensation code in embodiment 1, the equal-length code is simply padded. An attacker may find a pattern in the encoded text by analyzing it, thereby increasing the risk of cracking. In this embodiment, one or more characters are inserted at multiple random positions of the equal-length code.

[0066] like Figure 2 As shown, the specific steps for inserting characters at random positions of equal-length codes are:

[0067] S201, based on the equal-length codes generated in step S106, a random number generator is used to select a plurality of random positions;

[0068] Use a random number generator, set the maximum and minimum values ​​of the random number generator according to the length of the equal-length code 10, set the minimum value to 0 and the maximum value to 9, use the random number generator to generate 5 random positions, and generate 5 non-repeating random positions by setting the parameters of the random number. Finally, record the generated random positions and store the generated random positions in the position list.

[0069] S202, selecting a compensation code from a compensation code library according to the selected random position, and inserting the selected compensation code into the random position of the equal-length code;

[0070] According to the compensation code library in step S105, 5 compensation codes are randomly selected from the compensation code library, and the selected compensation codes are inserted into random positions of the equal-length codes.

[0071] In some embodiments, a group of equal-length codes ABCDEFGHIJ, random positions [2, 5, 9] are selected, and these positions are based on the results of the random number generator in step S201. Compensation codes X, Y, and Z are selected. The compensation codes X, Y, and Z are selected from a compensation code library. If the length of the compensation code is inconsistent with the character length of the equal-length code, truncation or padding operations are required to match the length. However, in this example, the character length of the compensation code is consistent with that of the equal-length code. According to the selected random position, the specific position for inserting the compensation code in the equal-length code is determined. Position 2 represents inserting the compensation code after the third character (because the index starts from 0). The equal-length code is divided into two parts: the part before the insertion point and the part after the insertion point. The compensation code is inserted between the two parts. The divided parts and the inserted compensation code are recombined to form a new equal-length code segment. The equal-length code AB (the first two parts) and CDEFGHIJ (the last eight parts) are divided, and the compensation code X is inserted: ABX +CDEFGHIJ= ABXDEFGHIJ is a new equal-length code segment, but it is not the final result yet, because there are other positions that need to be inserted. Repeat the above process for the insertion of positions 5 and 9: For position 5: ABXDEF (the first six parts) and GHIJ (the last four parts), insert Y: ABXDEFY+ GHIJ=ABXDEFYGHIJ; for position 9 (this is the last position, just add it after the result of the previous step, insert Z, so it directly becomes ABXDEFYGHIZ, ABXDEFYGHI+Z=ABXDEFYGHIZ, until all the selected random positions are inserted with compensation codes. After the compensation codes are inserted in all the selected random positions, these new equal-length code segments are combined to form the final equal-length code.

[0072] S203, verifying the generated equal-length code, and recording the code and its corresponding character string, allocation time and validity period in a database;

[0073] Furthermore, the system checks whether the length of each code meets the preset equal-length requirement. Any code that does not meet the length requirement will be marked as invalid. Then, the system verifies whether the format of the code is correct, which includes checking whether the code contains illegal characters and whether the structure of the code complies with the predetermined rules. In order to ensure the uniqueness of the code, the system will check whether the newly generated code has any duplication with the existing codes in the database. Once a duplication is found, the system will immediately generate a new code to replace the conflicting item.

[0074] The codes themselves are stored in the database. Each code is associated with a specific string, which is recorded in the database for subsequent query and matching. The system records the allocation time of each code, that is, the time point when the code is generated and verified. This helps to track the usage history and life cycle of the code. For each code, the system will also set an expiration date, which determines when the code expires and is no longer accepted or processed by the system. The expiration date information will also be accurately recorded in the database.

[0075] S204, restore the original character string according to the dictionary and the equal-length encoding.

[0076] By setting a dictionary, the dictionary is a predefined mapping table. The dictionary stores the correspondence between equal-length codes and original strings. Each equal-length code has a unique key in the dictionary, and the corresponding value is the original string. The key corresponding to the obtained equal-length code is entered into the dictionary and searched in the dictionary. The dictionary finds the original string corresponding to the key.

[0077] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0078] By generating random positions, the distribution of compensation codes becomes difficult to predict. Even if attackers know the existence and possible functions of the codes, it is difficult for them to accurately locate them, which increases the difficulty of data protection and secure transmission.

[0079] The combination of random position selection and compensatory code insertion can significantly improve the security of data encoding. In data transmission, this mechanism can effectively resist data tampering and man-in-the-middle attacks because it is difficult for attackers to modify or delete the inserted code without destroying the integrity of the data.

[0080] Embodiment 3: Based on Embodiment 1, the dynamic dictionary is essentially updated passively over a period of time according to the changes in the string content, but a large number of string contents may remain unchanged for a long time and can be easily identified as representing the meaning. In this embodiment, a conversion rule is made for the interpolated characters so that the combination code composed of the equal-length code and the compensation code is different each time it appears. This makes the long-term text have no statistical regularity, such as Figure 3 shown.

[0081] S301, setting a Rubik's Cube, wherein the Rubik's Cube has at least 26 faces, each face contains a small block representing an English letter or symbol, and creating a character table.

[0082] Specifically, the Rubik's Cube has 26 faces, each of which is a quadrilateral. The 26 letters of the English alphabet (AZ) are assigned to the 26 faces respectively, and each face has a small block representing the corresponding letter; a character table is created, in which a unique relative position is assigned to each character or symbol, and the English letters are arranged in alphabetical order, and a number from 1 to 26 is assigned to each letter. For other symbols, they can be sorted according to their frequency of use or importance, and assigned corresponding positions. The English letters in the character table are assigned to the first 26 faces of the Rubik's Cube in alphabetical order, and each face has a small block representing the corresponding letter.

[0083] S302, generating a scrambled path based on a random algorithm, and determining a single movement path of each character from the main surface to the adjustment surface according to the position of the character on the scrambled path on the main surface;

[0084] Define the main surface and determine the character set and its initial position on the main surface. Use the random walk algorithm to generate a random access sequence of characters. Use the A* algorithm to plan the movement path of each character in the sequence from the current position to the target position. Determine the current position of the character on the main surface through the coordinate system. According to the random access sequence, determine the next (or target) position of the character. Use the path planning algorithm to calculate the optimal (or feasible) movement path from the current position to the target position. This path should be an effective path for a single movement of the character on the main surface.

[0085] In some embodiments, the main surface is a 3X3 grid, and the characters on the grid are distributed as follows: The random walk algorithm generates a random access sequence of characters. This sequence determines the order in which the characters are shuffled, for example: [F, B, D, H, E, C, I, G, A]. The A* algorithm is used to find the optimal path from the current grid to the target grid for each character in the sequence. Taking the character F as an example, its initial position is (1,2) (here we use the upper left corner as the origin, the number of columns as the x coordinate, and the number of rows as the y coordinate). According to the random access sequence, the next position of F should be the initial position of the character after it in the sequence, but in this example, we only need to pay attention to how F moves to its target position. Assume that the target position is the initial position of B (0,1). Using the A* algorithm, we can plan a path for F from (1,2) to (0,1). Horizontal and vertical movement are allowed in the grid. The single movement path is: (1,2) -> (0,2) -> (0,1).

[0086] S303, converting the character into a new character according to the single movement path and the preset direction in the character table;

[0087] By comparing the first coordinate (starting point) and the second coordinate (position after movement) in the path, the preset direction of the character is determined. If the character moves from (x, y) to (x+1, y), the moving direction is right; if it moves to (x, y+1), the moving direction is up. The corresponding conversion rule is found based on the current character and the determined moving direction. The conversion rule is character replacement.

[0088] In some embodiments, the character table includes a conversion rule from letters A to Z. When the character moves to the right, it becomes the next letter (A becomes B, B becomes C, ..., Z becomes A); when the character moves to the left, it becomes the previous letter. If the character A is located at (0,0) and its single movement path is (0,0) -> (1,0), then according to the preset direction (right), we convert A to B.

[0089] S304, inserting the converted characters into the equal-length code to form a combined code;

[0090] S305, using the same magic cube and character table, according to the received scrambled path, reversely applying the conversion rule to restore the combined code to the original code.

[0091] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0092] By plugging in additional characters and applying transformation rules based on the Rubik's Cube state and the character table, the complexity of the original code is significantly increased, making the code more difficult to crack or predict. Before each transformation, the Rubik's Cube is randomly shuffled to a new state to ensure that each code is unique, which eliminates statistical regularities and makes the code more difficult to analyze or pattern recognize.

[0093] Embodiment 4: Based on the equal-length coding in Embodiment 3, that is, the original coding and the compensation coding, a dynamic coding rule is added in this embodiment, so that even if the same combination code appears, the meaning it represents may be different, thereby improving the security and unpredictability of the coding.

[0094] like Figure 4 As shown, add the steps of dynamic encoding:

[0095] S401, judging whether to use original coding or compensation coding according to the hash value of the scrambled path;

[0096] Specifically, when the last digit of the hash value of the scrambled path is an odd number, the compensation code is used; otherwise, the original code is used.

[0097] S402, if the compensation code is selected in step S401, convert the characters in the original code into the compensation code according to the scrambling path and the conversion rule; if the original code is selected in step S401, convert the characters in the compensation code into the original code according to the scrambling path and the conversion rule;

[0098] S403, combining the selected code with the remaining parts into a final combined code;

[0099] The selected codes include original codes and compensation codes, and the rest include prefixes, suffixes and other code blocks.

[0100] S404, using the same Rubik's Cube structure, character table and conversion rules, according to the received scrambling path and encoding type selection, reversely apply the conversion rules, if the compensation code is used, restore the combined code to the original code; if the original code is used, restore the combined code to the compensation code.

[0101] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0102] Through the conversion mechanism of the Rubik's Cube, the original code or the compensation code is dynamically selected to add an additional encryption dimension. The dynamic coding rules improve the security of the coding, so that even if the coding rules are known, the encoded content cannot be cracked; each encoding produces a different combination of codes. Even for the same original code and compensation code, different results are obtained due to different scrambling paths and coding type selections.

[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data security processing method based on artificial intelligence, characterized in that: include: S101, collecting a sensitive data sequence, and splitting the collected sensitive data sequence into a plurality of feasible character strings; S102, generating a characteristic string according to the obtained feasible string, obtaining suffix characters of each characteristic string, and calculating the occurrence probability of each suffix character of each characteristic string; S103, obtaining a long character string of each characteristic character string according to the occurrence probability; S104, selecting a character set and a coding length, and defining a coding structure; S105, generating a compensation code according to the character set selected in step S104, and storing the generated compensation code in a compensation code library; S106, based on the obtained long character string, generate equal-length codes according to encoding rules, and if there are redundant positions in the generated equal-length codes, select compensation codes from the compensation code library to fill them; Insert characters at random positions in equal-length codes; S107, storing the generated long character string and its corresponding equal-length code in a dictionary, and encrypting and decrypting the sensitive risk data sequence according to the dictionary; The specific steps for inserting characters at random positions of equal-length codes are: S201, based on the equal-length code generated in step S106, select a number of random positions using a random number generator; S202, selecting a compensation code from a compensation code library according to the selected random position, and inserting the selected compensation code into the random position of the equal-length code; S203, verifying the generated equal-length code, and recording the code and its corresponding character string, allocation time and validity period in a database; S204, restoring the original string according to the dictionary and the equal-length encoding; The dictionary is a predefined mapping table, which stores the correspondence between equal-length codes and original character strings. Each equal-length code has a unique key in the dictionary, and the corresponding value is the original character string. The key corresponding to the obtained equal-length code is input into the dictionary, and the dictionary is searched, and the dictionary finds the original character string corresponding to the key; Insert characters refer to additional characters inserted in the original encoding. The steps to convert insert characters are: S301, setting a Rubik's Cube, wherein the Rubik's Cube has at least 26 faces, each face contains a small block representing an English letter or symbol, and creating a character table; S302, generating a scrambled path based on a random algorithm, and determining a single movement path of each character from the main surface to the adjustment surface according to the position of the character on the scrambled path on the main surface; S303, converting the character into a new character according to the single movement path and the preset direction in the character table; S304, inserting the converted characters into the equal-length code to form a combined code; S305, using the same magic cube and character table, according to the received scrambled path, reversely applying the conversion rule to restore the combined code to the original code; The preset direction is the first coordinate and the second coordinate in the comparison path; Add a dynamic encoding to the original encoding and compensation encoding, and add the steps of dynamic encoding: S401, judging whether to use original coding or compensation coding according to the hash value of the scrambled path; S402, if the compensation code is selected in step S401, convert the characters in the original code into the compensation code according to the scrambling path and the conversion rule; if the original code is selected in step S401, convert the characters in the compensation code into the original code according to the scrambling path and the conversion rule; S403, combining the selected code with the remaining parts into a final combined code; S404, using the same Rubik's Cube structure, character table and conversion rules, according to the received scrambling path and encoding type selection, reversely apply the conversion rules, if the compensation code is used, restore the combined code to the original code; if the original code is used, restore the combined code to the compensation code.

2. The data security processing method based on artificial intelligence according to claim 1, characterized in that: The sensitive data sequence is split into several feasible character strings, a sliding window is preset, and the sliding window is a window with a fixed length. The left side of the preset sliding window is aligned with the first character of the sensitive data sequence. The preset sliding window is slid from left to right with one character as the sliding step until the right side of the sliding window is aligned with the last character of the sensitive data sequence, and the subsequence corresponding to the preset sliding window on the sensitive data sequence is recorded each time the preset sliding window slides.

3. The data security processing method based on artificial intelligence as claimed in claim 1, characterized in that: The strings whose frequency of occurrence of feasible strings is greater than the preset frequency threshold are taken as fixed strings, the intervals between adjacent positions of the fixed strings are calculated, a list containing all intervals is generated, the mean and standard deviation of all intervals are calculated, and the period distribution degree = .

4. The data security processing method based on artificial intelligence as claimed in claim 1, characterized in that: The scrambled path is the randomly scrambled state of the Rubik's Cube before each conversion, and each scrambled state corresponds to a unique path for determining the conversion result of the character.

Citation Information

Patent Citations

  • A method for protecting financially sensitive risk data

    CN116933297B

  • Financial sensitive risk data security protection method

    CN116933297A

  • Short message signature title real name automation method and system

    CN118741436A