A method and system for caching data within a USBKey
By managing the cached data of USBKey devices through a client-server architecture, the problem of low efficiency of USBKeys is solved, and efficient data interaction and sensitive information protection are achieved, thereby improving business efficiency and customer experience.
Patent Information
- Application Number
- CN202111542794.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2041-12-16
Smart Images

Figure CN114490745B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of USBKey interaction technology, specifically a method and system for caching data within a USBKey. Background Technology
[0002] Due to hardware resource limitations, USBKey products are less efficient than their host computers and do not support multitasking, which negatively impacts upper-layer business efficiency and results in a poor user experience. Therefore, there is an urgent need to propose a new method and system to solve these problems. Summary of the Invention
[0003] To address the shortcomings of existing technologies, the present invention aims to provide a data caching method and system within a USBKey. This method and system reduce the amount of data interaction between the upper layer and the USBKey, thereby improving efficiency while protecting sensitive information.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A method for caching data within a USBKey includes the following steps:
[0006] S1: The server identifies the inserted USBKey device and generates a device object for the USBKey device;
[0007] S2: The client obtains the device object handle from the server;
[0008] S3: The client uses the device object handle and the data file identifier within the USBKey to request the server to read the USBKey data;
[0009] S4: The server determines whether the corresponding data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, it queries the cache to see if the corresponding data exists. If it exists, it returns the corresponding data to the client.
[0010] S5: If the corresponding data does not exist in the cache, read the corresponding data from the USBKey device, add the corresponding data to the cache, and then return the corresponding data in the cache to the client;
[0011] S6: Unplug the USBKey device. The server deletes the device object of the device and deletes all caches corresponding to the device.
[0012] Furthermore, in the USBKey data caching method described above, the server has multiple USBKey device interfaces and can simultaneously identify multiple USBKey devices.
[0013] Furthermore, in the USBKey data caching method described above, each device object generated in step S1 is unique.
[0014] Furthermore, in the USBKey data caching method described above, step S3 further includes: the client using the device object handle and the data file identifier to request the server to update or delete the corresponding data in the USBKey device.
[0015] Furthermore, in the USBKey data caching method described above, step S4 further includes:
[0016] When a client requests the server to update the corresponding data in the USBKey device, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If the data is not sensitive, the server updates the corresponding data in the USBKey device and the corresponding data in the cache.
[0017] When a client requests the server to delete corresponding data in the USBKey device, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If the data is not sensitive, the server deletes the corresponding data in the USBKey device and the corresponding data in the cache.
[0018] A USBKey data caching system includes a USBKey device, a server, and a client;
[0019] The server is used for:
[0020] Identify the inserted USBKey device and generate a device object for the USBKey device;
[0021] The system determines whether the data requested by the client is sensitive based on the device object handle and the data file identifier within the USBKey. If the data is not sensitive, it checks the cache to see if the corresponding data exists. If the data exists, it returns the corresponding data to the client. If the corresponding data does not exist in the cache, it reads the corresponding data from the USBKey device, adds the corresponding data to the cache, and then returns the corresponding data in the cache to the client.
[0022] When the USBKey device is unplugged, the device object of the device is deleted, and all caches corresponding to the device are also deleted.
[0023] The client is used to: obtain a device object handle from the server, and use the device object handle and the data file identifier to request the server to read USBKey data.
[0024] Furthermore, in the USBKey data caching system described above, the server has multiple USBKey device interfaces and can simultaneously identify multiple USBKey devices.
[0025] Furthermore, in the USBKey data caching system described above, the device object is unique.
[0026] Furthermore, in the USBKey data caching system described above, the client is also used to request the server to update the corresponding data in the USBKey device using the device object handle and the data file identifier;
[0027] Correspondingly, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, the server updates the corresponding data in the USBKey device and the corresponding data in the cache.
[0028] Furthermore, in the USBKey data caching system described above, the client is also used to request the server to delete the corresponding data in the USBKey device using the device object handle and the data file identifier;
[0029] Correspondingly, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, the server deletes the corresponding data in the USBKey device and the corresponding data in the cache.
[0030] The beneficial effects of the present invention are as follows: The USBKey data caching method and system provided by the present invention adopt a client and server architecture, and the server can uniformly manage multiple USBKey devices; the cached data is one-to-one correspondent between the device object handle and the data file identifier; non-sensitive information can be quickly read and updated without frequent interaction with the USBKey device; and it can respond to device unplug events. Attached Figure Description
[0031] Figure 1 This is a flowchart of a data caching method within a USBKey provided in a specific embodiment of the present invention;
[0032] Figure 2 This is a block diagram of a USBKey internal data caching system provided in a specific embodiment of the present invention. Detailed Implementation
[0033] The present invention will now be further described with reference to specific embodiments and the accompanying drawings.
[0034] Figure 1 A flowchart of a data caching method within a USBKey according to an embodiment of the present invention is shown. As can be seen from the figure, the method includes the following steps:
[0035] Step S1: The server identifies the inserted USBKey device and generates a device object for the USBKey device.
[0036] The server has multiple USBKey device interfaces, which can identify multiple USBKey devices at the same time and generate a unique device object for each USBKey device.
[0037] Step S2: The client obtains the device object handle from the server.
[0038] Step S3: The client uses the device object handle and the data file identifier within the USBKey to request the server to read the USBKey data.
[0039] Step S4: The server determines whether the data is sensitive based on the device object handle and data file identifier. If it is not sensitive, it checks the cache to see if the corresponding data exists. If it does, it returns the corresponding data to the client.
[0040] Step S5: If the corresponding data does not exist in the cache, read the corresponding data from the USBKey device, add the corresponding data to the cache, and then return the corresponding data in the cache to the client.
[0041] The client can also use the device object handle and the data file identifier within the USBKey to request other USBKey data operations from the server, such as updating or deleting data. When the client uses the device object handle and data file identifier to request the server to update the corresponding data within the USBKey device, the server performs the following operations: the server determines whether the data is sensitive based on the device object handle and data file identifier; if it is not sensitive, the server updates the corresponding data within the USBKey device and updates the corresponding data in the cache.
[0042] When a client requests the server to delete data within the USBKey device using the device object handle and data file identifier, the server performs the following operations: the server determines whether the data is sensitive based on the device object handle and data file identifier. If it is not sensitive, the server deletes the corresponding data within the USBKey device and the corresponding data in the cache.
[0043] It should be noted that when the client uses the device object handle and data file identifier to request the server to read, update or delete data in the USBKey device, the server first determines whether the data is sensitive, and sensitive data cannot be manipulated casually.
[0044] Server-side cached data can be protected in various ways, such as encryption, tamper protection, and protection against memory analysis.
[0045] Step S6: Finally, unplug the USBKey device, delete the device object on the server, and delete all caches corresponding to the device.
[0046] This invention also provides a USBKey data caching system, including a USBKey device 1, a server 2, and a client 3; wherein:
[0047] Server 2 is used to: identify the inserted USBKey device and generate a device object for the USBKey device;
[0048] The system determines whether the data requested by the client is sensitive based on the device object handle and the data file identifier within the USBKey. If the data is not sensitive, it checks the cache to see if the corresponding data exists. If the data exists, it returns the corresponding data to the client. If the corresponding data does not exist in the cache, it reads the corresponding data from the USBKey device, adds the corresponding data to the cache, and then returns the corresponding data in the cache to the client.
[0049] Server 2 is also used to delete the device object of the USBKey device and delete all caches corresponding to the device when the USBKey device is unplugged.
[0050] Client 3 is used to obtain a device object handle from the server and use the device object handle and data file identifier to request the server to read USBKey data.
[0051] In this embodiment, the server has multiple USBKey device interfaces, which can simultaneously identify multiple USBKey devices and generate a unique device object for each USBKey device.
[0052] In this embodiment, the client is also used to request the server to update the corresponding data in the USBKey device using the device object handle and data file identifier; correspondingly, the server is used to determine whether the data is sensitive based on the device object handle and data file identifier. If it is not sensitive, the server updates the corresponding data in the USBKey device and the corresponding data in the cache.
[0053] In this embodiment, the client is also used to request the server to delete the corresponding data in the USBKey device using the device object handle and data file identifier; correspondingly, the server is used to determine whether the data is sensitive based on the device object handle and data file identifier. If it is not sensitive, the server deletes the corresponding data in the USBKey device and the corresponding data in the cache.
[0054] The USBKey data caching method and system provided by this invention adopts a client-server architecture, where the server can uniformly manage multiple USBKey devices; the cached data is mapped one-to-one with the device object handle and data file identifier; non-sensitive information can be quickly read and updated without frequent interaction with the USBKey device; and it can respond to device unplug events.
[0055] The above embodiments are merely illustrative examples of the present invention. The present invention may also be implemented in other specific ways or forms without departing from its spirit or essential characteristics. Therefore, the described embodiments should be considered illustrative rather than limiting in any respect. The scope of the present invention should be defined by the appended claims, and any variations equivalent to the intent and scope of the claims should also be included within the scope of the present invention.
Claims
1. A method for caching data within a USBKey, comprising the following steps: S1: The server identifies the inserted USBKey device and generates a device object for the USBKey device; S2: The client obtains the device object handle from the server; S3: The client uses the device object handle and the data file identifier within the USBKey to request the server to read the USBKey data; the client also uses the device object handle and the data file identifier to request the server to update or delete the corresponding data within the USBKey device; S4: The server determines whether the corresponding data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, it queries the cache to see if the corresponding data exists. If it exists, it returns the corresponding data to the client. When a client requests the server to update the corresponding data in the USBKey device, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If the data is not sensitive, the server updates the corresponding data in the USBKey device and the corresponding data in the cache. When a client requests the server to delete the corresponding data in the USBKey device, the server determines whether the data is sensitive based on the device object handle and the data file identifier. If the data is not sensitive, the server deletes the corresponding data in the USBKey device and the corresponding data in the cache. S5: If the corresponding data does not exist in the cache, read the corresponding data from the USBKey device, add the corresponding data to the cache, and then return the corresponding data in the cache to the client; S6: Unplug the USBKey device. The server deletes the device object of the device and deletes all caches corresponding to the device.
2. The USBKey data caching method according to claim 1, characterized in that, The server has multiple USBKey device interfaces and can recognize multiple USBKey devices simultaneously.
3. The USBKey data caching method according to claim 2, characterized in that, Each device object generated in step S1 is unique.
4. A data caching system within a USBKey, characterized in that, Includes USBKey devices, server, and client; The server is used for: Identify the inserted USBKey device and generate a device object for the USBKey device; The system determines whether the data requested by the client is sensitive based on the device object handle and the data file identifier within the USBKey. If the data is not sensitive, it checks the cache to see if the corresponding data exists. If the data exists, it returns the corresponding data to the client. If the corresponding data is not found in the cache, the corresponding data is read from the USBKey device and added to the cache. Then the corresponding data in the cache is returned to the client. When the USBKey device is unplugged, the device object of the device is deleted, and all caches corresponding to the device are also deleted. The client is configured to: obtain the device object handle from the server, and use the device object handle and the data file identifier to request the server to read USBKey data; The client is also used to request the server to update the corresponding data in the USBKey device using the device object handle and the data file identifier; Correspondingly, the server is used to determine whether the data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, the server updates the corresponding data in the USBKey device and the corresponding data in the cache. The client is also used to request the server to delete the corresponding data in the USBKey device using the device object handle and the data file identifier; correspondingly, the server is used to determine whether the data is sensitive based on the device object handle and the data file identifier. If it is not sensitive, the server deletes the corresponding data in the USBKey device and the corresponding data in the cache.
5. The USBKey data caching system according to claim 4, characterized in that, The server has multiple USBKey device interfaces and can recognize multiple USBKey devices simultaneously.
6. The USBKey data caching system according to claim 5, characterized in that, The device object is unique.
Citation Information
Patent Citations
Cache breakdown prevention method and annotation component thereof
CN110764920A
Systems and Methods for Caching Data Object Identifiers
US20140019454A1