Resource verification method of distributed server

By introducing verification times and time limit mechanisms in distributed servers, combined with network delay adjustment, the problems of resource abuse and security risks in traditional resource verification methods are solved, and efficient and accurate resource verification and stability improvement are achieved.

CN118900192AInactive Publication Date: 2024-11-05ANHUI YISHENG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410898162.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-05
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional resource verification methods can easily lead to system resource abuse and security risks in distributed servers, and fail to effectively manage and control client access behavior.

Method used

By introducing a restriction mechanism of verification times and verification time, we receive verification requests from the client, obtain and verify their resource usage permissions, and dynamically adjust the verification time according to network delay, limit the client's access frequency and usage times, ensuring the efficient and efficient resource verification process. precise.

Benefits of technology

Effectively prevent excessive access from clients, improve resource utilization, enhance system stability and fairness, and ensure efficient and accurate resource verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900192A_ABST
    Figure CN118900192A_ABST
Patent Text Reader

Abstract

The invention provides a resource verification method of a distributed server. The resource verification method of the distributed server comprises the following steps: S1, receiving a verification request sent by a client; s2, acquiring verification information of the client; s3, verifying the resource use permission of the client; s4, adjusting verification time; and S5, returning a verification result. The resource verification method of the distributed server provided by the invention has the advantages that the use is convenient, the access frequency of the client to the server resources is effectively controlled by introducing a limiting mechanism of verification times and verification time, the verification time is dynamically adjusted according to the network delay, and the efficient and accurate resource verification process is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of servers, and in particular relates to a resource verification method for a distributed server. Background Art

[0002] With the development of the Internet and distributed systems, resource verification has become an important part of ensuring system security and rational use of resources. While providing efficient services, distributed servers also face challenges from excessive client access and malicious attacks. Traditional resource verification methods usually only focus on the correctness of verification, while ignoring the management and control of client access behavior, which can easily lead to abuse of system resources and security risks.

[0003] Therefore, it is necessary to provide a new resource verification method for a distributed server to solve the above technical problems. Summary of the invention

[0004] The technical problem solved by the present invention is to provide a method for easily using a distributed server resource verification method, which effectively controls the access frequency of a client to server resources by introducing a limiting mechanism of the number of verifications and the verification time, and dynamically adjusts the verification time according to the network delay to ensure that the resource verification process is efficient and accurate. Specifically, the method is implemented by the following steps: receiving a verification request sent by a client, obtaining and verifying the resource usage authority of the client, adjusting the verification time, returning the verification result, and limiting the access and usage times of other clients after the verification is passed.

[0005] In order to solve the above technical problems, the resource verification method of the distributed server provided by the present invention comprises the following steps:

[0006] S1. Receive the verification request sent by the client;

[0007] S2. Obtain the client's verification information;

[0008] S3, verify the client's resource usage authority;

[0009] S4. Adjust verification time;

[0010] S5. Return the verification result;

[0011] Among them, according to the verification information, the resource use authority of the client is verified, and the verification result is returned to the client;

[0012] The verification information includes the client's IP address, user name, password, client's resource identifier, resource usage authority, verification time and verification times.

[0013] As a further solution of the present invention, the verification times are used to limit the verification times of the client, the verification times are set to 5 or 10 times, and the verification time is 10 minutes;

[0014] The specific steps are as follows:

[0015] The distributed server receives the verification request sent by the client, which includes the client's IP address, user name and password, as well as the client's resource identifier, resource usage authority, verification time and verification times;

[0016] The distributed server obtains the client's authentication information from the request, including the client's IP address, user name and password, as well as the client's resource identifier, resource usage permissions, authentication time and authentication times;

[0017] The distributed server verifies the client's authority to use the resource based on the resource identifier and resource usage authority in the verification information;

[0018] The distributed server adjusts the verification time according to the number of verifications and the verification time in the verification information; specifically, the distributed server calculates a new verification time according to the number of verifications and the verification time, and the new verification time is equal to the original verification time minus the network delay;

[0019] The distributed server returns the verification result to the client; if the verification is successful, a verification success message is returned; if the verification fails, a verification failure message is returned.

