CN114710501B - Service request processing method, device, server and computer readable storage medium - Google Patents

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

Info

Publication number
CN114710501B
CN114710501B CN202210598222.2A CN202210598222A CN114710501B CN 114710501 B CN114710501 B CN 114710501B CN 202210598222 A CN202210598222 A CN 202210598222A CN 114710501 B CN114710501 B CN 114710501B
Authority
CN
China
Prior art keywords
server
service request
target
data
servers
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
CN202210598222.2A
Other languages
Chinese (zh)
Other versions
CN114710501A (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.)
Wuhan Barda Technology Co ltd
Original Assignee
Wuhan Sitong Information Service 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 Wuhan Sitong Information Service Co ltd filed Critical Wuhan Sitong Information Service Co ltd
Priority to CN202210598222.2A priority Critical patent/CN114710501B/en
Publication of CN114710501A publication Critical patent/CN114710501A/en
Application granted granted Critical
Publication of CN114710501B publication Critical patent/CN114710501B/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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Abstract

The embodiment of the application provides a service request processing method, a service request processing device, a server and a computer readable storage medium, wherein the method comprises the following steps: deploying a plurality of first servers in a service processing system, receiving a service request through the first servers, and determines a target server from the plurality of second servers in the service processing system according to the user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server, processes the service request by using the target server, in this way, when allocating each service request, the first server considers not only the remaining performance data of the second server, but also the service type provided by the second server, the user information and the service type corresponding to the service request, each service request can be sent to the second server matched with the service request for final processing, the processing efficiency of the service request is improved, and the user experience is improved.

Description

