CN113179308B - Service request processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113179308B
CN113179308B CN202110441886.3A CN202110441886A CN113179308B CN 113179308 B CN113179308 B CN 113179308B CN 202110441886 A CN202110441886 A CN 202110441886A CN 113179308 B CN113179308 B CN 113179308B
Authority
CN
China
Prior art keywords
service
target
resource
node
identification information
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
CN202110441886.3A
Other languages
Chinese (zh)
Other versions
CN113179308A (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.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology 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 Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Priority to CN202110441886.3A priority Critical patent/CN113179308B/en
Publication of CN113179308A publication Critical patent/CN113179308A/en
Application granted granted Critical
Publication of CN113179308B publication Critical patent/CN113179308B/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
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure relates to a service request processing method, a device, an electronic device and a storage medium, wherein the method comprises the steps of receiving a target service request, and determining target service identification information corresponding to the target service request; determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, wherein the preset service configuration information represents mapping relationships between the plurality of service identification information and the service resources on the plurality of service nodes; and scheduling the target service request to the target service node so that the target service node processes the target service request based on the target service resource. The embodiment of the disclosure can effectively improve the balance of service resource allocation and the processing efficiency of service request processing.

Description

Service request processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a service request processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of internet technology, the service operation of a large number of internet platforms often needs the support of a service cluster. In the process of providing business support by the service cluster, multiple services are usually involved; in the related art, service requests of multiple services are often randomly allocated to a certain service node in a cluster, which causes problems in the related art that some service requests are in a state without service resources for a long time, some service resources are in an idle state because the service requests are not allocated to the service requests, service resource allocation is uneven, service request processing efficiency is low, and the like.
Disclosure of Invention
The present disclosure provides a service request processing method, device, electronic device, and storage medium, which can improve the balance of service resource allocation and the processing efficiency of service request processing. The technical scheme of the disclosure is as follows:
according to an aspect of the embodiments of the present disclosure, a method for processing a service request is provided, including:
receiving a target service request, and determining target service identification information corresponding to the target service request;
determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, wherein the preset service configuration information represents mapping relationships between a plurality of service identification information and service resources on a plurality of service nodes;
scheduling the target service request to the target service node to enable the target service node to process the target service request based on the target service resource.
In the technical scheme, in the service request processing process, the preset service configuration information which is pre-established and can represent the mapping relation between the service identification information of various services and the service resources on the service nodes is combined, and on the basis of improving the effective utilization rate of the service resources, the corresponding service resources can be rapidly allocated to the service request, so that the processing efficiency of service request processing, the balance of service resource allocation and the high availability of the system are effectively improved.
In an optional embodiment, the method further comprises:
acquiring resource consumption data of a plurality of services;
determining service resources on the plurality of service nodes;
and establishing a mapping relation between the service identification information of the services and the service resources on the service nodes based on the resource consumption data to obtain the preset service configuration information.
In the technical scheme of the embodiment, the mapping relationship between the service identification information of the multiple services and the service resources on the multiple service nodes is pre-established by combining the resource consumption data of the multiple services to obtain the preset service configuration information, so that the service resources can be reasonably allocated according to different resource consumption requirements, and the effective utilization rate of the service resources and the subsequent service processing efficiency are further improved.
In an optional embodiment, the method further comprises:
and creating a service process corresponding to the service in the service resources of the plurality of service nodes according to the preset service configuration information.
According to the technical scheme, the service processes corresponding to the services are established in the service resources of the service nodes in advance, so that the subsequent quick service request processing is facilitated, and the service request efficiency is improved.
In an optional embodiment, the scheduling the target service request to the target service node to cause the target service node to process the target service request based on the target service resource includes:
and scheduling the target service request to the target service node so that the target service node processes the target service request based on the service process in the target service resource.
In the technical scheme, the service processes corresponding to the services are created in the service resources of the plurality of service nodes in advance, and under the condition that the corresponding service requests need to be processed, the corresponding service processes can be directly processed, so that the processing efficiency of the service requests can be greatly improved.
In an optional embodiment, the establishing a mapping relationship between the service identifier information of the plurality of services and the service resources on the plurality of service nodes based on the resource consumption data to obtain the preset service configuration information includes:
determining service resource amount corresponding to each of the plurality of services according to the resource consumption data;
determining service resources allocated to the plurality of services from the service resources of the plurality of service nodes according to the service resource amount;
and establishing a mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located and the resource identification information of the service resource allocated to each service, so as to obtain the preset service configuration information.
In the technical scheme, the service resources are reasonably distributed for a plurality of services by combining the service resource amount required by a plurality of services, and each service is mapped to the service resource of the corresponding service node, so that the effective utilization rate of the service resources and the subsequent service processing efficiency are improved.
In an optional embodiment, the method further comprises:
acquiring preset configuration sequence information corresponding to the multiple services;
the determining, from the service resources of the plurality of service nodes according to the service resource amount, the service resources allocated to the plurality of services includes:
and determining the service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
According to the technical scheme, the preset configuration sequence corresponding to the multiple services is combined, the service resources of the multiple services can be distributed in order, and the efficiency of service resource distribution is improved.
In an optional embodiment, the determining, based on preset service configuration information, a target service node where a target service resource corresponding to the target service identification information is located includes:
determining a service node where a service resource corresponding to the target service identification information is located from the preset service configuration information;
acquiring load information of a service node where the corresponding service resource is located;
and determining a target service node from the service nodes where the corresponding service resources are located according to the load information.
In the technical scheme, in the service resource allocation process, the service resources are screened by combining the load information of the service node where the service resources are located, so that the processing efficiency of the service request can be effectively improved.
According to another aspect of the embodiments of the present disclosure, there is provided a service request processing apparatus including:
a target service request receiving module configured to perform receiving a target service request;
a target service identification information determination module configured to perform determining target service identification information corresponding to the target service request;
the target service node determining module is configured to execute determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, wherein the preset service configuration information represents mapping relationships between a plurality of service identification information and service resources on a plurality of service nodes;
a target service request scheduling module configured to perform scheduling of the target service request to the target service node to cause the target service node to process the target service request based on the target service resource.
In an optional embodiment, the apparatus further comprises:
a resource consumption data acquisition module configured to perform acquisition of resource consumption data of a plurality of services;
a service resource determination module configured to perform determining service resources on the plurality of service nodes;
and the mapping relation establishing module is configured to execute the mapping relation between the service identification information of the plurality of services and the service resources on the plurality of service nodes based on the resource consumption data to obtain the preset service configuration information.
In an optional embodiment, the apparatus further comprises:
and the service process creating module is configured to execute the service process for creating the corresponding service in the service resources of the plurality of service nodes according to the preset service configuration information.
In an optional embodiment, the target service request scheduling module is further configured to perform scheduling the target service request to the target service node, so that the target service node processes the target service request based on the service process in the target service resource.
In an optional embodiment, the mapping relationship establishing module includes:
a service resource amount determining unit configured to determine a service resource amount corresponding to each of the plurality of services according to the resource consumption data;
a service resource allocation module unit configured to perform determining service resources allocated to the plurality of services from service resources of the plurality of service nodes according to the service resource amount;
and the mapping relation establishing subunit is configured to execute the establishment of the mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located, and the resource identification information of the service resource allocated to each service, so as to obtain the preset service configuration information.
In an optional embodiment, the apparatus further comprises:
a preset configuration sequence information acquisition module configured to perform acquisition of preset configuration sequence information corresponding to the plurality of services;
the service resource allocation module unit is further configured to determine the service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
In an optional embodiment, the target service node determining module includes:
a service node determining unit configured to determine a service node where a service resource corresponding to the target service identification information is located from the preset service configuration information;
a load information obtaining unit configured to perform obtaining load information of a service node where the corresponding service resource is located;
and the target service node determining unit is configured to determine a target service node from the service nodes where the corresponding service resources are located according to the load information.
According to another aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any of the above.
According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform any one of the methods of the embodiments of the present disclosure.
According to another aspect of the embodiments of the present disclosure, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the methods of the embodiments of the present disclosure described above.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram of an application environment illustrating a method of service request processing in accordance with an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method of service request processing in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating one embodiment of a preset generating preset service configuration information, according to an illustrative embodiment;
fig. 4 is a flowchart illustrating a service scheduling node establishing a mapping relationship between service identification information of multiple services and service resources on multiple service nodes based on resource consumption data to obtain preset service configuration information according to an exemplary embodiment;
fig. 5 is a flowchart illustrating a service scheduling node determining, based on preset service configuration information, a target service node where a target service resource corresponding to target service identification information is located according to an exemplary embodiment;
FIG. 6 is a flow diagram illustrating another method of service request processing in accordance with an illustrative embodiment;
FIG. 7 is a block diagram illustrating a service request processing apparatus in accordance with an exemplary embodiment;
fig. 8 is a block diagram illustrating a hardware configuration of a server implementing a service request processing method according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in other sequences than those illustrated or described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
Fig. 1 is a schematic diagram illustrating an application environment of a service request processing method according to an exemplary embodiment, and as shown in fig. 1, the application environment may include a service requester 100, a service scheduling node 200, and at least one service node 300.
In an alternative embodiment, the service requester 100 may be a terminal for providing a service to a user, and optionally, the terminal may include, but is not limited to, an electronic device of a type of a smart phone, a desktop computer, a tablet computer, a laptop computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and the like, and may also be software running on the electronic device, such as an application program, and the like. Optionally, the operating system running on the electronic device may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.
In an optional embodiment, the service scheduling node 200 and the at least one service node 300 may be multiple network nodes in a certain service cluster, and optionally, the multiple network nodes may be physical servers or cloud servers. Specifically, the service scheduling node 200 may be configured to schedule the service request of the service requester 100, and schedule the service request to a corresponding service node. The at least one service node 300 may be configured to process the corresponding service request based on a service resource local to the node.
In addition, it should be noted that the application environment corresponding to fig. 1 is only one example in the embodiment of the present specification, and in practical applications, the service request processing method provided in the embodiment of the present specification may further include other application environments, for example, further requesters may also be included.
In this embodiment, the service requester 100, the service scheduling node 200, and the at least one service node 300 may be directly or indirectly connected through wired or wireless communication, and the disclosure is not limited herein.
Fig. 2 is a flowchart illustrating a service request processing method according to an exemplary embodiment, and as shown in fig. 2, the service request processing method may include:
s201: the service request direction sends a target service request to the service scheduling node.
In some embodiments, the service requester side may be provided with a service request triggering interface facing the user, optionally, the user may trigger a request operation of a corresponding service as needed based on the service request interface, and accordingly, the service requester may send the target service request to the service scheduling node in response to the request operation.
In some embodiments, multiple services may be provided according to actual application requirements, and optionally, the multiple services include, but are not limited to: at least two of a picture parsing service, a static library retrieval service, and a spatiotemporal library retrieval service. Accordingly, the target service request may include, but is not limited to, a request for one of a picture parsing service, a static library search service, and a spatiotemporal library search service.
In some embodiments, the picture parsing service may be a service that performs picture parsing, and the static library retrieval service may be a service that retrieves data from a static library; the spatiotemporal library retrieval service may be a service that retrieves data from a spatiotemporal library. Specifically, the static library may be a database in which corresponding data is stored in advance (the stored data may be different according to different actual application requirements, and may be, for example, a face image). The spatiotemporal library may be a database of data for real-time size acquisition (the acquired data may differ depending on the actual application requirements, for example, it may be a face image taken in real time).
S203: and the service scheduling node determines target service identification information corresponding to the target service request.
In practical applications, service requests of different services often correspond to service identification information of different services, and accordingly, after receiving an access request, the service to which a target service request belongs may be combined to determine corresponding service identification information. In a specific embodiment, the service identification information may be preset identification information for distinguishing multiple services, and optionally, the service identification information may include, but is not limited to, a character string composed of letters, numbers, and the like.
S205: and the service scheduling node determines a target service node where the target service resource corresponding to the target service identification information is located based on the preset service configuration information.
In a specific embodiment, the preset service configuration information may represent a mapping relationship between a plurality of service identification information and service resources on a plurality of service nodes. In a specific embodiment, the plurality of service nodes may be nodes that can be scheduled by the service scheduling node, and the service resources may include, but are not limited to, GPU (Graphics Processing Unit, chinese) resources.
In a specific embodiment, the service node where the target service resource corresponding to the target service identification information is located may be one or more (at least two) service nodes, and optionally, in a case that the service node where the target service resource corresponding to the target service identification information is located may be one service node, the service node may be the target service node. In a case that a service node where a target service resource corresponding to the target service identification information is located may be a plurality of service nodes, a service node may be selected from the plurality of service nodes as the target service node in combination with a preset rule or randomly.
S207: the service scheduling node schedules the target service request to the target service node.
In a specific embodiment, in the process of determining the target service node where the target service resource corresponding to the target service identification information is located in step S205, node identification information corresponding to the target service node may be determined. Accordingly, the service scheduling node may schedule the target service request to the target service node based on the node identification information.
S209: the target service node processes the target service request based on the target service resource.
In practical application, during the service request processing process, the service resource will start a corresponding service process to process. Correspondingly, the target service node may invoke the target service resource to start a service process corresponding to the target service resource, so as to process the target service request. In a specific embodiment, it is assumed that the target service request is a request corresponding to a picture parsing service; correspondingly, the target service node can call a corresponding GPU to start a picture analysis process so as to carry out picture analysis processing.
As can be seen from the technical solutions provided by the embodiments of the present specification, in the service request processing process, in combination with preset service configuration information that is pre-established and can represent mapping relationships between service identification information of multiple services and service resources on multiple service nodes, on the basis of improving the effective utilization rate of the service resources, the present specification can rapidly allocate corresponding service resources to the service request, thereby effectively improving the processing efficiency of service request processing, the balance of service resource allocation, and the high availability of the system.
In a specific embodiment, the method may further include: specifically, as shown in fig. 3, the step of generating preset service configuration information in advance may include:
s301: the service scheduling node acquires resource consumption data of a plurality of services;
s303: the service scheduling node determines service resources on a plurality of service nodes;
s305: the service scheduling node establishes mapping relations between the service identification information of the multiple services and the service resources on the multiple service nodes based on the resource consumption data to obtain preset service configuration information.
In a specific embodiment, the resource consumption data of each service may be data capable of reflecting the service resource requirement corresponding to the service. Specifically, the resource consumption data of each service may include a required amount of each service and a unit resource consumption amount corresponding to each service. Specifically, the demand of each service may be a demand of the service in the platform, and the unit resource consumption amount corresponding to each service may be a service resource required by a single request of the service.
In a specific embodiment, taking a picture analysis service, a static library retrieval service and a spatiotemporal library retrieval service as examples, the static library retrieval service usually occupies higher resources, and correspondingly, the unit resource consumption can be one GPU; the image analysis service and the space-time library retrieval service occupy lower resources and can share one GPU, correspondingly, the unit resource consumption can be less than one GPU, and the method can be specifically set by combining with practical application.
In the above embodiment, by combining resource consumption data of multiple services, mapping relationships between service identification information of the multiple services and service resources on multiple service nodes are pre-established to obtain preset service configuration information, so that service resources can be reasonably allocated according to different resource consumption requirements, and further, the effective utilization rate of the service resources and the subsequent service processing efficiency are improved.
In a specific embodiment, as shown in fig. 4, the step of the service scheduling node establishing a mapping relationship between service identification information of multiple services and service resources on multiple service nodes based on the resource consumption data, and obtaining the preset service configuration information may include:
s401: the service scheduling node determines the service resource amount corresponding to each of the multiple services according to the resource consumption data;
s403: the service scheduling node determines the service resources distributed to the services from the service resources of the service nodes according to the service resource amount;
s405: the service scheduling node establishes a mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located and the resource identification information of the service resource allocated to each service, and obtains preset service configuration information.
In a specific embodiment, the amount of service resources may be a corresponding amount of service resources. Taking the service resource as the GPU as an example, the service resource amount may be the number of the GPUs. In a specific embodiment, in the case where the resource consumption data includes a required amount of each service and a corresponding unit resource consumption amount of each service, a product of the required amount of the service and the corresponding unit resource consumption amount may be taken as the corresponding service resource amount.
In practical applications, the number of service resources on different service nodes may be the same or different. Optionally, the service resources on the multiple service nodes may be allocated to corresponding services according to the service resource amount required by the multiple services.
In a specific embodiment, as shown in table 1, table 1 is an example of a mapping relationship between a plurality of services and service resources on corresponding service nodes.
Figure BDA0003035345680000091
TABLE 1
Specifically, as can be seen in combination with table 1, the node identification information of the service node includes master1, master2, master3, and node1; wherein, the GPU number (service resource) corresponding to the master1 and the master2 is 3; the number of GPUs (service resources) corresponding to the master3 and the node1 is 2; the service resources corresponding to the picture analysis service are GPU0 on a master1, a master2 and a node1; the service resources corresponding to the static library retrieval service are GPU1 and GPU2 on master1, master2 and master 3. The service resources corresponding to the spatio-temporal library retrieval service are GPU0 on master1 and master 2.
In a specific embodiment, the node identification information of the service node may be preset identification information for distinguishing multiple service nodes, and optionally, the node identification information of the service node may include, but is not limited to, a character string and the like. The node identification information of the service node may be preset identification information for distinguishing a plurality of service nodes, and optionally, the node identification information of the service node may include, but is not limited to, a character string composed of letters, numbers, and the like. Optionally, the resource identification information of the service resource may be preset identification information for distinguishing a plurality of service resources; alternatively, the resource identification information of the service resource may include, but is not limited to, a character string composed of letters, numbers, and the like.
In a specific embodiment, each service may be mapped to a service resource of a corresponding service node by establishing a mapping relationship among service identification information of each service, node identification information of a service node where a service resource allocated to each service is located, and resource identification information of a service resource allocated to each service.
In the embodiment, the service resources are reasonably configured for the plurality of services by combining the service resource amounts required by the plurality of services, and each service is mapped to the service resource of the corresponding service node, so that the effective utilization rate of the service resources and the subsequent service processing efficiency are improved.
In an optional embodiment, the method may further include:
acquiring preset configuration sequence information corresponding to multiple services;
correspondingly, the determining the service resources allocated to the plurality of services from the service resources of the plurality of service nodes according to the service resource amount includes:
and determining the service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
In a specific embodiment, the preset configuration sequence information may be a sequence for configuring service resources corresponding to multiple services. Optionally, the configuration sequence corresponding to the multiple services may be preset in combination with the actual application requirement.
In the above embodiment, by combining the preset configuration sequence corresponding to the multiple services, the configuration of the service resources of the multiple services can be performed in order, so as to improve the efficiency of service resource allocation.
In an optional embodiment, as shown in fig. 5, the determining, by the service scheduling node, a target service node where a target service resource corresponding to the target service identification information is located based on the preset service configuration information may include:
s501: the service scheduling node determines a service node where the service resource corresponding to the target service identification information is located from preset service configuration information;
s503: the service scheduling node acquires load information of a service node where the corresponding service resource is located;
s505: and the service scheduling node determines a target service node from the service nodes where the corresponding service resources are located according to the load information.
In practical applications, a service may correspond to a service resource on one or more service nodes. Optionally, in combination with the preset service configuration information, the load condition of the service node where the service resource corresponding to the target service identification information is located may be determined, and then the idle service resource may be screened out in combination with the load information of the service node.
In the technical scheme, in the service resource allocation process, the service resources are screened by combining the load information of the service node where the service resources are located, so that the processing efficiency of the service request can be effectively improved.
In an optional embodiment, the method may further include:
and the target service node creates a service process corresponding to the service in the service resources of the plurality of service nodes according to the preset service configuration information.
In an optional embodiment, before creating a service process of a corresponding service in a service resource of a plurality of service nodes, the service process in the service resource may be emptied in advance, so as to avoid subsequent configuration exception.
In the embodiment, the service processes corresponding to the services are created in the service resources of the plurality of service nodes in advance, so that the subsequent rapid processing of the service requests is facilitated, and the service request efficiency is improved.
Optionally, the processing, by the target service node, the target service request based on the target service resource may include: the target service node processes the target service request based on the service processes in the target service resource.
In an optional embodiment, a service process of a corresponding service may be created in advance in service resources of a plurality of service nodes in combination with preset service configuration information, and accordingly, in a case where a corresponding service request needs to be processed, processing may be performed directly based on the corresponding service process.
In the embodiment, by combining the service processes of the corresponding services created in advance in the service resources of the multiple service nodes, the corresponding service processes can be directly processed under the condition that the corresponding service requests need to be processed, so that the processing efficiency of the service requests can be greatly improved.
An embodiment of a service request processing method according to the present disclosure is described below with a service scheduling node as an execution subject, and specifically, as shown in fig. 6, the service request processing method may include:
s601: receiving a target service request;
s603: determining target service identification information corresponding to the target service request;
s605: determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, wherein the preset service configuration information represents mapping relations between the plurality of service identification information and the service resources on the plurality of service nodes;
s607: and scheduling the target service request to the target service node so that the target service node processes the target service request based on the target service resource.
In an optional embodiment, the method further includes:
acquiring resource consumption data of a plurality of services;
determining service resources on a plurality of service nodes;
and based on the resource consumption data, establishing a mapping relation between the service identification information of the multiple services and the service resources on the multiple service nodes to obtain preset service configuration information.
In an optional embodiment, the method further comprises:
and creating a service process corresponding to the service in the service resources of the plurality of service nodes according to the preset service configuration information.
In an alternative embodiment, scheduling the target service request to the target service node to cause the target service node to process the target service request based on the target service resource includes:
and scheduling the target service request to the target service node so that the target service node processes the target service request based on the service process in the target service resource.
In an optional embodiment, the establishing a mapping relationship between service identification information of a plurality of services and service resources on a plurality of service nodes based on the resource consumption data, and the obtaining preset service configuration information includes:
determining service resource amount corresponding to each of the plurality of services according to the resource consumption data;
determining service resources allocated to a plurality of services from the service resources of the plurality of service nodes according to the service resource amount;
and establishing a mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located and the resource identification information of the service resource allocated to each service to obtain preset service configuration information.
In an optional embodiment, the method further includes:
acquiring preset configuration sequence information corresponding to multiple services;
determining service resources allocated to the plurality of services from the service resources of the plurality of service nodes according to the amount of the service resources comprises:
and determining the service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
In an optional embodiment, determining, based on the preset service configuration information, a target service node where a target service resource corresponding to the target service identification information is located includes:
determining a service node where a service resource corresponding to the target service identification information is located from preset service configuration information;
acquiring load information of a service node where a corresponding service resource is located;
and determining a target service node from the service nodes where the corresponding service resources are located according to the load information.
With regard to the method in the above-mentioned embodiment, the detailed manner of each step has been described in detail in the embodiment of the method on the interactive side, and will not be elaborated here.
Fig. 7 is a block diagram illustrating a service request processing apparatus in accordance with an example embodiment. Referring to fig. 7, the apparatus includes:
a target service request receiving module 710 configured to perform receiving a target service request;
a target service identification information determination module 720 configured to perform determining target service identification information corresponding to the target service request;
a target service node determining module 730, configured to execute determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, where the preset service configuration information represents mapping relationships between the plurality of service identification information and service resources on the plurality of service nodes;
a target service request scheduling module 740 configured to perform scheduling of the target service request to the target service node to cause the target service node to process the target service request based on the target service resource.
In an optional embodiment, the apparatus further comprises:
a resource consumption data acquisition module configured to perform acquisition of resource consumption data of a plurality of services;
a service resource determination module configured to perform determining service resources on a plurality of service nodes;
and the mapping relation establishing module is configured to execute mapping relation establishment between the service identification information of the plurality of services and the service resources on the plurality of service nodes based on the resource consumption data to obtain preset service configuration information.
In an optional embodiment, the apparatus further comprises:
and the service process creating module is configured to execute the service process of the corresponding service created in the service resources of the plurality of service nodes according to the preset service configuration information.
In an optional embodiment, the target service request scheduling module is further configured to perform scheduling the target service request to the target service node, so that the target service node processes the target service request based on the service process in the target service resource.
In an optional embodiment, the mapping relationship establishing module includes:
a service resource amount determination unit configured to perform determination of service resource amounts corresponding to the respective services according to the resource consumption data;
a service resource allocation module unit configured to perform determining service resources allocated to a plurality of services from service resources of a plurality of service nodes according to the amount of the service resources;
and the mapping relation establishing subunit is configured to execute the establishment of the mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located, and the resource identification information of the service resource allocated to each service, so as to obtain the preset service configuration information.
In an optional embodiment, the apparatus further comprises:
the system comprises a preset configuration sequence information acquisition module, a configuration information processing module and a configuration information processing module, wherein the preset configuration sequence information acquisition module is configured to acquire preset configuration sequence information corresponding to a plurality of services;
the service resource allocation module unit is further configured to determine service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
In an alternative embodiment, the target service node determining module 730 includes:
the service node determining unit is configured to determine a service node where the service resource corresponding to the target service identification information is located from preset service configuration information;
a load information acquisition unit configured to perform acquisition of load information of a service node where a corresponding service resource is located;
and the target service node determining unit is configured to determine a target service node from service nodes where the corresponding service resources are located according to the load information.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The method embodiments provided by the embodiments of the present application may be executed in a server, a network computing node, or a similar computing device. Taking the example of running on a server, fig. 8 is a hardware block diagram of a server implementing a service request processing method according to an exemplary embodiment. As shown in fig. 8, the server 800 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 810 (the processor 810 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 830 for storing data, one or more storage media 820 (e.g., one or more mass storage devices) for storing applications 823 or data 822. Memory 830 and storage medium 820 may be, among other things, transient or persistent storage. The program stored in storage medium 820 may include one or more modules, each of which may include a series of instruction operations for a server. Still further, the central processor 810 may be configured to communicate with the storage medium 820, and execute a series of instruction operations in the storage medium 820 on the server 800.The Server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input-output interfaces 840, and/or one or more operating systems 821, such as Windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM And so on.
The input/output interface 840 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 800. In one example, i/o Interface 840 includes a Network adapter (NIC) that may be coupled to other Network devices via a base station to communicate with the internet. In one example, the input/output interface 840 can be a Radio Frequency (RF) module, which is used to communicate with the internet via wireless.
It will be understood by those skilled in the art that the structure shown in fig. 8 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 800 may also include more or fewer components than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
In an exemplary embodiment, there is also provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the service request processing method as in the embodiments of the present disclosure.
In an exemplary embodiment, there is also provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform a service request processing method in an embodiment of the present disclosure.
In an exemplary embodiment, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the service request processing method in the embodiments of the present disclosure.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for processing a service request, comprising:
receiving a target service request, and determining target service identification information corresponding to the target service request;
determining a target service node where a target service resource corresponding to the target service identification information is located based on preset service configuration information, wherein the preset service configuration information represents a mapping relation among each piece of service identification information in the plurality of pieces of service identification information, node identification information of the service node where the service resource allocated to each type of service is located, and resource identification information of the service resource allocated to each type of service; the service identification information is preset identification information for distinguishing multiple services;
scheduling the target service request to the target service node to enable the target service node to process the target service request based on the target service resource.
2. The method of claim 1, further comprising:
acquiring resource consumption data of a plurality of services;
determining service resources on the plurality of service nodes;
and establishing a mapping relation between the service identification information of the plurality of services and the service resources on the plurality of service nodes based on the resource consumption data to obtain the preset service configuration information.
3. The method of claim 2, further comprising:
and creating a service process corresponding to the service in the service resources of the plurality of service nodes according to the preset service configuration information.
4. The method of claim 3, wherein the scheduling the target service request to the target service node to cause the target service node to process the target service request based on the target service resource comprises:
scheduling the target service request to the target service node so that the target service node processes the target service request based on the service processes in the target service resource.
5. The method of claim 2, wherein the establishing a mapping relationship between the service identifier information of the plurality of services and the service resources on the plurality of service nodes based on the resource consumption data to obtain the preset service configuration information comprises:
determining service resource amount corresponding to each of the plurality of services according to the resource consumption data;
determining service resources allocated to the plurality of services from the service resources of the plurality of service nodes according to the service resource amount;
and establishing a mapping relation among the service identification information of each service, the node identification information of the service node where the service resource allocated to each service is located and the resource identification information of the service resource allocated to each service, so as to obtain the preset service configuration information.
6. The method of claim 5, further comprising:
acquiring preset configuration sequence information corresponding to the multiple services;
the determining, from the service resources of the plurality of service nodes according to the service resource amount, the service resources allocated to the plurality of services includes:
and determining the service resources allocated to the plurality of services according to the preset configuration sequence information and the service resource amount.
7. The method according to any one of claims 1 to 6, wherein the determining, based on the preset service configuration information, the target service node where the target service resource corresponding to the target service identification information is located includes:
determining a service node where a service resource corresponding to the target service identification information is located from the preset service configuration information;
acquiring load information of a service node where the corresponding service resource is located;
and determining a target service node from the service nodes where the corresponding service resources are located according to the load information.
8. A service request processing apparatus, comprising:
a target service request receiving module configured to perform receiving a target service request;
a target service identification information determining module configured to perform determining target service identification information corresponding to the target service request;
a target service node determination module configured to perform determination of a target service node where a target service resource corresponding to target service identification information is located based on preset service configuration information, where the preset service configuration information represents a mapping relationship among each piece of service identification information in a plurality of pieces of service identification information, node identification information of a service node where the service resource allocated to each service is located, and resource identification information of the service resource allocated to each service; the service identification information is preset identification information for distinguishing multiple services;
a target service request scheduling module configured to perform scheduling of the target service request to the target service node to cause the target service node to process the target service request based on the target service resource.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the service request processing method of any of claims 1 to 7.
10. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable a service request processing device to perform a service request processing method according to any one of claims 1 to 7.
CN202110441886.3A 2021-04-23 2021-04-23 Service request processing method and device, electronic equipment and storage medium Active CN113179308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110441886.3A CN113179308B (en) 2021-04-23 2021-04-23 Service request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110441886.3A CN113179308B (en) 2021-04-23 2021-04-23 Service request processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113179308A CN113179308A (en) 2021-07-27
CN113179308B true CN113179308B (en) 2023-04-07

Family

ID=76924568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110441886.3A Active CN113179308B (en) 2021-04-23 2021-04-23 Service request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113179308B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018134911A1 (en) * 2017-01-18 2018-07-26 Nec Corporation Resource allocation system, method, and program
CN110321252A (en) * 2019-07-02 2019-10-11 苏州思必驰信息科技有限公司 A kind of method and apparatus of craft services scheduling of resource

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109471727B (en) * 2018-10-29 2021-01-22 北京金山云网络技术有限公司 Task processing method, device and system
CN110351342A (en) * 2019-06-20 2019-10-18 平安科技(深圳)有限公司 Service order processing method, device, computer equipment and storage medium
CN112130983A (en) * 2020-10-27 2020-12-25 上海商汤临港智能科技有限公司 Task processing method, device, equipment, system and storage medium
CN112506637A (en) * 2020-12-17 2021-03-16 广东省科技基础条件平台中心 Image data processing method, image data processing device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018134911A1 (en) * 2017-01-18 2018-07-26 Nec Corporation Resource allocation system, method, and program
CN110321252A (en) * 2019-07-02 2019-10-11 苏州思必驰信息科技有限公司 A kind of method and apparatus of craft services scheduling of resource

Also Published As

Publication number Publication date
CN113179308A (en) 2021-07-27

Similar Documents

Publication Publication Date Title
WO2020177533A1 (en) Electronic invoice identifier allocation method, and electronic ticket generating method, device and system
CN115328663B (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN112231049A (en) Computing equipment sharing method, device, equipment and storage medium based on kubernets
US20180375957A1 (en) Access scheduling method and apparatus for terminal, and computer storage medium
CN109889401B (en) Flow statistical method, device, computer equipment and storage medium
CN112825042A (en) Resource management method and device, electronic equipment and storage medium
CN111666131A (en) Load balancing distribution method and device, computer equipment and storage medium
CN111078516A (en) Distributed performance test method and device and electronic equipment
CN114244717A (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN111427551A (en) User code operation method of programming platform, equipment and storage medium
CN112468589A (en) Data distribution method and device, computer equipment and storage medium
CN112422450A (en) Computer equipment, and flow control method and device for service request
CN113220432B (en) Multi-cloud interconnection method, device, equipment, storage medium and product
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN111611017B (en) Display card selection method and related device
CN113179308B (en) Service request processing method and device, electronic equipment and storage medium
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN109005071B (en) Decision deployment method and scheduling equipment
CN110609707A (en) Online data processing system generation method, device and equipment
CN114924888A (en) Resource allocation method, data processing method, device, equipment and storage medium
CN113055199B (en) Gateway access method and device and gateway equipment
CN113656181A (en) Method and device for issuing real-time application cluster instance resources
CN111796934A (en) Task issuing method and device, storage medium and electronic equipment
CN110046040B (en) Distributed task processing method and system and storage medium
CN112328598A (en) ID generation method, 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