[0020] As a further solution of the present invention, the network delay between the client and the distributed server is calculated according to the IP address and resource identifier of the client, and the verification time is adjusted according to the network delay;

[0021] As a further solution of the present invention, the calculation formula of network delay is:

[0022]

[0023] The specific calculation steps are as follows:

[0024] Get the client IP address and distributed server IP address:

[0025] Obtain the client's IP address and the distributed server's IP address from the received verification request;

[0026] Calculate the distance between the client IP address and the distributed server IP address:

[0027] By querying the network topology database, the network distance between the client IP address and the distributed server IP address is obtained; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers);

[0028] Get the network transmission rate:

[0029] By querying the network device parameters, the current network transmission rate is obtained; the rate is in bit rate (bit / s) and byte rate (byte / s);

[0030] Calculate network latency:

[0031] The network delay is obtained by dividing the distance between the client IP address and the distributed server IP address by the network transmission rate; the delay is usually calculated in seconds (s) or milliseconds (ms).

[0032] As a further solution of the present invention, the calculation formula of the network transmission rate is:

[0033]

[0034] The specific calculation steps are as follows:

[0035] Get network bandwidth:

[0036] By querying the network device parameters, the bandwidth of the current network is obtained; the bandwidth is measured in bit rate (bit / s) and byte rate (byte / s);

[0037] Get network latency:

[0038] By querying the network device parameters, the current network delay is obtained; the delay is usually in milliseconds (ms);

[0039] Calculate network transmission rate:

[0040] Divide the network bandwidth by the network delay to get the network transmission rate; the transmission rate is usually calculated in bit rate (bit / s) or byte rate (byte / s).

[0041] As a further solution of the present invention, the calculation formula of the network bandwidth is:

[0042]

[0043] The specific steps are as follows:

[0044] The network bandwidth is calculated as follows:

[0045] Get the client IP address and distributed server IP address:

[0046] Obtain the client's IP address and the distributed server's IP address from the received verification request;

[0047] Calculate the distance between the client IP address and the distributed server IP address:

[0048] By querying the network topology database, the network distance between the client IP address and the distributed server IP address is obtained; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers);

[0049] Get network latency:

[0050] By querying the network device parameters, the current network delay is obtained; the delay is usually in milliseconds (ms);

[0051] Calculate network bandwidth:

[0052] The distance between the client IP address and the distributed server IP address is divided by the network delay to obtain the network bandwidth; the bandwidth is usually calculated in bit rate (bit / s) or byte rate (byte / s);

[0053] Verify network bandwidth: Verify whether the calculated network bandwidth is reasonable based on the actual configuration of the network equipment. If the calculated network bandwidth does not match the actual configuration, you may need to recheck the network topology database or network equipment parameters.

[0054] Record network bandwidth: Record the calculated network bandwidth in the system for subsequent query and use.

[0055] As a further solution of the present invention, the adjustment formula of the network delay is:

[0056]

[0057] Calculate the original network delay: Calculate the original network delay between the client and the distributed server according to the network delay calculation formula;

[0058] Calculate the number of verifications: count the number of client verifications; in the distributed server, maintain a counter to record the number of verifications for each client;

[0059] Adjust network latency: Get the adjusted network delay;

[0060] Verify network delay: Verify whether the adjusted network delay is reasonable based on the actual configuration of the network device. If the adjusted network delay does not match the actual configuration, you may need to recheck the network topology database or network device parameters.

[0061] Record network delay: record the adjusted network delay in the system for subsequent query and use;

[0062] The adjustment formula for verification time is:

[0063] Verification time = verification time - network delay

[0064] Calculate the original verification time: According to the settings of the distributed server, obtain the original time of the client verification;

[0065] Calculate network delay: Calculate the network delay between the client and the distributed server according to the network delay calculation formula;

[0066] Adjust verification time: Subtract network delay from original verification time to get adjusted verification time;

[0067] Verify the adjusted verification time: According to the settings of the distributed server, verify whether the adjusted verification time meets the requirements; if the adjusted verification time does not meet the requirements, it may be necessary to recalculate the network delay or adjust the original verification time;

