CN112035260A - Service request processing method and device, computer equipment and storage medium - Google Patents

Service request processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112035260A
CN112035260A CN202010914745.4A CN202010914745A CN112035260A CN 112035260 A CN112035260 A CN 112035260A CN 202010914745 A CN202010914745 A CN 202010914745A CN 112035260 A CN112035260 A CN 112035260A
Authority
CN
China
Prior art keywords
server
information
service request
sub
processing
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.)
Granted
Application number
CN202010914745.4A
Other languages
Chinese (zh)
Other versions
CN112035260B (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 E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202010914745.4A priority Critical patent/CN112035260B/en
Publication of CN112035260A publication Critical patent/CN112035260A/en
Application granted granted Critical
Publication of CN112035260B publication Critical patent/CN112035260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 invention discloses a service request processing method, a service request processing device, computer equipment and a storage medium. The method comprises the following steps: determining a configured target gateway corresponding to a service request from a client according to a gateway information table, verifying the service request according to a gateway configuration model of the target gateway, if the verification is passed, determining effective server information corresponding to the service request according to a registry, sending the service request to a sub-server in a cluster server according to the effective server information for processing, acquiring processing information and sending the processing information to the client. The load allocation technology based on the cluster service belongs to the field of cloud computing, can acquire the information of the currently available sub-servers as effective server information according to the service state of the sub-servers in the registry, ensures that the processing request can be processed timely and effectively, can avoid extruding abnormal data which cannot be processed normally in the cluster server, and improves the efficiency and timeliness of processing the service request.

Description

Service request processing method and device, computer equipment and storage medium
Technical Field
The invention relates to the field of load allocation of cluster services, belongs to an application scene of service request processing in a smart city, and particularly relates to a service request processing method and device, computer equipment and a storage medium.
Background
The cluster server can be used for processing service requests from mass clients, a single server cannot meet the increasing service requests, so that a many-to-many mode of the clients and the server is convenient to operate and becomes a current mainstream mode. If a sub-server in the cluster server is abnormal and cannot provide service, or if a sub-server needs to be updated and cannot provide service, part of the service requests may be processed and cannot be processed, which may cause a large amount of abnormal data that cannot be processed normally to be accumulated in the cluster server, and cause the cluster server to be stuck due to insufficient resource allocation, thereby affecting the efficiency and timeliness of the cluster server in processing the service requests. Therefore, the problem that the service request is sent to the abnormal sub-server in the cluster server and cannot be effectively processed exists in the prior art method.
Disclosure of Invention
The embodiment of the invention provides a service request processing method, a service request processing device, computer equipment and a storage medium, and aims to solve the problem that a service request in the prior art is sent to an abnormal sub-server in a cluster server and cannot be effectively processed.
In a first aspect, an embodiment of the present invention provides a service request processing method, which includes:
if a service request from the client is received, determining a target gateway which is configured in the management server and corresponds to the service request according to a preset gateway information table;
verifying the service request according to the gateway information configured by the target gateway to obtain a verification result of whether the verification is passed;
if the verification result is passed, determining effective server information corresponding to the service request according to a preset registry;
sending the service request to one sub-server in the cluster server according to the effective server information so as to obtain processing information obtained after the sub-server processes the service request;
and sending the processing information to the client.
In a second aspect, an embodiment of the present invention provides a service request processing apparatus, including:
a target gateway obtaining unit, configured to determine, according to a preset gateway information table, a target gateway corresponding to the service request, where the target gateway is configured in the management server, if the service request is received from the client;
a verification result obtaining unit, configured to verify the service request according to the gateway information configured by the target gateway to obtain a verification result indicating whether the service request passes the verification;
the effective server information acquisition unit is used for determining effective server information corresponding to the service request according to a preset registry if the verification result is that the effective server information passes;
the processing information acquisition unit is used for sending the service request to one sub-server in the cluster server according to the effective server information so as to acquire processing information obtained after the sub-server processes the service request;
and the processing information sending unit is used for sending the processing information to the client.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the service request processing method according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the service request processing method according to the first aspect.
The embodiment of the invention provides a service request processing method and device, computer equipment and a storage medium. Determining a configured target gateway corresponding to a service request from a client according to a gateway information table, verifying the service request according to a gateway configuration model of the target gateway, if the verification is passed, determining effective server information corresponding to the service request according to a registry, sending the service request to a sub-server in a cluster server according to the effective server information for processing, acquiring processing information and sending the processing information to the client. By the method, the currently available information of the sub-server can be obtained as effective server information according to the service state of the sub-server in the registry, the processing request can be timely and effectively processed, abnormal data which cannot be normally processed can be prevented from being extruded in the cluster server, and the efficiency and timeliness of processing the service request are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a service request processing method according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of a service request processing method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow diagram of a service request processing method according to an embodiment of the present invention;
fig. 4 is another sub-flow diagram of a service request processing method according to an embodiment of the present invention;
fig. 5 is another schematic flow chart of a service request processing method according to an embodiment of the present invention;
fig. 6 is another schematic flow chart of a service request processing method according to an embodiment of the present invention;
fig. 7 is another flowchart illustrating a service request processing method according to an embodiment of the present invention;
fig. 8 is a schematic sub-flow chart of a service request processing method according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a service request processing apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1-2, fig. 1 is a schematic flowchart of a service request processing method according to an embodiment of the present invention, and fig. 2 is a schematic application scenario diagram of the service request processing method according to the embodiment of the present invention, where the service request processing method is applied to a management server 10, the method is executed by application software installed in the management server 10, and a client 20 and a cluster server 30 realize transmission of data information by establishing a network connection with the management server 10. The management server 10 is a server side for executing a service request processing method to perform a service request from the client 20 and allocate sub-servers to the service request, the client 20 is a terminal device, such as a desktop computer, a notebook computer, a tablet computer, or a mobile phone, for sending the service request to the management server 10, the cluster server 30 is a server for receiving the service request allocated by the management server 10 and feeding back corresponding processing information after actually processing the service request, and the cluster server 30 is obtained by combining a plurality of sub-servers. Fig. 2 shows only one client 20 transmitting information to the management server 10, but in practical applications, the management server 10 may transmit information to a plurality of clients 20 at the same time. As shown in fig. 1, the method includes steps S110 to S150.
S110, if a service request from the client is received, determining a target gateway which is configured in the management server and corresponds to the service request according to a preset gateway information table.
And if a service request from the client is received, determining a target gateway which is configured in the management server and corresponds to the service request according to a preset gateway information table. The service request is request information which is sent by the client and needs to be processed, and the service request comprises a request source address, domain name information, API information, a service type, interface address information and service information to be processed; the request source address is the internet protocol address of the client; the domain name information is network domain name information corresponding to the management server, the time domain name information transmitted by the service request through the Internet can be used as a positioning identifier of the management server, and one management server can correspond to one or more domain name information; API (application Programming interface) information is application program interface information, the API information is information for identifying an application program interface of a service request, and one service request only comprises one application program interface; the service types are information for identifying the specific types of the service requests, the management server can receive the service requests of various service types and perform classification processing, and one service request comprises one service type; the interface address information is address information corresponding to a specific service interface for processing the service request, and the interface address information may include address information corresponding to one or more service interfaces. And a plurality of gateways for performing access control on the service request are also configured, the gateways can judge whether the service request meets the access control authority, and the service request can be forwarded to the corresponding gateways for subsequent processing through nginx equipment configured in the management server.
Specifically, each gateway configured in the management server corresponds to one application program interface, and one gateway corresponding to the application program interface in the API information can be used as a target gateway corresponding to the service request according to the API information in the service request.
S120, verifying the service request according to the gateway information configured by the target gateway to obtain a verification result of whether the verification is passed.
And verifying the service request according to the gateway information configured by the target gateway to obtain a verification result of whether the verification is passed. Specifically, the gateway information includes a source address blacklist and role matching authority information; the source address blacklist is a blacklist which is stored in the gateway information in advance and used for filtering the request source address, and if the source address blacklist contains a certain request source address, the service request corresponding to the request source address cannot be processed. The service request also includes client role information, i.e. information for describing the client role sending the service request, and the role authority information is information for recording the authority of various roles, and can judge whether the client role information in the service request has corresponding authority according to the role authority information. If the request source address is not contained in the source address blacklist and the client role information has corresponding authority, the obtained verification result is that the verification is passed; and if the request source address is contained in the source address blacklist or the client role information does not have corresponding authority, the obtained verification result is that the verification is not passed.
In an embodiment, as shown in fig. 3, step S120 includes sub-steps S121, S122 and S123.
S121, judging whether the request source address of the service request is contained in the source address blacklist or not.
And judging whether the request source address of the service request is contained in the source address blacklist or not. Specifically, a plurality of invalid source addresses are recorded in the source address blacklist, whether the request source address is the same as any invalid source address in the source address blacklist or not can be sequentially judged, and if the request source address is the same as any invalid source address in the source address blacklist, the request source address is contained in the source address blacklist, and a verification result that the verification cannot be passed is obtained; otherwise, the request source address is not contained in the source address blacklist, and the subsequent judgment process is continued.
And S122, if the request source address is not contained in the source address blacklist, judging whether the client role information has the authority or not according to the role authority information.
And if the request source address is not contained in the source address blacklist, judging whether the client role information has the authority according to the role authority information. Specifically, the role authority information includes multiple roles, and information whether each role has a corresponding authority; for example, roles of a general client, a VIP client, a new client, and the like, and whether a service request sent by each role has a right to be processed through the target gateway may be included in the role right information. The role matched with the client role information in the role permission information can be obtained, whether the permission of the role is 'yes' is judged, and if the permission of the role is 'yes', the client role information has corresponding permission; otherwise, the client role information does not have corresponding authority, and a verification result that the verification fails is obtained.
And S123, if the client role information has the authority, the verification result is that the verification is passed.
And if the client role information has the authority, the verification result is that the verification is passed. And if the client role is judged to have the corresponding authority according to the steps, the obtained verification result is verification passing.
And S130, if the verification result is that the service request passes, determining effective server information corresponding to the service request according to a preset registry.
And if the verification result is that the server passes, determining effective server information corresponding to the service request according to a preset registry. The registry is a data table which is pre-stored in the management server and used for recording the registration information of each sub-server in the cluster server, the registry comprises information such as type information, throughput, processing delay, service state and cluster address of each sub-server, effective server information corresponding to the service request can be determined according to the registry, and the effective server information can comprise the cluster address of one or more sub-servers. Specifically, the type information is a specific service type of the service request that can be processed by each sub-server; each sub-server can only exclusively process one service type, the throughput is the quantity information of the service requests currently processed by the sub-server, and the throughput can be used for quantitatively expressing the busyness degree of the sub-server; the processing delay is delay time for information interaction between the sub-server and the management server, generally, milliseconds (ms) are used as a unit, and the processing delay can be used for reflecting the information interaction condition between the sub-server and the management server; the service state is the state information of whether the sub-server can provide the service currently, and if the service state of the sub-server is unavailable, the sub-server cannot provide the service.
In an embodiment, as shown in fig. 4, step S130 includes sub-steps S131, S132, and S133.
S131, obtaining server information matched with the service type of the service request according to the registry, wherein the server information comprises information of a plurality of sub-servers.
And acquiring the server information matched with the service type of the service request according to the registry. The server information includes information of a plurality of sub-servers. The registry comprises specific information of each sub-server in the cluster server, and information of the sub-server matched with the service type of the service request in the registry can be obtained according to the type information of each sub-server in the registry to obtain server information.
S132, screening the server information according to the throughput and the processing delay of the sub-servers contained in the server information to obtain the preferred sub-servers meeting the preset conditions.
And screening the server information according to the throughput and the processing delay of the sub-servers contained in the server information to obtain the preferred sub-servers meeting the preset conditions. The sub-servers in the server information can be further screened according to the throughput and the processing delay of all the sub-servers in the server information, specifically, the average value of the throughput and the average value of the processing delay of all the sub-servers in the server information can be obtained, the sub-servers in the server information, of which the throughput is smaller than the average value of the throughput and the processing delay is smaller than the average value of the processing delay, are obtained and serve as the preferred sub-servers, and through the screening process, the sub-servers with larger throughput and larger processing delay are screened.
S133, determining whether the service status of each preferred sub-server is available, so as to obtain information of the preferred sub-server whose service status is available as the valid server information.
And judging whether the service state of each preferred sub-server is available or not so as to acquire the information of the preferred sub-server with the available service state as the effective server information. The service state is state information of whether the sub-server can provide service currently, if the service state is available, the sub-server is an effective server capable of providing service, if the service state is unavailable, the sub-server is an invalid server incapable of providing service, all the sub-servers included in the effective server information are sub-servers with available service states, and the effective server information includes the sub-servers and information related to the sub-servers, such as type information, throughput, processing delay, service state, cluster address and the like. In a specific use process, if an administrator of the cluster server needs to perform maintenance operations such as updating and restarting on the sub-server, the sub-server cannot provide services at this time, and the service state of the sub-server in the registry is unavailable.
In an embodiment, as shown in fig. 5, step S130 further includes: s1310.
S1310, sending a registration request to the cluster server according to a preset update cycle, so as to update the registry according to the registration information fed back by each sub-server in the cluster server.
And sending a registration request to the cluster server according to a preset update period so as to update the registry according to the registration information fed back by each sub-server in the cluster server. In order to ensure that the information in the registry is updated, a registration request may be sent to each sub-server in the cluster server according to an update period, and the sending time of the registration request is recorded, after the sub-server receives the registration request, the sub-server feeds back corresponding registration information according to the registration request, and the management server updates the registry according to the registration information fed back by each sub-server, for example, the update period may be 1s or 300 ms. Specifically, the fed back registration information includes throughput and service state, and the time for each sub-server to feed back the registration information is recorded, if the sub-server is in the process of maintenance operations such as updating and restarting, the fed back service state is unavailable, otherwise, the fed back service state is available; and acquiring the time difference between the sending of the registration request and the acquisition of the registration information to obtain the processing delay corresponding to each sub-server. And updating the throughput and the service state corresponding to the sub-server in the registry according to the throughput and the service state in the registration information fed back by the sub-server, and updating the corresponding processing delay in the registry according to the calculated processing delay corresponding to the sub-server, so as to obtain the updated registry.
In an embodiment, as shown in fig. 6, after step S1310, the method further includes: s1320.
S1320, if the registration rejection information from the cluster server is received, rejecting the information of the corresponding sub-server from the registry according to the registration rejection information.
And if registration rejection information from any sub-server is received, rejecting the information of the sub-server from the registry according to the registration rejection information. When the service of any sub-server is closed, the sub-server sends registration rejection information to the management server, the management server rejects the information of the sub-server from the registry according to the registration rejection information, and the registry does not have the information of the sub-server when the registry is updated and used. If the service of the sub-server is re-enabled, the sub-server may send registration addition information to the management server to re-add the information of the sub-server in the registry.
In an embodiment, as shown in fig. 7, after step S130, the method further includes: s1301 and S1302.
S1301, judging whether the number of the sub servers contained in the effective server information is zero or not; s1302, if the number of the sub servers included in the valid server information is zero, sending a prompt message that the service request cannot be processed to the client; if the number of the sub-servers included in the effective server information is not zero, the step of sending the service request to one sub-server in the cluster server according to the effective server information is executed, that is, the subsequent step S140 is executed.
The obtained effective server information may include information of one or more sub-servers, and the number of sub-servers may also be zero, after the effective server information is obtained, it may be determined whether the number of sub-servers therein is zero, and if the number is zero, it indicates that the cluster server cannot process the service request from the client, and may send a prompt message that cannot process the service request to the client; if the number of the sub-servers included in the valid server information is not zero, it indicates that the cluster server can process the service request from the client at this time, and the subsequent processing steps can be executed.
S140, the service request is sent to one sub-server in the cluster server according to the effective server information so as to obtain processing information obtained after the sub-server processes the service request.
And sending the service request to one sub-server in the cluster server according to the effective server information so as to obtain processing information obtained after the sub-server processes the service request. Specifically, a cluster address of one sub-server is selected from the effective server information as a target cluster address, the service request is sent to a sub-server corresponding to the target cluster address in the cluster server, the service request can be processed through the sub-server corresponding to the target cluster address, and the sub-server feeds back corresponding processing information to the management server after completing processing of the service request.
In one embodiment, as shown in fig. 8, step S140 includes the sub-steps of: s141 and S142.
S141, sorting the sub servers according to the throughput and the processing delay of each sub server in the effective server information to obtain a sorting result; s142, sending the service request to an optimal sub-server according to the sequencing result.
The sub-servers included in the effective server information can be sorted according to the throughput and the processing delay of the sub-servers, and the cluster address of the optimal sub-server is selected as the target cluster address according to the sorting result. Specifically, the throughput of each sub-server can be added to the processing delay, the added value is used as a basis for sorting the sub-servers in the effective server information, and the smaller the value is, the earlier the sorting is, the corresponding sorting result is obtained; the method can also multiply a preset first weighted value and throughput, add the result obtained by multiplying a second weighted value and processing delay, and use the value obtained by adding as a basis for sequencing the sub-servers in the effective server information, wherein the smaller the value, the earlier the sequencing is, and the corresponding sequencing result is obtained.
In addition, the cluster address of one sub-server can be randomly selected from the effective server information to serve as the target cluster address.
S150, sending the processing information to the client.
And sending the processing information to the client. And after receiving the processing information from the cluster server, the management server sends the processing information to the client corresponding to the service request, so that the processing process of the service request can be completed.
The technical method can be applied to application scenes including service request processing, such as intelligent government affairs, intelligent city management, intelligent community, intelligent security, intelligent logistics, intelligent medical treatment, intelligent education, intelligent environmental protection and intelligent traffic, so that the construction of the intelligent city is promoted.
In the service request processing method provided by the embodiment of the invention, the configured target gateway corresponding to the service request from the client is determined according to the gateway information table, the service request is verified according to the gateway configured by the target gateway, if the verification is passed, the effective server information corresponding to the service request is determined according to the registry, the service request is sent to one sub-server in the cluster server according to the effective server information for processing, and the processing information is obtained and sent to the client. By the method, the currently available information of the sub-server can be obtained as effective server information according to the service state of the sub-server in the registry, the processing request can be timely and effectively processed, abnormal data which cannot be normally processed can be prevented from being extruded in the cluster server, and the efficiency and timeliness of processing the service request are improved.
An embodiment of the present invention further provides a service request processing apparatus, where the service request processing apparatus is configured to execute any embodiment of the foregoing service request processing method. Specifically, referring to fig. 9, fig. 9 is a schematic block diagram of a service request processing apparatus according to an embodiment of the present invention. The service request processing device may be configured in the management server 10.
As shown in fig. 9, the service request processing apparatus 100 includes a target gateway acquisition unit 110, an authentication result acquisition unit 120, a valid server information acquisition unit 130, a processing information acquisition unit 140, and a processing information transmission unit 150.
A target gateway obtaining unit 110, configured to, if a service request from the client is received, determine a target gateway corresponding to the service request and configured in the management server according to a preset gateway information table.
A verification result obtaining unit 120, configured to verify the service request according to the gateway information configured by the target gateway to obtain a verification result indicating whether the service request passes the verification.
In one embodiment, the verification result obtaining unit 120 includes sub-units: a request source address judging unit, a role authority judging unit and a result acquiring unit.
A request source address judging unit, configured to judge whether a request source address of the service request is included in the source address blacklist; the role permission judging unit is used for judging whether the client role information has permission or not according to the role permission information if the request source address is not contained in the source address blacklist; and the result acquisition unit is used for judging that the verification result is verification pass if the client role information has the authority.
And an effective server information obtaining unit 130, configured to determine, according to a preset registry, effective server information corresponding to the service request if the verification result is that the service request passes.
In one embodiment, the valid server information obtaining unit 130 includes sub-units: the system comprises a server information acquisition unit, a preferred sub-server acquisition unit and a service state judgment unit.
A server information obtaining unit, configured to obtain, according to the registry, server information that matches a service type of the service request, where the server information includes information of a plurality of sub servers; a preferred sub-server obtaining unit, configured to filter, according to the throughput and the processing delay of the sub-server included in the server information, a preferred sub-server that meets a preset condition from the server information; and the service state judging unit is used for judging whether the service state of each optimized sub-server is available or not so as to acquire the information of the optimized sub-server with the available service state as the effective server information.
In an embodiment, the service request processing apparatus 100 further includes a sub-unit: and a registry updating unit.
And the registry updating unit is used for sending a registration request to the cluster server according to a preset updating period so as to update the registry according to the registration information fed back by each sub-server in the cluster server.
In an embodiment, the service request processing apparatus 100 further includes a sub-unit: and an information removing unit.
And the information removing unit is used for removing the information of the corresponding sub-server from the registry according to the registration removing information if the registration removing information from the cluster server is received.
In an embodiment, the service request processing apparatus 100 further includes a sub-unit: a server number judging unit and a prompt information sending unit.
A server number judgment unit configured to judge whether the number of child servers included in the valid server information is zero; a prompt information sending unit, configured to send, to the client, prompt information that the service request cannot be processed if the number of the sub servers included in the valid server information is zero; if the number of the sub-servers included in the effective server information is not zero, the step of sending the service request to one sub-server in the cluster server according to the effective server information is executed, that is, the step corresponding to the processing information obtaining unit 140 is executed.
A processing information obtaining unit 140, configured to send the service request to a sub-server in the cluster server according to the valid server information, so as to obtain processing information obtained after the sub-server processes the service request.
In one embodiment, the processing information obtaining unit 140 includes sub-units: a sequencing result acquisition unit and a service request sending unit.
A sorting result obtaining unit, configured to sort the sub servers according to throughput and processing delay of each sub server in the valid server information to obtain a sorting result; and the service request sending unit is used for sending the service request to an optimal sub-server according to the sequencing result.
A processing information sending unit 150, configured to send the processing information to the client.
The service request processing device provided by the embodiment of the invention applies the service request processing method, determines a configured target gateway corresponding to a service request from a client according to a gateway information table, verifies the service request according to a gateway model configured by the target gateway, determines effective server information corresponding to the service request according to a registry if the verification is passed, sends the service request to one sub-server in a cluster server according to the effective server information for processing, acquires processing information and sends the processing information to the client. By the method, the currently available information of the sub-server can be obtained as effective server information according to the service state of the sub-server in the registry, the processing request can be timely and effectively processed, abnormal data which cannot be normally processed can be prevented from being extruded in the cluster server, and the efficiency and timeliness of processing the service request are improved.
The service request processing means described above may be implemented in the form of a computer program which may be run on a computer device as shown in fig. 10.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be a management server 10 for executing the service request processing method to perform service request processing.
Referring to fig. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a service request processing method.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute the service request processing method.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 10 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory to implement the corresponding functions in the service request processing method.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 10 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 10, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps included in the service request processing method described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A service request processing method is applied to a management server, the management server is communicated with a cluster server and at least one client, and the method is characterized by comprising the following steps:
if a service request from the client is received, determining a target gateway which is configured in the management server and corresponds to the service request according to a preset gateway information table;
verifying the service request according to the gateway information configured by the target gateway to obtain a verification result of whether the verification is passed;
if the verification result is passed, determining effective server information corresponding to the service request according to a preset registry;
sending the service request to one sub-server in the cluster server according to the effective server information so as to obtain processing information obtained after the sub-server processes the service request;
and sending the processing information to the client.
2. The method of claim 1, wherein the gateway information includes a source address blacklist and role matching authority information, and the verifying the service request according to the gateway information configured by the target gateway to obtain a verification result indicating whether the service request is verified includes:
judging whether a request source address of the service request is contained in the source address blacklist or not;
if the request source address is not contained in the source address blacklist, judging whether the client role information has the authority or not according to the role authority information;
and if the client role information has the authority, the verification result is that the verification is passed.
3. The method according to claim 1, wherein the determining valid server information corresponding to the service request according to a preset registry comprises:
acquiring server information matched with the service type of the service request according to the registry, wherein the server information comprises information of a plurality of sub-servers;
screening the server information according to the throughput and the processing delay of the sub-servers contained in the server information to obtain a preferred sub-server meeting a preset condition;
and judging whether the service state of each preferred sub-server is available or not so as to acquire the information of the preferred sub-server with the available service state as the effective server information.
4. The service request processing method according to claim 1, further comprising:
and sending a registration request to the cluster server according to a preset update period so as to update the registry according to the registration information fed back by each sub-server in the cluster server.
5. The service request processing method according to claim 1, further comprising:
judging whether the number of the sub servers contained in the effective server information is zero or not;
if the number of the sub servers contained in the effective server information is zero, sending prompt information incapable of processing the service request to the client;
and if the number of the sub-servers contained in the effective server information is not zero, executing the step of sending the service request to one sub-server in the cluster server according to the effective server information.
6. The method according to claim 4, wherein after the step of sending a registration request to the cluster server according to a preset update cycle to update the registry according to the registration information fed back by each sub-server in the cluster server, the method further comprises:
and if the registration rejection information from the cluster server is received, rejecting the information of the corresponding sub-server from the registry according to the registration rejection information.
7. The method of claim 3, wherein the sending the service request to a sub-server in the cluster server according to the valid server information comprises:
sorting the sub-servers according to the throughput and the processing delay of each sub-server in the effective server information to obtain a sorting result;
and sending the service request to an optimal sub-server according to the sequencing result.
8. A service request processing apparatus, comprising:
a target gateway obtaining unit, configured to determine, according to a preset gateway information table, a target gateway corresponding to the service request, where the target gateway is configured in the management server, if the service request is received from the client;
a verification result obtaining unit, configured to verify the service request according to the gateway information configured by the target gateway to obtain a verification result indicating whether the service request passes the verification;
the effective server information acquisition unit is used for determining effective server information corresponding to the service request according to a preset registry if the verification result is that the effective server information passes;
the processing information acquisition unit is used for sending the service request to one sub-server in the cluster server according to the effective server information so as to acquire processing information obtained after the sub-server processes the service request;
and the processing information sending unit is used for sending the processing information to the client.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the service request processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to perform the service request processing method according to any one of claims 1 to 7.
CN202010914745.4A 2020-09-03 2020-09-03 Service request processing method, device, computer equipment and storage medium Active CN112035260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010914745.4A CN112035260B (en) 2020-09-03 2020-09-03 Service request processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010914745.4A CN112035260B (en) 2020-09-03 2020-09-03 Service request processing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112035260A true CN112035260A (en) 2020-12-04
CN112035260B CN112035260B (en) 2023-05-30

Family

ID=73591806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010914745.4A Active CN112035260B (en) 2020-09-03 2020-09-03 Service request processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112035260B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633867A (en) * 2020-12-30 2021-04-09 中国农业银行股份有限公司 Transaction request processing method and device
CN112994894A (en) * 2021-02-26 2021-06-18 中国工商银行股份有限公司 Single-thread request processing method and information verification AGENT based on gateway
CN113177179A (en) * 2021-04-30 2021-07-27 平安证券股份有限公司 Data request connection management method, device, equipment and storage medium
CN113448738A (en) * 2021-08-31 2021-09-28 成都派沃特科技股份有限公司 Method, device, equipment and storage medium for adjusting availability of server
CN113992742A (en) * 2021-09-17 2022-01-28 深圳云天励飞技术股份有限公司 Interface access method, device, equipment and storage medium
CN114697340A (en) * 2020-12-31 2022-07-01 深圳云天励飞技术股份有限公司 Registration scheduling method for multi-device access and related product thereof
CN114979133A (en) * 2022-04-13 2022-08-30 广东省电信规划设计院有限公司 Deployment method and device of converged communication cloud platform

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388839A (en) * 2007-07-20 2009-03-18 美国博通公司 Network communication method, machine readable memory and system
US20100017460A1 (en) * 2008-07-15 2010-01-21 International Business Machines Corporation Assymetric Dynamic Server Clustering with Inter-Cluster Workload Balancing
US20170041385A1 (en) * 2015-08-07 2017-02-09 International Business Machines Corporation Dynamic healthchecking load balancing gateway
CN107645508A (en) * 2017-10-16 2018-01-30 深圳市买买提乐购金融服务有限公司 A kind of data handling system, method, client and server
CN108769101A (en) * 2018-04-03 2018-11-06 北京奇艺世纪科技有限公司 A kind of information processing method, client and system
CN111131375A (en) * 2019-10-12 2020-05-08 平安普惠企业管理有限公司 Interface service acquisition method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388839A (en) * 2007-07-20 2009-03-18 美国博通公司 Network communication method, machine readable memory and system
US20100017460A1 (en) * 2008-07-15 2010-01-21 International Business Machines Corporation Assymetric Dynamic Server Clustering with Inter-Cluster Workload Balancing
US20170041385A1 (en) * 2015-08-07 2017-02-09 International Business Machines Corporation Dynamic healthchecking load balancing gateway
CN107645508A (en) * 2017-10-16 2018-01-30 深圳市买买提乐购金融服务有限公司 A kind of data handling system, method, client and server
CN108769101A (en) * 2018-04-03 2018-11-06 北京奇艺世纪科技有限公司 A kind of information processing method, client and system
CN111131375A (en) * 2019-10-12 2020-05-08 平安普惠企业管理有限公司 Interface service acquisition method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
(美)WILLIAM STALLINGS著: "《计算机网络与Internet协议和技术》", 31 August 2005 *
田丰等: "面向高并发服务请求的负载均衡技术研究", 中国民航大学学报 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633867A (en) * 2020-12-30 2021-04-09 中国农业银行股份有限公司 Transaction request processing method and device
CN114697340A (en) * 2020-12-31 2022-07-01 深圳云天励飞技术股份有限公司 Registration scheduling method for multi-device access and related product thereof
CN112994894A (en) * 2021-02-26 2021-06-18 中国工商银行股份有限公司 Single-thread request processing method and information verification AGENT based on gateway
CN112994894B (en) * 2021-02-26 2023-12-08 中国工商银行股份有限公司 Gateway-based single-thread request processing method and information verification AGENT
CN113177179A (en) * 2021-04-30 2021-07-27 平安证券股份有限公司 Data request connection management method, device, equipment and storage medium
CN113177179B (en) * 2021-04-30 2023-11-21 平安证券股份有限公司 Data request connection management method, device, equipment and storage medium
CN113448738A (en) * 2021-08-31 2021-09-28 成都派沃特科技股份有限公司 Method, device, equipment and storage medium for adjusting availability of server
CN113992742A (en) * 2021-09-17 2022-01-28 深圳云天励飞技术股份有限公司 Interface access method, device, equipment and storage medium
CN113992742B (en) * 2021-09-17 2023-10-10 深圳云天励飞技术股份有限公司 Interface access method, device, equipment and storage medium
CN114979133A (en) * 2022-04-13 2022-08-30 广东省电信规划设计院有限公司 Deployment method and device of converged communication cloud platform
CN114979133B (en) * 2022-04-13 2024-04-30 广东省电信规划设计院有限公司 Deployment method and device for converged communication cloud platform

Also Published As

Publication number Publication date
CN112035260B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN112035260B (en) Service request processing method, device, computer equipment and storage medium
CN112073320B (en) API (application program interface) gray level release method and device based on cloud gateway and computer equipment
EP3734913A1 (en) Communication method and communication apparatus
CN111385112B (en) Slice resource deployment method, device, slice manager and computer storage medium
CN111880852B (en) Operating system initialization method, system, computer device and storage medium
CN111711635B (en) Firewall wall opening method and device, computer equipment and storage medium
EP1956775A1 (en) Method and system for restricting access to an electronic message system
CN109586969A (en) Content distributing network disaster recovery method, device, computer equipment and storage medium
CN111367662A (en) Load balancing method, device and system
CN104717107A (en) Method, device and system for detecting network device
CN112953840A (en) Current limiting control method, gateway equipment and current limiting control system
CN108494843A (en) Dropbox space sharing method, device and equipment
CN114867025A (en) Method and device for preventing short message bombing
CN109597823B (en) Data source configuration method, device, computer equipment and storage medium
CN112751785B (en) Method and device for sending pending request, computer equipment and storage medium
CN113064906A (en) Binlog log data adaptive migration method and system
CN106230902B (en) A kind of modularization family cloud system and its control method
CN111131375B (en) Interface service acquisition method, device, computer equipment and storage medium
CN111639053A (en) Authorization file expiration alarm prompting method and device and computer equipment
CN115460075A (en) Multi-network mode implementation method, device, equipment and medium based on cloud-native
CN115002195B (en) Service registration discovery method, system and medium of self-adaptive peer-to-peer mode
CN106603743A (en) Broadcast request response method based on DHCP protocol customization, system and terminal thereof
CN113746942A (en) Information transceiving method, device, equipment and medium based on cluster message synchronization
CN114116219A (en) Data distribution balancing method and system and electronic equipment
CN111953794A (en) Group cheating and lending early warning method and device

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