An access request allocation method and device, electronic equipment and storage medium

By calculating the predicted time coefficient of user access requests and distributing them to multiple storage nodes, the single point of failure caused by load imbalance in distributed storage systems is solved, achieving balanced load distribution and improved system stability.

CN119544713BActive Publication Date: 2025-12-16CHINA MOBILE INTERNET CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411507564.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-12-16
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

In distributed storage systems, uneven load distribution on storage nodes can lead to single points of failure.

Method used

By acquiring user access information from storage nodes, the predicted time coefficient for each user access request is calculated, and the access requests are distributed to multiple storage nodes based on a preset allocation strategy to balance the load.

Benefits of technology

It effectively prevents individual storage nodes from becoming overloaded, solves the single point of failure problem caused by overloaded storage nodes, and improves the stability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544713B_ABST
    Figure CN119544713B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of allocation method, device, electronic equipment and storage medium of access request, belong to cloud computing service management technical field, can solve the problem that single point failure is caused by the overload of storage node. Including: obtaining the user access information corresponding to multiple storage nodes in network disk system, and multiple user access requests to be allocated to the multiple storage nodes, the user access information includes the historical access situation of user to the storage node;According to the user access information, determine the predicted time coefficient of each user access request, the predicted time coefficient is used to predict the duration of the network disk system processing the user access request;Based on the predicted time coefficient of each user access request, according to the preset allocation strategy, each user access request is allocated to the multiple storage nodes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing service management, and particularly relates to a method and device for distributing access requests, an electronic device and a storage medium. BACKGROUND

[0002] At present, data backup is usually performed by using a data distributed storage manner to avoid data loss. Each storage node of the distributed storage stores the same data for backup, so that in the case of data loss of any storage node, the loss can be compensated in time through backup, thereby greatly improving the security of data.

[0003] In the related art, since each storage node stores the same content, user access requests in a region are evenly distributed to each storage node in the region. If the distribution is not analyzed, the final load state of each storage node will be different, which causes the problem of single point failure due to excessive load of the storage node. SUMMARY

[0004] Embodiments of the present application provide a method and device for distributing access requests, an electronic device and a storage medium to solve the problem of single point failure due to excessive load of the storage node.

[0005] To solve the above technical problems, embodiments of the present application are implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide a method for distributing access requests, comprising: obtaining user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be distributed to the plurality of storage nodes, the user access information including historical access of users to the storage nodes; determining a predicted time coefficient of each user access request according to the user access information, the predicted time coefficient being used to predict a time length for the network disk system to process the user access request; and distributing each user access request to the plurality of storage nodes according to a preset distribution strategy based on the predicted time coefficient of each user access request.

[0007] In a second aspect, an embodiment of the present application provides an allocation apparatus of access requests, comprising: a data collection module, configured to acquire user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be allocated to the plurality of storage nodes, the user access information comprising historical access conditions of users to the storage nodes; a prediction analysis module, configured to determine a predicted time coefficient of each of the user access requests according to the user access information, the predicted time coefficient being used to predict a time length for the network disk system to process the user access requests; and an access management module, configured to allocate each of the user access requests to the plurality of storage nodes according to a preset allocation strategy based on the predicted time coefficient of each of the user access requests.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory electrically connected to the processor, the memory storing a computer program, and the processor is configured to call and execute the computer program from the memory to implement the above-mentioned access request allocation method.

[0009] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium for storing a computer program, the computer program being executable by a processor to implement the above-mentioned access request allocation method.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, the communication interface being coupled to the processor, and the processor being configured to run a program or an instruction to implement the above-mentioned access request allocation method.

[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, the computer program being executable by a processor to implement the above-mentioned access request allocation method.

[0012] According to the technical scheme of the embodiment of the present application, the user access information corresponding to the plurality of storage nodes in the network disk system is acquired, and the plurality of user access requests to be distributed to the plurality of storage nodes are acquired, the user access information including the historical access of the user to the storage node; the predicted time coefficient of each user access request is determined according to the user access information, the predicted time coefficient being used to predict the time length of the network disk system processing the user access request; and each user access request is distributed to the plurality of storage nodes according to the preset distribution strategy based on the predicted time coefficient of each user access request. It can be seen that, according to the user access information corresponding to the plurality of storage nodes in the network disk system, the predicted time coefficient of each user access request to be distributed to the plurality of storage nodes is calculated, the time length of the user access request can be predicted in advance, and each user access request can be more evenly distributed to each storage node according to the predicted time coefficient of the user access request and the preset distribution strategy, so as to prevent the load of the individual storage node from being too heavy due to too many user access requests received by the individual storage node, and the problem of single point failure caused by the load of the storage node being too heavy can be solved. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical scheme in the one or more embodiments of the present application or the prior art, the drawings needed to be used in the embodiment or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the one or more embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.

[0014] Figure 1 is a schematic diagram of an access request distribution system according to an embodiment of the present application;

[0015] Figure 2 is a schematic flow chart of an access request distribution method according to an embodiment of the present application;

[0016] Figure 3 is a schematic flow chart of an access request distribution method according to another embodiment of the present application;

[0017] Figure 4 is a schematic block diagram of an access request distribution apparatus according to an embodiment of the present application;

[0018] Figure 5 is a schematic diagram of the hardware structure of an access request distribution device according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] The embodiment of the present application provides an access request distribution method, apparatus, electronic device and storage medium, so as to solve the problem of single point failure caused by the load of the storage node being too heavy.

