WO2020199487A1 - 访问请求的响应方法、装置、设备及存储介质 - Google Patents

访问请求的响应方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020199487A1
WO2020199487A1 PCT/CN2019/103844 CN2019103844W WO2020199487A1 WO 2020199487 A1 WO2020199487 A1 WO 2020199487A1 CN 2019103844 W CN2019103844 W CN 2019103844W WO 2020199487 A1 WO2020199487 A1 WO 2020199487A1
Authority
WO
WIPO (PCT)
Prior art keywords
server cluster
target sub
total
request
user
Prior art date
Application number
PCT/CN2019/103844
Other languages
English (en)
French (fr)
Inventor
朱坤
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020199487A1 publication Critical patent/WO2020199487A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1025Dynamic adaptation of the criteria on which the server selection is based
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 

Definitions

  • This application relates to the field of Internet insurance, and in particular to a method, device, equipment and storage medium for responding to an access request.
  • the number of background service nodes is usually fixed.
  • the background server cluster responds slowly, and the user's access experience is not ideal.
  • This application provides a method, device, device, and storage medium for responding to an access request.
  • the method can dynamically adjust the working status of the service nodes of a server cluster, improve the response speed of the server cluster, and thereby improve the user's access experience.
  • this application provides a method for responding to an access request, the method including:
  • the access request including a user identification and user location information
  • the operating parameters of the service nodes in the target sub-server cluster are adjusted to respond to the user's access request.
  • this application also provides a device for responding to an access request, the device including:
  • the request receiving unit is configured to receive a user's access request, where the access request includes a user ID and user location information;
  • a cluster determining unit configured to determine a target sub-server cluster that responds to the access request according to the user identifier and the user location information
  • a status acquiring unit configured to acquire the current usage status of the target sub-server cluster
  • the request quantity determining unit is configured to determine the quantity of access requests received in the target sub-server cluster
  • the working parameter adjustment unit is configured to adjust the working parameters of the service node in the target sub-server cluster according to the number of received access requests and the current use status of the target sub-server cluster to respond to the user's access request.
  • the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the The computer program implements the above-mentioned access request response method.
  • the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor realizes the above-mentioned access request. Response method.
  • the present application discloses a method, device, device and storage medium for responding to an access request, by receiving a user's access request; according to the user identification and the user location information, determining the target sub-server cluster that responds to the access request; Acquire the current usage status of the target sub-server cluster; determine the number of access requests received by the target sub-server cluster; adjust the target sub-server cluster according to the number of received access requests and the current usage status
  • the working parameters of the middle service node respond to the user’s access request, thereby dynamically adjusting the working status of the service node of the server cluster, improving the response speed of the server cluster, thereby improving the user’s access experience and also avoiding resources waste.
  • FIG. 1 is a schematic diagram of an application scenario of a method for responding to an access request provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of the structure of the sub-service cluster in Figure 1;
  • FIG. 3 is a schematic flowchart of steps of a method for responding to an access request provided by an embodiment of the present application
  • FIG. 4 is a schematic flowchart of sub-steps of the method for responding to the access request in FIG. 3;
  • FIG. 5 is a schematic flowchart of steps of a method for responding to an access request according to another embodiment of the present application.
  • FIG. 6 is a schematic flowchart of steps of a method for responding to an access request according to another embodiment of the present application.
  • FIG. 7 is a schematic flowchart of partial steps of a method for responding to an access request according to still another embodiment of the present application.
  • FIG. 8 is a schematic block diagram of an apparatus for responding to an access request according to an embodiment of the present application.
  • Fig. 9 is a schematic block diagram of a subunit of the device for responding to an access request in Fig. 8;
  • Fig. 10 is a schematic block diagram of a subunit of the device for responding to an access request in Fig. 8;
  • FIG. 11 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • the embodiments of the present application provide a method, device, computer equipment, and storage medium for responding to an access request.
  • the response method of the visit request can be used for the fraudulent behavior of patients and/or doctors, and provides an important reference for quickly finding out the fraudulent insurance of patients or doctors.
  • FIG. 1 is a schematic diagram of an application scenario of a method for responding to an access request provided by an embodiment of the present application.
  • the access request response method of the present application can be applied to a distributed system composed of a user terminal 110 and a server cluster 120.
  • the server cluster 120 includes a plurality of sub-service clusters 121. As shown in FIG. 2, each sub-service cluster 121 includes at least one service node.
  • Each user terminal 110 can communicate with any service node in the service cluster 120, thereby dynamically adjusting the working parameters of the service node in response to the user's access request.
  • the user terminal 110 may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
  • various communication client applications such as web browser applications, search applications, instant messaging tools, and email clients, may be installed on the user terminal 110.
  • the dynamic adjustment of the working parameters of the service node is completed through the interaction between the user terminal 110 and the service node.
  • FIG. 3 is a schematic flowchart of the steps of a method for responding to an access request according to an embodiment of the present application.
  • the response method of the access request is used to dynamically adjust the working parameters of the service node.
  • the user's access request may be phased. For example, in a certain period of time, the number of access requests is particularly large, and there is no access request in a certain period of time.
  • the server cluster is composed of multiple servers with the same function.
  • the target sub-server cluster is at least one sub-server cluster in the server cluster.
  • the method for responding to the access request specifically includes: step S201 to step S205.
  • the access request includes information such as user identification and user location information.
  • information such as user identification and user location information.
  • each user has a unique user ID.
  • the user ID can include information such as employee number or user name.
  • the user location information may include the user's geographic location information and/or logical network topology location information.
  • the user's geographic location information includes address tags, and/or, latitude and longitude. Address tags are information such as provinces, cities, counties, and streets, such as Beijing, Haidian District, etc., "Guangdong province", “Shenzhen”, etc.
  • Wireless connection methods may include, but are not limited to, 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future wireless connection methods.
  • S202 Determine a target sub-server cluster that responds to the access request according to the user identifier and the user location information.
  • step S202 specifically includes sub-steps S202a and S202b.
  • Step S202a Obtain the user's registered address according to the user ID.
  • Step S202b Determine the target sub-server cluster that responds to the access request according to the user's registered address and the user's location information.
  • the target sub-server cluster that responds to the access request is determined based on the user's registered address and the user's location information, which can ensure that the response to the access request is responded to, avoiding competition to generate dirty data, and ensuring that each visit is away from the user
  • the nearest cluster of sub-servers can increase access speed and improve user experience.
  • the current usage status of the target sub-server cluster includes the number of currently activated service nodes in the target sub-server cluster and the request processing information of the currently activated service nodes.
  • S204 Determine the number of access requests received by the target sub-server cluster.
  • each service node in the target sub-server cluster can receive access requests from different users, and can also receive different access requests from the same user.
  • the sum of the number of access requests received by each service node in the target sub-server cluster at a preset time is the number of access requests received by the target sub-server cluster.
  • service nodes there are two service nodes in the target sub-server cluster, namely service node A and service node B.
  • the number of access requests received by service node A within ten minutes is 2, and service node B within ten minutes
  • the number of access requests received is 3, and the number of access requests received by the target sub-server cluster within ten minutes is 5.
  • S205 According to the number of received access requests and the current usage state, adjust the working parameters of the service node in the target sub-server cluster to respond to the user's access request.
  • the working parameters include the number of access requests that the service node can respond to each time and the working status of the service node.
  • the working state includes the start state and the closed state.
  • step S205 it further includes: judging whether there is currently a started service node in the target sub-server cluster.
  • step S205 is executed. If the current usage status of the target sub-server cluster indicates that the number of currently started service nodes in the target sub-server cluster is zero, it indicates that the target sub-server cluster does not currently have any started service nodes.
  • the adjusting the working parameters of the service nodes in the target sub-server cluster according to the number of received access requests and the current usage status is specifically:
  • the request processing capability of the activated service nodes in the target sub-server cluster, and the number of activated service nodes in the target sub-server cluster adjust the target sub-server cluster The working parameters of the service node.
  • the target sub-server cluster has 8 service nodes, of which the working status of 3 service nodes is the active state, and the working status of the remaining 5 service nodes is the off state. If the number of access requests of the current user is large and the service capabilities of the three service nodes cannot satisfy the access request of the current user, the working status of the remaining five service nodes is adjusted. The number of service nodes that need to adjust their working status is determined based on the number of current user access requests and the resource usage of the currently activated service nodes. For example, if 5 more service nodes need to be started to satisfy the user’s access request, the remaining The working status of the five service nodes is adjusted from the closed state to the activated state.
  • the above method for responding to the access request is by receiving a user's access request; determining a target sub-server cluster that responds to the access request according to the user identifier and the user location information; obtaining the current usage status of the target sub-server cluster; Determine the number of access requests received by the target sub-server cluster; according to the number of received access requests and the current usage status, adjust the working parameters of the service nodes in the target sub-server cluster to respond to the user's Access requests, thereby dynamically adjusting the working status of the service nodes of the server cluster, and improving the response speed of the server cluster, thereby improving the user's access experience and avoiding resource waste.
  • FIG. 5 is a schematic flowchart of the steps of a method for responding to an access request according to another embodiment of the present application.
  • the response method of the access request is used to dynamically adjust the working parameters of the service node.
  • the user's access request may be phased. For example, in a certain period of time, the number of access requests is particularly large, and there is no access request in a certain period of time.
  • the server cluster is composed of multiple servers with the same function.
  • the target sub-server cluster is at least one sub-server cluster in the server cluster.
  • the response method of the access request specifically includes: step S301 to step S306.
  • the access request includes information such as user identification and user location information.
  • information such as user identification and user location information.
  • each user has a unique user ID.
  • the user ID can include information such as employee number or user name.
  • the user location information may include the user's geographic location information and/or logical network topology location information.
  • the user's geographic location information includes address tags, and/or, latitude and longitude. Address tags are information such as provinces, cities, counties, and streets, such as Beijing, Haidian District, etc., "Guangdong province", “Shenzhen”, etc.
  • S302. Determine a target sub-server cluster that responds to the access request according to the user identifier and the user location information.
  • step S302 specifically includes: obtaining the user's registered address according to the user identification; determining the target sub-server cluster that responds to the access request according to the user's registered address and the user's location information, which can avoid the generation of dirty data from competition and ensure that every This visit is the cluster of sub-servers closest to the user, thereby increasing the speed of access and improving the user experience.
  • the current usage status of the target sub-server cluster includes the number of currently activated service nodes in the target sub-server cluster and the request processing information of the currently activated service nodes.
  • the request processing information includes request processing capacity, maximum processing capacity, request processing intensity, maximum processing intensity, request processing intensity, maximum processing intensity, and parallel processing capacity of the access request of the currently activated service node.
  • each service node in the target sub-server cluster can receive access requests from different users, and can also receive different access requests from the same user.
  • the sum of the number of access requests received by each service node in the target sub-server cluster at a preset time is the number of access requests received by the target sub-server cluster.
  • the usage rate calculation formula is:
  • T i represents a target sub-resource usage currently active servers in the cluster i-th service node
  • r i, R i represents each user service requesting node and the maximum volume of requests
  • q i, Q i respectively serving node the request processing capability and the maximum processing capacity
  • s i, S i denote the service requesting processing node processing intensity and a maximum intensity
  • C i is the parallel processing capability of the access request of the i-th service node currently started in the target sub-server cluster
  • w 1 , w 2 , and w 3 respectively represent the weight of user request volume, request processing capability and request processing intensity
  • w 1 +w 2 +w 3 1.
  • the amount of R & lt user requests to access the current i refers to the number average of the i-th user service node Y i received requests in a unit time.
  • Request processing capability refers to the average number q i i-th serving access node Y i completed within the unit time of the current user request, which dynamically shows the current processing capacity of the user's access request.
  • the request processing reflects the relative strength of the relationship between s i load status of the service node Y i actually requested processing capacity. 1 closer to request that the greater the load state of the service node handling strength Y i s i.
  • the resource usage rate of the currently activated service node in the target sub-server cluster can be calculated according to the number of received access requests and the current usage status of the target sub-server cluster.
  • Y i serving node load state is present overload, idle, three states normal, the second threshold value is less than the first threshold value ⁇ 2 ⁇ 1.
  • T i resource usage is greater than a first threshold value ⁇ 1
  • Y i serving node load state is the overload state, at this time, the number of target sub-servers in the cluster to start the service serving node is less than the current user requested service required The number of nodes.
  • T i ⁇ 2 ( ⁇ 2 ⁇ 1 ) Y i serving node load state is an idle state, at this time, the number of target sub-servers in the cluster to start service node is larger than the current user The number of service nodes required for the requested service.
  • the load status of the service node Y i is a normal state.
  • the target sub-server cluster does not currently have a started service node, adjust the working parameters of the service nodes in the target sub-server cluster to respond to the access request according to the number of access requests.
  • the first threshold ⁇ 1 and the second threshold ⁇ 2 can be designed according to actual requirements. For example, a first threshold value of 85% of ⁇ 1, ⁇ 2 of the second threshold value of 5%, T i If resource utilization is 90%, the start of the new serving node in the target sub-server cluster , So that the service capability of the currently activated service node meets the user's access request. If the resource usage T i is 2%, then there is some free service node, this time, start to close the current serving node Y i in the target sub-cluster server, any other course be close to the target sub-server cluster A currently activated service node can increase the utilization rate of the target sub-server cluster and greatly reduce the power consumption of the server cluster. If the resource utilization rate T i is 60%, the current working status of each service node in the target sub-server cluster is maintained, that is, neither a new service node nor a currently started service node is shut down.
  • the resource usage rate T i 0, it means that the target sub-server cluster does not currently have a started service node. At this time, the target sub-server cluster is started. Specifically, the number of service nodes that need to be started in the target sub-server cluster is determined and started according to the number of access requests.
  • the access request response method receives a user's access request; determines a target sub-server cluster that responds to the access request according to the user identifier and the user location information; obtains the current target sub-server cluster Use status; determine the number of access requests received by the target sub-server cluster; calculate the target sub-server cluster based on the number of access requests received and the current use status of the target sub-server cluster based on the usage rate calculation formula
  • the resource usage rate of the currently started service node in the server cluster if the resource usage rate is greater than the first threshold, a new service node is started in the target sub-server cluster; if the resource usage rate is less than the second
  • the threshold is set, a currently started service node is closed in the target sub-server cluster, thereby dynamically adjusting the working status of the service node of the server cluster, improving the response speed of the server cluster, thereby improving the user's access experience , But also avoid the waste of resources.
  • FIG. 6 is a schematic flowchart of steps of a method for responding to an access request according to another embodiment of the present application.
  • the response method of the access request is used to dynamically adjust the working parameters of the service node.
  • the target sub-server cluster is at least one sub-server cluster in the server cluster.
  • the response method of the access request specifically includes: step S401 to step S407.
  • the access request includes information such as user identification and user location information.
  • information such as user identification and user location information.
  • each user has a unique user ID.
  • the user ID can include information such as employee number or user name.
  • the user location information may include the user's geographic location information and/or logical network topology location information.
  • the user's geographic location information includes address tags, and/or, latitude and longitude. Address tags are information such as provinces, cities, counties, and streets, such as Beijing, Haidian District, etc., "Guangdong province", “Shenzhen”, etc.
  • S402. Determine a target sub-server cluster that responds to the access request according to the user identifier and the user location information.
  • step S402 specifically includes: obtaining the user's registered address according to the user ID; determining the target sub-server cluster that responds to the access request according to the user's registered address and user location information, which can avoid the generation of dirty data by competition and ensure that every This visit is the cluster of sub-servers closest to the user, thereby increasing the speed of access and improving the user experience.
  • the current usage status of the target sub-server cluster includes the number of currently activated service nodes in the target sub-server cluster and the request processing information of the currently activated service nodes.
  • the request processing information includes request processing capacity, maximum processing capacity, request processing intensity, maximum processing intensity, request processing intensity, maximum processing intensity, and parallel processing capacity of the access request of the currently activated service node.
  • S404 Determine the number of access requests received by the target sub-server cluster.
  • each service node in the target sub-server cluster can receive access requests from different users, and can also receive different access requests from the same user.
  • the sum of the number of access requests received by each service node in the target sub-server cluster at a preset time is the number of access requests received by the target sub-server cluster.
  • the usage rate calculation formula is:
  • T i represents a target sub-resource usage currently active servers in the cluster i-th service node
  • r i, R i represents each user service requesting node and the maximum volume of requests
  • q i, Q i respectively serving node the request processing capability and the maximum processing capacity
  • s i, S i denote the service requesting processing node processing intensity and a maximum intensity
  • C i is the parallel processing capability of the access request of the i-th service node currently started in the target sub-server cluster
  • w 1 , w 2 , and w 3 respectively represent the weight of user request volume, request processing capability and request processing intensity
  • w 1 +w 2 +w 3 1.
  • S406 Calculate the total resource usage rate of the target sub-server cluster based on the total usage rate calculation formula according to the total user request volume, the total request processing capacity, and the total request processing intensity of the target sub-server cluster.
  • T N represents the total resource utilization rate of the target sub-server cluster
  • r N and R N represent the total user request volume and the maximum total request volume of the target sub-server cluster respectively
  • q N and Q N represent the total resource usage of the target sub-server cluster.
  • Request processing capacity and maximum total processing capacity, s N and S N respectively represent the total request processing intensity and maximum total request processing intensity of the target sub-server cluster
  • the fourth threshold ⁇ 4 is smaller than the third threshold ⁇ 3 .
  • the first threshold ⁇ 1 is 85%
  • the second threshold ⁇ 2 is 5%
  • the third threshold ⁇ 3 is 75%
  • the fourth threshold ⁇ 4 is 10. %. If the resource usage rate T i is 90% and the total resource usage rate TN is 80%, a new service node is started in the target sub-server cluster so that the service capacity of the currently started service node meets the user's access request.
  • the resource usage rate T is 90% and the total resource usage rate TN is 6%, it means that there are service nodes with a resource usage rate of less than 90% among the started service nodes, that is, there are partially idle service nodes.
  • the resource A service node with a utilization rate T i of 90% refuses to receive a new access request, and a service node with a resource utilization rate T i of less than 90% can receive a new access request.
  • the resource usage T i is 2%, it indicates that the service node is in an idle state, this time, start to close the current serving node Y i, of course, the target may be closed in any other sub-server cluster a currently activated Service nodes to increase the utilization rate of the target sub-server cluster and greatly reduce the power consumption of the server cluster.
  • the user's access request may be phased. For example, in a certain period of time, the number of access requests is particularly large, and there is no access request in a certain period of time.
  • the method further includes: determining whether the target sub-server cluster receives a new access request within a preset time. If the target sub-server cluster does not receive the new access request within the preset time, the target sub-server cluster is closed.
  • step S406 it further includes:
  • S501 Based on the total request amount calculation formula, calculate the total user request amount of the target sub-server cluster according to the user request amount of each service node currently started in the target sub-server cluster.
  • the formula for calculating the total request amount is:
  • r N represents the total user request volume of the target sub-server cluster
  • r i represents the user request volume of the i-th service node currently started in the target sub-server cluster
  • n is the number of service nodes currently started in the target sub-server cluster .
  • S502 Based on the total processing capacity calculation formula, calculate the total request processing capacity of the target sub-server cluster according to the request processing capacity of each service node currently activated of the target sub-server cluster.
  • the total processing capacity calculation formula is:
  • q N represents the total request processing capability of the target sub-server cluster
  • q i represents the request processing capability of the currently activated i-th service node of the target sub-server cluster.
  • S503 Based on the total processing intensity calculation formula, calculate the total request processing intensity of the target sub-server cluster according to the total user request volume and the total request processing capacity.
  • the total processing intensity calculation formula is:
  • s N represents the total request processing intensity of the target sub server cluster.
  • the access request response method receives a user's access request; determines a target sub-server cluster that responds to the access request according to the user identification and the user location information; obtains the current target sub-server cluster Use status; determine the number of access requests received by the target sub-server cluster; calculate the target sub-server cluster based on the number of access requests received and the current use status of the target sub-server cluster based on the usage rate calculation formula
  • the resource utilization rate of the service node currently started in the server cluster; based on the total utilization rate calculation formula, the target sub-server cluster is calculated according to the total user request volume, the total request processing capacity and the total request processing intensity of the target sub-server cluster If the resource usage is greater than the first threshold and the total resource usage is greater than the third threshold, start a new service node in the target sub-server cluster; if the resource is When the usage rate is greater than the first threshold and the total resource usage rate is less than the fourth threshold, then refuse to receive a new access request; if the resource usage rate is less
  • FIG. 8 is a schematic block diagram of a device for responding to an access request according to an embodiment of the present application.
  • the device for responding to an access request is used to execute any one of the aforementioned access request response methods.
  • the device for responding to the access request can be configured in the server or the terminal.
  • the server can be an independent server or a server cluster.
  • the terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
  • the access request responding device 600 includes:
  • the request receiving unit 601 is configured to receive an access request from a user, where the access request includes a user identification and user location information;
  • the cluster determining unit 602 is configured to determine a target sub-server cluster that responds to the access request according to the user identifier and the user location information;
  • the status acquiring unit 603 is configured to acquire the current usage status of the target sub-server cluster
  • the request quantity determining unit 604 is configured to determine the quantity of access requests received by the target sub-server cluster
  • the working parameter adjustment unit 605 is configured to adjust the working parameters of the service node in the target sub-server cluster to respond to the user's access request according to the number of received access requests and the current usage status.
  • the cluster determining unit 602 includes an address obtaining subunit 602a and a cluster determining subunit 602b.
  • the address obtaining subunit 602a is configured to obtain the registered address of the user according to the user identification.
  • the cluster determining subunit 602b is configured to determine a target sub-server cluster that responds to the access request according to the registered address and the user location information.
  • the working parameter adjustment unit 605 includes a usage rate calculation sub-unit 605a and a startup and shutdown unit 605b.
  • the utilization rate calculation sub-unit 605a is configured to calculate the number of service nodes currently started in the target sub-server cluster according to the number of access requests received and the current use status of the target sub-server cluster based on the utilization rate calculation formula.
  • the startup and shutdown unit 605b is configured to start a new service node in the target sub-server cluster if the resource usage rate is greater than the first threshold; if the resource usage rate is less than the second threshold, Shut down a currently started service node in the target sub-server cluster; wherein the second threshold is less than the first threshold.
  • the formula for calculating the utilization rate is:
  • T i represents a target sub-resource usage currently active servers in the cluster i-th service node
  • r i, R i represents each user service requesting node and the maximum volume of requests
  • q i, Q i respectively serving node the request processing capability and the maximum processing capacity
  • s i, S i denote the service requesting processing node processing intensity and a maximum intensity
  • C i is the parallel processing capability of the request of the i-th service node currently started in the target sub-server cluster
  • w 1 , w 2 , and w 3 represent the weight of user request volume, request processing capability, and request processing intensity, respectively
  • w 1 +w 2 +w 3 1.
  • the working parameter adjustment unit 605 further includes a total usage rate calculation subunit 605c.
  • the total usage rate calculation subunit 605c is configured to calculate the total resources of the target sub-server cluster based on the total usage rate calculation formula and the total user request volume, the total request processing capacity, and the total request processing intensity of the target sub-server cluster Usage rate.
  • the startup and shutdown unit 605b is configured to start a new server cluster in the target sub-server cluster if the resource usage rate is greater than the first threshold and the total resource usage rate is greater than the third threshold.
  • Service node if the resource usage rate is greater than the first threshold and the total resource usage rate is less than the fourth threshold, refuse to receive a new access request; if the resource usage rate is less than the second threshold Value, shut down a currently started service node in the target sub-server cluster; wherein, the fourth threshold is less than the third threshold.
  • the formula for calculating the total utilization rate is:
  • T N represents the total resource utilization rate of the target sub-server cluster
  • r N and R N represent the total user request volume and the maximum total request volume of the target sub-server cluster respectively
  • q N and Q N represent the total resource usage of the target sub-server cluster.
  • Request processing capacity and maximum total processing capacity, s N and S N respectively represent the total request processing intensity and maximum total request processing intensity of the target sub-server cluster
  • the device for responding to an access request further includes a total user request amount calculation unit, a total request processing capability calculation unit, and a total request processing intensity calculation unit.
  • the total user request amount calculation unit is configured to calculate the total user request amount of the target sub-server cluster based on the total request amount calculation formula and the user request amount of each service node currently activated of the target sub-server cluster.
  • the total request processing capability calculation unit is configured to calculate the total request processing capability of the target sub-server cluster according to the request processing capability of each service node currently activated of the target sub-server cluster based on the total processing capability calculation formula;
  • the total request processing intensity calculation unit is configured to calculate the total request processing intensity of the target sub-server cluster based on the total processing intensity calculation formula and the total user request volume and total request processing capacity.
  • the total request amount calculation formula is:
  • r N represents the total user request volume of the target sub-server cluster
  • r i represents the user request volume of the i-th service node currently started in the target sub-server cluster
  • n is the number of service nodes currently started in the target sub-server cluster .
  • q N represents the total request processing capability of the target sub-server cluster
  • q i represents the request processing capability of the currently started i-th service node of the target sub-server cluster
  • s N represents the total request processing intensity of the target sub-server cluster
  • C i is the parallel processing capability of the request of the i-th service node currently started in the target sub-server cluster.
  • the aforementioned means for responding to an access request may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 11.
  • FIG. 11 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer equipment can be a server or a terminal.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium can store an operating system and a computer program.
  • the computer program includes program instructions, and when the program instructions are executed, the processor can execute an access request response method.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor can execute a response method to an access request.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the network interface is used for network communication, such as sending assigned tasks.
  • FIG. 11 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor may be a central processing unit (Central Processing Unit, CPU), the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the processor is used to run a computer program stored in the memory to implement the following steps:
  • the access request including a user identification and user location information
  • the operating parameters of the service nodes in the target sub-server cluster are adjusted to respond to the user's access request.
  • the processor is configured to implement the following when determining a target sub-server cluster that responds to the access request based on the user identifier and the user location information:
  • the processor adjusts the working parameters of the service node in the target sub-server cluster to respond to the user's access according to the number of received access requests and the current usage status. When requested, it is used to achieve:
  • the resource usage rate is greater than the first threshold, start a new service node in the target sub-server cluster; if the resource usage rate is less than the second threshold, then in the target sub-server cluster Close a currently activated service node; wherein, the second threshold is less than the first threshold.
  • the formula for calculating the usage rate is:
  • T i represents a target sub-resource usage currently active servers in the cluster i-th service node
  • r i, R i represents each user service requesting node and the maximum volume of requests
  • q i, Q i respectively serving node the request processing capability and the maximum processing capacity
  • s i, S i denote the service requesting processing node processing intensity and a maximum intensity
  • C i is the parallel processing capability of the access request of the i-th service node currently started in the target sub-server cluster
  • w 1 , w 2 , and w 3 respectively represent the weight of user request volume, request processing capability and request processing intensity
  • w 1 +w 2 +w 3 1.
  • the processor is implementing the calculation formula based on the usage rate, and calculates the current usage status of the target sub-server cluster according to the number of the received access requests and the current usage status of the target sub-server cluster.
  • the resource usage rate of the started service node is used to achieve:
  • T N represents the total resource utilization rate of the target sub-server cluster
  • r N and R N represent the total user request volume and the maximum total request volume of the target sub-server cluster respectively
  • q N and Q N represent the total resource usage of the target sub-server cluster.
  • Request processing capacity and maximum total processing capacity, s N and S N respectively represent the total request processing intensity and maximum total request processing intensity of the target sub-server cluster
  • the processor is implementing the calculation formula based on the total usage rate, and calculating the target sub-server based on the total user request volume, the total request processing capacity, and the total request processing intensity of the target sub-server cluster Before the total resource usage of the cluster, it is also used to achieve:
  • the total request processing intensity of the target sub-server cluster is calculated according to the total user request volume and the total request processing capacity
  • the formula for calculating the total request amount is:
  • r N represents the total user request volume of the target sub-server cluster
  • r i represents the user request volume of the i-th service node currently started in the target sub-server cluster
  • n is the number of service nodes currently started in the target sub-server cluster ;
  • q N represents the total request processing capability of the target sub-server cluster
  • q i represents the request processing capability of the currently started i-th service node of the target sub-server cluster
  • s N represents the total request processing intensity of the target sub-server cluster
  • C i is the parallel processing capability of the access request of the i-th service node currently started in the target sub-server cluster.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application
  • the embodiment provides a response method for any access request.
  • the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, such as the hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMC), or a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种访问请求的响应方法、装置、设备及存储介质,方法包括:接收访问请求;确定响应访问请求的目标子服务器集群;获取目标子服务器集群的当前使用状态;确定目标子服务器集群接收的访问请求的数量;根据接收的访问请求的数量和当前使用状态,调整目标子服务器集群中服务节点的工作参数以响应用户的访问请求。

