CN114035955A - Information processing method and device and storage medium - Google Patents
Information processing method and device and storage medium Download PDFInfo
- Publication number
- CN114035955A CN114035955A CN202111325150.6A CN202111325150A CN114035955A CN 114035955 A CN114035955 A CN 114035955A CN 202111325150 A CN202111325150 A CN 202111325150A CN 114035955 A CN114035955 A CN 114035955A
- Authority
- CN
- China
- Prior art keywords
- server
- access
- servers
- flow
- traffic
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 155
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 238000009530 blood pressure measurement Methods 0.000 claims abstract description 60
- 238000012545 processing Methods 0.000 claims abstract description 14
- 238000000034 method Methods 0.000 claims description 52
- 230000015654 memory Effects 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 7
- 238000012216 screening Methods 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 238000009826 distribution Methods 0.000 description 10
- 230000007423 decrease Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003247 decreasing effect Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the application discloses an information processing method, an information processing device and a storage medium, wherein the information processing method comprises the following steps: under the condition of receiving access flow transmitted by a client, acquiring pressure measurement information of a server in a server cluster; determining the number of servers for processing the access flow according to the access flow and the pressure measurement information; and determining a target server meeting the server number from the server cluster, and distributing the access flow to the target server.
Description
Technical Field
The present application relates to the field of information processing technologies, and in particular, to an information processing method and apparatus, and a storage medium.
Background
With the development of internet technology, a server provides services to clients in a load balancing manner, so as to improve service bandwidth and increase service throughput.
In the prior art, a server cluster is manually configured for a client, and load balancing is performed on the client by using the server cluster, because the client has a condition that access traffic increases or decreases, the number of servers in the server cluster needs to be manually adjusted under the condition that the access traffic increases, and if the number of servers in the server cluster is not manually adjusted in time, a condition of crowded access exists when load balancing is performed on the client by using the server cluster, so that the access speed during access traffic access is reduced.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present application desirably provide an information processing method and apparatus, and a storage medium, which can improve access speed when accessing traffic.
The technical scheme of the application is realized as follows:
an embodiment of the present application provides an information processing method, including:
under the condition of receiving access flow transmitted by a client, acquiring pressure measurement information of a server in a server cluster;
determining the number of servers for processing the access flow according to the access flow and the pressure measurement information;
determining a target server from the server cluster that satisfies the server number, and allocating the access traffic to the target server.
An embodiment of the present application provides an information processing apparatus, the apparatus including:
the acquisition unit is used for acquiring the pressure measurement information of the servers in the server cluster under the condition of receiving the access flow transmitted by the client;
the determining unit is used for determining the number of servers for processing the access flow according to the access flow and the pressure measurement information; determining a target server from the server cluster that satisfies the server number;
an allocation unit, configured to allocate the access traffic to the target server.
An embodiment of the present application provides an information processing apparatus, the apparatus including:
the information processing system includes a memory, a processor, and a communication bus, the memory communicating with the processor through the communication bus, the memory storing an information processing program executable by the processor, and the processor executing the information processing method when the information processing program is executed.
The embodiment of the application provides a storage medium, which stores a computer program thereon and is applied to an information processing device, wherein the computer program is used for realizing the information processing method when being executed by a processor.
The embodiment of the application provides an information processing method, an information processing device and a storage medium, wherein the information processing method comprises the following steps: under the condition of receiving access flow transmitted by a client, acquiring pressure measurement information of a server in a server cluster; determining the number of servers for processing the access flow according to the access flow and the pressure measurement information; and determining a target server meeting the server number from the server cluster, and distributing the access flow to the target server. By adopting the method implementation scheme, under the condition that the information processing device determines that the access flow transmitted by the client has flow increase or flow decrease, the information processing device can determine the number of servers according to the increased access flow and the pressure measurement information, or determine the number of servers according to the decreased access flow and the pressure measurement information, so that the target servers meeting the number of the servers are used for processing the access flow, and the access speed of the access flow is improved.
Drawings
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an exemplary information processing flow provided in an embodiment of the present application;
fig. 3 is a first schematic diagram illustrating a composition structure of an information processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a composition structure of an information processing apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Example one
An information processing method is provided in an embodiment of the present application, and an information processing method is applied to an information processing apparatus, and fig. 1 is a flowchart of the information processing method provided in the embodiment of the present application, and as shown in fig. 1, the information processing method may include:
s101, under the condition that the access flow transmitted by the client is received, acquiring the pressure measurement information of the servers in the server cluster.
The information processing method provided by the embodiment of the application is suitable for a scene of carrying out flow distribution on the received access flow.
In the embodiment of the present application, the information processing apparatus may be implemented in various forms. For example, the information processing apparatus described in the present application may include apparatuses such as a mobile phone, a camera, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation apparatus, a wearable device, a smart band, a pedometer, and the like, and apparatuses such as a Digital TV, a desktop computer, a server, and the like.
In this embodiment of the present application, a traffic monitoring module is disposed in an information processing apparatus, and a process of receiving an access traffic transmitted by a client by the information processing apparatus includes: the information processing device receives the access flow transmitted by the client by using the flow monitoring module.
In this embodiment, the information processing apparatus is further provided with a utilization unit logic module, and the process of acquiring the pressure measurement information of the servers in the server cluster by the information processing apparatus includes acquiring the pressure measurement information of the servers in the server cluster by the information processing apparatus through the utilization unit logic module.
In the embodiment of the application, the access traffic may be a request traffic of the client within one second; the access flow can also be the access flow of the client in 1 millisecond; the access traffic can also be the request traffic of the client within 1 microsecond; or the request traffic of the client in other unit time, the access traffic may also be the maximum access traffic of the client in a preset time period, and the specific access traffic may be determined according to an actual situation, which is not limited in this embodiment of the present application.
In this embodiment of the present application, the number of the clients may be one, the number of the clients may be two, the number of the clients may also be multiple, and the specific number of the clients may be determined according to an actual situation, which is not limited in this embodiment of the present application.
It should be noted that the clients correspond to the access traffic one to one, and specifically, one client corresponds to one access traffic.
In this embodiment, the pressure measurement information may be a pressure measurement value of the server, and specifically, the pressure measurement information may be traffic information (requested amount per second) that the server can handle at maximum under a limit condition.
In the embodiment of the application, the server cluster comprises at least two servers, and before the information processing device acquires the pressure measurement information of the servers in the server cluster, the information processing device also detects at least two initial pressure measurement information corresponding to the at least two servers; the information processing device screens out first information with the largest pressure value from at least two pieces of initial pressure measurement information; and using the first information as pressure measurement information.
In this embodiment, at least two servers correspond to at least two pieces of initial pressure measurement information one to one, and specifically, one server corresponds to one piece of initial pressure measurement information.
In this embodiment of the application, in a case that the information processing apparatus receives an access traffic transmitted by a client by using the traffic monitoring module, before obtaining the pressure measurement information of the servers in the server cluster by using the unit logic module, the information processing apparatus also receives a service address transmitted by the servers in the server cluster.
In this embodiment of the present application, a server cluster includes at least two servers, a corresponding service address also includes at least two service addresses, the at least two servers and the at least two service addresses are in one-to-one correspondence, and specifically, one server corresponds to one service address.
In an embodiment of the present application, the service address may be an Internet Protocol (IP) address of a server in a server cluster; the service Address may also be a Media Access Control Address (MAC) Address of a server in the server cluster; the service address may also be an address of a server in the server cluster in another form, and a specific representation manner of the service address may be determined according to an actual situation, which is not limited in this embodiment of the present application.
In the embodiment of the present application, the service address also carries a service state of the server, where the service state is a state indicating that the service is available or unavailable. The information processing device can determine whether the server can provide the service according to the service state so as to realize the access process of the access flow by using the server which can provide the service.
In this embodiment of the present application, a server in a server cluster may transmit a service status to an information processing apparatus once at intervals of a first time period; the server in the server cluster can transmit the service state to the information processing device once when the server is started; the servers in the server cluster can also carry service states only when transmitting service addresses to the information processing device; the specific manner in which the server in the server cluster transmits the service state to the information processing apparatus may be determined according to an actual situation, which is not limited in this embodiment of the present application.
It should be noted that the first time period may be a time period configured in a server in the server cluster, and the first time period may also be a time period received by the server in the server cluster; the manner in which the server in the server cluster obtains the first time period may be determined according to an actual situation, which is not limited in the embodiment of the present application.
It is further noted that the first time period may be one day; the first time period may also be 2 hours, the first time period may also be one month, and the specific time of the first time period may be determined according to an actual situation, which is not limited in the embodiment of the present application.
And S102, determining the number of servers for processing the access flow according to the access flow and the pressure measurement information.
In this embodiment, after the information processing apparatus obtains the pressure measurement information of the servers in the server cluster, the information processing apparatus may determine the number of servers that process the access traffic according to the access traffic and the pressure measurement information.
In an embodiment of the present application, a process of determining, by an information processing apparatus, the number of servers that process access traffic according to the access traffic and pressure measurement information includes: the information processing device predicts the maximum access flow of the client within a preset time period according to the access flow; the information processing apparatus determines the number of servers based on the maximum access flow and the pressure measurement information.
It should be noted that, in the process of predicting the maximum access traffic of the client within the preset time period according to the access traffic, the information processing apparatus may predict the maximum access traffic of the client within the preset time period according to the access traffic by using the traffic monitoring module. The information processing apparatus may determine the number of servers based on the maximum access flow and the pressure measurement information by using the unit logic module for the information processing apparatus.
In the embodiment of the present application, the preset time period may be a time period configured in the information processing apparatus; the preset time period can also be time period information received by the information processing device before the information processing device predicts the maximum access flow of the client in the preset time period by using the flow monitoring module according to the access flow; the preset time period can also be time period information acquired by the information processing device in other manners; the specific way of acquiring the preset time period information by the information processing apparatus may be determined according to actual conditions, which is not limited in the embodiment of the present application.
It should be noted that the preset time period may be 5 minutes; the preset time period can also be 1 hour; the preset time period is also 2 minutes; the specific time information of the preset time period may be determined according to actual conditions, which is not limited in the embodiment of the present application.
In the embodiment of the application, one client corresponds to one maximum access flow.
In the embodiment of the application, the maximum access flow may be the maximum access flow that the information processing apparatus predicts the maximum access flow that the client may have in a preset time period according to the access flow by using the flow monitoring module; the maximum access flow can also be the total access flow of the client in a preset time period predicted by the information processing device by utilizing the flow monitoring module according to the access flow; the specific maximum access flow rate may be determined according to actual situations, which is not limited in the embodiment of the present application.
In an embodiment of the present application, the maximum access traffic includes at least one maximum access traffic; the process of determining the number of servers by the information processing device according to the maximum access flow and the pressure measurement information includes: the information processing device determines at least one traffic segment to which at least one maximum access traffic belongs according to a preset traffic segment division rule; the information processing device acquires at least one access flow of a first flow section in at least one flow section; determining a total access flow according to the at least one access flow; until at least one total access flow corresponding to at least one flow segment is determined; the information processing device determines the number of at least one group of servers corresponding to at least one flow section according to at least one total access flow and the pressure measurement information; and taking the number of the at least one group of servers as the number of the servers.
It should be noted that the at least one access traffic is a part of the at least one maximum access traffic.
In this embodiment of the present application, a process of determining, by an information processing apparatus, at least one traffic segment to which at least one maximum access traffic belongs according to a preset traffic segment division rule may be that the information processing apparatus determines, by using a unit logic module, at least one traffic segment to which the at least one maximum access traffic belongs according to the preset traffic segment division rule.
In this embodiment of the present application, the client includes at least one client, and the at least one client corresponds to at least one maximum access traffic one to one, and specifically, one client corresponds to one maximum access traffic.
In the embodiment of the present application, the preset traffic segment division rule may be a traffic segment division rule configured in the information processing apparatus; the preset traffic segment division rule may also be a traffic segment division rule received by the information processing apparatus before the information processing apparatus determines at least one traffic segment to which at least one maximum access traffic belongs according to the preset traffic segment division rule by using the unit logic module; the preset traffic segment division rule can also be a traffic segment division rule acquired by the information processing device in other manners; the specific manner in which the information processing apparatus obtains the preset traffic segment division rule may be determined according to an actual situation, which is not limited in the embodiment of the present application.
In this embodiment of the present application, the preset traffic segment division rule may be a rule that the information processing apparatus divides into at least one traffic segment of hundreds, thousands, tens of thousands, hundreds of thousands and the like in an order of ten according to the magnitude (qps) of the access traffic; the preset flow segment division rule can also be a rule of at least one flow segment set by the information processing device according to the access flow multiple; the preset flow segment division rule can also be a rule of at least one flow segment set by the information processing device according to other modes; the specific details can be determined according to actual situations, and the embodiment of the present application does not limit the details.
In this embodiment of the present application, if the preset traffic segment division rule is a rule that the information processing apparatus divides into at least one traffic segment of hundreds, thousands, tens of thousands, hundreds of thousands and the like in order of ten according to the magnitude (qps) of the access traffic, the traffic segment in the information processing apparatus may be: less than or equal to 100qps, 100-1000qps, 1000-10000qps and 10000-100000qps … ….
For example, the preset traffic segment division rule may be a rule that the information processing apparatus divides into at least one traffic segment of hundreds, thousands, tens of thousands, hundreds of thousands and the like in order of ten according to the magnitude (qps) of the access traffic, and the at least one maximum access traffic acquired by the information processing apparatus includes: 500qps, 1800qps, 3200qps, 1400qps, the information processing apparatus determines, according to the preset traffic segment dividing rule by using the unit logic module, that the at least one traffic segment to which the at least one maximum access traffic belongs includes 100-. Wherein, the maximum access flow of the 100-1000qps flow segment is one, and is 500 qps; the maximum access traffic of the 1000-10000qps traffic segment is 3, which is 1800qps, 3200qps and 1400qps respectively.
It should be noted that, a traffic segment includes at least one access traffic, for example, the traffic segment 100-1000qps includes a maximum access traffic of 500 qps; the 1000-10000qps traffic segment includes 3 maximum access flows, 1800qps, 3200qps and 1400 qps.
In this embodiment of the application, the information processing apparatus may determine the total access traffic according to at least one access traffic in such a manner that, if one traffic segment includes only one access traffic, the total access traffic is the access traffic, and if the 100-1000qps traffic segment includes one maximum access traffic which is 500qps, the total access traffic of the traffic segment is 500 qps; if one traffic segment includes at least one access traffic, the total access traffic is the sum of the at least one access traffic, for example, if the 1000-10000qps traffic segment includes 3 maximum access traffic, which are 1800qps, 3200qps and 1400qps respectively, the total access traffic of the traffic segment is the sum of 1800qps, 3200qps and 1400qps, which is 6400 qps.
In an embodiment of the present application, the first flow segment is any one of the at least one flow segment.
In the embodiment of the present application, at least one traffic segment corresponds to at least one group of servers in a one-to-one manner, that is, one traffic segment corresponds to a group of servers, and one traffic segment includes servers satisfying the group of servers.
S103, determining target servers meeting the number of the servers from the server cluster, and distributing access flow to the target servers.
In the embodiment of the application, after the information processing apparatus determines the number of servers processing the access traffic according to the access traffic and the pressure measurement information, the information processing apparatus may determine a target server satisfying the number of servers from the server cluster and allocate the access traffic to the target server.
In this embodiment, the information processing apparatus further includes a traffic distribution module, and the process of allocating the access traffic to the target server by the information processing apparatus may be a process of allocating the access traffic to the target server by using the traffic distribution module for the information processing apparatus.
In the embodiment of the application, the information processing apparatus allocates the access traffic to the target server by using the traffic distribution module, so that the target server polls and processes the access traffic transmitted by the client, or the target server polls and processes the traffic monitoring module to receive the access traffic within a preset time period.
It should be noted that the process of the information processing apparatus acquiring the target server satisfying the number of servers from the server cluster includes that the information processing apparatus allocates the servers satisfying the number of the at least one group of servers to the at least one traffic segment.
In the embodiment of the application, the information processing device transmits the access flow to the server corresponding to at least one flow segment according to the at least one flow segment to which the access flow transmitted by the client belongs.
Illustratively, the traffic segment to which the access traffic transmitted by the client belongs is 100-1000qps traffic segment, and the 100-1000qps traffic segment has 3 servers, the information processing apparatus allocates the access traffic to the 3 servers by using the traffic distribution module, so as to implement the access process of the access traffic by using the 3 servers. If the traffic segment to which the access traffic 1 transmitted by the client 1 belongs is a traffic segment of 100 + 1000qps, the traffic segment to which the access traffic 2 transmitted by the client 2 belongs is a traffic segment of 1000 + 10000qps, the traffic segment of 100 + 1000qps has 2 servers, and the traffic segment of 1000 + 10000qps has 3 servers, the information processing device allocates the access traffic 1 to 2 servers in the traffic segment of 100 + 1000qps by using the traffic distribution module, and allocates the access traffic to 3 servers in the traffic segment of 1000 + 10000qps by using the traffic distribution module.
In the embodiment of the application, after the information processing apparatus takes the number of the at least one group of servers as the number of the servers, the information processing apparatus further determines the total number of the servers in the server cluster; the information processing device removes the number of the servers from the total number to obtain the number of the shared servers; accordingly, a process of acquiring a target server satisfying the number of servers from a server cluster by an information processing apparatus includes: the information processing device acquires shared servers meeting the number of the shared servers from the server cluster; the information processing apparatus sets the shared server as a target server.
In this embodiment, the server cluster includes at least two servers, that is, the total number of servers in the server cluster is at least two.
In the embodiment of the application, after the information processing apparatus acquires the shared servers meeting the number of the shared servers from the server cluster, the information processing apparatus adds the first server acquired from the shared servers to the target server to obtain an updated target server under the condition that the information processing apparatus receives the next access flow and the flow value of the next access flow is greater than the flow value of the access flow, and realizes the access process of the next access flow by using the updated target server; or the information processing device removes the second server from the target server to obtain an updated target server when receiving the next access flow and the flow value of the next access flow is smaller than the flow value of the access flow, and realizes the access process of the next access flow by using the updated target server.
In the embodiment of the application, the next access flow is the access flow transmitted by the client and received by the information processing device by the flow monitoring module; the next access flow may also be the access flow transmitted by the client and received by the information processing apparatus within a preset time period by using the flow monitoring module after the information processing apparatus receives the access flow by using the flow monitoring module; the specific next access flow may be determined according to actual conditions, which is not limited in this embodiment of the present application.
In the embodiment of the present application, the next client and the client corresponding to the next access flow may be the same client; the next client and the client can be different clients; the specific details can be determined according to actual conditions, and the embodiment of the present application does not limit this.
It should be noted that the number of the next clients may be one; the number of the next clients can also be two; the number of the next clients can be more than one; the specific number of the next clients may be determined according to actual situations, which is not limited in the embodiment of the present application.
In the embodiment of the present application, after the information processing apparatus removes the second server from the target server, the information processing apparatus adds the second server to the shared server.
In the embodiment of the application, after the information processing apparatus acquires the shared servers meeting the number of the shared servers from the server cluster, the information processing apparatus determines the number of the first servers corresponding to the first access flow when receiving the first access flow transmitted by the first client; the information processing device acquires a third server satisfying the first server number from the shared server; and realizing the access process of the first access flow by using the third server.
In this embodiment, in the process of determining, by the information processing apparatus, the first number of servers corresponding to the first access traffic, the information processing apparatus may determine, by using the unit logic module, the first number of servers corresponding to the first access traffic.
In the embodiment of the present application, the first client and the client may be the same client; the first client and the client can also be different clients; the specific details can be determined according to actual conditions, and the embodiment of the present application does not limit this.
It should be noted that the number of the first clients may be one; the number of the first clients can also be two; the number of the first clients can also be multiple; the specific number of the first clients may be determined according to actual situations, which is not limited in the embodiment of the present application.
In this embodiment of the application, the first clients correspond to the first access flows one to one, and specifically, one first client corresponds to one first access flow.
In this embodiment of the application, the manner in which the information processing apparatus determines the number of the first servers corresponding to the first access traffic by using the unit logic module may be: the information processing device acquires the pressure measurement information of the servers in the server cluster by using the unit logic module; the information processing device determines the number of the first servers according to the first access flow and the pressure measurement information by using the unit logic module.
In the embodiment of the application, under the condition that the information processing device receives access flow transmitted by a client, before acquiring pressure measurement information of a server in a server cluster, the information processing device also receives a service address transmitted by the server in the server cluster; accordingly, a process for an information processing apparatus to allocate an access traffic to a target server, includes: the information processing device acquires a target service address corresponding to the target server from the service address; the information processing apparatus transmits the access traffic to the target service address.
In this embodiment, in the process of sending the access traffic to the target service address by the information processing apparatus, the traffic distribution module may be used for sending the access traffic to the target service address for the information processing apparatus.
In this embodiment of the present application, the service address also includes at least two service addresses, and the at least two service addresses also carry at least two service states corresponding to the at least two servers.
It should be noted that one server corresponds to one service address.
In the embodiment of the application, the information processing device can receive the service address transmitted by the server in the server cluster in a wireless mode; the information processing device can also receive the service address transmitted by the server in the server cluster in a wired mode; the specific manner in which the information processing apparatus receives the service address transmitted by the server in the server cluster may be determined according to actual conditions, which is not limited in this embodiment of the present application.
Illustratively, as shown in FIG. 2: the client comprises a client 1, a client 2 and a client 3; the information processing device comprises a flow monitoring module, a unit logic module and a flow distribution module; the server cluster includes server 1, server 2, server 3, server 4, server 5, and server 6. When the server startup in the server cluster is completed, the server 1, the server 2, the server 3, the server 4, the server 5, and the server 6 in the server cluster acquire a service address (the service address 1, the service address 2, the service address 3, the service address 4, the service address 5, and the service address 6) and transmit the service address to the information processing apparatus (to complete the process of cluster server registration). Under the condition that the information processing device receives access flows (access flow 1, access flow 2 and access flow 3) sent by clients (client 1, client 2 and client 3), the information processing device predicts the maximum access flows (maximum access flow 1, maximum access flow 2 and maximum access flow 3) of the clients in a preset time period according to the access flows (access flow 1, access flow 2 and access flow 3) by using a flow monitoring module, and then determines at least one flow segment (logic unit 1, logic unit 2 and logic unit 3) to which at least one maximum access flow belongs by using a unit logic module according to a preset flow segment division rule; the information processing device acquires at least one access flow of a first flow section in at least one flow section; determining a total access flow according to the at least one access flow; until at least one total access flow corresponding to at least one flow segment is determined (total access flow 1 corresponding to logic unit 1, total access flow 2 corresponding to logic unit 2, and total access flow 3 corresponding to logic unit 3); the information processing device determines at least one group of server number (the number of servers in the logic unit 1, the number of servers in the logic unit 2 and the number of servers in the logic unit 3) corresponding to at least one flow section according to at least one total access flow and the pressure measurement information; and taking the number of the at least one group of servers as the number of the servers. The information processing device acquires target servers meeting the number of the servers from a server cluster (the server in a logic unit 1 comprises a server 1 and a server 2; the server in the logic unit 2 comprises a server 3 and a server 4; the server in the logic unit 3 comprises a server 5 and a server 6), and the information processing device distributes access flow to the target servers by using a flow distribution module; to implement the access process of the access traffic with the target server.
It can be understood that, when determining that there is a traffic increase or a traffic decrease in the access traffic transmitted by the client, the information processing apparatus may determine the number of servers according to the increased access traffic and the pressure measurement information, or determine that the number of servers is determined according to the decreased access traffic and the pressure measurement information, so as to process the access traffic by using a target server that satisfies the number of servers, thereby improving the access speed when accessing the access traffic.
Example two
Based on the idea of the invention together with the embodiments, the embodiments of the present application provide an information processing apparatus 1 corresponding to an information processing method; fig. 3 is a schematic diagram illustrating a first configuration of an information processing apparatus according to an embodiment of the present application, where the information processing apparatus 1 may include:
the acquiring unit 11 is configured to acquire pressure measurement information of servers in a server cluster under the condition that access traffic transmitted by a client is received;
a determining unit 12, configured to determine, according to the access traffic and the pressure measurement information, the number of servers that process the access traffic; determining a target server from the server cluster that satisfies the server number;
an allocating unit 13, configured to allocate the access traffic to the target server.
In some embodiments of the present application, the apparatus further comprises a prediction unit;
the prediction unit is used for predicting the maximum access flow of the client within a preset time period according to the access flow;
the determining unit 12 is configured to determine the number of servers according to the maximum access flow and the pressure measurement information.
In some embodiments of the present application, the maximum access traffic comprises at least one maximum access traffic;
the determining unit 12 is configured to determine, according to a preset traffic segment division rule, at least one traffic segment to which the at least one maximum access traffic belongs; determining a total access flow according to the at least one access flow; until at least one total access flow corresponding to the at least one flow segment is determined; determining the number of at least one group of servers corresponding to the at least one traffic segment according to the at least one total access traffic and the pressure measurement information; and taking the at least one group of server quantity as the server quantity;
the obtaining unit 11 is configured to obtain at least one access traffic of a first traffic segment in the at least one traffic segment; the at least one access flow is a portion of the at least one maximum access flow.
In some embodiments of the present application, the apparatus further comprises a removal unit;
the determining unit 12 is configured to determine the total number of servers in the server cluster;
the removing unit is used for removing the number of the servers from the total number to obtain the number of the shared servers;
correspondingly, the obtaining unit 11 is configured to obtain, from the server cluster, shared servers that satisfy the number of shared servers; and taking the shared server as the target server.
In some embodiments of the present application, the apparatus further comprises an adding unit;
the adding unit is used for adding the first server acquired from the shared server to the target server to obtain an updated target server under the condition that the next access flow is received and the flow value of the next access flow is greater than the flow value of the access flow; the updated target server is used for realizing the access process of the next access flow;
and the removing unit is used for removing the second server from the target server to obtain an updated target server and realizing the access process of the next access flow by using the updated target server under the condition that the next access flow is received and the flow value of the next access flow is smaller than the flow value of the access flow.
In some embodiments of the present application, the determining unit 12 is configured to, in a case that a first access traffic transmitted by a first client is received, determine a first number of servers corresponding to the first access traffic;
the obtaining unit 11 is configured to obtain, from the shared servers, third servers that satisfy the first number of servers; and realizing the access process of the first access flow by utilizing the third server.
In some embodiments of the present application, the server cluster includes at least two servers; the device also comprises a detection unit and a screening unit;
the detection unit is used for detecting at least two pieces of pressure measurement information corresponding to the at least two servers;
the screening unit is used for screening first information with the largest pressure value from the pressure measurement information; and using the first information as the pressure measurement information.
In some embodiments of the present application, the apparatus further comprises a receiving unit;
the receiving unit is configured to receive a service address transmitted by a server in the server cluster;
correspondingly, the device also comprises a sending unit;
the obtaining unit 11 is configured to obtain a target service address corresponding to the target server from the service addresses;
the sending unit is configured to send the access traffic to the target service address.
In practical applications, the obtaining Unit 11, the determining Unit 12 and the allocating Unit 13 may be implemented by a processor 14 on the information Processing apparatus 1, specifically implemented by a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal processor), a Field Programmable Gate Array (FPGA), or the like; the above data storage may be realized by the memory 15 on the information processing apparatus 1.
An embodiment of the present application also provides an information processing apparatus 1, and as shown in fig. 4, the information processing apparatus 1 includes: a processor 14, a memory 15 and a communication bus 16, the memory 15 communicating with the processor 14 through the communication bus 16, the memory 15 storing a program executable by the processor 14, the program, when executed, executing the information processing method as described above through the processor 14.
In practical applications, the Memory 15 may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to processor 14.
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor 14, the information processing method described above is implemented.
It can be understood that, when determining that there is a traffic increase or a traffic decrease in the access traffic transmitted by the client, the information processing apparatus may determine the number of servers according to the increased access traffic and the pressure measurement information, or determine that the number of servers is determined according to the decreased access traffic and the pressure measurement information, so as to process the access traffic by using a target server that satisfies the number of servers, thereby improving the access speed when accessing the access traffic.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.
Claims (11)
1. An information processing method, characterized in that the method comprises:
under the condition of receiving access flow transmitted by a client, acquiring pressure measurement information of a server in a server cluster;
determining the number of servers for processing the access flow according to the access flow and the pressure measurement information;
determining a target server from the server cluster that satisfies the server number, and allocating the access traffic to the target server.
2. The method of claim 1, wherein determining the number of servers to handle the access traffic based on the access traffic and the pressure measurement information comprises:
predicting the maximum access flow of the client within a preset time period according to the access flow;
and determining the number of the servers according to the maximum access flow and the pressure measurement information.
3. The method of claim 2, wherein the maximum access traffic comprises at least one maximum access traffic; the determining the number of servers according to the maximum access flow and the pressure measurement information includes:
determining at least one traffic segment to which the at least one maximum access traffic belongs according to a preset traffic segment division rule;
obtaining at least one access flow of a first flow section in the at least one flow section; determining total access flow according to the at least one access flow; until at least one total access flow corresponding to the at least one flow segment is determined; the at least one access flow is a part of the at least one maximum access flow;
determining the number of at least one group of servers corresponding to the at least one traffic segment according to the at least one total access traffic and the pressure measurement information; and taking the at least one group of server numbers as the server numbers.
4. The method of claim 3, wherein after the taking the at least one set of server numbers as the server number, the method further comprises:
determining a total number of servers in the cluster of servers;
removing the server number from the total number to obtain a shared server number;
correspondingly, the obtaining of the target server satisfying the server number from the server cluster includes:
acquiring shared servers meeting the number of the shared servers from the server cluster;
and taking the shared server as the target server.
5. The method of claim 4, wherein after obtaining the shared server satisfying the number of shared servers from the server cluster, the method further comprises:
adding a first server acquired from the sharing server to the target server to obtain an updated target server under the condition that the next access flow is received and the flow value of the next access flow is larger than the flow value of the access flow, and realizing the access process of the next access flow by using the updated target server;
and under the condition that the next access flow is received and the flow value of the next access flow is smaller than the flow value of the access flow, removing the second server from the target server to obtain an updated target server, and realizing the access process of the next access flow by using the updated target server.
6. The method of claim 4, wherein after obtaining the shared server satisfying the number of shared servers from the server cluster, the method further comprises:
under the condition of receiving first access flow transmitted by a first client, determining the number of first servers corresponding to the first access flow;
acquiring a third server meeting the first server number from the shared server; and realizing the access process of the first access flow by utilizing the third server.
7. The method of claim 1, wherein the cluster of servers includes at least two servers; before the obtaining of the pressure measurement information of the servers in the server cluster, the method further includes:
detecting at least two initial pressure measurement information corresponding to the at least two servers;
screening out first information with the largest pressure value from the at least two pieces of initial pressure measurement information; and using the first information as the pressure measurement information.
8. The method according to claim 1, wherein before obtaining the pressure measurement information of the servers in the server cluster in the case of receiving the access traffic transmitted by the client, the method further comprises:
receiving a service address transmitted by a server in the server cluster;
correspondingly, the allocating the access traffic to the target server includes:
acquiring a target service address corresponding to the target server from the service address;
and sending the access flow to the target service address.
9. An information processing apparatus characterized in that the apparatus comprises:
the acquisition unit is used for acquiring the pressure measurement information of the servers in the server cluster under the condition of receiving the access flow transmitted by the client;
the determining unit is used for determining the number of servers for processing the access flow according to the access flow and the pressure measurement information; determining a target server from the server cluster that satisfies the server number;
an allocation unit, configured to allocate the access traffic to the target server.
10. An information processing apparatus characterized in that the apparatus comprises:
a memory, a processor, and a communication bus, the memory in communication with the processor through the communication bus, the memory storing an information processing program executable by the processor, the information processing program when executed causing the processor to perform the method of any of claims 1 to 8.
11. A storage medium having stored thereon a computer program for application to an information processing apparatus, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111325150.6A CN114035955A (en) | 2021-11-10 | 2021-11-10 | Information processing method and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111325150.6A CN114035955A (en) | 2021-11-10 | 2021-11-10 | Information processing method and device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114035955A true CN114035955A (en) | 2022-02-11 |
Family
ID=80143795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111325150.6A Pending CN114035955A (en) | 2021-11-10 | 2021-11-10 | Information processing method and device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114035955A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
CN112866132A (en) * | 2020-12-31 | 2021-05-28 | 网络通信与安全紫金山实验室 | Dynamic load balancer and method for massive identification |
CN113407426A (en) * | 2021-06-17 | 2021-09-17 | 北京字跳网络技术有限公司 | Server cluster capacity evaluation method and device, electronic equipment and storage medium |
-
2021
- 2021-11-10 CN CN202111325150.6A patent/CN114035955A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
WO2020199487A1 (en) * | 2019-04-03 | 2020-10-08 | 平安科技(深圳)有限公司 | Method, apparatus and device for responding to access request, and storage medium |
CN112866132A (en) * | 2020-12-31 | 2021-05-28 | 网络通信与安全紫金山实验室 | Dynamic load balancer and method for massive identification |
CN113407426A (en) * | 2021-06-17 | 2021-09-17 | 北京字跳网络技术有限公司 | Server cluster capacity evaluation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11146502B2 (en) | Method and apparatus for allocating resource | |
CN109218355B (en) | Load balancing engine, client, distributed computing system and load balancing method | |
CN109617986B (en) | Load balancing method and network equipment | |
US10003550B1 (en) | Smart autoscaling of a cluster for processing a work queue in a distributed system | |
EP3419247A1 (en) | Method and device for storage resource allocation for video cloud storage | |
CN110602156A (en) | Load balancing scheduling method and device | |
CN108604194B (en) | Probabilistic adjustment | |
CN109815019B (en) | Task scheduling method and device, electronic equipment and readable storage medium | |
CN104714851A (en) | Method and device for realizing resource distribution | |
CN111614748A (en) | Scalable peer-to-peer matching | |
EP3885907A1 (en) | Read/write request processing method and apparatus, electronic device, and storage medium | |
US20120233313A1 (en) | Shared scaling server system | |
CN110708377A (en) | Data transmission method, device and storage medium | |
US9665409B2 (en) | Methods and apparatus facilitating access to storage among multiple computers | |
CN114185675A (en) | Resource management method, device, electronic equipment and storage medium | |
CN109428926B (en) | Method and device for scheduling task nodes | |
CN104572302A (en) | Method and device for distributing resources | |
CN104753814A (en) | Packet dispersion method based on network adapter | |
CN109347982A (en) | A kind of dispatching method and device of data center | |
CN114253698A (en) | Resource scheduling method, system, electronic device and storage medium | |
CN111491017A (en) | Data distribution system, method and device for CORS reference station | |
CN114035955A (en) | Information processing method and device and storage medium | |
US10547497B1 (en) | Methods and systems for providing predictive rating using a buffer | |
CN110891033B (en) | Network resource processing method, device, gateway, controller and storage medium | |
CN102200928A (en) | Computation resource control apparatus, computation resource control method, and non-transitory computer-readable recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |