A cache file update system based on quantum secure communication network

By using quantum key encryption and file weight calculation methods in quantum confidential communication networks, the problems of low efficiency and insufficient security of cached file updates are solved, and efficient and secure cached file management is achieved.

CN117235082BActive Publication Date: 2025-08-15NAT QUANTUM COMM (GUANGDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211184765.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-08-15
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The update method of cached files in existing quantum confidential communication networks is single, resulting in low file reading efficiency and low security, and failing to effectively utilize the limitations of cached files.

Method used

A cache file update system based on a quantum confidential communication network is adopted to generate quantum keys through quantum key distribution equipment to encrypt the file, and the file weight value is calculated based on the number of file accesses and timestamps. The cache files are eliminated by using weight value sorting to realize cache capacity management and encrypted storage.

Benefits of technology

Improve the security and reading efficiency of cached files, accurately judge hotspot cache files, reduce resource usage, and improve the management efficiency and security of cached files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235082B_ABST
    Figure CN117235082B_ABST
Patent Text Reader

Abstract

The present invention discloses a cache file update system based on a quantum secure communication network, comprising a client, a backend management center, a Redis database, and a quantum key distribution device (QKD); the backend management center comprises a file processing module, a weight calculation module, a sorting module, a judgment module, and a deletion module; the database stores cache files; the QKD generates quantum keys; the file processing module acquires, encrypts, and sends target files; the weight calculation module calculates the weight value of the target file; the sorting module sorts the weight values of all files in the database; the judgment module determines the maximum cache capacity in the database; and the deletion module deletes the cache file with the lowest weight value in the database. The method disclosed in the present invention improves security by calculating the cache weight and encrypting the cache file using a quantum key; cache files with higher weight values in the database are eliminated to improve the accuracy of determining hot cache files and reduce resource usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum secure communication networks, and in particular to a cache file update system based on quantum secure communication networks. Background Art

[0002] Cache is temporary storage located between the CPU and main memory. It has a smaller capacity than main memory but a faster exchange rate. When the CPU accesses large amounts of files or data, it bypasses main memory and directly accesses them from cache, speeding up data access.

[0003] In existing quantum secure communication and network technology solutions, cached files are generally the files with the most views. Files that have been accessed once by users are not cached, which limits the file types in the cache. When a cached file needs to be updated, the method adopted is to determine whether the file's expiration time has expired and delete the expired file. However, this cache file processing method is too simple, resulting in low read efficiency when users search for files in the cache. In addition, the files are not encrypted, making the cached files less secure.

[0004] Therefore, it is necessary to improve the deficiencies of the existing technology and propose a cache file update system based on quantum secure communication network. Summary of the Invention

[0005] The purpose of the present invention is to overcome the defects of the existing technology and to solve the problem of updating cache files. A cache file update system based on a quantum secure communication network is proposed.

[0006] The present invention is achieved through the following technical solutions:

[0007] A cache file update system based on a quantum secure communication network, including a client, a background management center, a Redis database, and a quantum key distribution device (QKD);

[0008] The client, backend management center, and quantum key distribution device QKD are respectively connected to the Redis database via electrical signals;

[0009] The backend management center includes a file processing module, a weight calculation module, a sorting module, a judgment module and a deletion module;

[0010] The file processing module, weight calculation module, sorting module, judgment module and deletion module are connected in sequence via electrical signals, and the deletion module is also connected to the Redis database via electrical signals;

[0011] The Redis database is used to store cache files;

[0012] The quantum key distribution device QKD is used to generate quantum keys;

[0013] The file processing module is used to obtain, encrypt and send the target file;

[0014] The weight calculation module is used to calculate the weight value of the target file;

[0015] The sorting module is used to sort the weight values of all files in the Redis database;

[0016] The judgment module is used to judge the maximum cache capacity in the Redis database;

[0017] The deletion module is used to delete the cache file with the lowest weight value in the Redis database according to the result fed back by the judgment module.

[0018] Preferably, the Redis database is configured with parameters, which include at least a maximum cache capacity.

[0019] Preferably, the client accesses the target file through a Redis database;

[0020] If the target file does not exist in the Redis database, the file processing module encrypts the target file using a quantum key;

[0021] If the target file exists in the Redis database, the client obtains the quantum key of the target file through the Redis database, and decrypts the target file according to the quantum key to obtain the file information.

[0022] Preferably, the file processing module records the current access count and access timestamp of the target file and stores the access count and access time in the ordered set click_zse and the ordered set time_zset respectively;

[0023] The weight calculation module obtains the sorting number of the target file in the ordered set click_zse and the ordered set time_zset respectively, calculates the weight value of the target file and stores it in the weight array W[];

[0024] The sorting module sorts the weight array W[] obtained by the weight calculation module in descending order;

[0025] The judgment module determines whether the number of cached files in the Redis database has reached the maximum cache capacity;

[0026] If the maximum cache capacity is reached, the cache file at the end of the weight array W[] is deleted by the deletion module, and the file processing module sends the target file to the Redis database;

[0027] If the maximum cache size is not reached, the file processing module sends the target file to the Redis database.

[0028] Preferably, the parameters also include at least a monitoring IP, a port and a connection password.

[0029] Preferably, the file processing module encrypts the target file using a quantum key in the following steps:

[0030] Step 3-1: The quantum key distribution device QKD generates a first quantum key and a second quantum key and distributes them to the file processing module in the background management center;

[0031] Step 3-2: The file processing module encrypts the target file according to the first quantum key; and stores the second quantum key in the Redis database.

[0032] Preferably, the weight calculation module calculates the weight value in the following steps:

[0033] Step 5-1: The weight calculation module obtains the sorting number c of the target file in the ordered set click_zset and the sorting number t of the ordered set time_zset respectively;

[0034] Step 5-2: Obtain the access timestamp of the target file based on the sort number t of the ordered set time_zset, and calculate the difference Δh between the access timestamp of the target file and the current system time T. Calculate the time coefficient Δt based on the value of Δh;

[0035] Step 5-3: Calculate the weight value W of the target file and store it in the weight array W[];

[0036] The weight value W is calculated as follows:

[0037]

[0038] Among them, c is the sorting number of the ordered set click_zse, t is the sorting number of the ordered set time_zset, and Δt is the time coefficient.

[0039] Preferably, the rule for obtaining the time coefficient Δt in step 5-2 is:

[0040] When Δh≤72h, the time coefficient Δt=0.3; when 72h<Δh≤120h, the time coefficient Δt=0.7;

[0041] When 120h<Δh≤168h, the time coefficient Δt=1.

[0042] Preferably, the deletion module is further configured to periodically delete cache files, and the periodic deletion of cache files is as follows:

[0043] Step A-1: Calculate the weight average of the weight array W[] through the file processing module; Step A-2: Delete the cache files whose weight values are less than the weight average.

[0044] Preferably, the time period H of the step A of periodically deleting cache files ranges from 6 to 10 days. The beneficial effects of the present invention are:

[0045] The method disclosed in the present invention calculates the cache weight value of a file by the number of times the cache file is accessed and the time coefficient, and adopts the method of sorting the cache weight values of the files to eliminate the cache files at the end, so as to improve the accuracy of judging hot cache files and the efficiency of users searching for cache files; the method disclosed in the present invention also improves the security of the cache files by encrypting the cache files with quantum keys. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a system principle block diagram of the present invention;

[0047] Figure 2 Flow chart of the method of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the embodiments, but the scope of protection claimed in the present invention is not limited to the following specific embodiments.

[0049] A cache file update system based on quantum secure communication network, such as Figure 1 As shown, it includes a client, a background management center, a Redis database and a quantum key distribution device QKD; specifically, the client, the background management center, and the quantum key distribution device QKD are respectively connected to the Redis database through electrical signals;

[0050] The backend management center includes a file processing module, a weight calculation module, a sorting module, a judgment module and a deletion module;

[0051] The file processing module, weight calculation module, sorting module, judgment module and deletion module are connected in sequence via electrical signals, and the deletion module is also connected to the Redis database via electrical signals;

[0052] The client is used to search the Redis database for the target file;

[0053] The Redis database is used to store cache files;

[0054] The quantum key distribution device QKD is used to generate quantum keys;

[0055] The file processing module is used to obtain, encrypt and send the target file;

[0056] The weight calculation module is used to calculate the weight value of the target file;

[0057] The sorting module is used to sort the weight values of all files in the Redis database;

[0058] The judgment module is used to judge the maximum cache capacity in the Redis database;

[0059] The deletion module is used to delete the cache file with the lowest weight value in the Redis database according to the result fed back by the judgment module.

[0060] Specifically, after configuring the Redis database parameters, enable the Redis service. The Redis database is a key-value storage system that supports stored value types, including string, list, set, and zset. It is also a network-enabled, memory-based, and persistent log-based database, and provides APIs in multiple languages. The parameters include at least the maximum cache capacity, listening IP address, port, and connection password.

[0061] The client uses the target file name as the key to search the Redis database for the target file;

[0062] If the target file does not exist in the Redis database, jump to step 3;

[0063] If the target file exists in the Redis database, jump to step 8 to determine whether the target file is updated;

[0064] Step 3: If the target file does not exist in the Redis database, the target file needs to be stored in the Redis database first, and the target file is first encrypted, that is, the quantum key distribution device QKD is enabled to generate the first quantum key and the second quantum key, and the two generated quantum keys are distributed to the file processing module in the background management center;

[0065] Specifically, the steps of step 3 are as follows:

[0066] Step 3-1: A quantum key distribution device (QKD) generates a first quantum key and a second quantum key and distributes them to a file processing module in a backend management center; wherein the first quantum key and the second quantum key are identical;

[0067] Step 3-2: The file processing module encrypts the target file according to the first quantum key; and stores the second quantum key in the Redis database using the target file name as the key. When the file is accessed again, the key can be found by the file name, and then the file can be decrypted and the file information can be obtained.

[0068] Step 4: the file processing module records the number of accesses and the access time of the target file and stores the number of accesses and the access time into the ordered set click_zset and the ordered set time_zset respectively to form the ordered set click_zset and the ordered set time_zset;

[0069] Among them, the ordered set can make the data be sorted according to certain rules each time it is inserted; specifically, the ordered set click_zset is sorted from small to large according to the number of access times, and the ordered set time_zset is sorted according to the order of access timestamps.

[0070] After sorting the access counts and timestamps of all files using an ordered set, the sorting number of each file can be obtained, which is convenient for subsequent weight calculation and comparison.

[0071] Step 5: The weight calculation module obtains the sort number c of the target file in the ordered set click_zse and the sort number t of the ordered set time_zset, calculates the weight value of the target file, and stores it in the weight array W[].

[0072] The steps for calculating the weight value by the weight calculation module in step 5 are as follows:

[0073] Step 5-1: The weight calculation module obtains the sorting number of the target file in the ordered set click_zset and names it c, and the sorting number of the ordered set time_zset and names it t;

[0074] Step 5-2: Obtain the access time of the target file according to the sort number t of the ordered set time_zset, and calculate the difference Δh between the access time of the target file and the current system time, and obtain the time coefficient Δt according to the value of Δh;

[0075] Furthermore, the rule for obtaining the time coefficient Δt is:

[0076] When Δh≤72h, time coefficient Δt=0.3;

[0077] When 72h<Δh≤120h, time coefficient Δt=0.7;

[0078] When 120h<Δh≤168h, time coefficient Δt=1;

[0079] Step 5-3: Calculate the weight values of all cached files in the Redis database and store them in the weight array W[]. The calculation formula of the weight value W is:

[0080]

[0081] Among them, c is the sorting number of the ordered set click_zse, t is the sorting number of the ordered set time_zset, and Δt is the time coefficient.

[0082] Among them, the weight value W calculation formula performs weight calculation on multiple parameters of the target file, which is conducive to improving the accuracy of file weight calculation and providing a more accurate judgment basis for subsequent elimination and update of cache files.

[0083] Step 6: The sorting module sorts the weight array W[] obtained in step 5 in descending order to eliminate the cache files at the end, that is, the cache files with the lowest weight values;

[0084] Step 7: When storing the target file in the Redis database, the judgment module first determines whether the number of cached files in the Redis database has reached the maximum cache capacity;

[0085] If the maximum cache capacity is reached, the deletion module deletes the cache file at the end of the weight array W[], and the file processing module sends the target file to the Redis database;

[0086] If the maximum cache size is not reached, the file processing module sends the target file to the Redis database;

[0087] Step 8: The client obtains the quantum key of the target file through the Redis database, and decrypts the target file according to the quantum key to obtain the file information.

[0088] The method disclosed in the present invention also includes a step A of periodically deleting cache files, wherein the value range of the period H is 6 to 10 days.

[0089] The step A is as follows:

[0090] Step A-1: Calculate the weight average of the weight array W[] through the file processing module;

[0091] Step A-2: Delete cache files whose weight values are less than the average weight value.

[0092] The present invention reduces cache space and resource occupancy of the system by periodically deleting cache files through a deletion module.

[0093] The present invention also caches all files accessed by users in the Redis database, that is, any files accessed by users will be cached in the cache capacity for a long time to improve the speed at which users search and read cached files; when the number of cached files reaches the maximum capacity of the cache, the cache weight values of the files are calculated and sorted to improve the accuracy of judging hot cache files.

[0094] The method disclosed in the present invention also adopts quantum key encryption for cache files, that is, in a quantum communication network, based on the confidentiality performance of quantum communication, the quantum key generated by the one-time key generation method is used to encrypt and store the cache files, thereby improving the security of the cache files.

[0095] Based on the disclosure and teachings of the above description, those skilled in the art may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and any modifications and variations of the invention should also fall within the scope of protection of the claims of the present invention. In addition, although certain specific terms are used in this description, these terms are for convenience of description only and do not constitute any limitation to the invention.

Claims

1. A cache file update system based on quantum secure communication network, characterized in that: Including client, backend management center, Redis database and quantum key distribution device QKD; The client, backend management center, and quantum key distribution device QKD are respectively connected to the Redis database via electrical signals; The backend management center includes a file processing module, a weight calculation module, a sorting module, a judgment module and a deletion module; The file processing module, weight calculation module, sorting module, judgment module and deletion module are connected in sequence via electrical signals, and the deletion module is also connected to the Redis database via electrical signals; The Redis database is used to store cache files; The quantum key distribution device QKD is used to generate quantum keys; The file processing module is used to obtain, encrypt and send the target file; The weight calculation module is used to calculate the weight value of the target file; The sorting module is used to sort the weight values of all files in the Redis database; The judgment module is used to judge the maximum cache capacity in the Redis database; The deletion module is used to delete the cache file with the lowest weight value in the Redis database according to the result fed back by the judgment module; The file processing module records the current access count and access timestamp of the target file and stores the access count and access time in the ordered set click_zse and the ordered set time_zset respectively; The weight calculation module obtains the sorting number of the target file in the ordered set click_zse and the ordered set time_zset respectively, calculates the weight value of the target file and stores it in the weight array W[]; The sorting module sorts the weight array W[] obtained by the weight calculation module in descending order; The judgment module determines whether the number of cached files in the Redis database has reached the maximum cache capacity; If the maximum cache capacity is reached, the cache file at the end of the weight array W[] is deleted by the deletion module, and the file processing module sends the target file to the Redis database; If the maximum cache size is not reached, the file processing module sends the target file to the Redis database.

2. A cache file update system based on a quantum secure communication network as claimed in claim 1, characterized in that: The Redis database is configured with parameters, which include at least a maximum cache capacity.

3. A cache file update system based on a quantum secure communication network as claimed in claim 2, characterized in that: The client accesses the target file through the Redis database; If the target file does not exist in the Redis database, the file processing module encrypts the target file using a quantum key; If the target file exists in the Redis database, the client obtains the quantum key of the target file through the Redis database, and decrypts the target file according to the quantum key to obtain the file information.

4. A cache file update system based on a quantum secure communication network as claimed in claim 2, characterized in that: The parameters also include at least the listening IP, port and connection password.

5. A cache file update system based on a quantum secure communication network as claimed in claim 1, characterized in that: The file processing module encrypts the target file using a quantum key as follows: Step 3-1: The quantum key distribution device QKD generates a first quantum key and a second quantum key and distributes them to the file processing module in the background management center; Step 3-2: The file processing module encrypts the target file according to the first quantum key; and stores the second quantum key in the Redis database.

6. A cache file update system based on a quantum secure communication network according to claim 1, characterized in that: The steps for calculating the weight value by the weight calculation module are as follows: Step 5-1: The weight calculation module obtains the sorting number c of the target file in the ordered set click_zset and the sorting number t of the ordered set time_zset respectively; Step 5-2: Obtain the access timestamp of the target file based on the sort number t of the ordered set time_zset, and calculate the difference Δh between the access timestamp of the target file and the current system time T. Calculate the time coefficient Δt based on the value of Δh; Step 5-3: Calculate the weight value W of the target file and store it in the weight array W[]; The weight value W is calculated as follows: ; Among them, c is the sorting number of the ordered set click_zse, t is the sorting number of the ordered set time_zset, and Δt is the time coefficient.

7. A cache file update system based on a quantum secure communication network according to claim 6, characterized in that: The rule for obtaining the time coefficient Δt in step 5-2 is: When Δh≤72h, the time coefficient Δt=0.3; when 72h<Δh≤120h, the time coefficient Δt=0.7; When 120h<Δh≤168h, the time coefficient Δt=1.

8. The cache file update system based on quantum secure communication network according to claim 1, characterized in that: The deletion module is also used to periodically delete cache files. The periodic deletion of cache files is as follows: Step A-1: Calculate the weight average of the weight array W[] through the file processing module; Step A-2: Delete cache files whose weight values are less than the average weight value.

9. A cache file update system based on a quantum secure communication network according to claim 8, characterized in that: The time period H of the step A of periodically deleting cache files ranges from 6 to 10 days.

Citation Information

Patent Citations

  • Encryption method and system based on OpenStack object storage

    CN108234436A

  • Method and system for quantum key distribution and data processing

    US20190149327A1