[0020] In order to make the technical personnel in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should belong to the scope of protection of the present application.

[0021] The access request distribution method provided by the embodiments of the present application can be executed by an electronic device or software installed in the electronic device. Specifically, the electronic device can be a terminal device or a server device. The terminal device can include a smart phone, a notebook computer, a smart wearable device, a vehicle-mounted terminal, etc., and the server device can include a physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.

[0022] Figure 1 is a schematic diagram of an access request distribution system according to an embodiment of the present application. As shown in Figure 1 , the system includes a distributed storage module, a data collection module, a prediction analysis module, and an access management module, wherein the access management module includes a queue unit and a distribution unit. Specifically, the distributed storage module includes a plurality of accessible storage nodes; the data collection module is configured to collect user access information of each user in the cloud disk system; the prediction analysis module is configured to calculate a predicted use time coefficient of each user access request to be distributed according to the user access information of the user; the access management module is configured to manage user access requests and storage nodes of the system, wherein the queue unit is configured to add the received user access request to the queue corresponding to the storage node and generate queue information, and the distribution unit is configured to distribute the user access request in the queue unit to the plurality of storage nodes of the distributed storage module, and can control the access quantity of the storage node according to the queue information, and distribute the user access request according to the predicted use time coefficient and the access quantity of the storage node. By supervising the security of the storage node, the user access request can be reasonably distributed to improve the stability and security of the operation of the storage node.

[0023] The access request distribution method provided by the embodiments of the present application will be described in detail below in conjunction with the drawings and specific embodiments and application scenarios.

[0024] Figure 2 A schematic flowchart of an access request distribution method provided by an embodiment of the present application is shown, which includes the following steps:

[0025] S202, acquire user access information corresponding to a plurality of storage nodes in a network disk system, and a plurality of user access requests to be distributed to the plurality of storage nodes.

[0026] The user access information includes historical access of the user to the storage nodes.

[0027] The network disk system includes a system composed of a plurality of servers. Through distributed computing such as cloud computing, computing resources, storage resources and application programs are virtualized and provided to users for on-demand use.

[0028] The storage node is a component for actually storing business data, and the network disk system includes a plurality of storage nodes.

[0029] The user access information includes storage node information, user information, user access request information, and user access time length of the user accessing the storage node in the network disk system, and can record detailed data of the user accessing the storage node. The users include the user currently submitting the user access request and the historical user.

[0030] The user access request includes a request of the user to access the content stored in a certain storage node. For example, the user access request is a request of the server to send resources (such as web pages, etc.).

[0031] The plurality of user access requests to be distributed to the plurality of storage nodes includes a corresponding other undistributed user access request when the number of user access requests in all storage nodes slightly exceeds the safe load number of all storage nodes in the current region, and can also include a corresponding other undistributed user access request when the number of user access requests in all storage nodes does not exceed the safe load number of all storage nodes in the current region, without limitation.

[0032] S204, determine a predicted time coefficient of each user access request according to the user access information.

[0033] The predicted time coefficient is used to predict the time length of the network disk system processing the user access request.

[0034] Specifically, the time length of the user access request is the access time length of the user accessing the content in the storage node. The longer the time length, the greater the load of the user access request, and therefore the greater the load of the accessed storage node. It can be seen that the time length of the user access request can represent the load of the user access request, which can affect the number of user access requests to the target storage node. The more the number of user access requests to the target storage node, the greater the load of the target storage node. It can be seen that the predicted time coefficient is specifically used to predict the load corresponding to the user access request.

[0035] S206, according to the preset allocation strategy, each user access request is allocated to the plurality of storage nodes based on the predicted time coefficient of each user access request.

[0036] The preset allocation strategy includes adjusting the number of user access requests carried by the storage nodes.

[0037] According to the prediction of the load of each user access request, the predicted time coefficient is obtained, and according to the preset allocation strategy, each user access request is more evenly allocated to the plurality of storage nodes according to the load size of the user access request received in advance.

[0038] The technical scheme of the embodiment of the application is adopted, the user access information corresponding to the plurality of storage nodes in the network disk system and the plurality of user access requests to be allocated to the plurality of storage nodes are obtained, the user access information includes the historical access of the user to the storage node; according to the user access information, the predicted time coefficient of each user access request is determined, the predicted time coefficient is used to predict the time length of the network disk system processing the user access request; according to the preset allocation strategy, each user access request is allocated to the plurality of storage nodes based on the predicted time coefficient of each user access request. It can be seen that according to the user access information corresponding to the plurality of storage nodes in the network disk system, the predicted time coefficient of each user access request to be allocated to the plurality of storage nodes is calculated, the time length of the user access request can be predicted in advance, according to the predicted time coefficient of the user access request and the preset allocation strategy, each user access request can be more evenly allocated to each storage node, preventing the load of the individual storage node from being too heavy due to the excessive number of user access requests received, and solving the problem of single point failure caused by the excessive load of the storage node.

[0039] In one embodiment, according to the user access information, the predicted time coefficient of each user access request (i.e. S204) is determined, which can perform the following steps A1-A2:

[0040] Step A1: By partitioning the contents in the plurality of storage nodes, a preset number of partitions is obtained.

[0041] Specifically, the contents in the storage node include the resource data stored in the storage node, and the contents in the storage node are partitioned to obtain a preset number of partitions, the preset number is the number of partitions set by the storage content itself, that is, the number and manner of division are not limited specifically under the condition of ensuring no omission and no repetition. As an example, the storage node is divided according to the web pages contained in the storage content, and each web page is recorded as a part.