[0068] Record verification time: Record the adjusted verification time in the system for subsequent query and use.

[0069] As a further solution of the present invention, it also includes: after the verification is passed, the verification information of the client is stored in the database of the distributed server; and within a certain period of time after the verification is passed, other clients are restricted from using the resource; at the same time, within a certain period of time after the verification is passed, the number of times the client uses the resource is restricted;

[0070] The specific steps are as follows:

[0071] Verification passed: The distributed server receives the verification request from the client and returns the verification result to the client after the verification passes.

[0072] Storing verification information: The distributed server stores the client's verification information (including IP address, user name, password, resource identifier, verification time and number of times, etc.) in the database;

[0073] Set time limit: According to the resource allocation policy of the distributed server, set a time limit after the verification is passed to limit other clients from using the resource;

[0074] Set usage times: According to the resource allocation policy of the distributed server, set a limit on the number of times the client can use the resource within a certain period of time after verification;

[0075] Check verification information: When another client or the same client requests to use the resource again, the distributed server checks the verification information stored in the database to determine whether the use is allowed;

[0076] Implement restrictions: If the verification information shows that other clients or the same client have not reached the usage limit, then the resource is allowed to be used; otherwise, the resource is denied and a corresponding error message is returned;

[0077] Calculate the remaining time: The distributed server calculates the remaining limit time based on the time it takes to pass the verification;

[0078] Wherein, remaining limit time = set limit time - (current time - verification passing time);

[0079] During the calculation process, the distributed server first needs to obtain the time when the verification is passed; this is achieved by extracting the time from the received verification request; then, the distributed server needs to obtain the current time; this is obtained through the system clock or timer; finally, the distributed server calculates the remaining limit time, so as to restrict other clients from using the resource within a certain period of time after the verification is passed;

[0080] Calculate the remaining number of uses: The distributed server calculates the remaining number of uses based on the number of times the verification passes;

[0081] Among them, the remaining number of uses = the set number of uses - the number of verification passes;

[0082] During the calculation process, the distributed server needs to record the number of times the verification is passed. This is achieved by maintaining a counter. Each time the verification is passed, the counter is incremented by 1. Then, the distributed server obtains the number of times the verification is passed from the counter and calculates the remaining number of uses, so as to limit the number of times the client can use the resource within a certain period of time after the verification is passed.

[0083] Determine whether to allow use: The distributed server determines whether to allow other clients or the same client to use the resource based on the remaining time and the remaining number of uses; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, use is allowed; otherwise, use is not allowed;

[0084] During the judgment process, the distributed server needs to compare the remaining time and the remaining number of uses with the preset thresholds; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, other clients or the same client are allowed to use the resource; otherwise, use is not allowed and a corresponding error message is returned.

[0085] Compared with the related art, the resource verification method of the distributed server provided by the present invention has the following beneficial effects:

[0086] The present invention provides a resource verification method for a distributed server: by introducing the number of verifications and the verification time, the number of verifications of a client is limited, and excessive access of the client to the distributed server is prevented. At the same time, by adjusting the verification time according to the number of verifications and the verification time, the resource verification process of the distributed server is guaranteed to be more efficient and accurate. In addition, after the verification is passed, the verification information of the client is stored in the database of the distributed server, and within a certain period of time after the verification is passed, other clients are restricted from using the resource, and the number of times the client uses the resource is restricted, so as to further improve the resource utilization rate of the distributed server, prevent individual clients from excessively using resources, and thus ensure the stability and fairness of the entire system.

[0087] The present invention provides a resource verification method for a distributed server: the method provided by the present invention calculates the network delay between the client and the distributed server, and adjusts the verification time according to the network delay, thereby ensuring that the resource verification process of the distributed server is more efficient and accurate. In addition, by storing the verification information of the client in a database after the verification is passed, and limiting other clients from using the resource within a certain period of time after the verification is passed, and limiting the number of times the client uses the resource, the resource utilization rate of the distributed server is further improved, and excessive use of resources by individual clients is prevented, thereby ensuring the stability and fairness of the entire system.

