Data thread protection method and terminal

By generating and comparing data thread identifiers, the problem of excessive thread resource occupation is solved, the protection and security of data threads are improved, and real-time monitoring and protection of key data is achieved.

CN118535376APending Publication Date: 2024-08-23FUJIAN TIANYI WEBSOFT TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410418800.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In scenarios where there is a lot of critical data, the existing technology requires setting up multiple CRC threads and daemon threads respectively, resulting in excessive thread resource usage and affecting data security.

Method used

By obtaining the data address of key data, a monitoring thread is created and an initial thread identifier is generated. Real-time thread identifiers are generated according to time periods and compared to determine the data security status to avoid establishing additional protection threads.

Benefits of technology

It effectively reduces the thread resource occupation, improves the protection and security of the data thread, and avoids the risk of the protection thread being damaged by attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535376A
    Figure CN118535376A
Patent Text Reader

Abstract

The invention discloses a data thread protection method and a terminal, and the method comprises the steps: creating a monitoring thread for key data, and generating a corresponding initial thread identifier according to a data address and a thread address of the key data; and in the subsequent monitoring process, the data address and the thread address are obtained in real time according to the time period to generate a real-time thread identifier. And finally, determining whether the current key data is in a safe state or not by comparing whether the initial thread identifier is consistent with the real-time thread identifier or not. In the process of protecting the monitoring thread, an additional protection thread does not need to be established, and whether the monitoring thread is changed or not can be judged only through identification based on the monitoring thread, so that whether the key data is modified or not is determined, the risk that the protection thread is attacked and damaged is avoided, and the protection performance and safety of the monitoring thread are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data threads, and in particular to a data thread protection method and a terminal. Background Art

[0002] In order to protect data security, a CRC (Cyclic Redundancy Check) thread is usually set up to perform periodic verification of key data to confirm whether the key data has been tampered with. When there are several key data, it is necessary to set up a corresponding CRC thread for each key data; because after the CRC thread is destroyed, the thread's data protection function is lost, which will affect the security of the key data. Therefore, for each CRC thread, it is necessary to set up a corresponding daemon thread to prevent the CRC thread from being destroyed; and for the daemon thread, it is necessary to set up a general daemon thread to protect the daemon thread from being destroyed. Therefore, in a scenario with a lot of key data, it is necessary to set up multiple CRC threads and corresponding daemon threads in sequence, resulting in the occupation of thread resources. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a data thread protection method and terminal, which can improve the protection and security of the data thread while reducing thread resource occupation.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0005] A data thread protection method, comprising:

[0006] Get the data address of key data;

[0007] Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address;

[0008] Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table;

[0009] Comparing the thread identification record table with the initial thread identification;

[0010] If the comparison results are completely consistent, it is determined that the key data is in a safe state;

[0011] If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

[0012] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0013] A data thread protection terminal comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when executing the computer program:

[0014] Get the data address of key data;

[0015] Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address;

[0016] Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table;

[0017] Comparing the thread identification record table with the initial thread identification;

[0018] If the comparison results are completely consistent, it is determined that the key data is in a safe state;

[0019] If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

[0020] The beneficial effects of the present invention are: while creating a monitoring thread for key data, a corresponding initial thread identifier is generated according to the data address and thread address of the key data; in the subsequent monitoring process, the data address and thread address are acquired in real time according to the time period to generate a real-time thread identifier. Finally, by comparing whether the initial thread identifier and the real-time thread identifier are consistent, it can be confirmed whether the current key data is in a safe state. In the process of protecting the monitoring thread, there is no need to establish an additional protection thread. It is only necessary to identify the monitoring thread based on the monitoring thread to determine whether the monitoring thread has changed, thereby determining whether the key data has been modified, avoiding the risk of the protection thread being attacked and destroyed, and effectively improving the protection and security of the monitoring thread. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of a method for protecting a data thread provided by an embodiment of the present invention;

[0022] Figure 2 Another program flow chart of a data thread protection method provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a data thread protection terminal provided by an embodiment of the present invention;

[0024] Description of labels:

[0025] 300. A data thread protection terminal; 301. A memory; 302. A processor. DETAILED DESCRIPTION

[0026] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0027] Please refer to Figure 1 , an embodiment of the present invention provides a data thread protection method, comprising:

[0028] Get the data address of key data;

[0029] Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address;

[0030] Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table;

[0031] Comparing the thread identification record table with the initial thread identification;

[0032] If the comparison results are completely consistent, it is determined that the key data is in a safe state;

[0033] If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

[0034] From the above description, it can be seen that the beneficial effects of the present invention are: while creating a monitoring thread for key data, a corresponding initial thread identifier is generated according to the data address and thread address of the key data; in the subsequent monitoring process, the data address and thread address are acquired in real time according to the time period to generate a real-time thread identifier. Finally, by comparing whether the initial thread identifier and the real-time thread identifier are consistent, it can be confirmed whether the current key data is in a safe state. In the process of protecting the monitoring thread, there is no need to establish an additional protection thread. It is only necessary to identify the monitoring thread based on the monitoring thread to determine whether the monitoring thread has changed, thereby determining whether the key data has been modified, avoiding the risk of the protection thread being attacked and destroyed, and effectively improving the protection and security of the monitoring thread.

[0035] Further, generating the initial thread identifier of the monitoring thread according to the data address and the thread address includes:

[0036] Obtaining a current data identifier of the key data stored in the data address;

[0037] Verifying the key data in the data address through the monitoring thread to obtain a current verification identifier;

[0038] According to a preset identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are combined in sequence to generate an initial thread identifier.

[0039] From the above description, it can be seen that when creating a monitoring thread, the corresponding key data is found according to the data address to extract the current data identifier. At the same time, the monitoring thread will perform data verification on the key data in the data address at this time to ensure that the key data stored in the current data address has not been tampered with. Finally, the initial thread identifier is generated by combining the data address, the current verification identifier, the thread address and the current data identifier, which is used as the standard feature of the monitoring thread to provide a reference value for subsequent key data monitoring.

[0040] Further, the determining that the key data is in an unsafe state includes:

[0041] If it is detected that the real-time thread identifier in the thread identifier record table is inconsistent with the initial thread identifier, it is determined that the key data is modified.

[0042] From the above description, it can be seen that since the real-time thread identifier in the thread identifier record table is a record of changes in the data characteristics of the monitoring thread within a period of time, if it is consistent with the initial thread identifier, it means that the key data has not been modified. If it is inconsistent with the initial thread identifier, it means that the key data has been modified, because after the key data is modified, its corresponding verification identifier is also modified, so it must be different from the initial thread identifier, so as to realize the monitoring of key data.

[0043] Further, after determining that the key data is in an unsafe state, the method further includes:

[0044] If it is detected that there is a blank record in the thread identification record table, it is determined that the monitoring thread is destroyed.

[0045] As can be seen from the above description, when the monitoring thread stops running, it is impossible to verify and obtain the verification mark, and thus it is impossible to generate the corresponding real-time thread mark, so it can be reversely confirmed that the monitoring thread is stopped. In this way, the security status of the monitoring thread can be accurately analyzed.

[0046] Furthermore, after the monitoring thread is created according to the data address to obtain the thread address, the method further includes:

[0047] Counting the number of threads of the monitoring thread, and randomly generating a unique identifier of the monitoring thread according to the number of threads;

[0048] The initial thread identifier and the real-time thread identifier are marked accordingly according to the unique identifier.

[0049] From the above description, we can see that due to the large amount of key data to be protected, a large number of corresponding monitoring threads are created, so a unique identifier is randomly generated for each monitoring thread to distinguish them. At the same time, based on the unique identifier, the initial thread identifier and real-time thread identifier of the corresponding monitoring thread can be quickly queried, so as to perform comparative analysis and improve the accuracy of data thread protection.

[0050] Please refer to Figure 3 Another embodiment of the present invention provides a data thread protection terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when executing the computer program:

[0051] Get the data address of key data;

[0052] Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address;

[0053] Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table;

[0054] Comparing the thread identification record table with the initial thread identification;

[0055] If the comparison results are completely consistent, it is determined that the key data is in a safe state;

[0056] If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