[0042] Step A2: According to the user access information, determine the preset weight coefficient corresponding to the user access request, the expected value of the user access request corresponding to the user browsing the preset number of partitions, the expected value of the access time of the user access request corresponding to the user browsing the highest frequency of the preset number of partitions, the historical access time of all users in the network disk system and the preset standard time, and calculate the predicted time coefficient of each user access request.

[0043] The user access information includes the historical access of the user to the storage node, such as the historical access data of all users to each storage node.

[0044] According to the user access information, the formula for calculating the predicted time coefficient of each user access request is as follows:

[0045]

[0046] Wherein, is the predicted time coefficient of the user access request, and the content stored in the storage node is divided into N partitions.

[0047] And is the preset weight coefficient corresponding to the user access request, which respectively represents the weight of the time length of the user access request of the user (i.e. the current user) and the historical user corresponding to the user access request.

[0048] N is the expected value of the user browsing the preset number of partitions corresponding to the user access request, including, according to the number of the preset number of partitions in step A1, the best access amount of the user browsing the preset number of partitions within the first preset time, that is, the expected value of the current user accessing the digital set of several partitions in the preset number of partitions.

[0049] , respectively represent the expected value of the access time of the highest frequency of the preset number of partitions browsed by the user corresponding to the user access request, including, in the user browsing the preset number of partitions corresponding to the user access request, the expected value of the access time of the partition with the highest access frequency within the first preset time. Digital set.

[0050] is the historical access time of all users in the network disk system, including, within the first preset time, the expected value of the digital set of the historical access time of all users within the preset time period.

[0051] is the preset standard time, including, within the first preset time, the standard time set for all users to access the storage node.

[0052] Specifically, the historical access duration of the user corresponding to the user access request is obtained according to the historical access data of the current user in the user access information, the historical access duration of all users is obtained according to the historical access data of all users in the user access information, and the historical access duration of the user corresponding to the user access request and the historical access duration of all users are subjected to weighted summation processing to obtain the prediction time coefficient of the user access request.

[0053] In the embodiment, the contents in the plurality of storage nodes are subjected to partition processing to obtain a preset number of partitions, and the preset weight coefficient corresponding to the user access request, the expected value of the user corresponding to the user access request browsing the preset number of partitions, the expected value of the access duration of the preset number of partitions with the highest browsing frequency of the user corresponding to the user access request, the historical access duration of all users in the network disk system, and the preset standard duration are determined according to the user access information, and then the prediction time coefficient of each user access request is calculated. The access duration of the user access request can be more accurately predicted, the user access request can be more reasonably dispersed to the plurality of storage nodes for processing, and the balance of the allocation of the user access request to the storage nodes is improved.

[0054] In one embodiment, the preset weight coefficient (i.e., step A2) includes a preset first weight coefficient and a preset second weight coefficient, and the following steps A21-A22 can be performed:

[0055] Step A21: When the historical access times of the user corresponding to the user access request accessing the storage node is greater than the preset access times within the first preset duration, it is determined that the preset first weight coefficient is greater than the preset second weight coefficient.

[0056] The first preset duration is consistent with the preset duration for collecting data when calculating the prediction time coefficient in step A2.

[0057] Step A22: The quotient of the historical access times and the preset access times is reduced by 1, and the obtained result is multiplied by a monotonically increasing transformation function in the first preset range to obtain the preset first weight coefficient.

[0058] The sum of the preset first weight coefficient and the preset second weight coefficient is equal to a preset constant determined based on empirical data.

[0059] Specifically, the calculation formula of the preset first weight coefficient is:

[0060]

[0061] Wherein, m is the historical access times, the historical access times include, taking the current time point of the user access request as the base point, the historical access times of each storage node accessed by the user corresponding to the user access request, i.e. the current user, within a first preset time length.

[0062] The preset number of times specifically includes an empirical constant set according to experience.

[0063] is a monotonically increasing transformation function with the independent variable and the value in the first preset range including the value interval defined as .

[0064] According to step A21, if the historical access times of the storage node accessed by the user corresponding to the user access request is greater than the preset access times, then the value of the preset first weight coefficient can be obtained through the above formula.

[0065] Further, since the sum of the preset first weight coefficient and the preset second weight coefficient is equal to the preset constant c determined based on empirical data, the second weight coefficient can be calculated and obtained through .

[0066] In this embodiment, by obtaining the historical access times of the storage node accessed by the user corresponding to the user access request and the preset access times, and comparing them, when the historical access times is greater than the preset access times, the preset first weight coefficient and the preset second weight coefficient are determined through the calculation formula. Based on the determined preset first weight coefficient and the preset second weight coefficient, the weights of the user corresponding to the user access request and the historical user access information are more accurately determined, so as to improve the accuracy of calculating the prediction time coefficient of the user access request.

[0067] In one embodiment, the preset first weight coefficient (i.e. step A2) can also perform the following step A23:

[0068] Step A23: When the historical access times of the storage node accessed by the user corresponding to the user access request is less than the preset access times, determine that the preset first weight coefficient is less than the preset second weight coefficient, and determine the preset first weight coefficient as a constant in the second preset range.

[0069] Specifically, when the historical access times of the storage node accessed by the user corresponding to the user access request is less than or equal to the preset access times, then the preset first weight coefficient is less than the preset second weight coefficient, i.e. .