[0088] The present invention provides a resource verification method for a distributed server: the method provided by the present invention calculates the network delay between the client and the distributed server, and adjusts the verification time according to the network delay, thereby ensuring that the resource verification process of the distributed server is more efficient and accurate. In addition, by storing the verification information of the client in a database after the verification is passed, and limiting other clients from using the resource within a certain period of time after the verification is passed, and limiting the number of times the client uses the resource, the resource utilization rate of the distributed server is further improved, and excessive use of resources by individual clients is prevented, thereby ensuring the stability and fairness of the entire system.

[0089] The present invention provides a resource verification method for a distributed server: the method provided by the present invention calculates the network delay between the client and the distributed server, and adjusts the verification time according to the network delay, thereby ensuring that the resource verification process of the distributed server is more efficient and accurate. In addition, by storing the verification information of the client in a database after the verification is passed, and limiting other clients from using the resource within a certain period of time after the verification is passed, and limiting the number of times the client uses the resource, the resource utilization rate of the distributed server is further improved, and excessive use of resources by individual clients is prevented, thereby ensuring the stability and fairness of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0091] Figure 1 A schematic diagram of the overall process principle of a preferred embodiment of the resource verification method of a distributed server provided by the present invention;

[0092] Figure 2 A schematic diagram of the verification times process principle provided by the present invention;

[0093] Figure 3 A schematic diagram of the principle of network delay calculation provided by the present invention;

[0094] Figure 4 A schematic diagram of the principle of the network transmission rate provided by the present invention;

[0095] Figure 5 A schematic diagram of the principle of calculating network delay provided by the present invention. DETAILED DESCRIPTION

[0096] Please refer to Figure 1 , Figure 2 , Figure 3 , Figure 4 and Figure 5 ,in, Figure 1 A schematic diagram of the overall process principle of a preferred embodiment of the resource verification method of a distributed server provided by the present invention; Figure 2 A schematic diagram of the verification times process principle provided by the present invention; Figure 3 A schematic diagram of the principle of network delay calculation provided by the present invention; Figure 4 A schematic diagram of the principle of the network transmission rate provided by the present invention; Figure 5The schematic diagram of the principle of calculating network delay provided by the present invention. The resource verification method of the distributed server includes the following steps: S1, receiving a verification request sent by a client; S2, obtaining verification information of the client; S3, verifying the resource usage authority of the client; S4, adjusting the verification time; S5, returning the verification result; wherein, according to the verification information, verifying the resource usage authority of the client, and returning the verification result to the client;

[0097] The verification information includes the client's IP address, user name, password, client's resource identifier, resource usage authority, verification time and verification times.

[0098] In the embodiment provided by the present invention, the verification times are used to limit the verification times of the client, the verification times are set to 5 or 10 times, and the verification time is 10 minutes;

[0099] The specific steps are as follows:

[0100] S1: receiving a verification request sent by a client; the distributed server receives the verification request sent by the client, which includes the client's IP address, user name and password, as well as the client's resource identifier, resource usage authority, verification time and verification times;

[0101] S2: Obtain the client's authentication information; the distributed server obtains the client's authentication information from the request, including the client's IP address, user name and password, as well as the client's resource identifier, resource usage authority, authentication time and authentication times;

[0102] S3 verifies the client's resource usage rights: The distributed server verifies the client's resource usage rights based on the resource identifier and resource usage rights in the verification information;

[0103] S4 adjusts the verification time: the distributed server adjusts the verification time according to the number of verifications and the verification time in the verification information; specifically, the distributed server calculates a new verification time according to the number of verifications and the verification time, and the new verification time is equal to the original verification time minus the network delay;

[0104] S5 returns the verification result: the distributed server returns the verification result to the client; if the verification is successful, a message indicating the verification is successful is returned; if the verification fails, a message indicating the verification fails is returned;

[0105] By introducing the number of verifications and verification time in the verification process, the number of client verifications is limited to prevent excessive access to distributed servers by clients. At the same time, by adjusting the verification time according to the number of verifications and verification time, the resource verification process of distributed servers is ensured to be more efficient and accurate.