[0057] From the above description, it can be seen that the beneficial effects of the present invention are: while creating a monitoring thread for key data, a corresponding initial thread identifier is generated according to the data address and thread address of the key data; in the subsequent monitoring process, the data address and thread address are acquired in real time according to the time period to generate a real-time thread identifier. Finally, by comparing whether the initial thread identifier and the real-time thread identifier are consistent, it can be confirmed whether the current key data is in a safe state. In the process of protecting the monitoring thread, there is no need to establish an additional protection thread. It is only necessary to identify the monitoring thread based on the monitoring thread to determine whether the monitoring thread has changed, thereby determining whether the key data has been modified, avoiding the risk of the protection thread being attacked and destroyed, and effectively improving the protection and security of the monitoring thread.

[0058] Further, generating the initial thread identifier of the monitoring thread according to the data address and the thread address includes:

[0059] Obtaining a current data identifier of the key data stored in the data address;

[0060] Verifying the key data in the data address through the monitoring thread to obtain a current verification identifier;

[0061] According to a preset identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are combined in sequence to generate an initial thread identifier.

[0062] It can be seen from the above description that when creating a monitoring thread, the corresponding key data is found according to the data address to extract the current data identifier. At the same time, the monitoring thread will perform data verification on the key data in the data address at this time to ensure that the key data stored in the current data address has not been tampered with. The current data identifier and the current verification identifier are recorded in the thread identifier at the same time to verify the integrity of the data verification function of the monitoring thread. If the current data identifier is inconsistent with the current verification identifier, it means that there is an error identifier in the current data identifier and the current verification identifier, so the identifier needs to be further confirmed to improve the accuracy of the thread identifier. Finally, the initial thread identifier is generated by combining the data address, the current verification identifier, the thread address and the current data identifier, which is used as the standard feature of the monitoring thread to provide a reference value for subsequent key data monitoring.

[0063] Further, the determining that the key data is in an unsafe state includes:

[0064] If it is detected that the real-time thread identifier in the thread identifier record table is inconsistent with the initial thread identifier, it is determined that the key data is modified.

[0065] From the above description, it can be seen that since the real-time thread identifier in the thread identifier record table is a record of changes in the data characteristics of the monitoring thread within a period of time, if it is consistent with the initial thread identifier, it means that the key data has not been modified. If it is inconsistent with the initial thread identifier, it means that the key data has been modified, because after the key data is modified, its corresponding verification identifier is also modified, so it must be different from the initial thread identifier, so as to realize the monitoring of key data.

[0066] Further, after determining that the key data is in an unsafe state, the method further includes:

[0067] If it is detected that there is a blank record in the thread identification record table, it is determined that the monitoring thread is destroyed.

[0068] As can be seen from the above description, when the monitoring thread stops running, it is impossible to verify and obtain the verification mark, and thus it is impossible to generate the corresponding real-time thread mark, so it can be reversely confirmed that the monitoring thread is stopped. In this way, the security status of the monitoring thread can be accurately analyzed.

[0069] Furthermore, after the monitoring thread is created according to the data address to obtain the thread address, the method further includes:

[0070] Counting the number of threads of the monitoring thread, and randomly generating a unique identifier of the monitoring thread according to the number of threads;

[0071] The initial thread identifier and the real-time thread identifier are marked accordingly according to the unique identifier.

[0072] From the above description, we can see that due to the large amount of key data to be protected, a large number of corresponding monitoring threads are created, so a unique identifier is randomly generated for each monitoring thread to distinguish them. At the same time, based on the unique identifier, the initial thread identifier and real-time thread identifier of the corresponding monitoring thread can be quickly queried, so as to perform comparative analysis and improve the accuracy of data thread protection.

[0073] A data thread protection method and terminal provided in an embodiment of the present invention can be applied to various game program scenarios to flexibly check and protect the data security of the game program. The following is an explanation through specific embodiments:

[0074] Please refer to Figure 1 to Figure 2 , Embodiment 1 of the present invention is:

[0075] A data thread protection method, comprising:

[0076] S1. Get the data address of key data.

[0077] S2. Create a monitoring thread according to the data address to obtain a thread address, and generate an initial thread identifier of the monitoring thread according to the data address and the thread address.

[0078] Specifically, the step S2 includes:

[0079] S21. Obtain the current data identifier of the key data stored in the data address.

[0080] S22. Verify the key data in the data address through the monitoring thread to obtain a current verification identifier.