[0070] The second preset range includes That is, a constant with a value range of on is obtained by calculation.

[0071] In this embodiment, the historical access times of the user access storage nodes corresponding to the user access request and the preset access times are obtained and compared. When the historical access times are less than or equal to the preset access times, the value of the first preset weight coefficient is a constant in the second preset range, which can more accurately determine the weight of the user access request corresponding to the user and the historical user access information, thereby improving the accuracy of the predicted use time coefficient of the user access request.

[0072] In one embodiment, after obtaining the user access information corresponding to a plurality of storage nodes in the network disk system and a plurality of user access requests to be distributed to the plurality of storage nodes (i.e., S202), the following step B can be performed:

[0073] Step B: Add the user access request to the queue corresponding to the storage node to generate queue information. The queue information includes: the number of user access requests allowed by the storage node in the network disk system.

[0074] The queue has the characteristics of first-in first-out, that is, the user access request that enters the queue first will be processed first, and the subsequent user access request will be processed in order, which can be used to process the user access request and ensure the fairness and order of the system.

[0075] The queue corresponding to the storage node includes: the information of the storage node and the user access request to be distributed, and the queue information corresponding to each storage node is generated according to the information of the storage node and the user access request. The queue information is mainly used to represent the number of user access requests allowed by the storage node. That is, the received user access request to be distributed is added to the queue to generate queue information, and the number of user access requests allowed by the storage node can also be controlled according to the queue information, so that a plurality of user access requests to be distributed can be dispersed to a plurality of corresponding storage nodes. All storage nodes and user access requests to be distributed can also share one queue, so that the user access request to be distributed can be distributed to the target storage node according to the predicted use time coefficient of the user access request to be distributed and the queue information of the queue corresponding to each storage node.

[0076] ​In the embodiment, the user access requests are added into the queue corresponding to the storage node, and the user access requests to be allocated are allocated in sequence. The number of user access requests allowed to be loaded by the storage node after loading is determined according to the queue information of the storage node in the queue, so that the number of user access requests allowed to be loaded by the storage node after loading is accurately obtained, and the user access requests are more accurately allocated.

[0077] In one embodiment, according to the preset allocation strategy, each user access request is allocated to a plurality of storage nodes (i.e., S206), and the following step C1 can be performed:

[0078] Step C1: According to the adjustment coefficient of each storage node in the plurality of storage nodes, the user access request in the queue is allocated to the storage node. The adjustment coefficient is used to represent the load degree of the user access request that can be carried by the storage node; wherein the adjustment coefficient of the storage node is used to dynamically adjust the load of the storage node when allocating the user access request.

[0079] Specifically, the adjustment coefficient of the storage node can adjust the load degree of the running queue of the storage node, that is, according to the adjustment coefficient of the storage node, the load of the storage node is dynamically adjusted when the user access request is allocated. The adjustment coefficient of the storage node can be calculated as:

[0080]

[0081] The adjustment coefficient of the storage node is Wh, wherein L is the queue length corresponding to the storage node, k is the slope of the regression line, t is the interval span of the first preset time length, F and G are both preset monotonic increasing functions, and r is a transformation function about the first preset time length interval span t. The number of access requests allowed to be carried by the storage node is adjusted according to the adjustment coefficient.

[0082] In the embodiment, according to the adjustment coefficient of the storage node, the number of user access requests allowed to be carried in the storage node can be adjusted, and when the user access request is allocated, the load of each storage node can be dynamically adjusted by using the adjustment coefficient, so that the load of the storage node is effectively controlled.

[0083] In one embodiment, based on the predicted use time coefficient of each user access request, according to the preset allocation strategy, each user access request is allocated to a plurality of storage nodes (i.e., S206), and the following steps D1-D2 can be performed:

[0084] Step D1: Based on the predicted use time coefficient of each user access request, the load of each user access request is determined.

[0085] According to the predicted time coefficient of the user access request, the time length of the user access request accessing the storage node is predicted, and the load of the user access request is predicted based on the time length.

[0086] Step D2: According to the load of the user access request and the adjustment coefficient of each storage node, the user access request in the queue is distributed to each storage node according to the preset load balancing rule.

[0087] According to the predicted load of the user access request in step D1 and the adjustment coefficient of the storage node, the load of the storage node is dynamically adjusted, and the user access request is distributed to the storage node according to the preset load balancing rule, and the allowed access number of the storage node is not exceeded.

[0088] The preset load balancing rule includes: according to the load of the user access request to be distributed, the user access request is preferentially distributed to the storage node with small number of user access requests and the number of user access requests received by the storage node after receiving the user access request reaches the allowed load of the user access request; when the storage node reaches the allowed load of the user access request, but does not reach the rated load, the user access request is preferentially distributed to the storage node with small number of user access requests; wherein the allowed load of the user access request in the storage node is dynamically adjusted according to the corresponding adjustment coefficient, so that the load of the user access request after distribution does not exceed the rated load of the storage node; if the allowed load of the user access request of the storage node reaches the rated load when receiving the user access request, the access request is distributed to other storage nodes.

