CN107682391B - Electronic device, server allocation control method, and computer-readable storage medium - Google Patents

Electronic device, server allocation control method, and computer-readable storage medium Download PDF

Info

Publication number
CN107682391B
CN107682391B CN201710658107.9A CN201710658107A CN107682391B CN 107682391 B CN107682391 B CN 107682391B CN 201710658107 A CN201710658107 A CN 201710658107A CN 107682391 B CN107682391 B CN 107682391B
Authority
CN
China
Prior art keywords
server
access request
servers
server group
access
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.)
Active
Application number
CN201710658107.9A
Other languages
Chinese (zh)
Other versions
CN107682391A (en
Inventor
张政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710658107.9A priority Critical patent/CN107682391B/en
Priority to PCT/CN2017/105028 priority patent/WO2019024235A1/en
Publication of CN107682391A publication Critical patent/CN107682391A/en
Application granted granted Critical
Publication of CN107682391B publication Critical patent/CN107682391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • 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/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • 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/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an electronic device, a server distribution control method and a storage medium, wherein the method comprises the following steps: receiving a first access request of an external system for calling one or more associated systems inside an enterprise; distributing a corresponding number of server processes from a first server group according to the number of the first access requests received in a first preset time; receiving a second access request of a business system inside an enterprise for requesting batch processing of data; and distributing a corresponding number of server processes from the second server group according to the number of the batch data in the second access request. The technical scheme of the invention ensures that different service requests of the internal and external systems of the enterprise to the server can be responded in time and do not interfere with each other.

Description

Electronic device, server allocation control method, and computer-readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an electronic device, a server allocation control method, and a computer-readable storage medium.
Background
The intra-enterprise system provides interface services to external systems in addition to hosting applications for intra-enterprise users. In addition, there are often a large number of batch operations within an enterprise. When the calling between the internal system and the external system of the enterprise is abnormal or the batch processing is abnormal, the thread of the server in the enterprise is blocked, the internal system of the enterprise is slow to react, and the user's demand cannot be responded in time. Therefore, a strategy is needed to enable different service requests of the internal and external systems of the enterprise to the server to be responded in time and not to interfere with each other.
Disclosure of Invention
The invention mainly aims to provide an electronic device, a server distribution control method and a storage medium, aiming at enabling different service requests of an internal system and an external system of an enterprise to a server to be responded in time and not to interfere with each other.
In order to achieve the above object, the electronic device provided in the present invention includes a memory, a processor, and a server allocation control system stored in the memory and operable on the processor, wherein the server allocation control system, when executed by the processor, implements the following steps:
A. receiving a first access request of an external system for calling one or more associated systems inside an enterprise;
B. distributing a corresponding number of servers from a first server group to process a first access request according to the number of the first access requests received in a first preset time;
C. receiving a second access request of a business system inside an enterprise for requesting batch processing of data;
D. and distributing a corresponding number of servers from a second server group to process the second access request according to the number of the batch data in the second access request.
Preferably, the processor is further configured to execute the server distribution control system to implement the following steps:
E. receiving one or more associated system requests inside the enterprise to call a third access request of an external system;
F. and distributing a corresponding number of servers from the third server group to process the third access request according to the number of the third access requests received in the second preset time.
Preferably, the step F is replaced by:
and distributing a corresponding number of servers from a third server group to process the third access request according to the number of the third access requests received in a second preset time and by combining the data processing capacity of the external system.
Preferably, the step D is replaced by:
and distributing a corresponding number of servers from a second server group to process the second access request according to the scheduled time and the number of the batch data in the second access request.
Preferably, the processor is further operable to execute the server distribution control system to implement the steps of:
the method comprises the steps of acquiring an idle server in real time, and dividing the acquired idle server into a plurality of server groups at least comprising a first server group, a second server group and a third server group according to a preset rule.
The invention also provides a server distribution control method, which comprises the following steps:
A. receiving a first access request of an external system for calling one or more associated systems inside an enterprise;
B. distributing a corresponding number of servers from a first server group to process a first access request according to the number of the first access requests received in a first preset time;
C. receiving a second access request of a business system inside an enterprise for requesting batch processing of data;
D. distributing a corresponding number of servers from a second server group to process the second access request according to the number of batch data in the second access request;
preferably, the server allocation control method further includes:
E. receiving one or more associated system requests inside the enterprise to call a third access request of an external system;
F. and distributing a corresponding number of servers from the third server group to process the third access request according to the number of the third access requests received in the second preset time.
Preferably, the step F is replaced by:
and distributing a corresponding number of servers from a third server group to process the third access request according to the number of the third access requests received in a second preset time and by combining the data processing capacity of the external system.
Preferably, the step D is replaced by:
and distributing a corresponding number of servers from a second server group to process the second access request according to the scheduled time and the number of the batch data in the second access request.
The present invention also provides a computer-readable storage medium storing a server allocation control system executable by at least one processor to cause the at least one processor to perform any of the server allocation control methods described above.
The technical scheme of the invention divides the servers in the enterprise system into a plurality of server groups, and allocates a corresponding number of servers to process the received different types of access requests respectively from the corresponding server groups, so that the processing of the access requests of various types cannot interfere with each other and influence each other, and the condition that the processing of other types of requests is influenced by the occurrence of abnormity in the process of processing a certain type of requests by the servers is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a server allocation control method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a server allocation control method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a server allocation control method according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of an operating environment of a server distribution control system according to a preferred embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a first embodiment of a server distribution control system according to the present invention;
FIG. 6 is a schematic structural diagram of a second embodiment of a server distribution control system according to the present invention;
fig. 7 is a schematic structural diagram of a server distribution control system according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, fig. 1 is a schematic flow chart of a server allocation control method according to a first embodiment of the present invention.
In this embodiment, the server allocation control method includes:
step S10, receiving a first access request of an external system for calling one or more associated systems inside the enterprise;
the enterprise internal system is connected with the enterprise external system through an external network, and a plurality of systems of the internal system communicate with each other through the internal network; the enterprise internal system comprises a plurality of servers, and the servers are in communication connection with the database; the multiple servers comprise one or more business systems (Apps) daily used by staff in the enterprise and one or more associated systems (Apps); and the client of the enterprise internal user accesses the service system or the associated system through the internal network login server. When an external system sends a first access request for calling the associated system in the enterprise to the internal system of the enterprise, the server distribution control system receives the first access request.
Step S20, according to the number of the first access requests received in the first preset time, distributing a corresponding number of servers from the first server group to process the first access requests;
in this embodiment, a plurality of servers of the enterprise internal system are divided into a plurality of server groups including at least a first server group, a second server group, and a third server group; wherein the first access request is processed by a server in the first server group. The first preset time (for example, 5 seconds) is an interval duration of the server allocation control system performing the server allocation processing on the first access request, that is, the server allocation control system performs the server allocation processing on the first access request received in the time every first preset time. The server allocation control system allocates a corresponding number of servers from the first server group to process the received first access request according to the number of the received first access requests (namely the number of the first access requests to be processed) in first preset time and according to a corresponding allocation rule; the distribution server comprises an IP address and a port of a designated server. The allocation rule is, for example: when the number of the first access requests is less than or equal to a first preset threshold (for example, 30), allocating A number (for example, 1) of servers to process the first access requests; and after the number of the first access requests exceeds a first preset threshold value, every time the number of the first access requests is increased by a first increment (for example, 50 pieces), redistributing B number (for example, 2 servers) on the basis of the A number to process the first access requests.
Step S30, receiving a second access request of a business system in an enterprise requesting batch processing data;
step S40, allocating a corresponding number of servers from a second server group to process the second access request according to the number of batch data;
when a business system in an enterprise needs to process batch data, the business system sends a second access request for requesting the batch data to a server distribution control system, the server distribution system receives the second access request, analyzes the quantity of the batch data contained in the second access request, and distributes a corresponding quantity of servers from a second server according to the quantity of the batch data and a preset rule to process the second access request; the predetermined rule may be a predetermined mapping relationship or other rule algorithm.
Further, the server allocation control method of this embodiment further includes:
step S50, receiving one or more associated system requests inside the enterprise to call a third access request of an external system;
step S60, according to the number of the third access requests received within the second preset time, allocating a corresponding number of servers from the third server group to process the third access requests.
When one or more associated systems inside the enterprise request to call the external system, the associated systems send a third access request for calling the external system to the server distribution control system, and the server distribution control system receives the third access request. The second preset time (for example, 5 seconds) is the allocation processing interval duration of the server allocation control system to the third access request, that is, the server allocation control system allocates the server to the third access request received in the time every second preset time; the server distribution control system analyzes the number of the third access requests received in the second preset time, and distributes a corresponding number of servers according to the obtained number of the third access requests in a preset mode to process the third access requests; the preset mode may be a preset mapping relationship or other preset algorithms, and the like.
In this embodiment, since the receiving of the first access request, the second access request, and the third access request is determined by the sender of the access request, there is no sequential order in receiving the first access request, the second access request, and the third access request, that is, steps S10, S20, steps S30, S40, and steps S50, and S60 in this embodiment, there is no sequential execution order restriction between these three steps, for example, steps S30 and S40 may be executed before steps S10 and S20, and steps S50 and S60 may be executed before steps S30 and S40.
Compared with the prior art, the scheme of the embodiment divides the servers in the enterprise system into a plurality of server groups, and allocates a corresponding number of servers to process the received different types of access requests respectively from the corresponding server groups, so that the processing of the access requests of various types cannot interfere with each other and influence each other, and the condition that the processing of other types of requests is influenced by the occurrence of abnormity of the servers in the process of processing certain types of requests is avoided.
Further, referring to fig. 2, in the server allocation control method according to the present embodiment, step S40 is replaced with:
step S70, according to the scheduled execution time and the amount of the batch data in the second access request, allocating a corresponding number of servers from a second server group to process the second access request.
The second access request sent by the service system includes the number of the batch processing data and the scheduled execution time, wherein the scheduled execution time refers to the time required by the service system to complete the batch processing data. After receiving a second access request, a server allocation control system analyzes the quantity of batch processing data and the scheduled execution time in the second access request, and then calculates the quantity of the servers which need to be allocated at least according to the quantity of data which can be processed by a single server in the scheduled execution time; and finally, distributing a corresponding number of servers from a second server group to process the second access request according to the calculated number of the servers. For example, if the number of batch processing data in the second access request sent by the service system is 20000, the scheduled execution time is 10 seconds, and the speed of processing data by a single server is 600 per second, that is, a single server can process 6000 data within the scheduled execution time, it can be calculated that at least 4 servers need to be allocated to process the second access request if the 20000 data are processed within the scheduled execution time, and then the server allocation control system allocates 4 servers from the second server group to process the second access request.
According to the scheme of the embodiment, the server with the minimum number required to be distributed is obtained by calculation according to the quasi-execution time and the number of the batch-processed data, so that the server with the minimum number is distributed from the second server group to process the second access request on the premise that the number of the batch-processed data of the second access request can be completed in the quasi-execution time; therefore, more idle servers in the second server group can be used for processing the subsequent access requests, the situation that the servers for processing the subsequent access requests are insufficient due to the fact that the number of the servers allocated to a certain second access request is too large is reduced, and timeliness of processing of each access request is guaranteed.
Further, referring to fig. 2, in the server allocation control method according to the present embodiment, step S60 is replaced with:
step S80, according to the number of the third access requests received within the second preset time, and in combination with the data processing capability of the external system, allocating a corresponding number of servers from the third server group to process the third access requests.
In this embodiment, the data processing capability of the external system is the current concurrency capability (i.e., the number of connections that can be accessed simultaneously) of the external system. If the number of the third access requests received within the second preset time does not exceed the current concurrency capability of the external system, the server allocation control system allocates a corresponding number of servers from a third server group according to a preset allocation rule (for example, a mapping relation) to process the third access requests; and if the number of the received third access requests in a second preset time exceeds the current concurrency capability of the external system, dividing the received third access requests into multiple batches by the server allocation control system according to the current concurrency capability of the external system, and sequentially performing server allocation processing, wherein the number of the third access requests in each batch does not exceed the current concurrency capability of the external system.
Further, after the step S60, the server allocation control method of the present embodiment further includes:
feeding back relevant information of the distributed servers to corresponding access requesters;
after the server distribution control system distributes the servers for each access request, the relevant information of the distributed servers is fed back to the corresponding access request party; the relevant information of the server comprises an IP address and port information.
And feeding back the processing result of each access request to the corresponding access requester.
And after each server finishes processing the corresponding access request, each server sends the corresponding processing result to the server distribution control system, and the server distribution control system feeds the processing result back to the corresponding access requester after receiving the processing result of each server.
Referring to fig. 3, the server allocation control method of the present embodiment further includes:
step S90, acquiring an idle server in real time, and dividing the acquired idle server into a plurality of server groups including at least a first server group, a second server group, and a third server group according to a preset rule.
Since the distribution of the number of various types of access requests changes with time, there may be a particularly large number of first access requests, a particularly large number of data volumes of batch data in some time periods, and a particularly large number of third access requests in some time periods. When the number of certain types of access requests (e.g., the first access request or the third access request) in a certain time period is particularly large, and other types of access requests are particularly small or relatively small, then the usage rate of the servers in the server group corresponding to the access requests with particularly large number is very large, and it may happen that the processing progress and efficiency of the type of access request are affected by insufficient servers; however, at this time, the remaining types of access requests have a smaller number and have more idle servers in the corresponding server group, so that the server resources are not allocated and used most efficiently. In order to improve the situation, in the embodiment, an idle server is acquired in real time, and the acquired server is divided into a plurality of server groups at least including a first server group, a second server group and a third server group according to a preset rule; therefore, when a certain type of access request is particularly large in quantity and a large number of servers in the server group corresponding to the type of access request are used, the server allocation control system acquires idle servers in the other server groups and re-divides the server groups according to the preset rule, parts of the acquired idle servers are divided into the server groups corresponding to the access requests with the particularly large quantity, and it is guaranteed that the server groups corresponding to the access requests with the particularly large quantity have enough servers to process the type of access request. In this embodiment, the preset rule may be an average allocation rule, or an allocation according to a preset proportion, or another rule.
In the embodiment, the number of idle servers in each server group is divided through dynamic adjustment, so that the utilization rate of the servers is the maximum, the situation that a certain server group does not have enough servers for allocation processing in the peak period of the corresponding access request is avoided, and the processing efficiency of various types of requests is ensured.
Further, on the basis of the scheme of the first embodiment, the plurality of servers in the intra-enterprise system may be divided into a first server group, a second server group, a third server group, and a standby server group, and thus, steps S20, S40, and S60 in the scheme may adopt the following scheme:
the step S20 includes:
determining a first quantity corresponding to a request quantity interval in which the quantity of the received first access requests is located according to a mapping relation between the predetermined request quantity interval and the first quantity;
if the determined first number is less than or equal to the number of idle servers in the first server group, allocating the determined first number of idle servers from the first server group to process the first access request;
if the determined first number is larger than the number of the idle servers in the first server group, acquiring a first supplementary number of servers from a standby server group, and processing the first access request through the idle servers in the first server and the acquired first supplementary number of servers; wherein the first supplemental number is equal to a difference between the determined first number and a number of servers in the first server group that are idle.
The step S40 includes:
determining a second quantity corresponding to the quantity interval in which the quantity of the batch data in the received second access request is located according to a mapping relation between the predetermined quantity interval of the batch data and the second quantity;
if the determined second number is less than or equal to the number of idle servers in the second server group, allocating the determined second number of idle servers from the second server group to process the second access request;
if the determined second number is larger than the number of the idle servers in the second server group, acquiring a second supplementary number of servers from a standby server group, and processing the second access request through the idle servers in the second server and the acquired second supplementary number of servers; wherein the second supplemental number is equal to a difference between the determined second number and a number of servers in the second server group that are idle.
The step S60 includes:
determining a third quantity corresponding to the request quantity interval in which the quantity of the received third access requests is located according to a mapping relation between the predetermined request quantity interval and the third quantity;
if the determined third number is less than or equal to the number of idle servers in the third server group, allocating the determined third number of idle servers from the third server group to process the third access request;
if the determined third number is larger than the number of the idle servers in the third server group, acquiring a third supplementary number of servers from a standby server group, and processing the third access request through the idle servers in the third server and the acquired third supplementary number of servers; wherein the third supplemental number is equal to a difference between the determined third number and a number of servers in the third server group that are idle.
In the scheme of this embodiment, the allocation number of the servers is obtained through a mapping relation table of the request number and the server number of each of the first, second and third access requests; and the server in the standby server group is used for being called by the server distribution control system when the server in the first, second or third server group does not process the corresponding access request.
The invention also provides a server distribution control system.
Please refer to fig. 4, which is a schematic diagram illustrating an operating environment of the server distribution control system 10 according to a preferred embodiment of the present invention.
In the present embodiment, the server distribution control system 10 is installed and operated in the electronic apparatus 1. The electronic device 1 may be a desktop computer, a notebook, a palm computer, a server, or other computing equipment. The electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Fig. 3 only shows the electronic device 1 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. The memory 11 may also be an external storage device of the electronic apparatus 1 in other embodiments, such as a plug-in hard disk provided on the electronic apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic apparatus 1. The memory 11 is used for storing application software installed in the electronic device 1 and various types of data, such as program codes of the server distribution control system 10. The memory 11 may also be used to temporarily store data that has been output or is to be output.
Processor 12, which in some embodiments may be a Central Processing Unit (CPU), microprocessor or other data Processing chip, executes program code stored in memory 11 or processes data, such as executing server distribution control system 10.
The display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 13 is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface, such as a service customization interface or the like. The components 11-13 of the electronic device 1 communicate with each other via a system bus.
Please refer to fig. 5, which is a functional block diagram of the server distribution control system 10 according to a preferred embodiment of the present invention. In this embodiment, the server distribution control system 10 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to complete the present invention. For example, in fig. 5, the server distribution control system 10 may be divided into a first receiving module 101, a first distribution module 102, a second receiving module 103, and a second distribution module 104. The module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the server distribution control system 10 in the electronic device 1, wherein:
a first receiving module 101, configured to receive a first access request for an external system to call one or more associated systems inside an enterprise;
the enterprise internal system is connected with the enterprise external system through an external network, and a plurality of systems of the internal system communicate with each other through the internal network; the enterprise internal system comprises a plurality of servers, and the servers are in communication connection with the database; the multiple servers comprise one or more business systems (Apps) daily used by staff in the enterprise and one or more associated systems (Apps); and the client of the enterprise internal user accesses the service system or the associated system through the internal network login server. When an external system sends a first access request for calling the associated system in the enterprise to the internal system of the enterprise, the server distribution control system receives the first access request.
A first allocating module 102, configured to allocate, according to the number of first access requests received within a first preset time, a corresponding number of servers from a first server group to process the first access requests;
in this embodiment, a plurality of servers of the enterprise internal system are divided into a plurality of server groups including at least a first server group, a second server group, and a third server group; wherein the first access request is processed by a server in the first server group. The first preset time (for example, 5 seconds) is an interval duration of the server allocation control system performing the server allocation processing on the first access request, that is, the server allocation control system performs the server allocation processing on the first access request received in the time every first preset time. The server allocation control system allocates a corresponding number of servers from the first server group to process the received first access request according to the number of the received first access requests (namely the number of the first access requests to be processed) in first preset time and according to a corresponding allocation rule; the distribution server comprises an IP address and a port of a designated server. The allocation rule is, for example: when the number of the first access requests is less than or equal to a first preset threshold (for example, 30), allocating A number (for example, 1) of servers to process the first access requests; and after the number of the first access requests exceeds a first preset threshold value, every time the number of the first access requests is increased by a first increment (for example, 50 pieces), redistributing B number (for example, 2 servers) on the basis of the A number to process the first access requests.
The second receiving module 103 is configured to receive a second access request of a business system inside an enterprise requesting batch processing of data;
a second allocating module 104, configured to allocate a corresponding number of servers from a second server group to process the second access request according to the amount of batch data;
when a business system in an enterprise needs to process batch data, the business system sends a second access request for requesting the batch data to a server distribution control system, the server distribution system receives the second access request, analyzes the quantity of the batch data contained in the second access request, and distributes a corresponding quantity of servers from a second server according to the quantity of the batch data and a preset rule to process the second access request; the predetermined rule may be a predetermined mapping relationship or other rule algorithm.
Further, the server distribution control system 10 according to the present embodiment further includes:
a third receiving module 105, configured to receive a third access request that one or more associated systems inside the enterprise request to invoke an external system;
and a third allocating module 106, configured to allocate, according to the number of third access requests received in a second preset time, a corresponding number of servers from the third server group to process the third access request.
When one or more associated systems inside the enterprise request to call the external system, the associated systems send a third access request for calling the external system to the server distribution control system, and the server distribution control system receives the third access request. The second preset time (for example, 5 seconds) is the allocation processing interval duration of the server allocation control system to the third access request, that is, the server allocation control system allocates the server to the third access request received in the time every second preset time; the server distribution control system analyzes the number of the third access requests received in the second preset time, and distributes a corresponding number of servers according to the obtained number of the third access requests in a preset mode to process the third access requests; the preset mode may be a preset mapping relationship or other preset algorithms, and the like.
In this embodiment, since the receiving of the first access request, the second access request, and the third access request is determined by the sender of the access request, there is no sequence for receiving the first access request, the second access request, and the third access request.
Compared with the prior art, the scheme of the embodiment divides the servers in the enterprise system into a plurality of server groups, and allocates a corresponding number of servers to process the received different types of access requests respectively from the corresponding server groups, so that the processing of the access requests of various types cannot interfere with each other and influence each other, and the condition that the processing of other types of requests is influenced by the occurrence of abnormity of the servers in the process of processing certain types of requests is avoided.
Referring to fig. 6, in the server allocation control system of the present embodiment, the second allocation module 104 is replaced with a fourth allocation module 107;
a fourth allocating module 107, configured to allocate a corresponding number of servers from a second server group to process the second access request according to the scheduled execution time and the number of batch data in the second access request.
The second access request sent by the service system includes the number of the batch processing data and the scheduled execution time, wherein the scheduled execution time refers to the time required by the service system to complete the batch processing data. After receiving a second access request, a server allocation control system analyzes the quantity of batch processing data and the scheduled execution time in the second access request, and then calculates the quantity of the servers which need to be allocated at least according to the quantity of data which can be processed by a single server in the scheduled execution time; and finally, distributing a corresponding number of servers from a second server group to process the second access request according to the calculated number of the servers. For example, if the number of batch processing data in the second access request sent by the service system is 20000, the scheduled execution time is 10 seconds, and the speed of processing data by a single server is 600 per second, that is, a single server can process 6000 data within the scheduled execution time, it can be calculated that at least 4 servers need to be allocated to process the second access request if the 20000 data are processed within the scheduled execution time, and then the server allocation control system allocates 4 servers from the second server group to process the second access request.
According to the scheme of the embodiment, the server with the minimum number required to be distributed is obtained by calculation according to the quasi-execution time and the number of the batch-processed data, so that the server with the minimum number is distributed from the second server group to process the second access request on the premise that the number of the batch-processed data of the second access request can be completed in the quasi-execution time; therefore, more idle servers in the second server group can be used for processing the subsequent access requests, the situation that the servers for processing the subsequent access requests are insufficient due to the fact that the number of the servers allocated to a certain second access request is too large is reduced, and timeliness of processing of each access request is guaranteed.
Further, referring to fig. 6, in the server allocation control system of the present embodiment, the third allocation module 106 is replaced with a fifth allocation module 108;
in this embodiment, the data processing capability of the external system is the current concurrency capability (i.e., the number of connections that can be accessed simultaneously) of the external system. If the number of the third access requests received within the second preset time does not exceed the current concurrency capability of the external system, the server allocation control system allocates a corresponding number of servers from a third server group according to a preset allocation rule (for example, a mapping relation) to process the third access requests; and if the number of the received third access requests in a second preset time exceeds the current concurrency capability of the external system, dividing the received third access requests into multiple batches by the server allocation control system according to the current concurrency capability of the external system, and sequentially performing server allocation processing, wherein the number of the third access requests in each batch does not exceed the current concurrency capability of the external system.
Further, the server allocation control system of the present embodiment further includes:
and the feedback module is used for feeding back the relevant information of the distributed server to the corresponding access request party and feeding back the processing result of each access request to the corresponding access request party.
After the server distribution control system distributes the servers for each access request, the relevant information of the distributed servers is fed back to the corresponding access request party; the relevant information of the server comprises an IP address and port information. And after each server finishes processing the corresponding access request, each server sends the corresponding processing result to the server distribution control system, and the server distribution control system feeds the processing result back to the corresponding access requester after receiving the processing result of each server.
Referring to fig. 7, the server allocation control system of the present embodiment further includes:
the dividing module 109 is configured to acquire an idle server in real time, and divide the acquired idle server into a plurality of server groups including at least a first server group, a second server group, and a third server group according to a preset rule.
Since the distribution of the number of various types of access requests changes with time, there may be a particularly large number of first access requests, a particularly large number of data volumes of batch data in some time periods, and a particularly large number of third access requests in some time periods. When the number of certain types of access requests (e.g., the first access request or the third access request) in a certain time period is particularly large, and other types of access requests are particularly small or relatively small, then the usage rate of the servers in the server group corresponding to the access requests with particularly large number is very large, and it may happen that the processing progress and efficiency of the type of access request are affected by insufficient servers; however, at this time, the remaining types of access requests have a smaller number and have more idle servers in the corresponding server group, so that the server resources are not allocated and used most efficiently. In order to improve the situation, in the embodiment, an idle server is acquired in real time, and the acquired server is divided into a plurality of server groups at least including a first server group, a second server group and a third server group according to a preset rule; therefore, when a certain type of access request is particularly large in quantity and a large number of servers in the server group corresponding to the type of access request are used, the server allocation control system acquires idle servers in the other server groups and re-divides the server groups according to the preset rule, parts of the acquired idle servers are divided into the server groups corresponding to the access requests with the particularly large quantity, and it is guaranteed that the server groups corresponding to the access requests with the particularly large quantity have enough servers to process the type of access request. In this embodiment, the preset rule may be an average allocation rule, or an allocation according to a preset proportion, or another rule.
In the embodiment, the number of idle servers in each server group is divided through dynamic adjustment, so that the utilization rate of the servers is the maximum, the situation that a certain server group does not have enough servers for allocation processing in the peak period of the corresponding access request is avoided, and the processing efficiency of various types of requests is ensured.
The present invention also provides a computer-readable storage medium storing a server allocation control system executable by at least one processor to cause the at least one processor to perform the server allocation control method in any of the above embodiments.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An electronic device comprising a memory, a processor, and a server allocation control system stored on the memory and operable on the processor, the server allocation control system when executed by the processor implementing the steps of:
A. receiving a first access request of an external system for calling one or more associated systems inside an enterprise;
B. distributing a corresponding number of servers from a first server group to process a first access request according to the number of the first access requests received in a first preset time;
C. receiving a second access request of a business system inside an enterprise for requesting batch processing of data;
D. distributing a corresponding number of servers from a second server group to process the second access request according to the number of batch data in the second access request;
E. receiving one or more associated system requests inside the enterprise to call a third access request of an external system;
F. and distributing a corresponding number of servers from the third server group to process the third access request according to the number of the third access requests received in the second preset time.
2. The electronic device of claim 1, wherein the step F is replaced by:
and distributing a corresponding number of servers from a third server group to process the third access request according to the number of the third access requests received in a second preset time and by combining the data processing capacity of the external system.
3. The electronic device of claim 1, wherein the step D is replaced with:
and distributing a corresponding number of servers from a second server group to process the second access request according to the scheduled time and the number of the batch data in the second access request.
4. The electronic device of any of claims 1-3, wherein the processor is further operable to execute the server distribution control system to perform the steps of:
the method comprises the steps of acquiring an idle server in real time, and dividing the acquired idle server into a plurality of server groups at least comprising a first server group, a second server group and a third server group according to a preset rule.
5. A server allocation control method, characterized in that the method comprises the steps of:
A. receiving a first access request of an external system for calling one or more associated systems inside an enterprise;
B. distributing a corresponding number of servers from a first server group to process a first access request according to the number of the first access requests received in a first preset time;
C. receiving a second access request of a business system inside an enterprise for requesting batch processing of data;
D. distributing a corresponding number of servers from a second server group to process the second access request according to the number of batch data in the second access request;
E. receiving one or more associated system requests inside the enterprise to call a third access request of an external system;
F. and distributing a corresponding number of servers from the third server group to process the third access request according to the number of the third access requests received in the second preset time.
6. The server allocation control method according to claim 5, wherein said step F is replaced with:
and distributing a corresponding number of servers from a third server group to process the third access request according to the number of the third access requests received in a second preset time and by combining the data processing capacity of the external system.
7. The server allocation control method according to claim 5, wherein said step D is replaced with:
and distributing a corresponding number of servers from a second server group to process the second access request according to the scheduled time and the number of the batch data in the second access request.
8. A computer-readable storage medium storing a server allocation control system executable by at least one processor to cause the at least one processor to perform the server allocation control method of any one of claims 5-7.
CN201710658107.9A 2017-08-04 2017-08-04 Electronic device, server allocation control method, and computer-readable storage medium Active CN107682391B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710658107.9A CN107682391B (en) 2017-08-04 2017-08-04 Electronic device, server allocation control method, and computer-readable storage medium
PCT/CN2017/105028 WO2019024235A1 (en) 2017-08-04 2017-09-30 Electronic device, server allocation control method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710658107.9A CN107682391B (en) 2017-08-04 2017-08-04 Electronic device, server allocation control method, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107682391A CN107682391A (en) 2018-02-09
CN107682391B true CN107682391B (en) 2020-06-30

Family

ID=61135314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710658107.9A Active CN107682391B (en) 2017-08-04 2017-08-04 Electronic device, server allocation control method, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN107682391B (en)
WO (1) WO2019024235A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246071A (en) * 2018-06-28 2019-01-18 平安科技(深圳)有限公司 Method for processing business, calls management system and transaction processing system at operation system
CN111669294B (en) * 2020-06-22 2023-06-30 南方电网数字电网研究院有限公司 Monitoring system configuration method, device, monitoring system and storage medium
CN112068956A (en) * 2020-08-24 2020-12-11 北京首汽智行科技有限公司 Load balancing method based on redis cache and server
CN112596899A (en) * 2020-12-18 2021-04-02 江苏省苏力环境科技有限责任公司 Pollution source online monitoring concurrent data processing method, system and storage medium
CN114500661A (en) * 2021-12-22 2022-05-13 新奥新智科技有限公司 Current limiting device, method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516536A (en) * 2012-06-26 2014-01-15 重庆新媒农信科技有限公司 Server service request parallel processing method based on thread number limit and system thereof
CN105930216A (en) * 2016-04-15 2016-09-07 平安科技(深圳)有限公司 Automatic scheduling method and system for electronic signature system and server
CN106453641A (en) * 2016-11-24 2017-02-22 深圳市小满科技有限公司 Dynamic enterprise cloud service platform expansion method, device and system
CN106550003A (en) * 2015-09-23 2017-03-29 腾讯科技(深圳)有限公司 The control method of load balancing, apparatus and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6950847B2 (en) * 2001-07-12 2005-09-27 Sun Microsystems, Inc. Service provider system for delivering services in a distributed computing environment
CN103581273B (en) * 2012-08-08 2017-06-06 阿里巴巴集团控股有限公司 A kind of distributed system performs method, the apparatus and system of business
CN105553724A (en) * 2015-12-17 2016-05-04 北京奇虎科技有限公司 Method and device for processing data request and obtaining server information
CN106294261A (en) * 2016-08-22 2017-01-04 贵州电网有限责任公司电力科学研究院 A kind of server architecture of high-performance real-time response

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516536A (en) * 2012-06-26 2014-01-15 重庆新媒农信科技有限公司 Server service request parallel processing method based on thread number limit and system thereof
CN106550003A (en) * 2015-09-23 2017-03-29 腾讯科技(深圳)有限公司 The control method of load balancing, apparatus and system
CN105930216A (en) * 2016-04-15 2016-09-07 平安科技(深圳)有限公司 Automatic scheduling method and system for electronic signature system and server
CN106453641A (en) * 2016-11-24 2017-02-22 深圳市小满科技有限公司 Dynamic enterprise cloud service platform expansion method, device and system

Also Published As

Publication number Publication date
CN107682391A (en) 2018-02-09
WO2019024235A1 (en) 2019-02-07

Similar Documents

Publication Publication Date Title
CN107682391B (en) Electronic device, server allocation control method, and computer-readable storage medium
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN108848039B (en) Server, message distribution method and storage medium
CN107688492B (en) Resource control method and device and cluster resource management system
CN108762931A (en) Method for scheduling task, server based on distributed scheduling system and storage medium
CN111813513A (en) Real-time task scheduling method, device, equipment and medium based on distribution
US8381216B2 (en) Dynamic thread pool management
US8005950B1 (en) Application server scalability through runtime restrictions enforcement in a distributed application execution system
US9106483B2 (en) Systems and methods for serving applications in an application server environment
CN109074281B (en) Method and device for distributing graphics processor tasks
CN109376011B (en) Method and device for managing resources in virtualization system
CN109960575B (en) Computing capacity sharing method, system and related equipment
US20220357990A1 (en) Method for allocating data processing tasks, electronic device, and storage medium
WO2019006907A1 (en) Systems and methods for allocating computing resources in distributed computing
WO2016061935A1 (en) Resource scheduling method, device and computer storage medium
CN114155026A (en) Resource allocation method, device, server and storage medium
CN111488206A (en) Deep learning task scheduling method, system, terminal and storage medium
WO2008085324A1 (en) Assigning tasks to threads requiring limited resources using programmable queues
CN112860387A (en) Distributed task scheduling method and device, computer equipment and storage medium
CN108833505B (en) Data request processing method, server and storage medium
CN115640113A (en) Multi-plane flexible scheduling method
WO2022142008A1 (en) Data processing method and apparatus, electronic device, and storage medium
CN111858035A (en) FPGA equipment allocation method, device, equipment and storage medium
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN107689979B (en) method and equipment for processing download request

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
GR01 Patent grant
GR01 Patent grant