Method and system for multi-parameter synchronization concealment in memory address
By creating a parameter mapping table and a parameter type mapping table, the splitting position and splitting function are dynamically generated. The splitting position is shared and the splitting function is randomly adjusted, which solves the problem of fixed parameter splitting position and achieves non-linear cracking difficulty and efficient data concealment.
Patent Information
- Application Number
- CN202511195944.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-08-26
AI Technical Summary
In existing technologies, the parameter splitting positions are independent and fixed, and the number of splitting functions is limited, which allows attackers to linearly track and crack the technology, making it impossible to effectively prevent memory scanning and tampering with high-frequency parameters.
By creating parameter mapping tables and parameter seed mapping tables, the correspondence between split positions and parameter sets, as well as the association between parameters and timestamp seeds, is recorded. Split positions and split functions are dynamically generated, split positions are shared, and split function types are randomly adjusted. Combined with dynamic memory management, split positions and array lengths are optimized.
It significantly improves data concealment and anti-cracking capabilities, transforming the cracking difficulty from linear to non-linear, balancing data concealment and operating efficiency in high-frequency scenarios, and avoiding additional CPU consumption and power consumption.
Smart Images

Figure CN120723679B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular to a method and system for synchronously hiding multiple parameters in memory address. BACKGROUND
[0002] In the field of computer data storage security, the prior art splits a single parameter into multiple sub-variables and stores them in an array, uses the original variable address as a camouflage address, and restores the real data by aggregating the sub-variables, to resist memory tampering. This method makes it difficult to locate the real address through precise search and fuzzy search by data splitting, to some extent, protecting data security.
[0003] However, the prior art has significant defects: the split position of each parameter is independent and fixed, the split value of a single parameter is only stored in a dedicated array position, and the mapping relationship between the split position and the parameter is single; the number of split functions is limited, usually 4 to 10 split function templates are shared by all parameters, and the function logic is simple, such as basic addition and subtraction operations. Attackers can track the memory changes of a single parameter, observe the value change rule of the split position, and combine the limited split function types to lock the real data address in linear time related to the number of split functions and the array length. Even if the original variable address is used as a camouflage address, since the association between the split position and the parameter is fixed, attackers can still crack it through linear tracking, resulting in limited data protection effect and difficulty in dealing with high-frequency parameter memory tampering attacks. The problem of CN120469942A is that if the attacker wants to tamper with a target parameter, he must repeatedly change the parameter and observe the data changes in the memory. Here, the changes can refer to different split functions or different split positions. In fact, different split positions are equivalent to selecting different split functions. The change in cracking difficulty is only linear, or even equivalent to swapping split positions. The split function is equivalent to performing a matrix operation multiple times.
[0004] Therefore, it is necessary to provide a method and system for synchronously hiding multiple parameters in memory address to solve the above technical problems. SUMMARY
[0005] To solve the above technical problems, the present application provides a method and system for synchronously hiding multiple parameters in memory address, which solves the problem that the split position of the parameter in the prior art is independent and fixed, and the number of split functions is limited, which allows attackers to crack linearly and cannot effectively prevent memory scanning from tampering with high-frequency parameters.
[0006] The present application provides a method for synchronously hiding multiple parameters in memory address, which comprises:
[0007] S1, create a number-parameter mapping table and a parameter-seed mapping table, wherein the number-parameter mapping table records the corresponding relationship between the split position and the parameter set, and the parameter-seed mapping table records the association between the parameter and the timestamp seed;
[0008] S2, in response to the parameter generation instruction, generate the split position based on the timestamp seed of the current parameter in the parameter-seed mapping table, and synchronously determine the corresponding split function;
[0009] S3, based on the split function, split the original value of the current parameter, assign a number value to the split position, that is, the split position marked retains the original value, and the split position not marked calculates a new value, and update the number-parameter mapping table;
[0010] S4, in response to the parameter modification instruction, find all split positions of the current parameter based on the number-parameter mapping table and the parameter-seed mapping table, and preferentially select the split position corresponding to the parameter set with multiple parameters as the associated split position;
[0011] S5, based on the associated split position, extract the associated parameter set from the number-parameter mapping table, trigger the parameter generation instruction of each parameter in the associated parameter set in a random order, and repeatedly execute S2 to S3 to complete the synchronous update of the number-parameter mapping table.
[0012] Preferably, the number-parameter mapping table is initially empty, the key is the element index of the array sequence, that is, the split position, and the value is the set containing all parameters mapped to the split position;
[0013] The parameter-seed mapping table is initially empty, the key is the identification of the parameter, and the value is the timestamp seed.
[0014] Preferably, in response to the parameter generation instruction, the timestamp seed of the current parameter in the parameter-seed mapping table is generated to generate the split position, and the corresponding split function is synchronously determined, specifically including:
[0015] The system timestamp at the response time of the parameter generation instruction is converted to obtain the timestamp seed of the current parameter, the length of the array sequence is subjected to a modulo operation through the timestamp seed, at least two different element indexes are generated as the split position, and the corresponding split function is synchronously determined;
[0016] If the generated split positions all exist in the number-parameter mapping table, the timestamp seed is updated and the split position is regenerated until there is one split position not occupied by other parameters, that is, the split position not marked.
[0017] Preferably, the type of the split function is determined by the timestamp seed, including addition, subtraction and mixed operation, and different timestamp seeds correspond to different split functions;
[0018] The number of split positions corresponding to a single parameter in the number-parameter mapping table is dynamically adjusted according to the size of the parameter value, that is, the smaller the parameter value, the fewer the number of split positions.
[0019] Preferably, the array sequence adopts a dynamic memory management mechanism, that is, after each execution of S2, the array sequence is allocated a new memory address, and the starting memory address of the array sequence is dynamically adjusted.
[0020] The memory length corresponding to the array sequence dynamically changes with the length of the array sequence, and is in a non-fixed ratio with the length of the parameter independent address.
[0021] Preferably, the original value of the current parameter is split based on the split function, and a split value is assigned to each split position, that is, the original value is retained for the marked split position, and a new value is calculated for the unmarked split position, and the number-parameter mapping table is updated, specifically including:
[0022] After obtaining the parameter original value of the current parameter, the parameter original value is split based on the split function to obtain a plurality of split values, and all the split values are restored to the parameter original value after being reversely calculated by the split function;
[0023] The split value is assigned to the split position, that is, the split value of the unmarked split position is randomly generated in the range of-0.5 to 1.5 times of the parameter original value, and is an integer; the split value of the marked split position remains unchanged due to the association with other parameters;
[0024] The current parameter is added to the parameter set in the number-parameter mapping table, and the mapping relationship between the split position and the parameter set in the number-parameter mapping table is updated.
[0025] Preferably, in response to the parameter modification instruction, all split positions of the current parameter are found based on the number-parameter mapping table and the parameter-seed mapping table, and the split positions corresponding to the parameter set with a plurality of parameters are preferentially selected as the associated split positions, specifically including:
[0026] All split positions corresponding to the current parameter are found through the parameter-seed mapping table, and the parameter set of each split position is obtained by traversing the number-parameter mapping table;
[0027] The number of parameters in the parameter set is counted, and the split position corresponding to the parameter set with two parameters is preferentially selected; if there is no split position corresponding to the parameter set with two parameters, the split position corresponding to the parameter set with more than two parameters and the least number of parameters is selected; if the number of parameters in the parameter set corresponding to all split positions is one, the timestamp seed of the current parameter is updated and S2 to S4 are re-executed.
[0028] Preferably, the associated parameter set is extracted from the number-parameter mapping table based on the associated split position, parameter generation instructions of parameters in the associated parameter set are triggered in random order, S2 to S3 are repeatedly executed, and the synchronization update of the number-parameter mapping table is completed, specifically including:
[0029] The corresponding parameters are extracted from the updated number-parameter mapping table to form the associated parameter set with the associated split position as the key;
[0030] The parameters in the associated parameter set are randomly sorted, parameter update instructions are generated for each parameter in turn, and S2 to S3 are repeatedly executed to complete the synchronization update of the number-parameter mapping table.
[0031] A multi-parameter synchronization and concealment system in a memory address, the system comprising:
[0032] A creation module for creating a number-parameter mapping table and a parameter-seed mapping table, wherein the number-parameter mapping table records the corresponding relationship between split positions and parameter sets, and the parameter-seed mapping table records the association relationship between parameters and timestamp seeds;
[0033] A generation module for generating split positions based on the timestamp seed of the current parameter in the parameter-seed mapping table in response to a parameter generation instruction, and synchronously determining the corresponding split function;
[0034] An allocation module for splitting the original value of the current parameter based on the split function, assigning a split value to the split position, that is, the original value is retained for the marked split position, a new value is calculated for the unmarked split position, and the number-parameter mapping table is updated;
[0035] A modification module for finding all split positions of the current parameter based on the number-parameter mapping table and the parameter-seed mapping table in response to a parameter modification instruction, and preferentially selecting the split positions corresponding to the parameter set with multiple parameters as the associated split positions;
[0036] A triggering module for extracting the associated parameter set from the number-parameter mapping table based on the associated split position, triggering parameter generation instructions of parameters in the associated parameter set in random order, repeatedly executing S2 to S3, and completing the synchronization update of the number-parameter mapping table.
[0037] Compared with the related art, the multi-parameter synchronization and concealment method and system in a memory address provided by the present application have the following beneficial effects:
[0038] The application creates a number parameter mapping table and a parameter seed mapping table, wherein the number parameter mapping table records the corresponding relationship between the split position and the parameter set, and the parameter seed mapping table records the association relationship between the parameter and the timestamp seed; in response to a parameter generation instruction, the split position of the current parameter is generated based on the timestamp seed of the parameter in the parameter seed mapping table, and the corresponding split function is synchronously determined; based on the split function, the original value of the current parameter is split, and the split number value is allocated to the split position, that is, the original value is retained for the marked split position, and the new value is calculated for the unmarked split position, and the number parameter mapping table is updated; in response to a parameter modification instruction, all split positions of the current parameter are found based on the number parameter mapping table and the parameter seed mapping table, and the split positions corresponding to the parameter set with multiple parameters are preferentially selected as the associated split positions; based on the associated split positions, the associated parameter set is extracted from the number parameter mapping table, the parameter generation instruction of each parameter in the associated parameter set is triggered in a random order, the split position generation and split number value allocation processes are repeatedly executed, and the synchronous update of the number parameter mapping table is completed, so that the cracking difficulty is changed from linear to nonlinear by sharing the split position by multiple parameters, and the data concealment and running efficiency are considered in the high-frequency scene.
[0039] The application significantly improves the data concealment and anti-cracking ability by designing the split position shared by multiple parameters. On the one hand, the split position is associated with multiple parameters through the number parameter mapping table, and the synchronous update of the associated parameters is triggered by the modification of a single parameter, so that the attacker cannot distinguish the split position corresponding to the target parameter, and the cracking difficulty is changed from linear to nonlinear. On the other hand, the split function and the split position are dynamically generated based on the timestamp seed, the type of the split function, the split position and the array length are dynamically changed every time the parameter is updated, the starting memory address and the length of the array are adjusted in real time, and the tracking rule of the attacker is further destroyed. Meanwhile, the application maintains the advantage of low performance overhead, and realizes protection only through basic memory allocation, value splitting and aggregation operation, without continuous locking or complex encryption operation, thereby avoiding additional CPU consumption and power consumption increase. In the high-frequency parameter scene, the safety and running efficiency are considered, and the contradiction between the insufficient protection strength and the performance loss in the prior art is effectively solved. The application can share the split number value in the array sequence, so that the data change of a single parameter in the memory is coupled with the change of other parameters, and the cracking difficulty is changed from linear to nonlinear. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A flowchart of a multi-parameter synchronous concealment method in a memory address is provided for the embodiments of the application.
[0041] Figure 2 A system block diagram of a multi-parameter synchronous concealment system in a memory address is provided for the embodiments of the application.
[0042] Figure 3A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0044] As Figure 1 shown is a flowchart of a multi-parameter synchronization and concealment method for a memory address provided by an embodiment of the present application, Figure 1 The execution subject of the method shown can be a software and / or a hardware device. The execution subject of the present application can include but is not limited to at least one of the following: a user device, a network device, etc. The user device can include but is not limited to a computer, a smart phone, a personal digital assistant (PDA) and the electronic devices mentioned above, etc. The network device can include but is not limited to a single network server, a server group composed of multiple network servers or a cloud composed of a large number of computers or network servers based on cloud computing, wherein the cloud computing is a kind of distributed computing, which is a super virtual computer composed of a loose coupled computer group. The present embodiment does not make any limitation. The steps S1 to S5 are included and are as follows:
[0045] S1, creating a number-parameter mapping table and a parameter-seed mapping table, wherein the number-parameter mapping table records the corresponding relationship between a split position and a parameter set, and the parameter-seed mapping table records the association relationship between a parameter and a timestamp seed;
[0046] The number-parameter mapping table is a data mapping structure, which is used to record the corresponding relationship between an element position for storing a split numerical value in an array sequence, i.e. a split position, and a set composed of all parameters mapped to the position, and is a core data carrier for realizing the sharing of a split position by multiple parameters. The parameter-seed mapping table is a data mapping structure, which is used to record the association relationship between a to-be-protected parameter and a corresponding timestamp seed, and provides a mapping basis for a parameter split rule through the unique association of a split function by the timestamp seed. The split position refers to an element index position in an array sequence for storing a child numerical value after parameter splitting, i.e. a split numerical value, and is a storage site of real data in a memory, which can be shared and associated by multiple parameters. The timestamp seed refers to a random identification value generated based on the system time at a parameter generation or update moment, which is used to dynamically generate a split position and determine a corresponding split function, and has randomness and uniqueness.
[0047] S2, in response to the parameter generation instruction, generating a split position based on the timestamp seed of the current parameter in the parameter mapping table, and synchronously determining a corresponding split function;
[0048] It can be understood that the parameter generation instruction refers to an operation instruction for triggering the split storage initialization or update of the parameter, for starting the split position generation and split value allocation of the parameter. The split function refers to an operation rule for splitting the original value of the parameter into multiple split values, and restoring the original value through the split values, including addition, subtraction, mixed operation, etc., which is uniquely determined by the timestamp seed.
[0049] S3, splitting the original value of the current parameter based on the split function, and assigning split values to the split positions, i.e. retaining the original value for the marked split position, calculating a new value for the unmarked split position, and updating the parameter mapping table;
[0050] It should be noted that the split value is a sub-value obtained by splitting the original value of the parameter through the split function, which is stored in the split position, and all split values can be accurately restored to the original value of the parameter through the reverse operation of the split function. The marked split position refers to a split position that already exists in the parameter mapping table and is associated with at least one parameter, and the split value stored therein remains unchanged due to the association with other parameters. The unmarked split position refers to a new split position that is not recorded in the parameter mapping table and is not associated with any parameter, and a new split value needs to be calculated and assigned according to the split function.
[0051] S4, in response to the parameter modification instruction, finding all split positions of the current parameter based on the parameter mapping table and the parameter seed mapping table, and preferentially selecting the split positions corresponding to the parameter set with multiple parameters as the associated split positions;
[0052] The parameter modification instruction is an operation instruction for triggering the update of the parameter value. The associated split position refers to the to-be-modified position selected from all split positions associated with the parameter in response to the parameter modification instruction, and preferentially selecting the split position associated with multiple parameters, where the number of parameters is generally set to two.
[0053] S5, based on the associated split position, extracting the associated parameter set from the parameter mapping table, triggering the parameter generation instruction of each parameter in the associated parameter set in a random order, and repeatedly executing S2 to S3 to complete the synchronous update of the parameter mapping table.
[0054] In actual application, the associated parameter set refers to a set composed of all parameters associated with the associated split position through the parameter mapping table, and when the associated split position is updated, the parameters in the set need to perform the split update process synchronously.
[0055] Specifically, first, the data association foundation is laid by constructing the number-parameter mapping table and the parameter-seed mapping table. The number-parameter mapping table, as the core association carrier, establishes the corresponding relationship between the split position in the array sequence and the parameter set mapped to the position; the parameter-seed mapping table realizes the binding of the to-be-protected parameter and the timestamp seed, and provides data support for the subsequent dynamic determination of the split rule, and the two together constitute the basic data architecture of the multi-parameter shared split position.
[0056] After receiving the parameter generation instruction, the split information generation process is started, the split position is generated through a random algorithm relying on the timestamp seed bound to the current parameter in the parameter-seed mapping table, and the corresponding split function is determined based on the uniqueness of the timestamp seed. This process breaks through the limitation of fixed split position in the prior art, dynamically controls the split position and function through the timestamp seed, and enhances the data concealment.
[0057] Based on the determined split function, the split operation is performed on the original value of the parameter, and a split value is allocated to the split position. For the marked split position that has been recorded in the number-parameter mapping table, the original split value remains unchanged because it is associated with other parameters; for the unmarked new split position, a new split value is calculated and allocated according to the split function, and the current parameter is added to the parameter set at the corresponding position in the number-parameter mapping table, completing the dynamic update of the mapping relationship.
[0058] When responding to the parameter modification instruction, the associated split position is selected as the associated split position by searching for all split positions associated with the current parameter by means of the associated data of the number-parameter mapping table and the parameter-seed mapping table, and by counting the number of elements in the parameter set of each position, so as to balance the update efficiency and the concealment effect.
[0059] Taking the determined associated split position as an index, all parameters associated with the position are extracted from the number-parameter mapping table to form a set, and the generation instruction of each parameter is triggered in random order to re-execute the split generation and value allocation process, thereby realizing the linkage update of the number-parameter mapping table, causing the synchronous change of associated parameters due to the modification of a single parameter, and greatly improving the positioning difficulty of attackers.
[0060] In the specific implementation process, the number-parameter mapping table is initially empty, the key is the element index of the array sequence, i.e. the split position, and the value is the set containing all parameters mapped to the split position;
[0061] The parameter-seed mapping table is initially empty, the key is the identification of the parameter, and the value is the timestamp seed.
[0062] It can be understood that the number parameter mapping table and the parameter seed mapping table are both initialized in an empty table state, constituring a basic data architecture of multi-parameter synchronous concealment. Among them, the key value structure of the number parameter mapping table explicitly points to the element index of the array sequence, which is the split position, as the specific bit of the stored split value in the memory; the value field is of a set type, used to accommodate all parameters mapped to the corresponding split position, realizing the association binding of a single split position and multiple parameters, and providing a data carrier for multi-parameter sharing of split positions.
[0063] The key value design of the parameter seed mapping table takes the parameter identifier as the retrieval basis, and the key field corresponds to the unique identifier of the to-be-protected parameter; the value field stores a timestamp seed, which serves as an association medium for the parameter and the split rule. The split function and split position will be dynamically generated based on the timestamp seed later, and through the binding relationship between the parameter and the timestamp seed, the limitation of single mapping of the parameter and the split position in the prior art is broken, laying a foundation for dynamic adjustment of the split rule.
[0064] The response parameter generation instruction generates a split position based on the timestamp seed of the current parameter in the parameter seed mapping table, and synchronously determines the corresponding split function, specifically including:
[0065] The system timestamp at the response moment of the parameter generation instruction is converted to obtain the timestamp seed of the current parameter, the length of the array sequence is subjected to a modulo operation through the timestamp seed, at least two different element indexes are generated as split positions, and the corresponding split function is synchronously determined;
[0066] If the generated split positions all exist in the number parameter mapping table, the timestamp seed is updated and the split positions are regenerated until there is one split position that is not occupied by other parameters, i.e., an unmarked split position.
[0067] The type of the split function is determined by the timestamp seed, including addition, subtraction and mixed operation, and different timestamp seeds correspond to different split functions.
[0068] The number of split positions corresponding to a single parameter in the number parameter mapping table is dynamically adjusted according to the size of the parameter value, i.e., the smaller the parameter value, the fewer the corresponding split positions.
[0069] The array sequence adopts a dynamic memory management mechanism, i.e., after each execution of S2, the array sequence is allocated with a new memory address, and the starting memory address of the array sequence is dynamically adjusted.
[0070] The memory length corresponding to the array sequence dynamically changes with the length of the array sequence, and is in a non-fixed ratio with the length of the parameter independent address.
[0071] In practical applications, first, a timestamp seed corresponding to the current parameter is generated based on the system timestamp of the triggering moment of the parameter generation instruction, which serves as the core identifier of the dynamic regulation and control split rule. By performing a modulo operation on the length of the array sequence with the timestamp seed, at least two different element indexes are generated as split positions, and a corresponding split function is determined based on the uniqueness of the timestamp seed, thereby achieving the dynamic binding of the split position and the operation rule.
[0072] If the generated split positions all exist in the number-parameter mapping table, i.e., they are all marked split positions, the split position generation process is re-executed by updating the timestamp seed until at least one split position that is not occupied by other parameters, i.e., an unmarked split position, is obtained, thereby ensuring that the new parameter can share the existing split positions and also obtain an independent storage site, thereby breaking through the limitation of the single mapping of split positions and parameters in the prior art.
[0073] The type of the split function is uniquely determined by the timestamp seed, covering various forms such as addition, subtraction, and mixed operations. Different timestamp seeds correspond to different split functions, thereby avoiding the limitation of a limited and fixed number of split functions in the prior art.
[0074] In addition, the number of split positions corresponding to a single parameter in the number-parameter mapping table dynamically adapts to the size of the parameter value. The smaller the parameter value, the fewer the number of split positions, thereby optimizing the memory occupancy efficiency while ensuring security.
[0075] The array sequence adopts a dynamic memory management mechanism. After each execution of the split position generation step, the system reallocates memory space for the array sequence, thereby dynamically changing the starting memory address. The memory length of the array sequence is adjusted in real time according to the number of elements, and the length of the parameter-independent storage address maintains a non-fixed proportional relationship. For example, the parameter-independent storage address is of the int type and has a fixed length of 4 bytes. When the array sequence contains 5 elements, the memory length is 22 bytes; when the number of elements increases to 10, the memory length is 45 bytes; and when the number of elements reaches 15, the memory length is 57 bytes. Through the dual dynamic changes of the memory address and the length, the anonymity of the real data is further improved, thereby resisting memory scanning and positioning attacks.
[0076] The split function is used to split the original value of the current parameter, and a split value is assigned to each split position. The original value is retained for the marked split positions, and a new value is calculated for the unmarked split positions. The number-parameter mapping table is updated, which specifically includes:
[0077] After obtaining the parameter original value of the current parameter, the parameter original value is split based on the split function to obtain multiple split values, and all split values are restored to the parameter original value after being reversely operated by the split function;
[0078] The split position is assigned a split value, i.e. the split value of the unmarked split position is randomly generated in the range of -0.5 to 1.5 times of the original value of the parameter, and is an integer; the split value of the marked split position remains unchanged due to the association with other parameters;
[0079] The current parameter is added to the parameter set of the number parameter mapping table, and the mapping relationship between the split position and the parameter set in the number parameter mapping table is updated.
[0080] To further optimize the split position generation efficiency and multi-parameter sharing effect, the optimal configuration of the average number of split values corresponding to a single parameter m and the array sequence length n is determined through the constraint condition, the key is to reduce the iteration number of split position generation, and to make the split value shared by multiple parameters as much as possible.
[0081] The constraint condition of m and n is:
[0082] ;
[0083] ;
[0084] ;
[0085] ;
[0086] ;
[0087] In the formula, is the expected space of the array sequence occupied after executing the generation instruction of the first parameter, ; is the average number of split values in all split functions; is the total number of parameters; is the length of the array sequence.
[0088] Simplify into a geometric sequence to get: , .
[0089] Based on the rules of hash mapping, to reduce the iteration number of split position generation, the first constraint condition is determined as: . The meaning of this formula is to ensure that at least one split position is unmarked.
[0090] The second constraint condition is: . In order to make the split value shared by multiple parameters as much as possible, the meaning of this formula is to ensure that the number of elements in the parameter set corresponding to the split position to be modified in the number parameter mapping table is strictly greater than 1.
[0091] The first constraint condition and the second constraint condition are both taken to the extreme case, and the integral And .
[0092] In addition, since the value of is usually selected as 4-7 according to experience, the above solving process is actually based on the determined value of (4, 5, 6, 7 in turn) to calculate the optimal And The maximum value, that is, on the basis of meeting the first constraint condition, the maximum value of the second constraint condition is obtained.
[0093] In practical application, first, the original value of the current parameter is obtained, and a splitting operation is performed on it through a preset splitting function to generate multiple split values. The splitting process strictly follows the reversibility principle, that is, all split values can be accurately restored to the original parameter value after the inverse operation of the splitting function, ensuring the accuracy of data operation.
[0094] For unmarked split positions, that is, positions not recorded in the number parameter mapping table, the split values of the unmarked split positions are randomly generated in the range of-0.5 to 1.5 times the original value of the parameter, and the value type is limited to integer, to ensure the randomness and operation accuracy of the splitting logic; for marked split positions, that is, positions associated with other parameters, since it is necessary to maintain the consistency of multi-parameter sharing, the stored split value of the marked split position remains unchanged, and the value of the unmarked position is adjusted to meet the overall restoration requirement.
[0095] After the allocation is completed, the current parameter is added to the parameter set of the corresponding split position in the number parameter mapping table, and the dynamic update of the mapping relationship is completed. The above process breaks through the limitation of single mapping of parameters and split positions in the prior art by sharing split positions of multiple parameters and dynamically adjusting values of unmarked positions, which not only guarantees data integrity, but also enhances the anonymity of split positions.
[0096] The response parameter modification instruction, based on the number parameter mapping table and the parameter seed mapping table, finds all split positions of the current parameter, and preferentially selects split positions corresponding to parameter sets with multiple parameters as associated split positions, specifically including:
[0097] All split positions corresponding to the current parameter are found through the parameter seed mapping table, and the parameter set of each split position is obtained by traversing the number parameter mapping table;
[0098] The number of parameters in the statistical parameter set is counted, and a split position corresponding to a parameter set with a parameter number of 2 is preferentially selected; if there is no split position corresponding to a parameter set with a parameter number of 2, a split position corresponding to a parameter set with a parameter number greater than 2 and a smallest parameter number is selected; if the parameter numbers of the parameter sets corresponding to all split positions are all 1, the timestamp seed of the current parameter is updated, and steps S2 to S4 are re-executed.
[0099] In the process of responding to the parameter modification instruction, the parameter seed mapping table and the number parameter mapping table are used as data support to carry out the retrieval and screening operation of the split position. First, the parameter seed mapping table is used to locate all split positions associated with the current parameter, and then the number parameter mapping table is used to obtain the parameter set corresponding to each split position to establish the mapping relationship between the position and the associated parameter.
[0100] Then, the number of elements of each parameter set is counted, and the associated split position is selected according to the priority: a split position corresponding to a parameter set with a parameter number of 2 is preferentially selected to balance the anonymity and update efficiency of multi-parameter sharing; if there is no such position, a split position corresponding to a parameter set with a parameter number greater than 2 and a smallest parameter number is selected to reduce the range of linkage update; if the parameter set numbers of all split positions are all 1, it indicates that the current mapping relationship is single, and the timestamp seed of the current parameter in the parameter seed mapping table needs to be updated, and the process of generating a split position (S2) to screening a position (S4) is re-executed. Through dynamic adjustment of the mapping relationship, the limitation of fixed association between parameters and split positions in the prior art is broken, and the data anonymity and cracking resistance are strengthened.
[0101] The associated parameter set is extracted from the number parameter mapping table based on the associated split position, and the parameter generation instruction of each parameter in the associated parameter set is triggered in a random order, and steps S2 to S3 are repeatedly executed to complete the synchronous update of the number parameter mapping table, which specifically includes:
[0102] The corresponding parameters are extracted from the updated number parameter mapping table to form an associated parameter set with the associated split position as a key;
[0103] The parameters in the associated parameter set are randomly sorted, and a parameter update instruction is generated for each parameter in turn, and steps S2 to S3 are repeatedly executed to complete the synchronous update of the number parameter mapping table.
[0104] It should be noted that the determined associated split position is used as a retrieval key to extract all parameters corresponding to the position from the updated number parameter mapping table to form an associated parameter set, which provides a data basis for multi-parameter linkage update.
[0105] Random ordering processing is performed on each parameter in the associated parameter set, and the parameter update order is disturbed to avoid the attacker from capturing a fixed rule. Then, an update instruction is generated for each parameter according to the ordering result, triggering repeated execution of the split information generation (S2) and split value allocation (S3) processes: the split position and split function are generated again based on the timestamp seed, the split value is allocated according to the split function rule, and the number-parameter mapping table is updated.
[0106] Through the above process, the modification of a single parameter triggers the synchronous split update of the associated parameters, so that the number-parameter mapping table maintains real-time data consistency, breaks through the limitation of independent parameter update in the prior art, and greatly improves the concealment and anti-tracking ability of real data through multi-parameter linkage change.
[0107] In summary, the application essentially shares the split values in the array sequence, so that the change of a single game parameter in the memory data is coupled with the change of other game parameters, and at the same time, the single game parameter part is actually invariable, which greatly enhances the difficulty of cracking in a nonlinear manner.
[0108] As shown in Figure 2 , it is a system block diagram of a multi-parameter synchronous concealment system in a memory address provided by an embodiment of the application, and the system comprises:
[0109] A creation module is configured to create a number-parameter mapping table and a parameter-seed mapping table, wherein the number-parameter mapping table records the correspondence between the split position and the parameter set, and the parameter-seed mapping table records the association between the parameter and the timestamp seed;
[0110] A generation module is configured to generate a split position based on the timestamp seed of the current parameter in the parameter-seed mapping table in response to a parameter generation instruction, and synchronously determine a corresponding split function;
[0111] An allocation module is configured to split the original value of the current parameter based on the split function, allocate split values to the split positions, i.e., the original value is retained for the marked split positions, and a new value is calculated for the unmarked split positions, and the number-parameter mapping table is updated;
[0112] A modification module is configured to find all split positions of the current parameter based on the number-parameter mapping table and the parameter-seed mapping table in response to a parameter modification instruction, and preferentially select the split positions corresponding to the parameter set with multiple parameters as the associated split positions;
[0113] A trigger module is configured to extract an associated parameter set from the number-parameter mapping table based on the associated split positions, trigger the parameter generation instruction of each parameter in the associated parameter set in a random order, repeatedly execute S2 to S3, and complete the synchronous update of the number-parameter mapping table.
[0114] Figure 2 The device of the embodiment shown can be used to performFigure 1 The steps in the method embodiments shown have similar principles and technical effects, and thus are not described here again.
[0115] An electronic device includes a memory and a processor, the memory stores a computer program, when the processor runs the computer program stored in the memory, the processor executes the steps of the multi-parameter synchronization concealment method in the memory address as claimed in any one of the above.
[0116] As Figure 3 shown, is a hardware structure schematic diagram of an electronic device provided by an embodiment of the application, the electronic device 30 includes: a processor 31, a memory 32 and a computer program; wherein
[0117] The memory 32 is used for storing the computer program, and the memory can also be a flash memory. The computer program is, for example, an application program, a functional module and the like for implementing the above method.
[0118] The processor 31 is used for executing the computer program stored in the memory to implement each step of the device in the above method. For details, see the related description in the above method embodiment.
[0119] Optionally, the memory 32 can be independent or integrated with the processor 31.
[0120] When the memory 32 is a device independent of the processor 31, the device can further include:
[0121] A bus 33 is used for connecting the memory 32 and the processor 31.
[0122] A readable storage medium, the readable storage medium stores a computer program, the computer program is executed by a processor to implement the steps of the multi-parameter synchronization concealment method in the memory address as claimed in any one of the above.
[0123] Wherein, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates transfer of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general purpose or special purpose computer. For example, the readable storage medium is coupled to the processor, so that the processor can read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in the user equipment. Of course, the processor and the readable storage medium can also exist as discrete components in the communication device. The readable storage medium can be read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy diskette, and optical data storage device, etc.
[0124] The present application also provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of the device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions so that the device implements the method provided by the various embodiments described above.
[0125] In the embodiments of the above device, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0126] Through the introduction of the above embodiments, the multi-parameter synchronization and concealment method and system in the memory address are used, a multi-parameter mapping table and a parameter seed mapping table are created, the multi-parameter mapping table records the corresponding relationship between the split position and the parameter set, and the parameter seed mapping table records the association relationship between the parameter and the timestamp seed; in response to a parameter generation instruction, a split position is generated based on the timestamp seed of the current parameter in the parameter seed mapping table, and a corresponding split function is synchronously determined; based on the split function, the original value of the current parameter is split, a split value is allocated to the split position, that is, the original value is retained for the marked split position, a new value is calculated for the unmarked split position, and the multi-parameter mapping table is updated; in response to a parameter modification instruction, all split positions of the current parameter are found based on the multi-parameter mapping table and the parameter seed mapping table, and the split positions corresponding to the parameter set with a plurality of parameters are preferentially selected as associated split positions; based on the associated split position, the associated parameter set is extracted from the multi-parameter mapping table, the parameter generation instruction of each parameter in the associated parameter set is triggered in a random order, the split position generation and split value allocation processes are repeatedly executed, and the synchronization update of the multi-parameter mapping table is completed, so that the cracking difficulty is increased from linear to nonlinear by sharing the split position of multiple parameters, and the data concealment and running efficiency are considered in the high-frequency scene by combining dynamic memory management.
[0127] The present application significantly improves the data concealment and anti-cracking ability by designing a multi-parameter shared split position. On the one hand, the split position is associated with multiple parameters through the multi-parameter mapping table, and the modification of a single parameter will trigger the synchronous update of the associated parameters, so that the attacker cannot distinguish the split position corresponding to the target parameter, and the cracking difficulty is increased from linear to nonlinear. On the other hand, the split function and the split position are dynamically generated by combining the timestamp seed, the type of the split function, the split position and the array length are dynamically changed each time the parameter is updated, the starting memory address and the length of the array are adjusted in real time, and the tracking rule of the attacker is further destroyed. At the same time, the present application maintains the advantage of low performance overhead, and only basic memory allocation, value splitting and aggregation operations are used to achieve protection, without the need for continuous locking or complex encryption operations, avoiding additional CPU consumption and power consumption increase, and considering safety and running efficiency in high-frequency parameter scenarios, effectively solving the contradiction between insufficient protection strength and performance loss in the prior art. The present application can share the split values in the array sequence, so that the data change of a single parameter in the memory is coupled with the change of other parameters, and the cracking difficulty is increased from linear to nonlinear.
[0128] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for synchronizing and concealing multiple parameters in a memory address, characterized in that, The method includes: S1. Create a parameter mapping table and a parameter seed mapping table. The parameter mapping table records the correspondence between the split position and the parameter set, and the parameter seed mapping table records the association between the parameter and the timestamp seed. S2, responds to the parameter generation instruction, generates the splitting position based on the timestamp seed of the current parameter in the parameter mapping table, and simultaneously determines the corresponding splitting function; S3, based on the splitting function, splits the original value of the current parameter, assigns splitting values to the splitting positions, that is, the original value is retained for the marked splitting positions, the new value is calculated for the unmarked splitting positions, and the parameter mapping table is updated; S4, responding to the parameter modification command, searches for all split positions of the current parameter based on the number parameter mapping table and the parameter type mapping table, and preferentially selects the split position corresponding to the parameter set with multiple parameters as the associated split position; S5, based on the associated split position, extract the associated parameter set from the parameter mapping table, trigger the parameter generation instructions of each parameter in the associated parameter set in a random order, repeat S2 to S3, and complete the synchronous update of the parameter mapping table; The response parameter generation instruction generates a splitting position based on the timestamp seed of the current parameter in the parameter seed mapping table, and synchronously determines the corresponding splitting function, specifically including: The system timestamp of the response time to the parameter generation instruction is converted to obtain the timestamp seed of the current parameter. The length of the array sequence is moduloed by the timestamp seed to generate at least two different element indices as split positions, and the corresponding split function is determined synchronously. If all generated split positions already exist in the parameter mapping table, update the timestamp seed and regenerate the split positions until there is one split position that is not occupied by other parameters, i.e., an unmarked split position.
2. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The parameter mapping table is initially empty, with the key being the element index of the array sequence, i.e., the split position, and the value being a set containing all parameters mapped to that split position; The parameter mapping table is initially empty, with the key being the parameter identifier and the value being the timestamp seed.
3. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The type of the splitting function is determined by the timestamp seed, including addition, subtraction and mixed operations, and different timestamp seeds correspond to different splitting functions; The number of splitting positions corresponding to a single parameter in the parameter mapping table is dynamically adjusted according to the parameter value; that is, the smaller the parameter value, the fewer the corresponding splitting positions.
4. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The array sequence adopts a dynamic memory management mechanism, that is, after each execution of S2, the memory address of the array sequence is reallocated and the starting memory address of the array sequence is dynamically adjusted. The memory length corresponding to the array sequence changes dynamically with the length of the array sequence and is not in a fixed proportion to the length of the parameter-independent address.
5. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The process of splitting the original value of the current parameter based on the splitting function, assigning splitting values to the splitting positions (i.e., retaining the original value for marked splitting positions, calculating new values for unmarked splitting positions, and updating the parameter mapping table) specifically includes: After obtaining the original value of the current parameter, the original value of the parameter is split into multiple split values based on the split function, and all split values are restored to the original value of the parameter after the split function is reversed. Assign split values to split positions. The split values for unmarked split positions are randomly generated within the range of -0.5 to 1.5 times the original parameter value and are integers. The split values for marked split positions remain unchanged because they are associated with other parameters. Add the current parameter to the parameter set of the parameter mapping table to update the mapping relationship between the split position in the parameter mapping table and the parameter set.
6. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The response parameter modification instruction searches for all split positions of the current parameter based on the number parameter mapping table and the parameter type mapping table, and preferentially selects the split positions corresponding to parameter sets with multiple parameters as associated split positions, specifically including: The parameter mapping table is used to find all split positions corresponding to the current parameter, and the parameter set of each split position is obtained by traversing the parameter mapping table. The number of parameters in the parameter set is counted, and the split position corresponding to the parameter set with 2 parameters is selected first. If there is no split position corresponding to the parameter set with 2 parameters, the split position corresponding to the parameter set with more than 2 parameters and the fewest parameters is selected. If the number of parameters in the parameter sets corresponding to all split positions is 1, the timestamp seed of the current parameter is updated and S2 to S4 are re-executed.
7. The method for synchronizing and concealing multiple parameters in a memory address according to claim 1, characterized in that, The process of extracting a set of associated parameters from the parameter mapping table based on the associated split position, triggering parameter generation instructions for each parameter in the associated parameter set in a random order, and repeatedly executing S2 to S3 to complete the synchronous update of the parameter mapping table, specifically includes: Using the associated split position as the key, extract the corresponding parameters from the updated parameter mapping table to form an associated parameter set; The parameters in the associated parameter set are randomly sorted, and parameter update instructions are generated for each parameter in turn. S2 to S3 are executed repeatedly to complete the synchronous update of the parameter mapping table.
8. A multi-parameter synchronization concealment system in memory addresses, applied to the multi-parameter synchronization concealment method in memory addresses as described in any one of claims 1-7, characterized in that, The system includes: The module is used to create a parameter mapping table and a parameter seed mapping table. The parameter mapping table records the correspondence between split positions and parameter sets, and the parameter seed mapping table records the association between parameters and timestamp seeds. The generation module is used to respond to parameter generation instructions, generate split positions based on the timestamp seed of the current parameter in the parameter seed mapping table, and simultaneously determine the corresponding split function; The allocation module is used to split the original value of the current parameter based on the splitting function, assign splitting values to the splitting positions, that is, the original value is retained for the marked splitting positions, the new value is calculated for the unmarked splitting positions, and the parameter mapping table is updated. The modification module is used to respond to parameter modification commands. It searches for all split positions of the current parameter based on the parameter mapping table and the parameter type mapping table, and prioritizes the split positions corresponding to parameter sets with multiple parameters as associated split positions. The trigger module is used to extract the set of associated parameters from the parameter mapping table based on the associated split position, trigger the parameter generation instructions of each parameter in the set of associated parameters in a random order, and repeat S2 to S3 to complete the synchronous update of the parameter mapping table.
Citation Information
Patent Citations
Automatic memory protection method and device, computer equipment and storage medium
CN120256337A
Method for disguising and hiding data in memory address
CN120469942A