Data temporary storage method and terminal
By introducing virtualized database technology into traditional databases, using temporary memory blocks to store data and clear them according to conditions, the problems of data privacy and security in traditional database storage are solved, and efficient and secure temporary storage of data is achieved.
Patent Information
- Application Number
- CN202411913831.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-23
AI Technical Summary
Traditional databases are stored on disk, and there is a risk of being cracked or restored, making it difficult to ensure the privacy and security of data, especially in scenarios where temporary storage is required.
Using virtualized database technology, a virtualized database is created when the target software is run, and when the target data is written to the database, the data is stored in the temporary memory block of the virtualized database, and the freed memory block is cleared according to the set temporary data clearing conditions.
It realizes temporary storage of data, only stored in temporary memory blocks, and is not synchronized with database files, which enhances the privacy and security of data and avoids the risk of recoverable data in database files.
Smart Images

Figure CN120030562A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data temporary storage method and terminal. Background Art
[0002] A database is a computer software system that stores and manages data according to data structures. It can store millions, tens of millions, or even hundreds of millions of data according to rules. Data comes from many sources, such as travel records, consumption records, web pages browsed, messages sent, and so on.
[0003] When people use various software, they will generate a lot of data. Among them, temporary data such as chat messages and transaction records are private and need to be used in the short term, but after use, people do not want these data to be obtained by others without permission. For this reason, some existing software also uses encrypted databases to store data.
[0004] However, traditional database storage stores physical data on disk. Even if it is encrypted or deleted, it is still possible to be cracked by cracking software and recovered by file recovery software, making it difficult to ensure data security and unable to meet the temporary data storage needs in scenarios such as data voice business chat rooms. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a data temporary storage method and terminal to increase the privacy of temporary data, ensure data security, and meet user needs.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for temporary data storage comprises the following steps: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
[0007] In order to solve the above technical problems, another technical solution adopted by the present invention is: A data instant storage terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
[0008] The beneficial effects of the present invention are: providing a data temporary storage method and terminal, creating a virtualized internal database, capturing the target data to be written into the database file when the target software interacts with the database file data, and storing the target data into a temporary memory block of the virtualized database, so as to realize temporary data storage and save the data only in the temporary memory block, and not synchronize with the database file, so that the user can browse and query the target data in a short time, and then trigger the temporary memory block to be cleared and released through the temporary data clearing condition, so that the target data disappears, thereby avoiding the recoverable risk of the data needing to exist in the database file, enhancing data privacy, ensuring data security, and meeting user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A schematic diagram of the steps of a temporary data storage method of the present invention; Figure 2 It is a schematic diagram of an application of a temporary data storage method of the present invention; Figure 3 The present invention is a system block diagram of a temporary data storage terminal.
[0010] Description of labels: 1. A data temporary storage terminal; 2. Memory; 3. Processor. DETAILED DESCRIPTION
[0011] 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.
[0012] Please refer to Figure 1 and Figure 2 , a data temporary storage method, comprising the following steps: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
[0013] From the above description, it can be seen that the beneficial effects of the present invention are: creating a virtualized database, capturing the target data to be written to the database file when the target software interacts with the database file data, and storing the target data in the temporary memory block of the virtualized database, so as to realize temporary storage of data and save it only in the temporary memory block, without synchronizing with the database file, so that users can browse and query the target data in a short time, and then trigger the temporary memory block to be cleared and released through the temporary data clearing condition, so that the target data disappears, thereby avoiding the recoverable risk of data needing to exist in the database file, enhancing data privacy, ensuring data security, and meeting user needs.
[0014] Furthermore, the step S2 further includes: A database operation performed by a user when applying the target software is received, and the database operation is executed on the virtualized database.
[0015] From the above description, it can be seen that some functions of the database file on the disk are completed in the constructed virtual user database, such as basic database operations such as adding, deleting, checking and modifying.
[0016] Furthermore, the creation of the virtualized database in step S1 is specifically as follows: A memory cache tree consisting of at least two of the temporary memory blocks is constructed to obtain the virtualization database.
[0017] From the above description, we can see that building a memory cache tree can effectively improve the reading and writing speed of data and optimize data management; while maintaining dynamic updates, it can provide more efficient query performance.
[0018] Furthermore, the temporary data clearing condition is the occurrence of an operation triggering keyword; The step 3 is specifically as follows: Obtain and determine whether the user operation contains the operation trigger keyword. If so, determine the temporary memory block corresponding to the operation trigger keyword from the memory cache tree and clear and release it.
[0019] From the above description, it can be seen that the appearance of operation trigger keywords is used as a temporary data clearing condition. In response to the operation of the user with the operation trigger keyword, the temporary memory block corresponding to the operation trigger keyword is determined from the memory cache tree and cleared and released. It is applied to scenarios with extremely high privacy requirements such as business chats to help users erase sensitive data instantly.
[0020] Further, storing the target data into a temporary memory block of the virtualized database includes: In the temporary memory block, a corresponding memory data size is allocated according to the size of the target data.
[0021] From the above description, it can be seen that the corresponding memory data size is allocated according to the size of the target data to ensure the rationality of memory allocation.
[0022] Please refer to Figure 3 A data instant storage terminal 1 includes a memory 2, a processor 3, and a computer program stored in the memory and executable on the processor 3. When the processor 3 executes the computer program, the following steps are implemented: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
[0023] From the above description, it can be seen that the beneficial effects of the present invention are: creating a virtualized database, capturing the target data to be written to the database file when the target software interacts with the database file data, and storing the target data in the temporary memory block of the virtualized database, so as to realize temporary storage of data and save it only in the temporary memory block, without synchronizing with the database file, so that users can browse and query the target data in a short time, and then trigger the temporary memory block to be cleared and released through the temporary data clearing condition, so that the target data disappears, thereby avoiding the recoverable risk of data needing to exist in the database file, enhancing data privacy, ensuring data security, and meeting user needs.
[0024] Furthermore, the step S2 further includes: A database operation performed by a user when applying the target software is received, and the database operation is executed on the virtualized database.
[0025] From the above description, it can be seen that some functions of the database file on the disk are completed in the constructed virtual user database, such as basic database operations such as adding, deleting, checking and modifying.
[0026] Furthermore, the creation of the virtualized database in step S1 is specifically as follows: A memory cache tree consisting of at least two of the temporary memory blocks is constructed to obtain the virtualization database.
[0027] From the above description, we can see that building a memory cache tree can effectively improve the reading and writing speed of data and optimize data management; while maintaining dynamic updates, it can provide more efficient query performance.
[0028] Furthermore, the temporary data clearing condition is the occurrence of an operation triggering keyword; The step 3 is specifically as follows: Obtain and determine whether the user operation contains the operation trigger keyword. If so, determine the temporary memory block corresponding to the operation trigger keyword from the memory cache tree and clear and release it.
[0029] From the above description, it can be seen that the appearance of operation trigger keywords is used as a temporary data clearing condition. In response to the operation of the user with the operation trigger keyword, the temporary memory block corresponding to the operation trigger keyword is determined from the memory cache tree and cleared and released. It is applied to scenarios with extremely high privacy requirements such as business chats to help users erase sensitive data instantly.
[0030] Further, storing the target data into a temporary memory block of the virtualized database includes: In the temporary memory block, a corresponding memory data size is allocated according to the size of the target data.
[0031] From the above description, it can be seen that the corresponding memory data size is allocated according to the size of the target data to ensure the rationality of memory allocation.
[0032] Please refer to Figure 1 and Figure 2 , Embodiment 1 of the present invention is: A method for temporary data storage comprises the following steps: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; like Figure 2 As shown, a temporary data storage method includes memory creation: the virtualized database is different from the traditional database in that the traditional database function is retained and the data storage function is erased. The stored data is visualized in the memory, and the memory has query and browsing significance, but no storage significance; the virtualized database disappears with the disappearance of the temporary memory block and with the restart of the system / program; the virtualized database storage only stores fields and tables, and does not store the contents of the fields and tables.
[0033] Among them, the temporary data clearing condition is set according to the characteristics of the target software, and is mainly used to realize timely data clearing when it is determined that the user does not need these temporary data. Taking the chat software as an example, when user 1 and user 2 are chatting, due to the chat initiated by user 1, a new virtualized database is created on the cloud host of user 1 to store user 1's information. At this time, user 2 joins the chat, and the information of user 2 is stored. User 1 and user 2 establish the table memory of user 1 and user 2 in the virtualized database together, which is recorded as mark1. At this time. mark1 belongs to the shared memory block of user 1 and user 2; and the temporary data clearing condition can be set as: when user 1 leaves the instant chat room, the corresponding table is released. At this time, mark1 is cleared and released. The data of user 1 and user 2 in the chat room disappears.
[0034] In this embodiment, a cache structure is constructed, specifically composed of temporary memory blocks. When caching, the corresponding memory data size is allocated according to the size of the target data; at the same time, a tree structure is added to construct a memory cache tree composed of at least two temporary memory blocks to obtain a virtualized database, that is, a table in the database corresponds to one member; for example: Class is a table, name is a member; members can be divided into name1name2; similarly, since the table in the database file is stored in the database file (for the convenience of explanation, the table or the member in the table can be directly retained); at this time, name is memory block 1, name1 is name member 1 (memory block 1) The memory block forms a memory tree structure as follows: Member 1 - Data - Other tables; Member 2 - Data - Other tables; Table 1.
[0035] S2. When the target software interacts with the database file data, the target data to be written into the database file is captured, and the target data is stored in a temporary memory block of the virtualized database; In this embodiment, if Figure 2 As shown, a temporary data storage method includes two functions: data callback and callback monitoring; wherein, data callback includes: data callback monitoring cache interval data; cache data is the cache data generated when the target software is about to write data to the database file. When the target software writes and reads through the table / field in the data file, data information is generated, and the data information will be captured by the data callback.
[0036] Callback monitoring includes: receiving data events that occur when the message end (referring to user data transmitted to the database software), events refer to: basic database operations such as addition, deletion, query and modification; executing database operations on the virtualized database without affecting the database files on the disk.
[0037] S3. Determine whether the temporary data clearing condition is met. If so, clear and release the temporary memory block.
[0038] In this embodiment, the temporary data clearing condition may also be the occurrence of an operation trigger keyword; Figure 2 As shown, a temporary data storage method includes message callback: obtaining and judging whether the user operation contains an operation trigger keyword, if so, determining the temporary memory block corresponding to the operation trigger keyword from the memory cache tree and clearing and releasing it. This is because deleting a data table in the normal process will be associated with the database file (on the disk), but after the memory is visualized, the data is in the temporary memory block. At this time, when the user executes an operation trigger keyword such as: drop table class. Then, the table named class in the memory cache tree is found and the temporary memory block is directly released, and the member information in the memory is removed at the same time.
[0039] Please refer to Figure 3 , Embodiment 2 of the present invention is: A real-time data storage terminal 1 includes a memory 2, a processor 3, and a computer program stored in the memory and executable on the processor 3. When the processor 3 executes the computer program, a real-time data storage method of embodiment 1 is implemented.
[0040] In summary, the present invention provides a data temporary storage method and terminal, which create a virtualized internal database, capture the target data to be written into the database file when the target software interacts with the database file data, and store the target data into the temporary memory block of the virtualized database, so as to realize temporary data storage and save it only in the temporary memory block, which is not synchronized with the database file, so that the user can browse and query the target data in a short time, and then trigger the temporary memory block to be cleared and released through the temporary data clearing condition, so that the target data disappears, thereby avoiding the recoverable risk caused by the need for data to exist in the database file, enhancing data privacy, ensuring data security, and meeting user needs.
[0041] 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 temporary storage method, characterized in that: The steps include: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
2. A data temporary storage method according to claim 1, characterized in that: The step S2 further comprises: A database operation performed by a user when applying the target software is received, and the database operation is executed on the virtualized database.
3. A data temporary storage method according to claim 1, characterized in that: The specific steps of creating a virtualized database in step S1 are as follows: A memory cache tree consisting of at least two of the temporary memory blocks is constructed to obtain the virtualization database.
4. A data temporary storage method according to claim 3, characterized in that: The temporary data clearing condition is the occurrence of an operation trigger keyword; The step 3 is specifically as follows: Obtain and determine whether the user operation contains the operation trigger keyword. If so, determine the temporary memory block corresponding to the operation trigger keyword from the memory cache tree and clear and release it.
5. A data temporary storage method according to claim 3, characterized in that: The step of storing the target data in a temporary memory block of the virtualized database comprises: In the temporary memory block, a corresponding memory data size is allocated according to the size of the target data.
6. A data instant storage terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. When the target software is running, create a virtualized database and temporary data clearing conditions corresponding to the target software; S2. When the target software interacts with the database file data, capturing the target data to be written into the database file, and storing the target data into a temporary memory block of the virtualized database; S3. Determine whether the temporary data clearing condition is met, and if so, clear and release the temporary memory block.
7. The instant data storage terminal according to claim 1, characterized in that: The step S2 further comprises: A database operation performed by a user when applying the target software is received, and the database operation is executed on the virtualized database.
8. The instant data storage terminal according to claim 1, characterized in that: The specific steps of creating a virtualized database in step S1 are as follows: A memory cache tree consisting of at least two of the temporary memory blocks is constructed to obtain the virtualization database.
9. The instant data storage terminal according to claim 8, characterized in that: The temporary data clearing condition is the occurrence of an operation trigger keyword; The step 3 is specifically as follows: Obtain and determine whether the user operation contains the operation trigger keyword. If so, determine the temporary memory block corresponding to the operation trigger keyword from the memory cache tree and clear and release it.
10. The instant data storage terminal according to claim 8, characterized in that: The step of storing the target data in a temporary memory block of the virtualized database comprises: In the temporary memory block, a corresponding memory data size is allocated according to the size of the target data.