[0089] It should be noted that according to the allowed load of the user access request of the storage node and the predicted time coefficient of the user access request to be distributed, the user access request exceeding the total safety threshold left endpoint number is controlled to be distributed, wherein the total safety threshold left endpoint is the sum of the left endpoint values of the safety threshold interval of each storage node. For example, when the sum of the loads of the storage nodes exceeds the sum of the left endpoint values in the safety threshold interval, the sum of the left endpoint values in the safety threshold interval is the sum of the minimum values in the safety threshold interval, at this time, the number of user access requests allowed to load of the storage node can be controlled by adjusting the coefficient to distribute the user access request to be distributed. It can be seen that when the number of user access requests in the storage node has slightly exceeded the current safety load number of all storage nodes after adding the user access request to be distributed, the user access request to be distributed can be distributed to the storage node by reasonable analysis and distribution adjustment of the storage node, so that each storage node can be as evenly loaded as possible, and the safety of the storage node is guaranteed.

[0090] In this embodiment, based on the predicted time coefficient of each user access request, the load of each user access request is predicted, and according to the load of the user access request and the adjustment coefficient of the storage node, the number of user access requests allowed by the load of the storage node is adjusted according to the preset load balancing rule, so that each user access request is evenly distributed in the plurality of storage nodes. After adjusting the number of user access requests of the storage node, the load of each storage node is close to the predicted load of the user access request, which can improve the operation safety of each storage node.

[0091] In one embodiment, the load of the storage node is dynamically adjusted (i.e., step C1), which can be implemented as follows:

[0092] Step E1: According to the user access information, the preset adjustment interval of the storage node is determined.

[0093] The preset adjustment interval includes a first adjustment interval number and a second adjustment interval number, wherein the first adjustment interval number is less than the second adjustment interval number.

[0094] According to the user access information, the historical information data corresponding to each storage node is obtained, the historical user access amount and the stored information of the storage node are determined according to the historical information data, and then the preset adjustment interval of each storage node is determined. The adjustment interval is used to represent the minimum and maximum values of the number of user access requests allowed by the load of the storage node.

[0095] Step E2: When the adjustment coefficient of the storage node is less than the first adjustment interval number, the number of user access requests corresponding to the storage node in the queue information is not adjusted.

[0096] When the adjustment coefficient of the storage node is less than the first adjustment interval number, the number of user access requests allowed by the load of the storage node is less than the first adjustment interval number, and the number of user access requests allowed by the load of the corresponding storage node in the queue information is not adjusted. When the storage node receives a user access request, it can provide access information, wherein the number of user access requests allowed by the load of the storage node corresponding to the adjustment coefficient includes the user access requests to be allocated after the prediction time coefficient.

[0097] For example, the preset adjustment interval is , the first adjustment interval number is , the second adjustment interval number is , the adjustment coefficient of the storage node is , when , the number of user access requests allowed by the load of the storage node is not adjusted.

[0098] In this embodiment, according to the historical access in the user access information, the preset adjustment interval of the storage node is determined, the adjustment coefficient of the storage node is compared with the preset adjustment interval, when the adjustment coefficient of the storage node is less than the first adjustment interval number, it is indicated that the user access request allowed to be loaded in the load of the storage node is less than the minimum value in the preset adjustment interval, and the adjustment coefficient of the storage node is not adjusted.

[0099] In one embodiment, the load of the storage node is dynamically adjusted (i.e., step C1), and the following step F can be performed:

[0100] Step F: When the adjustment coefficient of the storage node is greater than or equal to the first adjustment interval number and less than or equal to the second adjustment interval number, the number of user access requests of the corresponding storage node in the queue information is adjusted within the allowed access amount.

[0101] The adjustment coefficient of the storage node is proportional to the allowed access amount of the storage node.

[0102] When the adjustment coefficient of the storage node is greater than or equal to the first adjustment interval number and less than or equal to the second adjustment interval number, the number of user access requests allowed to be loaded in the storage node is greater than or equal to the first adjustment interval number and less than or equal to the second adjustment interval number, and the number of user access requests allowed to be loaded in the corresponding storage node in the queue information can be adjusted within the preset adjustment interval, and when the storage node receives a user access request, access information can be provided. Within the preset adjustment interval, the greater the adjustment coefficient corresponding to the storage node, the greater the allowed access amount of the storage node, and the more the number of user access requests allowed to be loaded.

[0103] For example, the preset adjustment interval is , the first adjustment interval number is , the second adjustment interval number is , and the adjustment coefficient of the storage node is When , the number of user access requests allowed to be loaded in the storage node can be adjusted within the safety threshold interval, and the adjustment coefficient is proportional to the allowed access amount, that is, the greater the adjustment coefficient, the greater the allowed access amount after adjustment within the safety threshold interval.

[0104] In this embodiment, the adjustment coefficient of the storage node is adjusted within the preset adjustment interval, the adjustment coefficient of the storage node is within the preset adjustment interval, the number of user access requests allowed to be loaded in the load of the storage node is proportional to the adjustment coefficient, the greater the adjustment coefficient, the greater the number of user access requests allowed to be loaded in the storage node after adjustment. The flexibility of the number of user access requests allowed to be loaded in the storage node can be improved to adapt to receiving more user access requests.

[0105] In one embodiment, the load of the storage node is dynamically adjusted (i.e. step C1), which can be performed as follows:

[0106] Step G: When the adjustment coefficient of the storage node is greater than the second adjustment interval number, the adjustment coefficient is adjusted to the maximum value to adjust the number of user access requests of the corresponding storage node in the queue information to the maximum value in the allowed access amount.

[0107] When the adjustment coefficient of the storage node is greater than the second adjustment interval number, that is, the storage content in the storage node is large, the number of user access requests allowed to be loaded by the storage node needs to be adjusted to the maximum value in the allowed access amount.