Service request processing method, device, server and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a service request processing method, apparatus, server, and computer-readable storage medium.
Background
In the cloud service, when a request from a user side needs to be processed, the request is generally sent to a plurality of servers for processing in a polling manner, however, this manner is not effective in every environment for providing the cloud service, and if the request is processed in every environment in a polling manner, the processing efficiency is reduced.
Disclosure of Invention
The embodiment of the application provides a service request processing method, a service request processing device, a server and a computer readable storage medium, which can improve the processing efficiency of service requests.
The embodiment of the application provides a service request processing method, which is applied to a service processing system, wherein the service processing system comprises a plurality of first servers and a plurality of second servers, the plurality of first servers share the same virtual IP, and the service request processing method comprises the following steps:
receiving, by the first server, a service request of the virtual IP;
acquiring user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server;
determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server;
and sending the service request to the target server so that the target server processes the service request.
An embodiment of the present application further provides a service request processing apparatus, which is applied to a service processing system, where the service processing system includes a plurality of first servers and a plurality of second servers, and the plurality of first servers share the same virtual IP, and the service request processing apparatus includes:
a first receiving module, configured to receive, through the first server, a service request of the virtual IP;
the data acquisition module is used for acquiring user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server;
a first determining module, configured to determine a target server from the multiple second servers according to the user information, the service type that can be provided by each second server, and remaining performance data of each second server;
and the first sending module is used for sending the service request to the target server so as to enable the target server to process the service request.
An embodiment of the present application further provides a server, where the server includes:
one or more processors; a memory; and one or more computer programs, wherein the processor is coupled to the memory, the one or more computer programs being stored in the memory and configured to be executed by the processor to perform the above-described steps applied to the service request processing method in the first server or to perform the above-described steps applied to the service request processing method in the second server.
An embodiment of the present application further provides a file transmission system, where the file transmission system includes a first server and a second server, where the first server executes the service request processing method applied to any embodiment of the first server, and the second server executes the service request processing method applied to any embodiment of the second server.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in any one of the service request processing methods are implemented.
The embodiment of the application deploys a plurality of first servers in the service processing system, receives the service request through the first servers, determines a target server from the plurality of second servers in the service processing system according to the user information corresponding to the service request, the service type of the service request, the service type provided by each second server and the remaining performance data of each second server, and processes the service request by using the target server, so that when each service request is distributed by the first servers, the first servers not only consider the remaining performance data of the second servers, but also consider the service type provided by the second servers, the user information corresponding to the service request and the service type, each service request can be sent to the matched second server for final processing, and the processing efficiency of the service request is improved, the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 only some embodiments of the present application, 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 application scenario diagram of a service request processing method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a service request processing method according to an embodiment of the present application.
Fig. 3 is a flowchart of a service request processing method according to an embodiment of the present application.
Fig. 4 is another flowchart illustrating a service request processing method according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a service request processing apparatus according to an embodiment of the present application.
Fig. 6 is another schematic structural diagram of a service request processing apparatus according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The embodiment of the application provides a service request processing method, a service request processing device, a server, a system and a storage medium. Any one of the file transmission methods and/or the service request processing apparatuses provided in the embodiments of the present application may be applied to/integrated in a corresponding server of a service processing system. The server includes a first server and a second server.
The first server and the second server may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a CDN, and big data and artificial intelligence platforms.
Fig. 1 is a schematic view of an application scenario of a service request processing method provided in an embodiment of the present application, where the application scenario includes a request end, a plurality of first servers, a plurality of second servers, and a plurality of data storage modules. The service processing system comprises a plurality of first servers, a plurality of second servers and a plurality of data storage modules. The request end is connected with the first servers through network communication, the first servers are connected with the second servers through network communication, the first servers are connected with the data storage modules through network communication, and/or the second servers are connected with the data storage modules through network communication.
The request end comprises a plurality of user terminals such as a user terminal a, a user terminal B, a user terminal C, and the like, and the user terminals include but are not limited to a smart phone, a tablet Computer, a notebook Computer, a smart television, an intelligent robot, a Personal Computer (PC), a wearable device, and the like.
The plurality of first servers are provided with virtual IPs, the plurality of first servers share the same virtual IP, the plurality of first servers provide services to the outside through the virtual IPs, and each first server in the plurality of first servers is also provided with a real IP.
The first servers can be all in working state, then the service request of the virtual IP can be distributed to the first servers according to a certain rule, the first servers carry out subsequent processing, the first servers can improve the availability of the service processing system, when one of the first servers is damaged, other first servers can also run to avoid service interruption, and the first servers can distribute all the service requests to improve the response speed of the service request.
If only one of the first servers is in a working state, the service request of the virtual IP is only sent to the first server in the working state, the first server performs subsequent processing, and when the first server is damaged, the first server is switched to operate on other first servers, so that service interruption is avoided.
The plurality of second servers are used for providing specific services for the user, each second server in the plurality of second servers is provided with a real IP, and the types of the services which can be provided in the plurality of second servers are different.
For example, the number of the plurality of second servers is 10, wherein 5 second servers are mainly used for computing, and corresponding to the type of computing, the services that the 5 second servers can provide may be completely the same, and another 3 second servers are mainly used for monitoring and related to other functions such as computing, but are mainly used for monitoring, and corresponding to the type of monitoring, the services that the 3 second servers can provide may be completely the same, but different from the services that the 5 second servers are mainly used for computing can provide, and the rest 2 second servers are mainly used for storing and related to other functions such as computing, but are mainly used for storing, and corresponding to the type of storing, the services that the 2 second servers can provide may be completely the same. Wherein, the second servers of the calculation type, the monitoring type and the storage type are provided with a plurality of servers which can improve the availability of the service processing system. The type of service that can be provided by the second server is merely an example for ease of understanding, and does not constitute a limitation on the type of service.
The data storage modules may be distributed at different physical locations, and the data stored by the data storage modules may be different, for example, for a certain data, only four important fields and specific data corresponding to the four fields are stored in a certain data storage module, and all the fields of the data and the specific data corresponding to all the fields are stored in another data storage module. In addition, the amount of data in the plurality of data storage modules may vary, as may the retrieval and indexing tools used.
In the embodiment of the present application, an application scenario shown in fig. 1 will be described as an example.
In one embodiment, the first server may also be a first virtual machine on a first physical machine in the service processing system, and the second server may also be a second virtual machine on a second physical machine in the service processing system. For example, the service processing system includes at least one first physical machine and at least one second physical machine, a plurality of first virtual machines are distributed on the at least one first physical machine, the plurality of first virtual machines share the same virtual IP, and a plurality of second virtual machines are distributed on the at least one second physical machine.
Hereinafter, the data management method, the data management system, and the computer-readable storage medium in the embodiments of the present application will be described in detail. The numbers in the following examples are not intended to limit the order of preference of the examples.
Fig. 2 is a flowchart illustrating a service request processing method according to an embodiment of the present application, where the service request processing method is applied to a first server and includes the following steps.
101, receiving a service request of a virtual IP through a first server.
The user locates to the first server by accessing the virtual IP, i.e. sends a service request to the first server via the virtual IP. When the plurality of first servers are all in a working state, the first servers may receive the service request of the virtual IP according to a certain rule, for example, in a random or polling manner; when only one first server of the plurality of first servers is in the working state, the first server in the working state receives the service request of the virtual IP.
The service request may be any request, for example, if the second server corresponds to a server of a certain application, the service request may be any request requesting the application, such as a registration request, a query request, and the like. The application may be any application, such as an instant messaging application, a gaming application, a financial application, an audio-video playing application, a shopping related application, and the like.
102, obtaining user information corresponding to the service request, a service type of the service request, a service type which can be provided by each second server, and remaining performance data of each second server.
The service request comprises user information triggering the service request, such as a user name, a user number and other information, and the corresponding user priority can be directly determined according to the user information, or more detailed user information is obtained according to the user information, and the corresponding user priority is determined according to the more detailed user information.
The service type of the service request includes registration, query, monitoring, saving, etc., which may be specifically defined according to the actual situation, and is only for illustration.
The types of services that can be provided by each second server can be referred to the corresponding description above, and are not described herein again. The type of service that each second server can provide can be preset, then save to each first server.
The remaining performance data of each second server is dynamic data, the performance data mainly includes processing capacity data and storage capacity data, the remaining performance data includes, but is not limited to, remaining processing capacity data and remaining storage capacity data, the remaining processing capacity data is the total processing capacity data minus used processing capacity data of each second server, the remaining storage capacity data is the total storage capacity data minus used storage capacity data of each second server, the used processing capacity data and used storage capacity data are dynamic values, and therefore, the remaining performance data of each second server is also dynamic data.
The remaining performance data of each second server may be obtained by querying the first server in each second server every preset time and then storing the data in each first server, or obtained by sending the remaining performance data corresponding to each second server to each first server every preset time, and each first server stores the remaining performance data. And when the first server receives the service request, directly acquiring the residual performance data in each second server stored in the first server.
If the second server is a second virtual machine on the second physical machine, the remaining performance data of each second server is the remaining performance data of the second physical machine where each second virtual machine is located.
And 103, determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server.
In one case, the step 103 includes: determining a matched service type according to the service type, and taking a second server corresponding to the matched service type as a candidate server; determining corresponding user priority according to the user information; and determining the target server from the candidate servers according to the user priority and the residual performance data of the second servers. Therefore, the candidate server is determined from the second server of the matched service type, and then the matching is carried out according to the user priority and the residual performance data, so that the target server is determined from the candidate server, the service request can be matched with the optimal second server to be executed, and the processing efficiency is improved.
Wherein, the step of determining the target server from the candidate servers according to the user priority and the remaining performance data of each second server comprises: determining a performance grade corresponding to the residual performance data; determining a target performance level matched with the user priority according to the user priority; and determining a second server matched with the target performance level from the candidate servers as a target server. In the embodiment, the corresponding performance level is matched according to the user priority, and the target server is determined from the candidate servers corresponding to the matched performance level.
Wherein, the step of determining the performance level corresponding to the residual performance data comprises: determining a first score corresponding to the residual processing capacity data and a second score corresponding to the residual storage capacity data; carrying out weighted sum on the first score and the second score to obtain a total score; a performance level of the remaining performance data is determined based on the total score. The higher the total score, which means the higher the performance level of the remaining performance data, the higher the accuracy of the performance level determination in this embodiment, based on numerically quantifying the performance level.
Wherein, the step of determining the target server from the candidate servers according to the user priority and the remaining performance data of each second server comprises: and detecting whether the user priority is a preset priority, if so, determining a second server with the largest residual performance data from the candidate servers as a target server, and if not, determining a second server from the candidate servers as the target server according to a certain rule.
The preset priority in this embodiment is a higher priority, and may be determined according to the VIP level of the user, and when the user is the preset priority, the second server with the largest remaining performance data is used as the target server, where the total score is the largest after the calculation manner of the remaining performance data may obtain the total score according to the weighted sum manner, and is the largest remaining performance data. And when the user is not the preset priority, waiting to select a second server as the target server according to a certain rule, such as a random rule and a polling rule.
In one case, the target server may be determined according to a server decision model, and correspondingly, the step 103 includes: inputting the user information, the service type provided by each second server and the residual performance data of each second server into a feature extractor of a server decision model to obtain server decision features; inputting the server decision characteristics into a server decision maker of a server decision model so as to output decision probabilities corresponding to a plurality of second servers; and selecting the second server with the maximum strategy probability from the strategy probabilities corresponding to the plurality of second servers as the target server. Utilizing a server decision model to determine the target server provides another way to determine the target server.
Correspondingly, the server decision model may be trained by: obtaining a sample data set, wherein the sample data set comprises a plurality of service request samples, and each service request sample comprises user information corresponding to the server request, a service type corresponding to the service request, a service type of each second server, residual performance data of each second server and a decision result label corresponding to the service request sample; inputting a service request sample into a feature extractor to obtain a sample server decision feature; inputting the sample server decision characteristics into a server decision maker so as to obtain a second server with the maximum sample decision probability from a plurality of second servers as a decision server; if the proportion of the service request samples with the consistent decision server and decision result labels in the sample data set is larger than a preset proportion threshold value, for example 90%, the training is finished, otherwise, the parameters of the server decision model are adjusted to continue the training so that the proportion is larger than the preset proportion threshold value.
In other embodiments, the target server may also be determined in other ways.
And 104, sending the service request to the target server so that the target server processes the service request.
After the target server is determined, the service request is sent to the target server, for example, the real IP of the first server receiving the service request and the real IP of the target server are obtained, the real IP of the first server and the real IP of the target server are added to the service request, and the service request is sent to the target server, so that the target server processes the service request. The real IP of the first server and the real IP of the target server added to the service request may include not only an IP address but also information such as a port. For example, the real IP and port of the first server are used as the sending address, and the real IP and port of the target server are used as the receiving address. And each first server pre-stores the real IP and the corresponding port of each second server.
In the embodiment, a plurality of first servers are deployed in the service processing system, the first servers receive the service requests, and the target servers for processing the service requests are determined from the plurality of second servers according to the user information corresponding to the service requests, the service types of the service requests, the service types provided by the second servers and the residual performance data of the second servers, namely when each service request is distributed by the first servers, the residual performance data of the second servers are considered, and the service types provided by the second servers, the user information corresponding to the service requests and the service types are also considered, so that each service request can be sent to the second server matched with the service request for final processing, the processing efficiency of the service requests is improved, and the user experience is improved.
In an embodiment, the first server may perform some operations associated with the business in addition to distributing the service request to the matching second server. As shown in fig. 3, a flow chart of a service request processing method provided in the embodiment of the present application is shown, and the service request processing method includes the following steps.
A service request for a virtual IP is received 201 by a first server.
And 202, determining target data required to be called by the service request.
Wherein, because the target data which needs to be called by the service request needs to be determined, some operations related to the service are involved in the step.
Specifically, step 202 includes: and acquiring a processing interface for processing the service request, and determining target data according to the processing interface. The processing interfaces corresponding to all the service requests can be pre-stored in the first server. The processing interface includes a processing function for processing the service request, such as a monitoring function, a registration function, and the like, which may involve some verification functions and the like, the target data includes data for verification and the like, such as a query function, and the target data includes data corresponding to a field of the query and the like.
In other embodiments, the target data may be determined in other ways.
And 203, determining a target data storage module for storing the target data from the plurality of data storage modules according to the target data.
In the embodiment of the application, there are a plurality of data storage modules, and the plurality of data storage modules are not located in the same physical location, or the storage servers where the plurality of data storage modules are located are not always the same server in the same physical location, or the storage servers where the plurality of data storage modules are located are not servers in the same environment. For example, data storage modules are respectively deployed in the first area, the second area, and the third area, such as areas in china, south china, north china, and the like, and an area a, an area B, an area C, and the like in a certain city. The data stored by the data storage modules may be different, and reference may be made to the above description.
Since there are different portions of data held by the plurality of data storage modules and the same portion, the target data may exist in at least one data storage module.
Therefore, in one embodiment, the step 203 includes: determining a candidate data storage module matched with the target data from the plurality of data storage modules according to the target data; acquiring the data volume of the candidate data storage module, and a retrieval tool and an index mode of the candidate data storage module; and determining a target data storage module from the candidate data storage modules according to the data volume, the retrieval tool and the indexing mode. In this embodiment, the target data storage module is determined according to the data size, the retrieval tool and the retrieval mode in each data storage module, so as to ensure that the target data can be rapidly acquired from the target data storage module, improve the data acquisition efficiency, and further improve the service request processing efficiency.
Candidate data storage modules storing the target data are determined among the plurality of data storage modules. In one embodiment, the target data has a target field, and a candidate data storage module matching the target data is determined from the plurality of data storage modules according to the target field, that is, when the corresponding target field is stored in the data storage module, the data storage module is considered as the candidate data storage module matching the target data.
And acquiring the data volume, the retrieval tools and the retrieval modes of the candidate data storage modules, wherein the retrieval speeds of different retrieval tools are different, the retrieval speeds corresponding to different retrieval modes are different, and the different data volumes also have influence on the retrieval speed. The data volume, the retrieval tool and the retrieval mode of each data storage module are pre-stored in the first server, wherein the data volume of each data storage module is a dynamic value, and a timing task can be set in the first server so as to acquire the data volume of each data storage module when the timing task is executed, or the data storage module sends the data volume corresponding to the data storage module to each first server at intervals.
In one case, the step of determining the target data storage module from the candidate data storage modules according to the data size, the search tool, and the index method includes: determining the estimated time for acquiring the target data from the candidate data storage module according to the data volume, the retrieval tool and the indexing mode; and selecting the candidate data storage module with the minimum estimated time from the estimated times as a target data storage module. Correspondingly, the retrieval speed corresponding to the retrieval tool and the retrieval mode is obtained, wherein the retrieval speed corresponding to the retrieval tool and the retrieval mode can be known in advance, the retrieval speed is stored in the corresponding first server, and the estimated time for obtaining the target data is determined according to the data volume and the retrieval speed.
In one case, the step of determining the target data storage module from the candidate data storage modules according to the data size, the search tool, and the index method includes: determining a first score corresponding to the data volume, a second score corresponding to the retrieval tool and a third score corresponding to the retrieval mode, wherein the smaller the data volume, the higher the first score is, the more advanced the retrieval tool is, the higher the second score is, the optimized the retrieval mode is, and the higher the third score is; carrying out weighted sum on the first score, the second score and the third score to obtain retrieval scores corresponding to the candidate data storage modules; and determining the candidate data storage module corresponding to the retrieval score with the maximum score in the retrieval scores as the target data storage module.
The first score corresponding to the data volume, the second score corresponding to the search tool, and the third score corresponding to the search mode are determined, and may also be determined as follows: determining the grade of the data volume, the grade of a retrieval tool and the grade of a retrieval mode according to the data volume, the retrieval tool and the indexing mode; and determining a first score corresponding to the data volume grade, a second score corresponding to the retrieval tool grade and a third score corresponding to the retrieval mode grade.
In other embodiments, the target data storage module may also be determined in other ways.
And 204, adding the identification of the target data storage module into the service request.
And after the target data storage module is determined, adding the identifier of the target data storage module into the service request. The identification of the target data storage module includes an IP, a port, a storage directory, etc. of the storage server, and may also include other more or less information.
And 205, obtaining user information corresponding to the service request, a service type of the service request, a service type that can be provided by each second server, and remaining performance data of each second server.
And 206, determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server.
And 207, acquiring the real IP of the first server and the real IP of the target server receiving the service request, and adding the real IP of the first server and the real IP of the target server into the service request.
208, the service request is sent to the target server to enable the target server to process the service request.
The steps 202 to 204 and 205 to 207 may be executed in parallel or in series, or when executed in series, the steps 205 to 207 may be executed first, and the steps 202 to 204 are executed. In addition, for the steps not described in detail in this embodiment and the beneficial effects achieved by the steps, please refer to the description of the corresponding steps above, which is not repeated herein.
In this embodiment, when the target data corresponding to the service request needs to be acquired, the target data exists in all the data storage modules, and the first server determines the target data storage module with the fastest execution speed according to the data volume, the retrieval tool and the retrieval mode of the data storage modules, so that the efficiency of executing the service request by the second server is improved.
Fig. 4 is another schematic flow chart of a service request processing method according to an embodiment of the present application, where the service request processing method includes the following steps.
301, a service request for a virtual IP is received by a first server.
And 302, obtaining user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server.
And 303, determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server.
And 304, acquiring the real IP of the first server receiving the service request and the real IP of the target server, and adding the real IP of the first server and the real IP of the target server into the service request.
The service request is sent 305 to the target server to have the target server process the service request.
And 306, the target server determines target data which needs to be called by the service request in the process of executing the service request.
Since the processing interface for processing the service request is necessarily called in the process of executing the service request, the target data can be determined by executing the processing interface.
307, a target data storage module for storing the target data is determined from the plurality of data storage modules according to the target data.
This step is consistent with the description of the corresponding step above, except that: in this embodiment, the second server stores the data size, the search mode, and the search tool corresponding to the plurality of data storage modules. And setting a timing task at the second server so as to acquire the data volume of each data storage module when the timing task is executed, or sending the data volume corresponding to the data storage module to each second server by each data storage module at intervals.
The target data is retrieved 308 from the target data storage module to execute the service request.
In this embodiment, steps 301 to 305 are applied to the first server, and the subsequent steps 306 to 308 are applied to the target server. Thus, the first server is used for distributing the service request, the second server is used for processing the specific service, and the service request processing and the service processing are separated, so that service decoupling is realized.
According to the method described in the above embodiments, the present embodiment will be further described from the perspective of a service request processing device, which may be specifically implemented as an independent entity or integrated in a corresponding server.
Fig. 5 is a schematic structural diagram of a service request processing apparatus according to an embodiment of the present application, where the service request processing apparatus may be integrated in a first server of a service processing system, and the service processing system further includes a plurality of second servers, and the plurality of first servers share the same virtual IP. The apparatus may include a first receiving module 401, a data obtaining module 402, a first determining module 403, and a first transmitting module 404.
A first receiving module 401, configured to receive, through the first server, a service request of the virtual IP.
A data obtaining module 402, configured to obtain user information corresponding to the service request, a service type of the service request, a service type that can be provided by each second server, and remaining performance data of each second server.
A first determining module 403, configured to determine a target server from the multiple second servers according to the user information, the service type that can be provided by each second server, and remaining performance data of each second server.
A first sending module 404, configured to send the service request to the target server, so that the target server processes the service request.
In an embodiment, the service processing system further includes a server decision module, where the server decision module has a feature extractor and a server decision device, and the first determination module 403 is specifically configured to input the user information, the service type that can be provided by each second server, and remaining performance data of each second server into the feature extractor to obtain a server decision feature; inputting the server decision characteristics into the server decision maker to output decision probabilities corresponding to a plurality of second servers; and selecting the second server with the maximum decision probability from the decision probabilities corresponding to the plurality of second servers as the target server.
In an embodiment, the first determining module 403 is specifically configured to determine a matched service type according to the service type, and use a second server corresponding to the matched service type as a candidate server; determining corresponding user priority according to the user information; and determining a target server from the candidate servers according to the user priority and the residual performance data of the second servers.
In an embodiment, when the first determining module 403 performs the step of determining the target server from the candidate servers according to the user priority and the remaining performance data of each second server, specifically: determining a performance level of the remaining performance data; determining a target performance level matched with the user priority according to the user priority; determining a second server from the candidate servers that matches the target performance level as a target server.
In an embodiment, as shown in fig. 6, another schematic structural diagram of a service request processing apparatus provided in the embodiment of the present application is shown, where the service request processing apparatus further includes a training module 405. A training module 405, configured to obtain a sample data set, where the sample data set includes a plurality of service request samples, and each service request sample includes user information corresponding to the server request, a service type corresponding to the service request, a service type of each second server, remaining performance data of each second server, and a decision result tag corresponding to the service request sample; inputting a service request sample into a feature extractor to obtain a sample server decision feature; inputting the sample server decision characteristics into a server decision maker so as to obtain a second server with the maximum sample decision probability from a plurality of second servers as a decision server; if the proportion of the service request samples of the decision server and the decision result labels in the sample data set is larger than a preset proportion threshold value, for example 90%, the training is finished, otherwise, the parameters of the decision model of the server are adjusted to continue the training so that the proportion is larger than the preset proportion threshold value.
In one embodiment, as shown in fig. 6, the service request processing apparatus further includes a second determining module 406, a third determining module 407, and a joining module 408.
A second determining module 406, configured to determine target data that the service request needs to be invoked.
In an embodiment, the second determining module 406 is specifically configured to obtain a processing interface for processing the service request; and determining the target data according to the processing interface.
A third determining module 407, configured to determine, according to the target data, a target data storage module that stores the target data from the multiple data storage modules.
In an embodiment, the target data has a target field, and the third determining module 407 is specifically configured to determine, according to the target field, a candidate data storage module matching the target data from the plurality of data storage modules.
In an embodiment, the third determining module 407 is specifically configured to determine, according to the target data, a candidate data storage module that matches the target data from the plurality of data storage modules; acquiring the data volume of the candidate data storage module, and a retrieval tool and an index mode of the candidate data storage module; and determining a target data storage module from the candidate data storage modules according to the data volume, the retrieval tool and the index mode.
A joining module 408, configured to join the identifier of the target data storage module into the service request.
In an embodiment, the second determination module 406 and the third determination module 407 are integrated in the second server. The second server further includes a second receiving module, and the second receiving module is specifically configured to receive the service request.
In specific implementation, the above units may be implemented as independent entities, or may be implemented as one or several entities by any combination. The specific implementation processes of the above apparatus and each unit, and the achieved beneficial effects, may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.
The embodiment of the present application further provides a server, which may be a first server in a service processing system, where the number of the first servers in the service processing system is multiple, and the multiple first servers share the same virtual IP, and the service processing system further includes multiple second servers, as shown in fig. 7, which shows a schematic structural diagram of the server according to the embodiment of the present application, specifically:
the server may include components such as a processor 501 of one or more processing cores, memory 502 of one or more computer-readable storage media, Radio Frequency (RF) circuitry 503, a power supply 504, an input unit 505, and a display unit 506. Those skilled in the art will appreciate that the server architectures depicted in the figures are not meant to be limiting of servers and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
processor 501 is the control center for the server. The processor is connected to various parts of the whole server by various interfaces and lines, and executes various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the server. Optionally, the processor may include one or more processing cores; preferably, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The memory 502 may be used to store software programs (computer programs) and modules, and the processor 501 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
The RF circuit 503 may be used for receiving and transmitting signals during information transmission and reception, and in particular, for receiving downlink information of a base station and then processing the received downlink information by one or more processors 501; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 503 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 503 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The server also includes a power supply 504 (e.g., a battery) for powering the various components, and preferably, the power supply 504 is logically connected to the processor 501 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 504 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may further include an input unit 505, and the input unit 505 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, in one particular embodiment, input unit 505 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 501, and can receive and execute commands sent by the processor 501. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 505 may include other input devices in addition to a touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The server may also include a display unit 506, and the display unit 506 may be used to display information input by the user or provided to the user, as well as various graphical user interfaces of the server, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 506 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 501 to determine the type of the touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of the touch event. Although in the figures the touch sensitive surface and the display panel are shown as two separate components to implement the input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
Although not shown, the server may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 501 in the server loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 runs the application program stored in the memory 502, thereby implementing various functions as follows:
receiving, by the first server, a service request of the virtual IP; acquiring user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server; determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server; and sending the service request to the target server so that the target server processes the service request.
The server may implement the steps in any embodiment of the service request processing method provided in this embodiment of the application, and therefore, beneficial effects that can be achieved by any service request processing method provided in this embodiment of the application may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
It should be noted that, in the embodiment of the present application, the structure of the second server may also refer to the structure of the server shown in fig. 7, and is not described herein again.
The embodiment of the present application further provides a service processing system, where the service processing system includes a plurality of first servers and a plurality of second servers, and the plurality of first servers share the same virtual IP, where the first servers are configured to execute the steps in any embodiment of the service request processing method, and the second servers are configured to execute corresponding steps in the service request processing method.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions (computer programs) which are stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the instructions (computer programs). To this end, an embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps of any embodiment of the service request processing method provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any service request processing method embodiment provided in the embodiments of the present invention, beneficial effects that can be achieved by any service request processing method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The foregoing describes in detail a service request processing method, apparatus, server, system, and storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and implementations of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A service request processing method is applied to a service processing system, the service processing system comprises a plurality of first servers, a plurality of second servers and a plurality of data storage modules, the plurality of first servers share the same virtual IP, and the service request processing method comprises the following steps:
receiving, by the first server, a service request of the virtual IP;
determining target data required to be called by the service request;
determining a target data storage module for storing the target data from the plurality of data storage modules according to the target data;
adding the identification of the target data storage module into the service request;
acquiring user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server;
determining a target server from the plurality of second servers according to the user information, the service type which can be provided by each second server and the residual performance data of each second server;
sending the service request to the target server so that the target server processes the service request;
wherein the step of determining a target data storage module storing the target data from the plurality of data storage modules according to the target data comprises:
determining candidate data storage modules matched with the target data from the plurality of data storage modules according to the target data;
acquiring the data volume of the candidate data storage module, and a retrieval tool and an index mode of the candidate data storage module;
and determining a target data storage module from the candidate data storage modules according to the data volume, the retrieval tool and the index mode.
2. The service request processing method of claim 1, wherein the service processing system further comprises a server decision model having a feature extractor and a server decision maker,
the step of determining a target server from the plurality of second servers according to the user information, the service type that can be provided by each second server, and the remaining performance data of each second server includes:
inputting the user information, the service type provided by each second server and the residual performance data of each second server into the feature extractor to obtain server decision features;
inputting the server decision characteristics into the server decision maker to output decision probabilities corresponding to a plurality of second servers;
and selecting the second server with the maximum decision probability from the decision probabilities corresponding to the plurality of second servers as the target server.
3. The method of claim 1, wherein the step of determining the target server from the plurality of second servers according to the user information, the service type that each second server can provide, and the remaining performance data of each second server comprises:
determining a matched service type according to the service type, and taking a second server corresponding to the matched service type as a candidate server;
determining corresponding user priority according to the user information;
and determining a target server from the candidate servers according to the user priority and the residual performance data of the second servers.
4. The method according to claim 3, wherein the remaining performance data includes remaining processing capacity data and remaining storage capacity data, and the step of determining the target server from the candidate servers according to the user priority and the remaining performance data of each second server comprises:
determining a performance level of the remaining performance data;
determining a target performance level matched with the user priority according to the user priority;
determining a second server from the candidate servers that matches the target performance level as a target server.
5. The method according to claim 1, wherein the step of determining target data that the service request needs to be invoked comprises:
acquiring a processing interface for processing the service request;
and determining the target data according to the processing interface.
6. A service request processing apparatus applied to a service processing system including a plurality of first servers, a plurality of second servers, and a plurality of data storage modules, wherein the plurality of first servers share a same virtual IP, the service request processing apparatus comprising:
a first receiving module, configured to receive, through the first server, a service request of the virtual IP;
the data acquisition module is used for acquiring user information corresponding to the service request, the service type of the service request, the service type which can be provided by each second server and the residual performance data of each second server;
a first determining module, configured to determine a target server from the multiple second servers according to the user information, the service type that can be provided by each second server, and remaining performance data of each second server;
the first sending module is used for sending the service request to the target server so that the target server processes the service request;
wherein, the service request processing device further comprises:
the second determining module is used for determining target data which needs to be called by the service request;
a third determining module, configured to determine, according to the target data, a target data storage module that stores the target data from the plurality of data storage modules; specifically, the third determining module is configured to determine, according to the target data, a candidate data storage module that matches the target data from the plurality of data storage modules; acquiring the data volume of the candidate data storage module, and a retrieval tool and an index mode of the candidate data storage module; determining a target data storage module from the candidate data storage modules according to the data volume, the retrieval tool and the index mode;
and the adding module is used for adding the identifier of the target data storage module into the service request.
7. A server, characterized in that the server comprises:
one or more processors; a memory; and one or more computer programs, wherein the processor is coupled to the memory, the one or more computer programs being stored in the memory and configured to be executed by the processor to perform the steps of the method of processing a service request of any of claims 1-5.
8. A computer-readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor for performing the steps of the method of processing a service request according to any of claims 1-5.
CN202210598222.2A 2022-05-30 2022-05-30 Service request processing method, device, server and computer readable storage medium Active CN114710501B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210598222.2A CN114710501B (en) 2022-05-30 2022-05-30 Service request processing method, device, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210598222.2A CN114710501B (en) 2022-05-30 2022-05-30 Service request processing method, device, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114710501A CN114710501A (en) 2022-07-05
CN114710501B true CN114710501B (en) 2022-09-20