[0106] In the embodiment provided by the present invention, the network delay between the client and the distributed server is calculated according to the IP address and resource identifier of the client, and the verification time is adjusted according to the network delay;

[0107] In the embodiment provided by the present invention, the calculation formula of network delay is:

[0108]

[0109] The specific calculation steps are as follows:

[0110] Obtain the client IP address and the distributed server IP address: Obtain the client IP address and the distributed server IP address from the received verification request;

[0111] Calculate the distance between the client IP address and the distributed server IP address: obtain the network distance between the client IP address and the distributed server IP address by querying the network topology database; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers);

[0112] Get network transmission rate: Get the current network transmission rate by querying network device parameters; the rate is in bit rate (bit / s) and byte rate (byte / s);

[0113] Calculate network delay: Divide the distance between the client IP address and the distributed server IP address by the network transmission rate to get the network delay; the delay is usually calculated in seconds (s) or milliseconds (ms);

[0114] Through the above calculation steps, the network delay between the client and the distributed server is calculated;

[0115] In the embodiment provided by the present invention, the calculation formula of the network transmission rate is:

[0116]

[0117] The specific calculation steps are as follows:

[0118] Get network bandwidth: Get the current network bandwidth by querying network device parameters; bandwidth is measured in bit rate (bit / s) and byte rate (byte / s);

[0119] Get network delay: Get the current network delay by querying network device parameters; the delay is usually in milliseconds (ms);

[0120] Calculate the network transmission rate: Divide the network bandwidth by the network delay to get the network transmission rate; the transmission rate is usually calculated in bit rate (bit / s) or byte rate (byte / s);

[0121] Through the above calculation steps, the current network transmission rate is calculated;

[0122] In the embodiment provided by the present invention, the calculation formula of the network bandwidth is:

[0123]

[0124] The specific steps are as follows:

[0125] The network bandwidth is calculated as follows:

[0126] Obtain the client IP address and the distributed server IP address: Obtain the client IP address and the distributed server IP address from the received verification request;

[0127] Calculate the distance between the client IP address and the distributed server IP address: obtain the network distance between the client IP address and the distributed server IP address by querying the network topology database; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers);

[0128] Get network delay: Get the current network delay by querying network device parameters; the delay is usually in milliseconds (ms);

[0129] Calculate network bandwidth: Divide the distance between the client IP address and the distributed server IP address by the network delay to get the network bandwidth; the bandwidth is usually calculated in bit rate (bit / s) or byte rate (byte / s);

[0130] Verify network bandwidth: Verify whether the calculated network bandwidth is reasonable based on the actual configuration of the network equipment. If the calculated network bandwidth does not match the actual configuration, you may need to recheck the network topology database or network equipment parameters.

[0131] Record network bandwidth: record the calculated network bandwidth in the system for subsequent query and use;

[0132] Through the above calculation steps, the network bandwidth between the client and the distributed server is calculated;

[0133] In the embodiment provided by the present invention, the adjustment formula of the network delay is:

[0134]

[0135] Calculate the original network delay: Calculate the original network delay between the client and the distributed server according to the network delay calculation formula;

[0136] Calculate the number of verifications: count the number of client verifications; in the distributed server, maintain a counter to record the number of verifications for each client;

[0137] Adjust network latency: Get the adjusted network delay;

[0138] Verify network delay: Verify whether the adjusted network delay is reasonable based on the actual configuration of the network device. If the adjusted network delay does not match the actual configuration, you may need to recheck the network topology database or network device parameters.

[0139] Record network delay: record the adjusted network delay in the system for subsequent query and use;

[0140] The advantage of this adjustment formula is that it dynamically adjusts the network delay according to the number of client verifications. As the number of verifications increases, the network delay will also increase accordingly, thus preventing a single client from overusing distributed server resources, thereby improving the resource utilization of the entire system. At the same time, this adjustment method also prevents malicious clients from attacking distributed servers through frequent verifications.

[0141] The adjustment formula for verification time is: Verification time = verification time - network delay