Description

访问请求的响应方法、装置、设备及存储介质
本申请要求于2019年4月3日提交中国专利局、申请号为201910268069.5、发明名称为“访问请求的响应方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网保险领域,尤其涉及一种访问请求的响应方法、装置、设备及存储介质。
背景技术
随着互联网的不断发展,越来越多的企业需要使用集群服务来更好的满足用户的需求。在实际应用中,用户在不同时间段内网络行为的差异性导致访问请求多少差别较大,用户的访问在某些时间段内有大量请求,而在部分时间段内基本没有请求或者仅有少量请求。为了保证系统能够在访问量在最高时仍能够保持较高的可用性,避免系统在访问量最高时出现故障而对业务造成危害的问题,后台服务节点需要一直保持运行。
目前,对于大型的应用服务而言,当应用服务启动时,后台服务节点的数量通常是固定的,在服务运行状态下,后台服务器集群响应慢,用户的访问体验不够理想。
发明内容
本申请提供了一种访问请求的响应方法、装置、设备及存储介质,该方法能够动态调整服务器集群的服务节点的工作状态,提高服务器集群的响应速度,由此提高用户的访问体验度。
第一方面,本申请提供了一种访问请求的响应方法,所述方法包括:
接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
获取所述目标子服务器集群的当前使用状态;
确定所述目标子服务器集群所接收的访问请求的数量;
根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
第二方面,本申请还提供了一种访问请求的响应装置,所述装置包括:
请求接收单元,用于接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
集群确定单元,用于根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
状态获取单元,用于获取所述目标子服务器集群的当前使用状态;
请求数量确定单元,用于确定所述目标子服务器集群中所接收的访问请求 的数量;
工作参数调整单元,用于根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
第三方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如上述的访问请求的响应方法。
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上述的访问请求的响应方法。
本申请公开了一种访问请求的响应方法、装置、设备及存储介质,通过接收用户的访问请求;根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;获取所述目标子服务器集群的当前使用状态;确定所述目标子服务器集群所接收的访问请求的数量;根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求,从而动态调整服务器集群的服务节点的工作状态,提高了服务器集群的响应速度,由此提高了用户的访问体验度,同时也避免了资源浪费。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请的实施例提供的访问请求的响应方法的应用场景示意图;
图2是图1中子服务集群的结构示意图;
图3是本申请一实施例提供的一种访问请求的响应方法的步骤示意流程图;
图4是图3中访问请求的响应方法的子步骤示意流程图;
图5是本申请另一实施例提供的一种访问请求的响应方法的步骤示意流程图;
图6是本申请又一实施例提供的一种访问请求的响应方法的步骤示意流程图;
图7是本申请再一实施例提供的一种访问请求的响应方法的部分步骤示意流程图;
图8是本申请的实施例还提供一种访问请求的响应装置的示意性框图;
图9是图8中访问请求的响应装置的子单元的示意性框图;
图10是图8中访问请求的响应装置的子单元的示意性框图;
图11为本申请一实施例提供的一种计算机设备的结构示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
本申请的实施例提供了一种访问请求的响应方法、装置、计算机设备及存储介质。访问请求的响应方法可用于针对患者和/或医生的骗保行为,为快速找出患者或医生骗保提供了重要的参考。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1是本申请的实施例提供的访问请求的响应方法的应用场景示意图。本申请的访问请求的响应方法可以应用于由用户终端110和服务器集群120构成的分布式系统中。服务器集群120包括多个子服务集群121。如图2所示,每个子服务集群121包括至少一个服务节点。用户终端110可以有多个,比如用户终端110a和用户终端110b。每个用户终端110可以与所述服务集群120中的任意一个服务节点通信,从而动态调整服务节点的工作参数以响应用户的访问请求。
其中,用户终端110可以是各种电子设备,包括但不限于智能手机、平板电脑、膝上便携计算机和台式计算机。
具体的,用户终端110上可以安装有各种通讯客户端应用,例如网页浏览器应用、搜索类应用、即时通讯工具、邮箱客户端等。通过用户终端110与服务节点的交互完成对服务节点的工作参数进行动态调整。
请参阅图3,图3是本申请一实施例提供的一种访问请求的响应方法的步骤示意流程图。该访问请求的响应方法,用于动态调整服务节点的工作参数。对于某些子服务器集群,用户的访问请求可能是阶段性的,例如,在某个时间段内,访问请求的数量特别多,在某个时间段内没有访问请求。
其中,服务器集群是由具有相同功能的多个服务器组成。其中,目标子服务器集群为服务器集群中的至少一个子服务器集群。
如图3所示,该访问请求的响应方法,具体包括:步骤S201至步骤S205。
S201、接收用户的访问请求。
具体的,所述访问请求包含用户标识和用户位置信息等信息。在实际应用中,每个用户均具有唯一一个用户标识。用户标识可以包括员工编号或用户姓名等信息。
用户位置信息可以包括用户的地理位置信息和/或逻辑网络拓扑位置信息。用户的地理位置信息包括地址标签,和/或,经纬度。地址标签为省、市、县、街道等信息,如北京市、海淀区等、“广东省”,“深圳市”等。
用户可以使用该用户终端通过有线连接方式或无线连接方式与目标子服务器集群中当前启动的服务节点交互,以发送访问请求。无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接以及其他目前公知或未来开发的无线连接方式。
S202、根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群。
在本实施例中,步骤S202,具体包括子步骤S202a和S202b。
步骤S202a、根据用户标识获得用户的注册地址。
步骤S202b、根据用户的注册地址和所述用户位置信息确定响应访问请求的目标子服务器集群。
本实施例中,根据上述用户的注册地址和用户的位置信息,来确定响应访 问请求的目标子服务器集群,可以保证响应访问请求,可以避免竞争产生脏数据,并且保证每次访问都是离用户最近的子服务器集群,从而提高访问速度,提高用户的体验度。
S203、获取所述目标子服务器集群的当前使用状态。
具体的,所述目标子服务器集群的当前使用状态包括目标子服务器集群中当前启动的服务节点的数量和当前启动的服务节点的请求处理信息。
S204、确定所述目标子服务器集群所接收的访问请求的数量。
其中,目标子服务器集群中的每一个服务节点可以接收不同用户的访问请求,也可以接收同一用户的不同访问请求。
在本实施例中,所述目标子服务器集群中各服务节点在预设时间所接收的访问请求的数量之和即为所述目标子服务器集群所接收的访问请求的数量。
示例性的,目标子服务器集群中有两个服务节点,分别为服务节点A和服务节点B,服务节点A在十分钟内接收到的访问请求的数量为2个,服务节点B在十分钟内接收到的访问请求的数量为3个,则目标子服务器集群在十分钟内所接收到的访问请求的数量为5个。
S205、根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
具体的,所述工作参数包括服务节点每次可响应的访问请求的数量以及服务节点的工作状态。工作状态包括启动状态和关闭状态。
在本实施例中,步骤S205之前还包括:判断目标子服务器集群中当前是否有启动的服务节点。
若目标子服务器集群中当前没有启动的服务节点,则启动目标子服务器集群。若目标子服务器集群中当前有启动的服务节点,则执行步骤S205。如果目标子服务器集群的当前使用状态指示目标子服务器集群中当前启动的服务节点的数量为零,则表明目标子服务器集群当前没有启动的服务节点。
其中,所述根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数,具体为:
根据所述接收的访问请求的数量、所述目标子服务器集群中已启动的服务节点的请求处理能力和所述目标子服务器集群中已启动的服务节点的数量,调整所述目标子服务器集群中服务节点的工作参数。
示例性的,目标子服务器集群有8个服务节点,其中3个服务节点的工作状态为启动状态,剩余5个服务节点的工作状态为关闭状态。若当前用户的访问请求的数量较大,3个服务节点的服务能力无法满足当前用户的访问请求时,则调整剩余5个服务节点的工作状态。需要调整工作状态的服务节点的数量依据当前用户的访问请求的数量和当前已启动的服务节点的资源使用情况确定,比如,需要再启动5个服务节点才能满足用户的访问请求,则将剩余的5个服务节点的工作状态由关闭状态调整为启动状态。
上述访问请求的响应方法,通过接收用户的访问请求;根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;获取所述目标子服务器集群的当前使用状态;确定所述目标子服务器集群所接收的访问请求的数量;根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求,从而动态调整服务器集群的服务节点的工作状态,提高了服务器集群的响应速度,由此提高了用户的访问体验度,同时也避免了资源浪费。
请参阅图5,图5是本申请另一实施例提供的一种访问请求的响应方法的步 骤示意流程图。该访问请求的响应方法,用于动态调整服务节点的工作参数。对于某些子服务器集群,用户的访问请求可能是阶段性的,例如,在某个时间段内,访问请求的数量特别多,在某个时间段内没有访问请求。
其中,服务器集群是由具有相同功能的多个服务器组成。其中,目标子服务器集群为服务器集群中的至少一个子服务器集群。
如图5所示,该访问请求的响应方法,具体包括:步骤S301至步骤S306。
S301、接收用户的访问请求。
具体的,所述访问请求包含用户标识和用户位置信息等信息。在实际应用中,每个用户均具有唯一一个用户标识。用户标识可以包括员工编号或用户姓名等信息。
用户位置信息可以包括用户的地理位置信息和/或逻辑网络拓扑位置信息。用户的地理位置信息包括地址标签,和/或,经纬度。地址标签为省、市、县、街道等信息,如北京市、海淀区等、“广东省”,“深圳市”等。
S302、根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群。
在本实施例中,步骤S302具体包括:根据用户标识获得用户的注册地址;根据用户的注册地址和用户的位置信息确定响应访问请求的目标子服务器集群,可以避免竞争产生脏数据,并且保证每次访问都是离用户最近的子服务器集群,从而提高访问速度,提高用户的体验度。
S303、获取所述目标子服务器集群的当前使用状态。
所述目标子服务器集群的当前使用状态包括目标子服务器集群中当前启动的服务节点的数量和当前启动的服务节点的请求处理信息。
请求处理信息包括请求处理能力、最大处理能力、请求处理强度、最大处理强度、请求处理强度、最大处理强度以及当前启动的服务节点的访问请求的并行处理能力。
S304、确定所述目标子服务器集群所接收的访问请求的数量。
具体的,目标子服务器集群中的每一个服务节点可以接收不同用户的访问请求,也可以接收同一用户的不同访问请求。
在本实施例中,所述目标子服务器集群中各服务节点在预设时间所接收的访问请求的数量之和即为所述目标子服务器集群所接收的访问请求的数量。
S305、基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率。
在本实施例中,所述使用率计算公式为:
Figure PCTCN2019103844-appb-000001
其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
Figure PCTCN2019103844-appb-000002
C i为目标子服务器集群中当前启动的第i个 服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
具体的,假设目标子服务器集群Y中具有N个当前启动的服务节点,即Y={Y 1,Y 2,...,Y n}。用户请求量r i指第i个服务节点Y i在单位时间内收到的当前用户的平均访问请求的数量。请求处理能力q i指第i个服务节点Y i在单位时间内完成的当前用户的平均访问请求的数量,其动态显示了当前用户的访问请求的处理能力。请求处理强度s i体现了服务节点Y i的负载状况与实际请求处理能力的相对关系。请求处理强度s i越接近1说明服务节点Y i的负载状态越大。
基于上述使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,可以计算出所述目标子服务器集群中当前启动的服务节点的资源使用率。
S306、若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点。
其中,服务节点Y i的负载状态存在过载、空闲、正常三种状态,所述第二阀值α 2小于所述第一阀值α 1。当资源使用率T i大于第一阀值α 1时,服务节点Y i的负载状态为过载状态,此时,目标子服务器集群中启动的服务节点的数量小于当前用户请求的服务所需要的服务节点的数量。当资源使用率T i小于第二阀值α 22<α 1)时,服务节点Y i的负载状态为空闲状态,此时,目标子服务器集群中启动的服务节点的数量大于当前用户请求的服务所需要的服务节点的数量。当α 2≤T i≤α 1时,服务节点Y i的负载状态为正常状态。当目标子服务器集群当前没有启动的服务节点时,根据访问请求的数量调整目标子服务器集群中服务节点的工作参数以响应访问请求。
其中,第一阀值α 1和第二阀值α 2可以根据实际需求进行设计。例如,第一阀值α 1取值为85%,第二阀值α 2取值为5%,若资源使用率T i为90%,则在所述目标子服务器集群中启动新的服务节点,以使当前已启动的服务节点的服务能力满足用户的访问请求。若资源使用率T i为2%,则表示存在部分空闲的服务节点,此时,在目标子服务器集群中关闭当前启动的服务节点Y i,当然也可以关闭所述目标子服务器集群中其他任意一个当前已启动的服务节点,以提高目标子服务器集群的使用率,大大降低服务器集群的功耗。若资源使用率T i为60%,则保持所述目标子服务器集群中各服务节点的当前工作状态,即既不启动新的服务节点、也不关闭当前已启动的服务节点。
当资源使用率T i=0时,表示目标子服务器集群当前没有启动的服务节点,此时,启动目标子服务器集群。具体的,根据访问请求的数量确定目标子服务器集群中需要启动的服务节点的数量并启动。
上述实施例提供的访问请求的响应方法,接收用户的访问请求;根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;获取所述目标子服务器集群的当前使用状态;确定所述目标子服务器集群所接收的访问请求的数量;基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点,从而动态调整服务器集群的服务节点的工作状态,提高了服务器集群的响应速度,由此提高了用户的访问体验度,同时也避免了资源浪费。
请参阅图6,图6是本申请又一实施例提供的一种访问请求的响应方法的步骤示意流程图。该访问请求的响应方法,用于动态调整服务节点的工作参数。目标子服务器集群为服务器集群中的至少一个子服务器集群。
如图6所示,该访问请求的响应方法,具体包括:步骤S401至步骤S407。
S401、接收用户的访问请求。
具体的,所述访问请求包含用户标识和用户位置信息等信息。在实际应用中,每个用户均具有唯一一个用户标识。用户标识可以包括员工编号或用户姓名等信息。
用户位置信息可以包括用户的地理位置信息和/或逻辑网络拓扑位置信息。用户的地理位置信息包括地址标签,和/或,经纬度。地址标签为省、市、县、街道等信息,如北京市、海淀区等、“广东省”,“深圳市”等。
S402、根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群。
在本实施例中,步骤S402,具体包括:根据用户标识获得用户的注册地址;根据用户的注册地址和用户位置信息确定响应访问请求的目标子服务器集群,可以避免竞争产生脏数据,并且保证每次访问都是离用户最近的子服务器集群,从而提高访问速度,提高用户的体验度。
S403、获取所述目标子服务器集群的当前使用状态。
所述目标子服务器集群的当前使用状态包括目标子服务器集群中当前启动的服务节点的数量和当前启动的服务节点的请求处理信息。
请求处理信息包括请求处理能力、最大处理能力、请求处理强度、最大处理强度、请求处理强度、最大处理强度以及当前启动的服务节点的访问请求的并行处理能力。
S404、确定所述目标子服务器集群所接收的访问请求的数量。
具体的,目标子服务器集群中的每一个服务节点可以接收不同用户的访问请求,也可以接收同一用户的不同访问请求。
在本实施例中,所述目标子服务器集群中各服务节点在预设时间所接收的访问请求的数量之和即为所述目标子服务器集群所接收的访问请求的数量。
S405、基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率。
在本实施例中,所述使用率计算公式为:
Figure PCTCN2019103844-appb-000003
其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
Figure PCTCN2019103844-appb-000004
C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
S406、基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率。
其中,所述总使用率计算公式为:
Figure PCTCN2019103844-appb-000005
其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
S407、若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点。
其中,所述第四阀值α 4小于所述第三阀值α 3。示例性的,第一阀值α 1取值为85%,第二阀值α 2取值为5%,第三阀值α 3取值为75%,第四阀值α 4取值为10%。若资源使用率T i为90%、总资源使用率T N为80%,则在所述目标子服务器集群中启动新的服务节点,以使当前已启动的服务节点的服务能力满足用户的访问请求。
若资源使用率T为90%、总资源使用率T N为6%,则表示已启动的服务节点中存在资源使用率小于90%的服务节点,即存在部分空闲的服务节点,此时,资 源使用率T i为90%的服务节点拒绝接收新的访问请求,资源使用率T i小于90%的服务节点可以接收新的访问请求。
若资源使用率T i为2%,则表示该服务节点处于空闲状态,此时,关闭该当前启动的服务节点Y i,当然也可以关闭所述目标子服务器集群中其他任意一个当前已启动的服务节点,以提高目标子服务器集群的使用率,大大降低服务器集群的功耗。
对于某些子服务器集群,用户的访问请求可能是阶段性的,例如,在某个时间段内,访问请求的数量特别多,在某个时间段内没有访问请求。在本实施例中,为了进一步提高整个服务集群的利用率、降低功耗,步骤307之后还包括:判断在预设时间内所述目标子服务器集群是否接收到新的访问请求。若在预设时间内所述目标子服务器集群未接收到所述新的访问请求,则关闭所述目标子服务器集群。
在本实施中,在步骤S406之前,还包括:
S501、基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量。
在本实施例中,所述总请求量计算公式为:
Figure PCTCN2019103844-appb-000006
其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量。
S502、基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力。
在本实施例中,所述总处理能力计算公式为:
Figure PCTCN2019103844-appb-000007
其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力。
S503、基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度。
在本实施例中,所述总处理强度计算公式为:
Figure PCTCN2019103844-appb-000008
其中,s N表示目标子服务器集群的总请求处理强度。
上述实施例提供的访问请求的响应方法,接收用户的访问请求;根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群; 获取所述目标子服务器集群的当前使用状态;确定所述目标子服务器集群所接收的访问请求的数量;基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率;若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点,从而动态调整服务器集群的服务节点的工作状态,提高了服务器集群的响应速度,由此提高了用户的访问体验度,同时也避免了资源浪费。
请参阅图8,图8是本申请的实施例还提供一种访问请求的响应装置的示意性框图,该访问请求的响应装置用于执行前述任一项访问请求的响应方法。其中,该访问请求的响应装置可以配置于服务器或终端中。
其中,服务器可以为独立的服务器,也可以为服务器集群。该终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。
如图8所示,访问请求的响应装置600包括:
请求接收单元601,用于接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
集群确定单元602,用于根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
状态获取单元603,用于获取所述目标子服务器集群的当前使用状态;
请求数量确定单元604,用于确定所述目标子服务器集群所接收的访问请求的数量;
工作参数调整单元605,用于根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
在一个实施例中,如图9所示,集群确定单元602包括地址获取子单元602a和集群确定子单元602b。
地址获取子单元602a,用于根据所述用户标识获取用户的注册地址。
集群确定子单元602b,用于根据所述注册地址和所述用户位置信息确定响应所述访问请求的目标子服务器集群。
在一个实施例中,如图10所示,工作参数调整单元605包括使用率计算子单元605a和启动关闭单元605b。
使用率计算子单元605a,用于基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;
启动关闭单元605b,用于若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第二阀值小于所述第一阀值。
在一实施例中,所述使用率计算公式为:
Figure PCTCN2019103844-appb-000009
其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
Figure PCTCN2019103844-appb-000010
C i为目标子服务器集群中当前启动的第i个服务节点的请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
在一实施例中,工作参数调整单元605还包括总使用率计算子单元605c。
总使用率计算子单元605c,用于基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率。
在该实施例中,启动关闭单元605b,用于若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第四阀值小于所述第三阀值。
具体的,所述总使用率计算公式为:
Figure PCTCN2019103844-appb-000011
其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
在一实施例中,访问请求的响应装置还包括总用户请求量计算单元、总请求处理能力计算单元和总请求处理强度计算单元。
总用户请求量计算单元,用于基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量。
总请求处理能力计算单元,用于基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力;
总请求处理强度计算单元,用于基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度。
具体的,所述总请求量计算公式为:
Figure PCTCN2019103844-appb-000012
其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量。
所述总处理能力计算公式为:
Figure PCTCN2019103844-appb-000013
其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力;
所述总处理强度计算公式为:
Figure PCTCN2019103844-appb-000014
其中,s N表示目标子服务器集群的总请求处理强度,C i为目标子服务器集群中当前启动的第i个服务节点的请求的并行处理能力。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的访问请求的响应装置和各单元的具体工作过程,可以参考前述访问请求的响应方法实施例中的对应过程,在此不再赘述。
上述的访问请求的响应装置可以实现为一种计算机程序的形式,该计算机程序可以在如图11所示的计算机设备上运行。
请参阅图11,图11是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备可以是服务器或终端。
参阅图11,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行一种访问请求的响应方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行一种访问请求的响应方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其 他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
获取所述目标子服务器集群的当前使用状态;
确定所述目标子服务器集群所接收的访问请求的数量;
根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
在一个实施例中,所述处理器在实现所述根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群时,用于实现:
根据所述用户标识获取用户的注册地址;
根据所述注册地址和所述用户位置信息确定响应所述访问请求的目标子服务器集群。
在一个实施例中,所述处理器在实现所述根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求时,用于实现:
基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;
若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第二阀值小于所述第一阀值。
在一个实施例中,所述使用率计算公式为:
Figure PCTCN2019103844-appb-000015
其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
Figure PCTCN2019103844-appb-000016
C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
在一个实施例中,所述处理器在实现所述基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率时,用于实现:
基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率;
若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第四阀值小于所述第三阀值;
所述总使用率计算公式为:
Figure PCTCN2019103844-appb-000017
其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
在一实施例中,所述处理器在实现所述基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率之前,还用于实现:
基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量;
基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力;
基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度;
所述总请求量计算公式为:
Figure PCTCN2019103844-appb-000018
其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量;
所述总处理能力计算公式为:
Figure PCTCN2019103844-appb-000019
其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力;
所述总处理强度计算公式为:
Figure PCTCN2019103844-appb-000020
其中,s N表示目标子服务器集群的总请求处理强度,C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力。
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项访问请求的响应方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种访问请求的响应方法,包括:
    接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
    根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
    获取所述目标子服务器集群的当前使用状态;
    确定所述目标子服务器集群所接收的访问请求的数量;
    根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
  2. 根据权利要求1所述的访问请求的响应方法,其中,所述根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群,包括:
    根据所述用户标识获取用户的注册地址;
    根据所述注册地址和所述用户位置信息确定响应所述访问请求的目标子服务器集群。
  3. 根据权利要求1所述的访问请求的响应方法,其中,所述根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求,包括:
    基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;
    若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第二阀值小于所述第一阀值。
  4. 根据权利要求3所述的访问请求的响应方法,其中,所述使用率计算公式为:
    Figure PCTCN2019103844-appb-100001
    其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
    Figure PCTCN2019103844-appb-100002
    C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
  5. 根据权利要求3或4所述的访问请求的响应方法,其中,所述基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率,包括:
    基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总 请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率;
    若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第四阀值小于所述第三阀值;
    所述总使用率计算公式为:
    Figure PCTCN2019103844-appb-100003
    其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
  6. 根据权利要求5所述的访问请求的响应方法,其中,所述基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率之前,还包括:
    基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量;
    基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力;
    基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度;
    所述总请求量计算公式为:
    Figure PCTCN2019103844-appb-100004
    其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量;
    所述总处理能力计算公式为:
    Figure PCTCN2019103844-appb-100005
    其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力;
    所述总处理强度计算公式为:
    Figure PCTCN2019103844-appb-100006
    其中,s N表示目标子服务器集群的总请求处理强度,C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力。
  7. 根据权利要求1所述的访问请求的响应方法,其特征在于,所述根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求之后,还包括:
    判断在预设时间内所述目标子服务器集群是否接收到新的访问请求;
    若在预设时间内所述目标子服务器集群未接收到所述新的访问请求,则关闭所述目标子服务器集群。
  8. 一种访问请求的响应装置,包括:
    请求接收单元,用于接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
    集群确定单元,用于根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
    状态获取单元,用于获取所述目标子服务器集群的当前使用状态;
    请求数量确定单元,用于确定所述目标子服务器集群中所接收的访问请求的数量;
    工作参数调整单元,用于根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
  9. 一种计算机设备,所述计算机设备包括存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:
    接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
    根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
    获取所述目标子服务器集群的当前使用状态;
    确定所述目标子服务器集群所接收的访问请求的数量;
    根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
  10. 根据权利要求9所述的计算机设备,其中,所述处理器在实现所述根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群时,具体实现:
    根据所述用户标识获取用户的注册地址;
    根据所述注册地址和所述用户位置信息确定响应所述访问请求的目标子服务器集群。
  11. 根据权利要求9所述的计算机设备,其中,所述处理器在实现所述根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求时,具体实现:
    基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务 器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;
    若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第二阀值小于所述第一阀值。
  12. 根据权利要求11所述的计算机设备,其中,所述使用率计算公式为:
    Figure PCTCN2019103844-appb-100007
    其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
    Figure PCTCN2019103844-appb-100008
    C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
  13. 根据权利要求11或12所述的计算机设备,其中,所述处理器在实现所述基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率时,具体实现:
    基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率;
    若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第四阀值小于所述第三阀值;
    所述总使用率计算公式为:
    Figure PCTCN2019103844-appb-100009
    其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
  14. 根据权利要求13所述的计算机设备,其中,所述处理器在实现所述基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率之前, 还实现:
    基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量;
    基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力;
    基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度;
    所述总请求量计算公式为:
    Figure PCTCN2019103844-appb-100010
    其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量;
    所述总处理能力计算公式为:
    Figure PCTCN2019103844-appb-100011
    其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力;
    所述总处理强度计算公式为:
    Figure PCTCN2019103844-appb-100012
    其中,s N表示目标子服务器集群的总请求处理强度,C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:
    接收用户的访问请求,所述访问请求包含用户标识和用户位置信息;
    根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群;
    获取所述目标子服务器集群的当前使用状态;
    确定所述目标子服务器集群所接收的访问请求的数量;
    根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述处理器在实现所述根据所述用户标识和所述用户位置信息,确定响应所述访问请求的目标子服务器集群时,具体实现:
    根据所述用户标识获取用户的注册地址;
    根据所述注册地址和所述用户位置信息确定响应所述访问请求的目标子服务器集群。
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述处理器在实 现所述根据所述接收的访问请求的数量和所述当前使用状态,调整所述目标子服务器集群中服务节点的工作参数以响应所述用户的访问请求时,具体实现:
    基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率;
    若所述资源使用率大于第一阀值时,则在所述目标子服务器集群中启动新的服务节点;若所述资源使用率小于第二阀值时,则在所述目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第二阀值小于所述第一阀值。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述使用率计算公式为:
    Figure PCTCN2019103844-appb-100013
    其中,T i表示目标子服务器集群中当前启动的第i个服务节点的资源使用率,r i、R i分别表示服务节点的用户请求量和最大请求量,q i、Q i分别表示服务节点的请求处理能力和最大处理能力,s i、S i分别表示服务节点的请求处理强度和最大处理强度,
    Figure PCTCN2019103844-appb-100014
    C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力,w 1、w 2、w 3分别表示用户请求量、请求处理能力和请求处理强度的权重,且w 1+w 2+w 3=1。
  19. 根据权利要求17或18所述的计算机可读存储介质,其中,所述处理器在实现所述基于使用率计算公式,根据所述接收的访问请求的数量和所述目标子服务器集群的当前使用状态,计算所述目标子服务器集群中当前启动的服务节点的资源使用率时,具体实现:
    基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率;
    若所述资源使用率大于所述第一阀值且所述总资源使用率大于第三阀值时,则在目标子服务器集群中启动新的服务节点;若所述资源使用率大于所述第一阀值且所述总资源使用率小于第四阀值时,则拒绝接收新的访问请求;若所述资源使用率小于所述第二阀值时,则在目标子服务器集群中关闭一个当前启动的服务节点;其中,所述第四阀值小于所述第三阀值;
    所述总使用率计算公式为:
    Figure PCTCN2019103844-appb-100015
    其中,T N表示目标子服务器集群的总资源使用率,r N、R N分别表示目标子服务器集群的总用户请求量和最大总请求量,q N、Q N分别表示目标子服务器集群的总请求处理能力和最大总处理能力,s N、S N分别表示目标子服务器集群的总请求处理强度和最大总请求处理强度,w 4,w 5,w 6分别表示总用户请 求量、总请求处理能力和总请求处理强度的权重,且w 4+w 5+w 6=1。
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述处理器在实现所述基于总使用率计算公式,根据所述目标子服务器集群的总用户请求量、总请求处理能力和总请求处理强度,计算所述目标子服务器集群的总资源使用率之前,还实现:
    基于总请求量计算公式,根据所述目标子服务器集群的当前启动的各服务节点的用户请求量,计算所述目标子服务器集群的总用户请求量;
    基于总处理能力计算公式,根据所述目标子服务器集群的当前启动的各服务节点的请求处理能力,计算所述目标子服务器集群的总请求处理能力;
    基于总处理强度计算公式,根据所述总用户请求量和总请求处理能力,计算所述目标子服务器集群的总请求处理强度;
    所述总请求量计算公式为:
    Figure PCTCN2019103844-appb-100016
    其中,r N表示目标子服务器集群的总用户请求量,r i表示目标子服务器集群的当前启动的第i个服务节点的用户请求量,n为目标子服务器集群中当前启动的服务节点的数量;
    所述总处理能力计算公式为:
    Figure PCTCN2019103844-appb-100017
    其中,q N表示目标子服务器集群的总请求处理能力,q i表示目标子服务器集群的当前启动的第i个服务节点的请求处理能力;
    所述总处理强度计算公式为:
    Figure PCTCN2019103844-appb-100018
    其中,s N表示目标子服务器集群的总请求处理强度,C i为目标子服务器集群中当前启动的第i个服务节点的访问请求的并行处理能力。