[0108] For example, the preset adjustment interval is , the first adjustment interval number is , the second adjustment interval number is , and the adjustment coefficient of the storage node is When , the number of user access requests allowed to be loaded in the storage node can be adjusted to the maximum value in the allowed access amount.

[0109] In this embodiment, when the adjustment coefficient of the storage node is greater than the second adjustment interval number, it means that the number of user access requests allowed to be loaded by the load of the storage node is greater than the maximum value in the preset adjustment interval, and the number of user access requests allowed to be loaded by the storage node is adjusted to the maximum value in the allowed access amount.

[0110] Figure 3 is a schematic flow chart of an access request allocation method according to another embodiment of the present application, as shown in Figure 3 , the method comprises the following steps:

[0111] S301, obtaining a plurality of storage nodes to be accessed in a network disk system, user access information in the network disk system, and a plurality of user access requests to be allocated.

[0112] S302, calculating a predicted time coefficient of each user access request according to the historical access situation of the user corresponding to the user access information and the user access request.

[0113] S303, adding the user access requests to be allocated to the queue in order, and generating queue information corresponding to each storage node.

[0114] S304, adjusting the number of user access requests allowed to be loaded by the storage node according to the adjustment coefficient of each storage node in the queue information.

[0115] S305, according to the predicted use time coefficient of the user access request and the adjustment coefficient of each storage node, each user access request is allocated to the plurality of storage nodes according to a preset allocation strategy.

[0116] The specific processes of S301 to S305 have been described in detail in the above embodiments, and will not be repeated here.

[0117] By using the technical solutions of the embodiments of the present application, the user access information corresponding to the plurality of storage nodes in the network disk system and the plurality of user access requests to be allocated to the plurality of storage nodes are obtained, and the user access information includes the historical access of the user to the storage nodes. According to the user access information, the predicted use time coefficient of each user access request is determined, and the predicted use time coefficient is used to predict the time length of the network disk system processing the user access request. According to the predicted use time coefficient of each user access request, each user access request is allocated to the plurality of storage nodes according to a preset allocation strategy. As can be seen, according to the user access information corresponding to the plurality of storage nodes in the network disk system, the predicted use time coefficient of each user access request to be allocated to the plurality of storage nodes is calculated, the time length of the user access request can be predicted in advance, and according to the predicted use time coefficient of the user access request and the preset allocation strategy, each user access request can be more evenly allocated to each storage node, so as to prevent the load of the individual storage node from being too heavy due to too many user access requests, and solve the problem of single point failure caused by the load of the storage node being too heavy.

[0118] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions noted in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0119] The above is an access request allocation method provided by the embodiments of the present application. Based on the same idea, the embodiments of the present application also provide an access request allocation device.

[0120] Figure 4 is a structural schematic diagram of an access request allocation device according to an embodiment of the present application. As shown in Figure 4 The access request allocation device includes a data collection module 41, a prediction analysis module 42, and an access management module 43.

[0121] The data collection module 41 is configured to obtain user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be allocated to the plurality of storage nodes, and the user access information includes historical access of a user to the storage nodes.

[0122] The prediction analysis module 42 is configured to determine a predicted time coefficient of each user access request according to the user access information, and the predicted time coefficient is used to predict a time length for the network disk system to process the user access request.

[0123] The access management module 43 is configured to distribute each user access request to the plurality of storage nodes according to a preset distribution strategy based on the predicted time coefficient of each user access request.

[0124] In an embodiment, the prediction analysis module 42 further comprises:

[0125] The processing unit is configured to obtain a preset number of partitions by partitioning the contents in the plurality of storage nodes.

[0126] The prediction unit is configured to determine a preset weight coefficient corresponding to the user access request, an expected value of the user access request corresponding to the user browsing the preset number of partitions, an expected value of the user access request corresponding to the user browsing the preset number of partitions with the highest frequency, a historical access time length of all users in the network disk system, and a preset standard time length, and calculate the predicted time coefficient of each user access request.

[0127] In an embodiment, the preset weight coefficient in the prediction unit comprises a preset first weight coefficient and a preset second weight coefficient, and the calculation unit is specifically configured to, when the historical access times of the user access request corresponding to the user accessing the storage node is greater than a preset access times within a first preset time length, determine that the preset first weight coefficient is greater than the preset second weight coefficient.

[0128] The quotient of the historical access times and the preset access times is reduced by 1, and the obtained result is multiplied by a monotonically increasing transformation function in a first preset range to obtain the preset first weight coefficient; wherein the sum of the preset first weight coefficient and the preset second weight coefficient is equal to a preset constant determined based on empirical data.

[0129] In an embodiment, the preset first weight coefficient in the prediction unit is further configured to, when the historical access times of the user access request corresponding to the user accessing the storage node is less than the preset access times, determine that the preset first weight coefficient is less than the preset second weight coefficient, and determine the preset first weight coefficient as a constant in a second preset range.

[0130] In an embodiment, the access management module further comprises a queue unit, which is specifically configured to add the user access request to a queue corresponding to the storage node, and generate queue information, wherein the queue information comprises a number of user access requests allowed by the storage node in the network disk system.

[0131] In an embodiment, the access management module 43 is further configured to distribute the user access requests in the queue to the storage nodes according to an adjustment coefficient of each of the storage nodes, the adjustment coefficient being used to represent a load degree of the user access requests that can be carried by the storage node, and the adjustment coefficient of the storage node being used to dynamically adjust the load of the storage node when the user access requests are distributed.