[0142] Calculate the original verification time: According to the settings of the distributed server, obtain the original time of the client verification;

[0143] Calculate network delay: Calculate the network delay between the client and the distributed server according to the network delay calculation formula;

[0144] Adjust verification time: Subtract network delay from original verification time to get adjusted verification time;

[0145] Verify the adjusted verification time: According to the settings of the distributed server, verify whether the adjusted verification time meets the requirements; if the adjusted verification time does not meet the requirements, it may be necessary to recalculate the network delay or adjust the original verification time;

[0146] Record verification time: record the adjusted verification time in the system for subsequent query and use;

[0147] It dynamically adjusts the verification time according to the network delay. As the network delay increases, the verification time will be reduced accordingly, thus avoiding the client waiting for the verification result for a long time under poor network conditions, thereby improving the verification efficiency and user experience. At the same time, this adjustment method also ensures that the distributed server will not waste a lot of resources due to long waiting time for verification under poor network conditions.

[0148] In the embodiment provided by the present invention, the verification information of the client is stored in the database of the distributed server after the verification is passed; and within a certain period of time after the verification is passed, other clients are restricted from using the resource; at the same time, within a certain period of time after the verification is passed, the number of times the client uses the resource is restricted;

[0149] Verification passed: The distributed server receives the verification request from the client and returns the verification result to the client after the verification passes.

[0150] Storing verification information: The distributed server stores the client's verification information (including IP address, user name, password, resource identifier, verification time and number of times, etc.) in the database;

[0151] Set time limit: According to the resource allocation policy of the distributed server, set a time limit after the verification is passed to limit other clients from using the resource;

[0152] Set usage times: According to the resource allocation policy of the distributed server, set a limit on the number of times the client can use the resource within a certain period of time after verification;

[0153] Check verification information: When another client or the same client requests to use the resource again, the distributed server checks the verification information stored in the database to determine whether the use is allowed;

[0154] Implement restrictions: If the verification information shows that other clients or the same client have not reached the usage limit, then the resource is allowed to be used; otherwise, the resource is denied and a corresponding error message is returned;

[0155] Calculate the remaining time: The distributed server calculates the remaining limit time based on the time it takes to pass the verification;

[0156] Wherein, remaining limit time = set limit time - (current time - verification passing time);

[0157] During the calculation process, the distributed server first needs to obtain the time when the verification is passed; this is achieved by extracting the time from the received verification request; then, the distributed server needs to obtain the current time; this is obtained through the system clock or timer; finally, the distributed server calculates the remaining limit time, so as to restrict other clients from using the resource within a certain period of time after the verification is passed;

[0158] Calculate the remaining number of uses: The distributed server calculates the remaining number of uses based on the number of times the verification passes;

[0159] Among them, the remaining number of uses = the set number of uses - the number of verification passes;

[0160] During the calculation process, the distributed server needs to record the number of times the verification is passed. This is achieved by maintaining a counter. Each time the verification is passed, the counter is incremented by 1. Then, the distributed server obtains the number of times the verification is passed from the counter and calculates the remaining number of uses, so as to limit the number of times the client can use the resource within a certain period of time after the verification is passed.

[0161] Determine whether to allow use: The distributed server determines whether to allow other clients or the same client to use the resource based on the remaining time and the remaining number of uses; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, use is allowed; otherwise, use is not allowed;

[0162] During the judgment process, the distributed server needs to compare the remaining time and the remaining number of uses with the preset thresholds; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, other clients or the same client are allowed to use the resource; otherwise, the use is not allowed and the corresponding error message is returned;

[0163] In this way, the distributed server ensures that other clients or the same client cannot overuse resources within a certain period of time after verification, thereby improving resource utilization and stability of the entire system;

[0164] By storing the client's verification information in the database after the verification is passed, and restricting other clients from using the resource within a certain period of time after the verification is passed, and limiting the number of times the client uses the resource, the resource utilization of the distributed server is further improved, and excessive use of resources by individual clients is prevented, thereby ensuring the stability and fairness of the entire system; at the same time, this strategy also prevents malicious clients from attacking distributed servers through frequent verification, thereby improving the security of the system.