[0081] S23. According to a preset identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are sequentially combined to generate an initial thread identifier.

[0082] In some embodiments, the generation rules of the initial thread identifier and the real-time thread identifier are the same. The thread identifier can be expressed as NMTD, where N represents the data address, M represents the current check identifier, T represents the thread address, and D represents the current data identifier. For example, for a key data, the data address where it is stored is N=111, and the current check identifier obtained by the monitoring thread after checking the key data in the data address N=111 is M=94M41. The thread address of the monitoring thread that monitors the key data is T=0, and the current data identifier D=94M41 obtained is obtained. Then the thread identifier of the monitoring thread, the current thread identifier, can be expressed as 111|94M41|0|94M41, where | is added between the data to distinguish different data codes.

[0083] In some embodiments, the above step S2 is performed by the AI ​​server, and after the initial thread identifier is generated, the initial thread identifier is stored in the AI ​​server so that the subsequent server can obtain the initial thread identifier for comparison.

[0084] S3. Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period to obtain a thread identification record table.

[0085] In some embodiments, the step S3 is specifically as follows: according to a preset time period, the current data identifier of the key data stored in the data address in each of the time periods is obtained, and the key data in the data address is verified by the monitoring thread to obtain the current verification identifier; according to the identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are sequentially combined to generate a real-time thread identifier in the current time period. In this way, while the monitoring thread protects the key data of the data address, the current data identifier and verification identifier are obtained in real time according to the time period to generate the thread identifier of the monitoring thread at different times, and the thread identifier is used to characterize the data status currently monitored by the monitoring thread, without the need to perform real-time protection on the monitoring thread by creating an additional protection thread, which greatly reduces the resource occupation of the data thread.

[0086] In some embodiments, for the same monitoring thread, if its key data has not been modified, its corresponding thread identifier should remain consistent. When the key data is modified, the corresponding data identifier and the verification identifier obtained by verifying it will also change at any time. For a computer program, in the absence of the original reference value, it is impossible to determine whether the current data has been modified and what kind of modification has occurred, so it is necessary to compare it with the initial thread identifier to confirm the change of the current data. For example, for a monitoring thread, its initial thread identifier is 111|94M41|0|94M41, and then the real-time thread identifier for each time period is generated according to the preset time period, and the current data identifier obtained in one time period is FFM41, and the current verification identifier obtained after verifying the data address 111 is also FFM41, so the real-time thread identifier for this time period is 111|FFM41|0|FFM41. At this time, the initial thread identifier is inconsistent with the real-time thread identifier.

[0087] Specifically, after the monitoring thread is created according to the data address to obtain the thread address, the method further includes:

[0088] S201, counting the number of threads of the monitoring thread, and randomly generating a unique identifier of the monitoring thread according to the number of threads;

[0089] S202: Mark the initial thread identifier and the real-time thread identifier accordingly according to the unique identifier.

[0090] In some embodiments, the unique identifier of the monitoring thread randomly generated according to the number of threads can be expressed as AF, where A represents the total number of monitoring threads, and F represents the randomly generated identifier. For example, there are currently 5 monitoring threads, and the monitoring thread created by the key data with data address 111 has a randomly generated identifier of 1NS, then the unique identifier of the monitoring thread is expressed as 5|1NS, and marking the initial thread identifier of the monitoring thread is expressed as 5|1NS=111|94M41|0|94M41.

[0091] S4. Compare the thread identification record table with the initial thread identification.

[0092] In some embodiments, the AI ​​server is periodically triggered to obtain a thread identification record table, and the thread identification record table is compared with the initial thread identification.

[0093] S5. If the comparison results are completely consistent, it is determined that the key data is in a safe state.

[0094] S6. If there is inconsistency in the comparison result, it is determined that the key data is in an unsafe state.

[0095] In some embodiments, the unique identifier corresponding to the initial thread identifier is first determined, and all real-time thread identifiers corresponding to the unique identifier are searched in the thread identifier record table, and the initial thread identifier is compared with the real-time thread identifiers one by one in the order of time periods. If the initial thread identifier is consistent with all real-time thread identifiers, the key data is in a safe state. If the initial thread identifier is inconsistent with one of the real-time thread identifiers, the key data is in an unsafe state.

[0096] Specifically, step S6 includes:

[0097] S61: If it is detected that the real-time thread identifier in the thread identifier record table is inconsistent with the initial thread identifier, it is determined that the key data is modified.

[0098] In some embodiments, if the real-time thread identifiers of the key data with data address 111 in different time periods are: 5|1NS=111|94M41|0|94M41→5|1NS=111|94M41|0|94M41→5|1NS=111|FFM41|0|FFM41, it means that the key data has been modified. If the real-time thread identifiers of the key data with data address 111 in different time periods are: 5|1NS=111|94M41|0|94M41→5|1NS=111|FFM41|0|FFM41→5|1NS=111|94M41|0|94M41, it means that the key data has been modified. In this way, real-time monitoring of key data and monitoring threads is achieved.

[0099] Specifically, after step S6, the method further includes:

[0100] S7. If it is detected that there is a blank record in the thread identification record table, it is determined that the monitoring thread is destroyed.

[0101] In some embodiments, if the real-time thread identifiers of the key data with data address 111 in different time periods are: 5|1NS=111|94M41|0|94M41→[blank]→5|1NS=111|FFM41|0|FFM41, it means that the monitoring thread has been destroyed. When the thread is running, since the thread is in periodic activity, the AI ​​server will definitely get the corresponding periodic response in the periodic service. When the monitoring thread is destroyed and stopped, the system cannot obtain the corresponding periodic response, and the thread identifier cannot be generated.

[0102] Embodiment 2 of the present invention is:

[0103] A data thread protection method is applied in a practical scenario.

[0104] In a sandbox game, due to the large amount of real-time data of battles in the game, if the real-time data of the battle process is placed on the server for processing, it will cause an excessive load on the server, so the real-time data cannot be placed on the server for processing. Therefore, in sandbox games, three data addresses storing key data are usually protected by corresponding threads. After running for a period of time, a large amount of abnormal player data appeared in the game leaderboard, but the game server did not receive any abnormal data reminders, indicating that there was an abnormality in the thread protection. In this regard, the present invention creates corresponding monitoring threads for the three data addresses storing key data, and simultaneously generates a unique identifier and an initial thread identifier corresponding to each monitoring thread.

[0105] Among them, the three data addresses storing key data are 111, 222 and 333 respectively, the data identifiers corresponding to the three data addresses are 94M41, 14NAF and IL1AF respectively, the check identifiers corresponding to the three data addresses are 94M41, 14NAF and IL1AF respectively, and the thread addresses corresponding to the three data addresses are 0, 1 and 1 respectively. Therefore, the unique identifier and initial thread identifier of the monitoring thread corresponding to the three data addresses are: 3|F12=111|94M41|0|94M41, 3|DF1=222|14NAF|1|14NAF and 3|ABT=333|IL1AF|1|IL1AF, and the above unique identifier and initial thread identifier are stored in the AI ​​server.

[0106] During the game running, the real-time thread identification of the monitoring thread in different time periods is generated according to the data address and thread address in each time period according to the preset time period to obtain a thread identification record table. Among them, in the thread identification record table, the real-time thread identifications of the monitoring threads corresponding to the data address 111 are: 3|F12=111|94M41|0|94M41→3|F12=111|94M41|0|94M41→3|F12=111|FFM41|0|FFM41→3|F12=111|94M41|0|94M41; the real-time thread identifications of the monitoring threads corresponding to the data address 222 are: 3|DF1=222|14NAF|1|14NAF→[blank]→[blank]→3|DF1=222|14NAF|1|14NAF; the real-time thread identifications of the monitoring threads corresponding to the data address 333 are: 3|ABT=333|IL1AF|1|IL1AF→[blank]→[blank]→3|ABT=333|IL1AF|1|IL1AF.

[0107] The AI ​​server compared the real-time thread identifiers of the above three monitoring threads with their initial thread identifiers and found that the key data in data address 111 was modified and then restored, and the monitoring threads corresponding to the key data in data address 222 and data address 333 were suspended and then restored. Based on the above comparison results, it can be confirmed that there are game players who modify key data by pausing the thread and then perform game operations, and then restore the data after completing the game operations to achieve the effect of cheating in the game. Based on this, the game player is banned and the players with abnormal data in the game rankings are cleared, which effectively maintains the security of game data and ensures the game experience of other normal players.