[0132] In an embodiment, the access management module 43 is further configured to determine the load of each of the user access requests based on a predicted use time coefficient of each of the user access requests, and distribute the user access requests in the queue to the storage nodes according to the load of the user access requests and the adjustment coefficient of each of the storage nodes according to a preset load balancing rule.

[0133] In an embodiment, the queue unit is further configured to determine a preset adjustment interval of the storage node according to the user access information, the preset adjustment interval including a first adjustment interval number and a second adjustment interval number, wherein the first adjustment interval number is less than the second adjustment interval number, and when the adjustment coefficient of the storage node is less than the first adjustment interval number, the number of the user access requests allowed to be loaded by the corresponding storage node in the queue information is not adjusted.

[0134] In an embodiment, the queue unit is further configured to, when the adjustment coefficient of the storage node is greater than or equal to the first adjustment interval number and less than or equal to the second adjustment interval number, adjust the number of the user access requests allowed to be loaded by the corresponding storage node in the queue information within the allowed access amount, wherein the adjustment coefficient of the storage node is directly proportional to the allowed access amount of the storage node.

[0135] In an embodiment, the queue unit is further configured to, when the adjustment coefficient of the storage node is greater than the second adjustment interval number, adjust the adjustment coefficient to a maximum value to adjust the number of the user access requests allowed to be loaded by the corresponding storage node in the queue information to a maximum value in the allowed access amount.

[0136] According to the technical scheme of the embodiment of the present application, the user access information corresponding to the plurality of storage nodes in the network disk system and the plurality of user access requests to be distributed to the plurality of storage nodes are acquired, the user access information includes the historical access situation of the user to the storage node; the predicted time coefficient of each user access request is determined according to the user access information, the predicted time coefficient is used to predict the time length of the network disk system processing the user access request; and each user access request is distributed to the plurality of storage nodes according to the preset distribution strategy based on the predicted time coefficient of each user access request. It can be seen that, according to the user access information corresponding to the plurality of storage nodes in the network disk system, the predicted time coefficient of each user access request to be distributed to the plurality of storage nodes is calculated, the time length of the user access request can be predicted in advance, and each user access request can be more evenly distributed to each storage node according to the predicted time coefficient of the user access request and the preset distribution strategy, so that the problem of the single point failure caused by the overload of the storage node is solved.

[0137] Those skilled in the art should understand that, Figure 4 The access request distribution device in the above embodiment can be used to implement the access request distribution method described above, and the detailed description should be similar to the method part described above. To avoid tediousness, it will not be described here.

[0138] Based on the same technical concept, the present application also provides an electronic device for executing the above-mentioned access request distribution method, Figure 5 To implement the structure of an electronic device of various embodiments of the present application. The electronic device can have a big difference due to different configurations or performances, and can include a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 complete mutual communication through the communication bus 540. The processor 510 can call the computer program stored on the memory 530 and executable on the processor 510 to execute the following steps:

[0139] Acquire the user access information corresponding to the plurality of storage nodes in the network disk system and the plurality of user access requests to be distributed to the plurality of storage nodes, the user access information includes the historical access situation of the user to the storage node;

[0140] Determine the predicted time coefficient of each user access request according to the user access information, the predicted time coefficient is used to predict the time length of the network disk system processing the user access request;

[0141] According to a preset allocation strategy, each user access request is allocated to the plurality of storage nodes based on the predicted use time coefficient of each user access request.

[0142] According to the technical solution of the embodiment of the application, the user access information corresponding to the plurality of storage nodes in the network disk system and the plurality of user access requests to be allocated to the plurality of storage nodes are obtained, and the user access information includes the historical access of the user to the storage nodes. According to the user access information, the predicted use time coefficient of each user access request is determined, and the predicted use time coefficient is used to predict the time length of the network disk system processing the user access request. According to a preset allocation strategy, each user access request is allocated to the plurality of storage nodes based on the predicted use time coefficient of each user access request. It can be seen that according to the user access information corresponding to the plurality of storage nodes in the network disk system, the predicted use time coefficient of each user access request to be allocated to the plurality of storage nodes is calculated, the time length of the user access request can be predicted in advance, and according to the predicted use time coefficient of the user access request and the preset allocation strategy, each user access request can be more evenly allocated to each storage node, so as to prevent the load of the individual storage node from being too heavy due to too many user access requests, and solve the problem of single point failure caused by the load of the storage node being too heavy.

[0143] The specific execution steps can refer to the steps of the above-mentioned access request allocation method embodiment, and the same technical effects can be achieved. To avoid repetition, they will not be described here.

[0144] It should be noted that the electronic device in the embodiment of the application includes a server, a terminal or other devices other than the terminal.

[0145] The above electronic device structure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than the illustration, or combine certain components, or different component arrangements. For example, the input unit can include a graphics processing unit (GPU) and a microphone, and the display unit can be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also called a touch screen. Other input devices can include but are not limited to a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, and the like, which will not be described here.

[0146] The memory can be used to store software programs and various data. The memory can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory can include a volatile memory or a non-volatile memory, or the memory can include both a volatile and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM).

[0147] The processor can include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor.

[0148] The application further provides a readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to implement each process of the above-mentioned access request allocation method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.

[0149] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0150] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize each process of the above-mentioned method for allocating access requests, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0151] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0152] The embodiment of the present application further provides a computer program product, which comprises a computer program. When the computer program is executed by a processor, the processor is used for running programs or instructions to realize each process of the above-mentioned product recommendation method embodiment, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0153] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the present application is not limited to the order of performing the functions shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.