PCT/CN2019/103844 2019-04-03 2019-08-30 访问请求的响应方法、装置、设备及存储介质 WO2020199487A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910268069.5A CN110138732B (zh) 2019-04-03 2019-04-03 访问请求的响应方法、装置、设备及存储介质
CN201910268069.5 2019-04-03

Publications (1)

Publication Number Publication Date
WO2020199487A1 true WO2020199487A1 (zh) 2020-10-08

Family

ID=67569285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103844 WO2020199487A1 (zh) 2019-04-03 2019-08-30 访问请求的响应方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110138732B (zh)
WO (1) WO2020199487A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535332A (zh) * 2021-08-11 2021-10-22 北京字节跳动网络技术有限公司 集群资源调度方法、装置、计算机设备及存储介质
CN113590298A (zh) * 2021-08-09 2021-11-02 平安银行股份有限公司 一种资源调度方法、装置、服务器及存储介质
CN113645310A (zh) * 2021-08-20 2021-11-12 北京高途云集教育科技有限公司 一种数据限流方法、装置、电子设备及可读存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138732B (zh) * 2019-04-03 2022-03-29 平安科技(深圳)有限公司 访问请求的响应方法、装置、设备及存储介质
CN110531999A (zh) * 2019-09-04 2019-12-03 上海闻泰电子科技有限公司 应用管理方法、装置、设备和存储介质
CN111198756A (zh) * 2019-12-28 2020-05-26 北京浪潮数据技术有限公司 一种kubernetes集群的应用调度方法及装置
CN111338575B (zh) * 2020-02-20 2021-06-29 苏州浪潮智能科技有限公司 一种存储服务质量控制方法、装置、设备及存储介质
CN111444018B (zh) * 2020-03-30 2023-08-08 北京字节跳动网络技术有限公司 请求处理方法以及装置
CN111767137B (zh) * 2020-06-03 2023-09-01 北京奇艺世纪科技有限公司 一种系统部署方法、装置、电子设备及存储介质
CN112165436B (zh) * 2020-10-15 2024-02-20 腾讯科技(深圳)有限公司 流量控制方法、装置及系统
CN112333172B (zh) * 2020-10-28 2023-06-30 中国农业银行股份有限公司 签名验签方法及系统
CN112817729A (zh) * 2021-02-24 2021-05-18 阳光人寿保险股份有限公司 一种数据源动态调度方法、装置、电子设备及存储介质
CN115001854B (zh) * 2022-07-18 2022-11-22 江苏艾盾网络科技有限公司 基于大数据的防止溯源的服务器集群管控系统及方法
CN115277713A (zh) * 2022-07-27 2022-11-01 京东科技信息技术有限公司 负载均衡方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080183876A1 (en) * 2007-01-31 2008-07-31 Sun Microsystems, Inc. Method and system for load balancing
CN102480469A (zh) * 2010-11-29 2012-05-30 北京中和威软件有限公司 一种sip服务集群中基于能量均衡的负载调度的方法及装置
CN103188277A (zh) * 2011-12-27 2013-07-03 中国电信股份有限公司 负载能耗管理系统、方法和服务器
CN104731516A (zh) * 2013-12-18 2015-06-24 腾讯科技(深圳)有限公司 一种存取文件的方法、装置及分布式存储系统
CN110138732A (zh) * 2019-04-03 2019-08-16 平安科技(深圳)有限公司 访问请求的响应方法、装置、设备及存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394931B (zh) * 2011-11-04 2013-12-18 北京邮电大学 一种基于云的用户访问请求调度方法
CN103581039B (zh) * 2013-11-08 2016-11-02 西安电子科技大学宁波信息技术研究院 一种服务器集群的动态负载均衡系统及其使用方法
CN103825785B (zh) * 2014-03-24 2017-05-10 北京中电普华信息技术有限公司 一种服务节点的监测方法及装置
CN105808347B (zh) * 2014-12-31 2018-11-09 北京神州泰岳软件股份有限公司 集群服务器部署计算方法及装置
CN105100237A (zh) * 2015-07-15 2015-11-25 浪潮(北京)电子信息产业有限公司 一种调度控制方法及系统
CN106959894B (zh) * 2016-01-11 2020-11-24 北京京东尚科信息技术有限公司 资源分配方法和装置
CN105915583B (zh) * 2016-03-28 2020-05-26 联想(北京)有限公司 一种启动服务集群的方法及服务集群
CN108667878A (zh) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 服务器负载均衡方法及装置、存储介质、电子设备
CN107613030A (zh) * 2017-11-06 2018-01-19 网宿科技股份有限公司 一种处理业务请求的方法和系统
CN109218100A (zh) * 2018-09-21 2019-01-15 郑州云海信息技术有限公司 分布式对象存储集群及其请求响应方法、系统和存储介质
CN109347982A (zh) * 2018-11-30 2019-02-15 网宿科技股份有限公司 一种数据中心的调度方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080183876A1 (en) * 2007-01-31 2008-07-31 Sun Microsystems, Inc. Method and system for load balancing
CN102480469A (zh) * 2010-11-29 2012-05-30 北京中和威软件有限公司 一种sip服务集群中基于能量均衡的负载调度的方法及装置
CN103188277A (zh) * 2011-12-27 2013-07-03 中国电信股份有限公司 负载能耗管理系统、方法和服务器
CN104731516A (zh) * 2013-12-18 2015-06-24 腾讯科技(深圳)有限公司 一种存取文件的方法、装置及分布式存储系统
CN110138732A (zh) * 2019-04-03 2019-08-16 平安科技(深圳)有限公司 访问请求的响应方法、装置、设备及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590298A (zh) * 2021-08-09 2021-11-02 平安银行股份有限公司 一种资源调度方法、装置、服务器及存储介质
CN113590298B (zh) * 2021-08-09 2024-03-26 平安银行股份有限公司 一种资源调度方法、装置、服务器及存储介质
CN113535332A (zh) * 2021-08-11 2021-10-22 北京字节跳动网络技术有限公司 集群资源调度方法、装置、计算机设备及存储介质
CN113645310A (zh) * 2021-08-20 2021-11-12 北京高途云集教育科技有限公司 一种数据限流方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN110138732A (zh) 2019-08-16
CN110138732B (zh) 2022-03-29