Family

ID=82177208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210598222.2A Active CN114710501B (en) 2022-05-30 2022-05-30 Service request processing method, device, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114710501B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246222A (en) * 2018-09-21 2019-01-18 郑州云海信息技术有限公司 service request processing method, device, system and computer readable storage medium
CN114124405A (en) * 2020-07-29 2022-03-01 腾讯科技(深圳)有限公司 Business processing method, system, computer equipment and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5603029A (en) * 1995-06-07 1997-02-11 International Business Machines Corporation System of assigning work requests based on classifying into an eligible class where the criteria is goal oriented and capacity information is available
JP4206266B2 (en) * 2001-12-28 2009-01-07 株式会社リコー Full-text search device, processing method, processing program, and recording medium
CN103425673A (en) * 2012-05-18 2013-12-04 同程网络科技股份有限公司 Method and device for synchronously searching indexes on basis of Lucene
JP6545236B2 (en) * 2017-11-17 2019-07-17 華為技術有限公司Huawei Technologies Co.,Ltd. Method and apparatus for processing operation requests in a storage system
CN111722806A (en) * 2020-06-19 2020-09-29 华中科技大学 Cloud disk allocation method and device, electronic equipment and storage medium
US20220043822A1 (en) * 2020-08-04 2022-02-10 International Business Machines Corporation Shadow experiments for serverless multi-tenant cloud services

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246222A (en) * 2018-09-21 2019-01-18 郑州云海信息技术有限公司 service request processing method, device, system and computer readable storage medium
CN114124405A (en) * 2020-07-29 2022-03-01 腾讯科技(深圳)有限公司 Business processing method, system, computer equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114710501A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN109101318B (en) Virtual machine migration control method and device
WO2015090248A1 (en) Server overload protection method and device
US10304461B2 (en) Remote electronic service requesting and processing method, server, and terminal
CN103942113A (en) System restarting reason detection method, device and terminal equipment
EP3179693B1 (en) Method, apparatus, storage medium and computer program product for establishing a data connection
CN107040610A (en) Method of data synchronization, device, storage medium, terminal and server
CN113592209A (en) Model training task management method, device, terminal and storage medium
CN104780234B (en) IP attribution inquiry method, apparatus and system
CN111273955A (en) Thermal restoration plug-in optimization method and device, storage medium and electronic equipment
CN104901992A (en) Resource transfer method and device
CN111274463B (en) Information display method, device and storage medium based on IM contact person grouping setting
CN106649595B (en) Object pool-based webpage starting acceleration method and device and terminal
CN105306611A (en) Method and device for identifying attribution of short message port number
CN114710501B (en) Service request processing method, device, server and computer readable storage medium
CN106708501A (en) Activity monitoring method and device
CN116596202A (en) Work order processing method, related device and storage medium
CN107203427B (en) Process control method and device in application multi-open mode and mobile terminal
CN115065609A (en) B-end SaaS system hybrid deployment method and system
CN112866422B (en) Data request processing method and device
CN114648336A (en) Face payment method and device, electronic equipment and storage medium
CN111294275B (en) User information indexing method, device, server and storage medium of IM tool
CN113065083A (en) Page processing method and device, electronic equipment and storage medium
CN114661247B (en) Automatic capacity expansion method and device, electronic equipment and storage medium
CN114095585B (en) Data transmission method, device, storage medium and electronic equipment
CN114189436B (en) Multi-cluster configuration deployment method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee after: Wuhan Barda Technology Co.,Ltd.

Address before: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee before: Wuhan Sitong Information Service Co.,Ltd.

CP01 Change in the name or title of a patent holder