[0165] Although the embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments or applied directly or indirectly without departing from the principles and spirit of the present invention. In other related technical fields, the scope of the present invention is defined by the appended claims and their equivalents, which are equally included in the scope of patent protection of the present invention.

Claims

1. A resource verification method for a distributed server, characterized in that: The following steps are involved: S1. Receive the verification request sent by the client; S2. Obtain the client's verification information; S3, verify the client's resource usage authority; S4. Adjust verification time; S5. Return the verification result; Among them, according to the verification information, the resource use authority of the client is verified, and the verification result is returned to the client; The verification information includes the client's IP address, user name, password, client's resource identifier, resource usage authority, verification time and verification times.

2. The resource verification method of a distributed server according to claim 1, characterized in that: in, The verification times are used to limit the number of verifications of the client, the verification times are set to 5 or 10 times, and the verification time is 10 minutes; The specific steps are as follows: The distributed server receives the verification request sent by the client, which includes the client's IP address, user name and password, as well as the client's resource identifier, resource usage authority, verification time and verification times; The distributed server obtains the client's authentication information from the request, including the client's IP address, user name and password, as well as the client's resource identifier, resource usage permissions, authentication time and authentication times; The distributed server verifies the client's authority to use the resource based on the resource identifier and resource usage authority in the verification information; The distributed server adjusts the verification time according to the number of verifications and the verification time in the verification information; specifically, the distributed server calculates a new verification time according to the number of verifications and the verification time, and the new verification time is equal to the original verification time minus the network delay; The distributed server returns the verification result to the client; if the verification is successful, a verification success message is returned; if the verification fails, a verification failure message is returned.

3. The resource verification method of a distributed server according to claim 2, characterized in that: According to the client's IP address and resource identifier, the network delay between the client and the distributed server is calculated, and the verification time is adjusted according to the network delay.

4. The resource verification method of a distributed server according to claim 3, characterized in that: in, The network delay is calculated as: The specific calculation steps are as follows: Get the client IP address and distributed server IP address: Obtain the client's IP address and the distributed server's IP address from the received verification request; Calculate the distance between the client IP address and the distributed server IP address: By querying the network topology database, the network distance between the client IP address and the distributed server IP address is obtained; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers); Get the network transmission rate: By querying the network device parameters, the current network transmission rate is obtained; the rate is measured in bit rate (bit / s) and byte rate (byte / s); Calculate network latency: The network delay is obtained by dividing the distance between the client IP address and the distributed server IP address by the network transmission rate; the delay is usually calculated in seconds (s) or milliseconds (ms).

5. The resource verification method of a distributed server according to claim 4, characterized in that: The calculation formula of the network transmission rate is: The specific calculation steps are as follows: Get network bandwidth: By querying the network device parameters, the bandwidth of the current network is obtained; the bandwidth is measured in bit rate (bit / s) and byte rate (byte / s); Get network latency: By querying the network device parameters, the current network delay is obtained; the delay is usually in milliseconds (ms); Calculate network transmission rate: Divide the network bandwidth by the network delay to get the network transmission rate; the transmission rate is usually calculated in bit rate (bit / s) or byte rate (byte / s).

6. The resource verification method of a distributed server according to claim 5, characterized in that: The calculation formula of the network bandwidth is: The specific steps are as follows: The network bandwidth is calculated as follows: Get the client IP address and distributed server IP address: Obtain the client's IP address and the distributed server's IP address from the received verification request; Calculate the distance between the client IP address and the distributed server IP address: By querying the network topology database, the network distance between the client IP address and the distributed server IP address is obtained; the distance is the hop count between the two IP addresses, and is also the physical distance between the two IP addresses (for example, in kilometers); Get network latency: By querying the network device parameters, the current network delay is obtained; the delay is usually in milliseconds (ms); Calculate network bandwidth: Divide the distance between the client IP address and the distributed server IP address by the network delay to get the network bandwidth; the bandwidth is usually calculated in bit rate (bit / s) or byte rate (byte / s); Verify network bandwidth: Verify whether the calculated network bandwidth is reasonable based on the actual configuration of the network equipment. If the calculated network bandwidth does not match the actual configuration, you may need to recheck the network topology database or network equipment parameters. Record network bandwidth: Record the calculated network bandwidth in the system for subsequent query and use.