Similar Documents

Publication Publication Date Title
WO2020199487A1 (zh) 访问请求的响应方法、装置、设备及存储介质
Xia et al. Phone2Cloud: Exploiting computation offloading for energy saving on smartphones in mobile cloud computing
Hoang et al. Optimal admission control policy for mobile cloud computing hotspot with cloudlet
US9300578B2 (en) Large receive offload functionality for a system on chip
WO2020019743A1 (zh) 流量控制方法及装置
US20140002504A1 (en) Generation based update system
US11088924B2 (en) Network management method, device, and system
US20160070475A1 (en) Memory Management Method, Apparatus, and System
US20170212581A1 (en) Systems and methods for providing power efficiency via memory latency control
WO2022111313A1 (zh) 一种请求处理方法及微服务系统
CN112600761B (zh) 一种资源分配的方法、装置及存储介质
CN112925607A (zh) 一种系统扩缩容方法及装置、电子设备
WO2024016596A1 (zh) 容器集群调度的方法、装置、设备及存储介质
US20180375739A1 (en) Cache based on dynamic device clustering
Chunlin et al. Distributed QoS-aware scheduling optimization for resource-intensive mobile application in hybrid cloud
Ramasubbareddy et al. RTTSMCE: a response time aware task scheduling in multi-cloudlet environment
WO2020259208A1 (zh) 内存调度方法、装置、设备及存储介质
US11709707B2 (en) Low latency distributed counters for quotas
US8379525B2 (en) Techniques to support large numbers of subscribers to a real-time event
CN116244231A (zh) 一种数据传输方法、装置、系统、电子设备及存储介质
US20230221996A1 (en) Consensus-based distributed scheduler
CN114765613A (zh) 客户端驱动的云网络访问系统和方法
WO2014121605A1 (zh) 一种支持多终端应用的永远在线架构的方法及设备及系统
US11233847B1 (en) Management of allocated computing resources in networked environment
US10887381B1 (en) Management of allocated computing resources in networked environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19922846

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19922846

Country of ref document: EP

Kind code of ref document: A1