[0154] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disc), including a number of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) executes the method described in various embodiments of the present application.

[0155] The embodiments of the present application are described above in conjunction with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not limited, those skilled in the art can make many forms without departing from the purpose of the present application and the scope of the claims under the inspiration of the present application, all belong to the protection of the present application.

Claims

1. An allocation method of access requests, characterized in that, The method comprises: obtaining user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be distributed to the plurality of storage nodes, the user access information including historical access of the user to the storage node; obtaining a preset number of partitions by partitioning the contents in the plurality of storage nodes; determining a preset weight coefficient corresponding to the user access request, an expected value of the user corresponding to the user access request browsing the preset number of partitions, an expected value of the user corresponding to the user access request browsing the access time length of the preset number of partitions with the highest frequency, a historical access time length of all users in the network disk system and a preset standard time length, and calculating a predicted time coefficient of each user access request, the predicted time coefficient being used to predict the time length of the network disk system processing the user access request; based on the predicted time coefficient of each user access request, distributing each user access request to the plurality of storage nodes according to a preset distribution strategy.

2. The method of claim 1, wherein, The preset weight coefficient includes a preset first weight coefficient and a preset second weight coefficient, in a first preset time length, when the historical access number of the user corresponding to the user access request accessing the storage node is greater than a preset access number, it is determined that the preset first weight coefficient is greater than the preset second weight coefficient; the quotient of the historical access number and the preset access number is reduced by 1, and the result obtained is multiplied by a monotonically increasing transformation function in a first preset range to obtain the preset first weight coefficient; wherein the sum of the preset first weight coefficient and the preset second weight coefficient is equal to a preset constant determined based on empirical data.

3. The method of claim 2, wherein, The preset first weight coefficient also includes: when the historical access number of the user corresponding to the user access request accessing the storage node is less than the preset access number, it is determined that the preset first weight coefficient is less than the preset second weight coefficient, and the preset first weight coefficient is determined as a constant in a second preset range.

4. The method of claim 1, wherein, After obtaining the user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be distributed to the plurality of storage nodes, the method comprises: adding the user access request to the queue corresponding to the storage node to generate queue information, the queue information including the number of user access requests allowed by the storage node in the network disk system.

5. The method of claim 4, wherein, The method comprises: distributing the user access request in the queue to the storage node according to the adjustment coefficient of each storage node in the plurality of storage nodes; the adjustment coefficient is used to represent the load degree of the user access request that the storage node can carry; wherein the adjustment coefficient of the storage node is used to dynamically adjust the load of the storage node when distributing the user access request.

6. The method of claim 5, wherein, The method comprises the following steps: determining the load of each user access request based on the predicted time coefficient of each user access request; allocating the user access requests in the queue to each storage node according to a preset load balancing rule based on the load of the user access request and the adjustment coefficient of each storage node.

7. The method of claim 6, wherein, The method further comprises the following steps: determining a preset adjustment interval of the storage node based on the user access information, wherein the preset adjustment interval comprises a first adjustment interval number and a second adjustment interval number, and the first adjustment interval number is less than the second adjustment interval number; when the adjustment coefficient of the storage node is less than the first adjustment interval number, the number of user access requests allowed to be loaded on the corresponding storage node in the queue information is not adjusted.

8. The method of claim 7, wherein, The method further comprises the following steps: when the adjustment coefficient of the storage node is greater than or equal to the first adjustment interval number and less than or equal to the second adjustment interval number, the number of user access requests allowed to be loaded on the corresponding storage node in the queue information is adjusted within the allowed access amount; wherein the adjustment coefficient of the storage node is directly proportional to the allowed access amount of the storage node.

9. The method of claim 8, wherein, The method further comprises the following steps: when the adjustment coefficient of the storage node is greater than the second adjustment interval number, the adjustment coefficient is adjusted to a maximum value to adjust the number of user access requests allowed to be loaded on the corresponding storage node in the queue information to a maximum value in the allowed access amount.

10. An apparatus for allocating access requests, characterized by The device comprises: a data collection module configured to obtain user access information corresponding to a plurality of storage nodes in a network disk system and a plurality of user access requests to be allocated to the plurality of storage nodes, wherein the user access information comprises historical access information of users to the storage nodes; a prediction analysis module configured to: divide the contents in the plurality of storage nodes into a preset number of partitions; determine a preset weight coefficient corresponding to the user access requests, an expected value of a user corresponding to the user access requests browsing the preset number of partitions, an expected value of an access time length of the preset number of partitions with the highest browsing frequency of the user corresponding to the user access requests, a historical access time length of all users in the network disk system, and a preset standard time length, and calculate a predicted time coefficient of each user access request, wherein the predicted time coefficient is used to predict a time length for the network disk system to process the user access request; an access management module configured to allocate each user access request to the plurality of storage nodes based on the predicted time coefficient of each user access request according to a preset allocation strategy.

11. An electronic device, comprising: An apparatus comprising a processor and a memory electrically connected with the processor, the memory storing a computer program, the processor being configured to invoke and execute the computer program from the memory to implement the method of claim 1-9.

12. A computer-readable storage medium, characterized in that, The storage medium is configured to store a computer program, the computer program being executable by a processor to implement the method of claim 1-9.

Citation Information

Patent Citations

  • Data processing method and device, equipment and storage medium

    CN115442373A

  • Scheduling method and device of content delivery network and electronic equipment

    CN117201612A