7. The resource verification method of a distributed server according to claim 6, characterized in that: The adjustment formula for the network delay is: Calculate the original network delay: Calculate the original network delay between the client and the distributed server according to the network delay calculation formula; Calculate the number of verifications: count the number of client verifications; In the distributed server, a counter is maintained to record the number of verifications of each client; Adjust network latency: multiply the original network latency by Get the adjusted network delay; Verify network delay: Verify whether the adjusted network delay is reasonable based on the actual configuration of the network device. If the adjusted network delay does not match the actual configuration, you may need to recheck the network topology database or network device parameters. Record network delay: record the adjusted network delay in the system for subsequent query and use; The adjustment formula for verification time is: Verification time = verification time - network delay Calculate the original verification time: According to the settings of the distributed server, obtain the original time of the client verification; Calculate network delay: Calculate the network delay between the client and the distributed server according to the network delay calculation formula; Adjust verification time: Subtract network delay from original verification time to get adjusted verification time; Verify the adjusted verification time: According to the settings of the distributed server, verify whether the adjusted verification time meets the requirements; if the adjusted verification time does not meet the requirements, it may be necessary to recalculate the network delay or adjust the original verification time; Record verification time: Record the adjusted verification time in the system for subsequent query and use.

8. The resource verification method of a distributed server according to claim 1 or 7, characterized in that: Also includes: After the verification is passed, the client's verification information is stored in the database of the distributed server; And within a certain period of time after the verification is passed, other clients are restricted from using the resource; at the same time, within a certain period of time after the verification is passed, the number of times the client can use the resource is restricted; The specific steps are as follows: Verification passed: The distributed server receives the verification request from the client and returns the verification result to the client after the verification passes. Storing verification information: The distributed server stores the client's verification information (including IP address, user name, password, resource identifier, verification time and number of times, etc.) in the database; Set time limit: According to the resource allocation policy of the distributed server, set a time limit after the verification is passed to limit other clients from using the resource; Set usage times: According to the resource allocation policy of the distributed server, set a limit on the number of times the client can use the resource within a certain period of time after verification; Check verification information: When another client or the same client requests to use the resource again, the distributed server checks the verification information stored in the database to determine whether the use is allowed; Implement restrictions: If the verification information shows that other clients or the same client have not reached the usage limit, then the resource is allowed to be used; otherwise, the resource is denied and a corresponding error message is returned; Calculate the remaining time: The distributed server calculates the remaining limit time based on the time it takes to pass the verification; Wherein, remaining limit time = set limit time - (current time - verification passing time); During the calculation process, the distributed server first needs to obtain the time when the verification is passed; this is achieved by extracting the time from the received verification request; then, the distributed server needs to obtain the current time; this is obtained through the system clock or timer; finally, the distributed server calculates the remaining limit time, so as to restrict other clients from using the resource within a certain period of time after the verification is passed; Calculate the remaining number of uses: The distributed server calculates the remaining number of uses based on the number of times the verification passes; Among them, the remaining number of uses = the set number of uses - the number of verification passes; During the calculation process, the distributed server needs to record the number of times the verification is passed. This is achieved by maintaining a counter. Each time the verification is passed, the counter is incremented by 1. Then, the distributed server obtains the number of times the verification is passed from the counter and calculates the remaining number of uses, so as to limit the number of times the client can use the resource within a certain period of time after the verification is passed. Determine whether to allow use: The distributed server determines whether to allow other clients or the same client to use the resource based on the remaining time and the remaining number of uses; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, use is allowed; otherwise, use is not allowed; During the judgment process, the distributed server needs to compare the remaining time and the remaining number of uses with the preset thresholds; if the remaining time is greater than 0 and the remaining number of uses is greater than 0, other clients or the same client are allowed to use the resource; otherwise, use is not allowed and a corresponding error message is returned.