[0108] Please refer to Figure 3 , Embodiment 3 of the present invention is:

[0109] A data thread protection terminal 300 includes a memory 301, a processor 302, and a computer program stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program, a data thread protection method in the above-mentioned embodiment 1 and embodiment 2 is implemented.

[0110] In summary, the present invention provides a data thread protection method and terminal. While creating a monitoring thread for key data, a corresponding initial thread identifier is generated according to the data address, data identifier, verification identifier of the data address and thread address of the key data; in the subsequent monitoring process, the data address, data identifier, verification identifier of the data address and thread address in each time period are obtained in real time to generate a real-time thread identifier for each time period. Finally, by comparing whether the initial thread identifier and the real-time thread identifier are completely consistent, it can be confirmed whether the current key data is in a safe state. In the process of protecting the monitoring thread, there is no need to establish an additional protection thread. It only needs to be identified based on the monitoring thread to determine whether the monitoring thread has changed, thereby determining whether the key data has been modified, avoiding the risk of the protection thread being attacked and destroyed, and effectively improving the protection and security of the monitoring thread.

[0111] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A data thread protection method, characterized in that: include: Get the data address of key data; Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address; Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table; Comparing the thread identification record table with the initial thread identification; If the comparison results are completely consistent, it is determined that the key data is in a safe state; If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

2. A data thread protection method according to claim 1, characterized in that: The step of generating the initial thread identifier of the monitoring thread according to the data address and the thread address includes: Obtaining a current data identifier of the key data stored in the data address; Verifying the key data in the data address through the monitoring thread to obtain a current verification identifier; According to a preset identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are combined in sequence to generate an initial thread identifier.

3. A data thread protection method according to claim 1, characterized in that: Determining that the key data is in an unsafe state includes: If it is detected that the real-time thread identifier in the thread identifier record table is inconsistent with the initial thread identifier, it is determined that the key data is modified.

4. A data thread protection method according to claim 1, characterized in that: After determining that the key data is in an unsafe state, the method further includes: If it is detected that there is a blank record in the thread identification record table, it is determined that the monitoring thread is destroyed.

5. A data thread protection method according to claim 1, characterized in that: After the monitoring thread is created according to the data address to obtain the thread address, the method further includes: Counting the number of threads of the monitoring thread, and randomly generating a unique identifier of the monitoring thread according to the number of threads; The initial thread identifier and the real-time thread identifier are marked accordingly according to the unique identifier.

6. A data thread protection terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Get the data address of key data; Creating a monitoring thread according to the data address to obtain a thread address, and generating an initial thread identifier of the monitoring thread according to the data address and the thread address; Generate the real-time thread identification of the monitoring thread in different time periods according to the data address and the thread address in each time period according to the preset time period, and obtain a thread identification record table; Comparing the thread identification record table with the initial thread identification; If the comparison results are completely consistent, it is determined that the key data is in a safe state; If there is inconsistency in the comparison results, it is determined that the key data is in an unsafe state.

7. A data thread protection terminal according to claim 6, characterized in that: The step of generating the initial thread identifier of the monitoring thread according to the data address and the thread address includes: Obtaining a current data identifier of the key data stored in the data address; Verifying the key data in the data address through the monitoring thread to obtain a current verification identifier; According to a preset identifier generation rule, the data address, the current verification identifier, the thread address and the current data identifier are combined in sequence to generate an initial thread identifier.

8. A data thread protection terminal according to claim 6, characterized in that: Determining that the key data is in an unsafe state includes: If it is detected that the real-time thread identifier in the thread identifier record table is inconsistent with the initial thread identifier, it is determined that the key data is modified.

9. A data thread protection terminal according to claim 6, characterized in that: After determining that the key data is in an unsafe state, the method further includes: If it is detected that there is a blank record in the thread identification record table, it is determined that the monitoring thread is destroyed.

10. A data thread protection terminal according to claim 6, characterized in that: After the monitoring thread is created according to the data address to obtain the thread address, the method further includes: Counting the number of threads of the monitoring thread, and randomly generating a unique identifier of the monitoring thread according to the number of threads; The initial thread identifier and the real-time thread identifier are marked accordingly according to the unique identifier.