CN111131401A - Service request response method and system - Google Patents

Service request response method and system Download PDF

Info

Publication number
CN111131401A
CN111131401A CN201911233030.6A CN201911233030A CN111131401A CN 111131401 A CN111131401 A CN 111131401A CN 201911233030 A CN201911233030 A CN 201911233030A CN 111131401 A CN111131401 A CN 111131401A
Authority
CN
China
Prior art keywords
service
service request
node
processing
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911233030.6A
Other languages
Chinese (zh)
Other versions
CN111131401B (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.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech 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 Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN201911233030.6A priority Critical patent/CN111131401B/en
Publication of CN111131401A publication Critical patent/CN111131401A/en
Application granted granted Critical
Publication of CN111131401B publication Critical patent/CN111131401B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

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

Abstract

The invention is suitable for the technical field of Internet, and provides a service request response method and a service request response system, wherein the service request response method comprises the following steps: sending a service request to the process control middleware; identifying service types corresponding to the service requests, and configuring task information about the service requests for each service type; inquiring service processing nodes related to the service types and sending the task information; and generating a service response result of the service request according to the task result fed back by the service processing node, and sending the service response result. The invention sends the task information to the corresponding service processing node for processing according to the service type, thereby ensuring the independence of processing logic of different types of service requests and realizing the parallel processing of multiple types of tasks.

Description

Service request response method and system
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a service request response method and system.
Background
With the continuous development of the internet technology, more and more services can be realized in an online mode, and various types of service requests can be completed online, so that the service response efficiency is greatly improved, and the convenience degree of using the service requests by users is improved.
In the existing response technology of the service request, when providing quick and various service requests for users, different service requests are processed by the same server, particularly, with the diversification of terminal equipment, one service request relates to different service types, and when the service requests are responded by the same server, the server needs to process and complete one type of task to execute the next type of task, so that not only is the processing logic conflict easily caused, but also the service response time length is prolonged, and the service response efficiency is reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for responding to a service request, so as to solve the problem that, in the existing response technology for a service request, because different service requests are all processed by the same server, when one service request relates to different service types, processing logic conflicts are easily caused, and the service response duration is prolonged, thereby reducing the efficiency of the service response.
A first aspect of an embodiment of the present invention provides a method for responding to a service request, which is applied to a system for responding to a service request, where the method for responding to a service request includes:
sending a service request;
identifying service types corresponding to the service requests, and configuring task information about the service requests for each service type;
inquiring a service processing node associated with the service type, and sending the task information to the service processing node so as to output a task result of the task information through the service processing node;
and generating a service response result of the service request according to the task result fed back by the service processing node, and sending the service response result.
A second aspect of an embodiment of the present invention provides a system for responding to a service request, where the system for responding to a service request includes: service distribution middleware, processing control middleware and at least one service processing node;
the service distribution middleware is used for sending the received service request to the processing control middleware;
the processing control middleware is used for identifying the service type corresponding to the service request and configuring task information related to the service request for each service type;
the processing control middleware is used for inquiring the service processing node associated with the service type and sending the task information to the service processing node so as to output a task result of the task information through the service processing node;
and the processing control middleware is used for generating a service response result of the service request according to the task result fed back by the service processing node and sending the service response result.
The method and the system for responding the service request provided by the embodiment of the invention have the following beneficial effects:
the embodiment of the invention receives the service request sent by each terminal device through the service distribution middleware and forwards the service request to the corresponding processing control middleware, determines the service type contained in the service request through the processing control middleware, configures corresponding task information for different service types, sends each task information to the corresponding service processing node for response, encapsulates the processing result fed back by all the service processing nodes to obtain the response result related to the service request, and achieves the purpose of processing multi-type services in parallel. Compared with the prior art for responding service requests, the method and the system have the advantages that the corresponding service processing nodes are configured for different service types, the service types related to the service requests are subjected to task division through the processing control middleware to obtain a plurality of task information, and the task information is sent to the corresponding service processing nodes to be processed according to the service types, so that the independence of processing logics of the service requests of different types can be guaranteed, the parallel processing of multiple types of tasks can be realized, the coupling degree among different service types is reduced, the service response efficiency is improved, and the service response duration is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is an interaction flowchart of a method for responding to a service request according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a detailed implementation of a method S103 for responding to a service request according to a second embodiment of the present invention;
fig. 3 is a flowchart of a detailed implementation of a method S1031 for responding to a service request according to a third embodiment of the present invention;
fig. 4 is a flowchart of a detailed implementation of a method for responding to a service request according to a fourth embodiment of the present invention;
fig. 5 is a flowchart illustrating a detailed implementation of a method S103 for responding to a service request according to a fifth embodiment of the present invention;
fig. 6 is a flowchart of a specific implementation of a method S101 for responding to a service request according to a sixth embodiment of the present invention;
fig. 7 is a flowchart of a detailed implementation of a method S101 for responding to a service request according to a seventh embodiment of the present invention;
fig. 8 is a block diagram illustrating a response system for a service request according to an embodiment of the present invention;
fig. 9 is a block diagram of a response system for a service request according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention receives the service request sent by each terminal device through the service distribution middleware and forwards the service request to the corresponding processing control middleware, determining the service type contained in the service request through the processing control middleware, configuring corresponding task information for different service types, and sends each task information to the corresponding service processing node for response, encapsulates the processing results fed back by all the service processing nodes to obtain the response result about the service request, realizes the purpose of parallel processing of multiple types of services, solves the response technology of the existing service request, since different service requests are handled by the same server, when a service request relates to a different service type, easily causing a conflict of processing logics and extending the service response time length, thereby reducing the efficiency of service response.
In the embodiment of the invention, the execution subject of the flow is a response system of the service request. The response to the service request includes service distribution middleware, process control middleware, and at least one service processing node. The service distribution middleware and the processing control middleware may be a server, and the service processing node may be a server or a server cluster including a plurality of servers. Fig. 1 shows a flowchart of an implementation of a method for responding to a service request according to a first embodiment of the present invention, which is detailed as follows:
in S101, a service request transmission is transmitted.
In this embodiment, the terminal device may send the service request to the response system of the service request through a client installed locally or a web page associated with the response system of the access service request. The service request carries a service type or a service identifier of a request, and optionally, the service request may further include a service requester, that is, the device identifier of the terminal device. The response system of the service request can converge all the service requests received from the terminal side to the service distribution middleware and forward the service requests through the service distribution middleware.
For example, the terminal device sending the service request may be an intelligent robot, and during an automation process of the intelligent robot, the intelligent robot may package the acquired environment information, generate a target identification request, that is, the service request is a service request for identifying a target object, and send the service request including the environment information to the service distribution middleware. The intelligent robot can perform cloud processing on the acquired information through a response system with the service request, so that the data processing capacity can be improved.
For example, the terminal device sending the service request may be a distributed camera device, and the distributed camera device may collect video data of the current environment, package the video data into a face recognition request, that is, the service request is a service request for face recognition, and send the service request including the video data to the service distribution middleware. The distributed camera device can perform cloud processing on the collected video data through a response system with the service request, so that the purpose of face recognition is achieved, the accuracy of face recognition can be improved by performing face recognition through a cloud end, compared with the technology of completing face recognition through a local mode, the recognition efficiency can be greatly improved, the requirements of a processing module of the distributed camera device are reduced, and the manufacturing cost of the distributed video device is reduced.
For example, the terminal device sending the service request may be a user terminal, for example, a smart device such as a smart phone, a tablet computer, or a smart watch used by a user, and encapsulates collected information, for example, voice data (for performing voice recognition) or image data (for performing face recognition, text recognition, or object recognition) into the service request, and processes the data recognition through a response system of the service request, so that the smart recognition range of the user terminal can be enhanced, and the usability of the terminal device can be expanded.
In this embodiment, the service distribution middleware serves as a sink node of the service request, sends the service request initiated by all the terminal devices to the service distribution middleware, and forwards the service request to the corresponding processing control middleware through the service distribution middleware.
In this embodiment, after the terminal device sends a service request to the service distribution middleware, the service distribution middleware may configure a corresponding session identifier, that is, a SessionID, for the service request; when the terminal equipment sends a service request to a response system of the service request for the first time through a built-in client, the system creates a Session for the client, configures a corresponding Session ID for each service request through a preset Session identifier generation algorithm, and the service distribution middleware establishes a corresponding relationship between a client Session represented by the Session ID and the service request of the Session, namely the request of the Session contains the Session ID and the service request, and stores the corresponding relationship in a database, thereby facilitating the subsequent query operation.
Optionally, in this embodiment, before forwarding the service request to the process control middleware, the service distribution middleware may filter the abnormal service request through the data filtering unit, that is, deploy the data filtering unit between the communication links between the service distribution middleware and the process control middleware. After receiving a service request sent by a user terminal, the data filtering unit determines whether the service request contains a preset key parameter item, where the key parameter item includes, but is not limited to, a service type, a terminal identifier of the user terminal, a network address, and other one or more combinations. If the data filtering unit detects that the service request does not contain any key parameter item, the data filtering unit identifies the service request as an abnormal request and filters the abnormal request, so that data is cleaned, a large number of invalid requests are prevented from entering a response system of the service request, the safety of the system is improved, response operation of the invalid requests is reduced, and resource waste is avoided.
In S102, a service type corresponding to the service request is identified, and task information about the service request is configured for each service type.
In this embodiment, after receiving the service request sent by the service distribution middleware, the processing control middleware identifies a service type corresponding to the service request. The service type may include one or a combination of two or more of the following: the target recognition type, the face recognition type, the voice recognition type, the biological sign recognition type, the character recognition and other services. The processing control middleware may determine a corresponding service type according to the request content of the service request, and may query the corresponding service type based on the service identifier if the service request carries the service identifier.
It should be noted that, part of the service request may be completed together through a plurality of service logics, for example, the intelligent robot sends environment video data, needs to identify a target type in the environment, needs to perform face recognition on an object of a "person" type after identifying the target type, and then the service request includes two service types, namely, target type recognition and face recognition. Therefore, the processing control middleware needs to determine the service type corresponding to the service request, and the service type may be one or a combination of multiple types.
Optionally, in this embodiment, the processing control middleware may be configured with a service request index table, where the service request index table includes service types corresponding to the service requests. The terminal device may determine the service type associated with each received service request by querying the service request index table. For example, the processing control middleware may determine, by a bit value of a preset byte in the service identifier, an entry corresponding to the service request in the service request index table, and query a service type included in the entry.
In this embodiment, because different service types are processed by different service processing nodes, the service processing middleware needs to split the service request, divide the service request into different task information, where each task information corresponds to one service type, and define the content that the service type needs to complete.
In S103, a service processing node associated with the service type is queried, and the task information is sent to the service processing node, so that a task result of the task information is output by the service processing node.
In this embodiment, the processing control middleware may configure a correspondence table between service types and service processing nodes, where each service processing node may correspond to one service type. The service response middleware may query the correspondence table, determine a service processing node corresponding to a service type for responding to the received service request, and send task information corresponding to the service type to the service processing node associated with the service type for processing.
Optionally, in this embodiment, the process control middleware may configure a state list related to the operating state of the service processing node. The state list includes the service type and the operation state associated with each service processing node. When a service response request of any service type does not exist in a response system of the service request, the service response middleware can adjust the running state of the first service processing node associated with the service type to a closed state and update a state list; if the running state of the service processing node corresponding to the service type received by the response system of the service request is detected to be the closed state, the service processing node corresponding to the service type can be started, and the state list is updated. The processing control middleware can determine the service types which can be responded in the current service response system and the currently started service types according to the state list, and open and close the corresponding service processing nodes based on the service types contained in the received service request, so that the resource consumption of the service response system can be reduced.
In this embodiment, the service processing node receives the task information forwarded by the processing control middleware, responds to the issued task information, and generates a corresponding task result. Alternatively, the service processing node may add the task information into the response queue and sequentially respond based on the addition order of the respective task information.
Optionally, in this embodiment, the processing control middleware may set a maximum response time length. After the processing control middleware sends the task information, the processing control middleware starts a response timer and detects whether the count value of the response timer is greater than the maximum response time length. If the counting value of the response timer is detected to be larger than the maximum response time and the task result fed back by the service processing node is not received, the service processing node without the task result can be identified as an abnormal node, and abnormal processing information is generated so that maintenance personnel can process the abnormal node.
In S104, a service response result of the service request is generated according to the task result fed back by the service processing node, and the service response result is sent.
In this embodiment, the processing control middleware receives task results fed back from each service processing node, packages and merges all task results, generates a service response result corresponding to the service request, extracts a communication address corresponding to the terminal device that sends the service request from the service request, and sends the service response result to the terminal device based on the communication address, thereby completing the service response flow.
Optionally, the processing control middleware may feed back the generated service response result to the service distribution middleware, and since the service distribution middleware may maintain a communication link and/or session with the terminal device, the service response result may be sent to the service distribution middleware and sent to the terminal device through the service distribution middleware.
As can be seen from the above, in the service request response method provided in the embodiment of the present invention, the service allocation middleware receives the service request sent by each terminal device, and forwards the service request to the corresponding processing control middleware, the processing control middleware determines the service type included in the service request, configures corresponding task information for different service types, sends each task information to the corresponding service processing node for response, and encapsulates the processing results fed back by all the service processing nodes to obtain the response result related to the service request, thereby achieving the purpose of processing multiple types of services in parallel. Compared with the prior art for responding service requests, the method and the system have the advantages that the corresponding service processing nodes are configured for different service types, the service types related to the service requests are subjected to task division through the processing control middleware to obtain a plurality of task information, and the task information is sent to the corresponding service processing nodes to be processed according to the service types, so that the independence of processing logics of the service requests of different types can be guaranteed, the parallel processing of multiple types of tasks can be realized, the coupling degree among different service types is reduced, the service response efficiency is improved, and the service response duration is reduced.
Fig. 2 shows a flowchart of a specific implementation of S103 of a method for responding to a service request according to a second embodiment of the present invention. Referring to fig. 2, with respect to the embodiment described in fig. 1, a method S103 for responding to a service request provided in this embodiment includes: s1031 to S1033 are specifically described as follows:
further, the service processing node comprises a plurality of cluster servers; the querying the service processing node associated with the service type and sending the task information to the service processing node includes:
in S1031, the operation parameters fed back by each cluster server in the service processing node are obtained.
In this embodiment, each service processing node may include a plurality of cluster servers, where the plurality of cluster servers together form the service processing node, and are configured to process all tasks of the service type corresponding to the service processing node. The service processing node may be configured with an available device list, where the available device list records all cluster servers included in the service processing node and is marked with an operating parameter corresponding to each cluster server. Before sending the task information, the process control middleware may obtain the operating parameters of each cluster server by reading the available device list.
In this embodiment, the cluster server may actively feed back the operation parameters, for example, a response system of the service request may be configured with a feedback period, and if the cluster server detects that the current time reaches the preset feedback period, the cluster server may obtain the local operation parameters and upload the operation parameters; the response system of the service request may also be provided with a plurality of operation thresholds, and if the cluster server detects that the operation threshold is exceeded or fallen below at a certain time, the cluster server may feed back a notification message to the response system of the service request to notify the response system of the service request that the operation parameter of the cluster server reaches a certain parameter range.
Optionally, the cluster server may passively send the operation parameter, and after receiving the service request, the processing control middleware may send a broadcast message to the service processing node corresponding to the service type to notify all cluster servers connected to the service processing node to feed back the operation parameter.
It should be noted that the operation parameter is a parameter indicating the operation condition of the current environment of the cluster server, and the operation parameter includes, but is not limited to: a combination of one or more of a load value, network bandwidth, network rate, available hardware resource value, data processing rate, and/or available thread count.
In S1032, the response priority of each cluster server is calculated by a preset load balancing algorithm.
In this embodiment, after acquiring the operating parameters of each cluster server, the processing control middleware may respectively calculate the response priority of each cluster server, where if the response priority of a cluster server is higher, the data processing capability of the cluster server is higher, and conversely, if the corresponding response priority of a cluster server is lower, the data processing capability of the cluster server is lower. Therefore, it is possible to determine to which cluster server within the service processing node the task information is specifically allocated to respond by the size of the response priority.
Optionally, in this embodiment, the way for the processing control middleware to calculate the response priority may be: and the processing control middleware configures corresponding reference values for different operation parameters, respectively calculates the ratio between the actually acquired operation parameters and the corresponding reference values, and performs weighted superposition according to the weights corresponding to the operation parameters, thereby calculating the response priority of the cluster server.
Figure BDA0002304088710000101
Wherein Priority is the response Priority of the cluster server, FactRuniThe ith operating parameter of the cluster server; StandardRuniIs the ith reference value ξiAnd n is the total number of the operation parameters.
Optionally, in this embodiment, the way for the processing control middleware to calculate the response priority may be: the processing control middleware can perform normalization operation on each operation parameter, and superimposes the normalized operation parameters according to the preset weight of each operation parameter, so as to calculate the response priority of the cluster server, wherein the specific formula is as follows:
Figure BDA0002304088710000102
wherein Priority is the response Priority of the jth cluster server, FactRunjiξ as the ith operating parameter of the jth cluster serveriThe weight value corresponding to the ith operating parameter is obtained, and n is the total number of the operating parameters; and m is the total number of the cluster servers.
In S1033, the cluster server with the highest response priority is selected as a target server, and the task information is sent to the target server.
In this embodiment, after the processing control middleware calculates the response priority of each cluster server, the cluster servers may be sorted according to the priority value, and the cluster server corresponding to the largest value of the response priority is selected as the target server, and the task information corresponding to the service request is processed by the target server.
In the embodiment of the invention, the response priority of each cluster server in the service processing node is obtained, and the cluster server with the highest priority is selected as the target server, so that the purpose of load balancing can be realized, and the data processing capacity of the response system of the service request and the stability of the system are improved.
Fig. 3 shows a flowchart of a specific implementation of a method S1031 for responding to a service request according to a third embodiment of the present invention. Referring to fig. 3, with respect to the embodiment described in fig. 2, a method S1031 for responding to a service request provided by this embodiment includes: s301 to S303 are specifically detailed as follows:
further, the response system of the service request also comprises a node registration server; the obtaining of the operation parameters fed back by each cluster server in the service processing node includes:
in S301, if it is detected that a preset feedback condition is satisfied, the operation parameter is sent to the node registration server.
In this embodiment, the cluster server may be configured with a feedback condition, where the feedback condition may be a time trigger condition, in this case, the cluster server may be provided with a feedback period or a feedback time node, and if it is detected that the current time reaches a feedback time node or a feedback period that meets a preset condition, the cluster server recognizes that the current time meets the feedback condition, and performs the operation of S301. The feedback condition may also be an event trigger condition, in which case, when a feedback instruction fed back by the node registration server is received, it is identified that a preset event trigger condition is satisfied, or an instantaneous parameter change ratio is set, and if it is detected that a change rate of an operation parameter of the cluster server is greater than the instantaneous parameter change ratio within a certain time period, it is identified that the feedback condition is satisfied, and the operation parameter is sent to the node registration server.
In this embodiment, the node registration server may be configured to manage the operating status of each cluster server. When the cluster server is started, a registration instruction needs to be sent to the node registration server, and the node registration server adds the cluster server into the monitoring list and obtains the operating parameters of each cluster server in the monitoring list.
In S302, the operating parameters of each cluster server are recorded by the node registration server.
In this embodiment, the node registration server may store the operation parameters fed back by each cluster server, and establish a corresponding relationship between the cluster server and the operation parameters.
Optionally, the node registration server may configure a corresponding effective time for each operation parameter, and the lengths of the effective times corresponding to different operation parameters may be different or the same. After receiving the operation parameters fed back by the cluster server, the node registration server starts a timer corresponding to the operation parameters, if the count value of the timer is detected to be greater than the effective duration corresponding to the operation parameters and the operation parameters returned by the cluster server are not received, the node registration server identifies that the currently recorded operation parameters are invalid, and sends a parameter feedback instruction to the cluster server to reacquire the operation parameters of the cluster server.
In S303, the node registration server receives the query instruction sent by the processing control middleware, and sends the operating parameter of each cluster server in the service processing node corresponding to the node identifier to the processing control middleware according to the node identifier included in the query instruction.
In this embodiment, the node registration server may be configured to store the operating parameters of the cluster servers in all the service processing nodes. Before receiving the service request and sending the task information, the processing control middleware may send a query instruction to the node registration server, where the query instruction carries a node identifier to be queried, and the node identifier is used to define a service processing node to be invoked for responding to the service request.
In this embodiment, the node registration server may analyze the query instruction, determine the target service processing node through the node identifier, determine each cluster server associated with the service processing node, query the operating parameters corresponding to each cluster server, encapsulate all the operating parameters, and send the encapsulated operating parameters to the processing control middleware.
In the embodiment of the invention, the running state of each cluster server is managed through the node registration server, and the processing control middleware can obtain the running parameters of all the cluster servers through the node registration server, so that the obtaining efficiency of the running parameters can be improved.
Fig. 4 is a flowchart illustrating a specific implementation of a method for responding to a service request according to a fourth embodiment of the present invention. Referring to fig. 4, in relation to the embodiment described in fig. 1, the method for responding to a service request provided in this embodiment further includes: s401 to S403 are specifically described as follows:
further, the response system of the service request further comprises deployment middleware; the service processing node comprises a plurality of cluster servers; the response method of the service request further comprises the following steps:
in S401, the load value of each cluster server is obtained through the deployment middleware.
In this embodiment, the deployment middleware may be configured to manage the operating states of the cluster servers, and if it is detected that the load condition of the current network is low, a certain number of cluster servers may be closed, so as to reduce energy consumption of the system; if the load condition of the current network is detected to be higher, a certain number of cluster servers can be started to improve the data processing capacity of the system and dynamically adjust the response capacity of the service request of the response system of the service request.
In this embodiment, the deployment middleware may obtain the load value of the cluster server in a preset monitoring period, and obtain the overall load condition of the response system of the entire service request.
In S402, if it is detected that the load value of each cluster server in any service processing node is greater than a preset first load threshold, a standby server is started, and the standby server is added to the available device list of the service request node.
In this embodiment, when the deployment middleware detects that the load value of each cluster server is greater than the preset first load threshold, it indicates that the load of the entire service processing node is in a higher state, and possibly some cluster servers are in a full load or overload condition, and it is necessary to perform capacity expansion operation on the service processing node, select one of the standby servers as a capacity expansion server, set the operating state of the capacity expansion server as an open state, set the capacity expansion server as an available device list of the service request node, and then when subsequently receiving task information of the service type, send the task information to the expanded standby server for processing.
In S403, if it is detected that the load value of each cluster server in any of the service processing nodes is smaller than a preset second load threshold, at least one cluster server is selected from the service processing nodes as a redundant server, and the redundant server is closed.
In this embodiment, when the deployment middleware detects that the load value of each cluster server is smaller than the preset second load threshold, it indicates that the load of the entire service processing node is in a lower state, and then the tasks of the service type corresponding to the service processing node are fewer, and at this time, the corresponding number of servers may be closed, so that the corresponding number of cluster servers is selected as the redundant server, and the redundant server is closed, thereby reducing the resource consumption of the response system.
In the embodiment of the invention, the deployment middleware is added into the response system of the service request, and the deployment middleware is used for controlling the on-off state of the cluster server, so that the processing capacity of each service processing node can be dynamically adjusted, and the resource utilization rate is improved.
Fig. 5 is a flowchart illustrating a specific implementation of the method S103 for responding to a service request according to a fifth embodiment of the present invention. Referring to fig. 5, with respect to any of the embodiments shown in fig. 1 to 4, a method S103 for responding to a service request provided in this embodiment includes: S501-S502 are detailed as follows:
further, the querying, by the processing control middleware, a service processing node associated with the service type, and sending the task information to the service processing node, so as to output a task result of the task information through the service processing node, including:
in S501, a response procedure associated with the service request is obtained, and a processing order corresponding to each piece of task information is determined based on the response procedure.
In this embodiment, after obtaining the service request, the processing control middleware may query a response procedure associated with the service identifier according to the service identifier corresponding to the service request. The service identification may be associated with session information sent by the service request. The terminal device may send the service request to a response system of the service request through different clients, and when the different clients establish a communication connection with the response system, the session information used is different, for example, the service request sent through different channels, that is, the clients, may be marked by information such as a session number. Based on this, the response system of the service request can determine the client corresponding to the service request by analyzing the session information of the service request, and when responding to the service request placed by different clients, the corresponding response flows are different, so that the response flow of the service request can be determined by analyzing the session information.
In this embodiment, the response flow is specifically used to define the tasks that need to be executed when responding to the service request and the processing order among the tasks, and based on this, the processing control middleware may determine a plurality of task nodes by analyzing the response flow, configure corresponding task information for different task nodes, and determine the processing order of each task information based on the position of each task node in the response flow.
In S502, based on the processing order, the service processing nodes corresponding to the task information are sequentially assigned.
In this embodiment, the processing control middleware may send the task information to the corresponding service processing node according to the determined response order, and send the task information of the next response order to the service processing node of the next processing order after receiving the processing result fed back by the service processing node. Optionally, if an iterative relationship exists between the multiple service processing nodes, that is, the service processing node in the next processing order needs the processing result in the previous processing order, the processing control middleware may add the processing result fed back by the previous processing order into the task information in the next processing order, and send the added task information to the service processing node corresponding to the next processing order.
For example, for the face recognition process, it is necessary to first recognize the object type of each object in the image information, and perform face recognition from the object whose object type is "person". Therefore, the processing control middleware can send the task information identified by the object type to the first service processing node and receive the object type list fed back by the first service processing node; and adding the object type list into the task information, and delivering the task information to a second service processing node for processing face recognition for subsequent processing.
In the embodiment of the invention, the processing sequence of each task information is determined by obtaining the response flow of the service request, and the accuracy of the service request processing logic is ensured.
Fig. 6 shows a flowchart of a specific implementation of S101 of a method for responding to a service request according to a sixth embodiment of the present invention. Referring to fig. 6, in contrast to any one of the embodiments shown in fig. 1 to 4, a method S101 for responding to a service request provided by this embodiment includes: s1011 to S1012, detailed description is as follows:
further, the sending the service request includes:
in S1011, a topic type associated with the service request is identified.
In this embodiment, each service request corresponds to a Topic type, i.e., Topic. The service distribution middleware and the processing control middleware can determine the processing control middleware corresponding to different topic types by establishing a publish-subscribe relationship. Based on this, after receiving the service request, the service distribution middleware needs to determine the topic type associated with the service request.
Optionally, the topic type may be determined according to a session identifier required for the service request. The session identifier, i.e. the SessionID, may determine the topic type associated with the service request by parsing the bit value of the field corresponding to the SessionID.
Optionally, the topic type may be determined by a client type issued by the service request, and the service distribution middleware may determine, by parsing a client number of the service request, a client type corresponding to the service request, and determine, based on the client type, an associated topic type.
In S1012, a pre-stored topic subscription list is queried, the processing control middleware subscribing to the topic type is determined, and the service request is sent to the processing control middleware.
In this embodiment, service requests of different topic types may be distributed in response through different processing control middleware, based on which, the processing control middleware may establish a subscription-distribution relationship with the service distribution middleware, and after receiving a service request of a corresponding topic type, the service distribution middleware may perform a distribution operation of the service request to the processing control middleware subscribed to the topic type, thereby being capable of directionally sending the service request of an associated topic type. Based on this, the service distribution middleware can determine the processing control middleware corresponding to the topic type of the service request received this time by querying the topic subscription list, and send the service request to the processing control middleware for subsequent response operation.
In the embodiment of the invention, the processing control middleware corresponding to the processing service request is determined by identifying the theme type of the service request, so that different theme types can be responded by different processing control middleware, and the coupling degree between service response flows of different theme types is reduced.
Fig. 7 is a flowchart illustrating a specific implementation of a method S101 for responding to a service request according to a seventh embodiment of the present invention. Referring to fig. 7, with respect to any embodiment described in fig. 1 to 4, a method S101 for responding to a service request provided by this embodiment includes: s701 to S702 are specifically detailed as follows:
in S701, the service request is added to a to-be-processed list, and a processing order of the service request in the to-be-processed list is determined according to a receiving time of the service request.
In this embodiment, when responding to a service request, the service distribution middleware may perform processing in an asynchronous response manner, that is, after receiving the service request sent by the terminal device, add the service request to the to-be-processed list, determine a processing order of each service request according to the receiving time of each to-be-processed request, and sequentially respond to each service request.
In S702, based on the processing order, the service requests in the to-be-processed list are sequentially sent.
In this embodiment, the service distribution middleware may send each service request stored in the pending list to each process control middleware according to the determined processing order. If a plurality of processing control middleware exist in the response system of the service request, each service request can be sequentially sent to the processing control middleware corresponding to the theme type of the service request for response according to the theme type of each service request.
In the embodiment of the invention, the service request is added into the list to be processed, so that asynchronous response of the service request is realized, the data processing efficiency of a response system of the service request can be improved, and the load pressure of the system is reduced.
Fig. 8 is a schematic structural diagram illustrating a response system for a service request according to an embodiment of the present invention. Referring to fig. 8, the response system of the service request includes a terminal device 81, service distribution middleware 82, process control middleware 83, a service processing node 84, a node registration server 85, and deployment middleware 86. The terminal device 81 may send the service request to the service distribution middleware 82, forward the service request to the processing control middleware 83 through the service distribution middleware 82, and determine the service processing node 84 corresponding to the response service request through the processing control middleware 83, because each service processing node often includes a plurality of cluster servers, a node registration server 85 may be cascaded, and the node registration server 85 determines the cluster server in the target service processing node for responding to the task information of the service type corresponding to the service request. The terminal devices 81 may be classified into a smart robot 811, a camera device 812, a smart phone 813, and a notebook computer 814 according to the terminal types, and each of the terminal devices may transmit a service request to a response system of the service request through a built-in client. The service processing nodes can be divided into a service processing node 1 (corresponding to reference numeral 841) for processing intention recognition, a service processing node 2 (corresponding to reference numeral 842) for processing voice recognition, a service processing node 3 (corresponding to reference numeral 843) for processing face recognition, and a service processing node 4 (corresponding to reference numeral 844) for processing object recognition, according to the types of response services. The response system of the service request may further include a deployment middleware 84 for controlling the startup of each cluster server.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 9 is a block diagram illustrating a structure of a service request response system according to another embodiment of the present invention, where the service request response system includes units for performing the steps in the corresponding embodiment of fig. 1. Please refer to fig. 1 and fig. 1 for the corresponding description of the embodiment. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 9, the service request response system includes: service distribution middleware 91, process control middleware 92, and at least one service processing node 93;
the service distribution middleware 91 is configured to send the received service request to the processing control middleware 92;
the processing control middleware 92 is configured to identify a service type corresponding to the service request, and configure task information about the service request for each service type;
the processing control middleware 92 is configured to query the service processing node 93 associated with the service type, and send the task information to the service processing node 93, so as to output a task result of the task information through the service processing node 93;
the processing control middleware 92 is configured to generate a service response result of the service request according to the task result fed back by the service processing node, and send the service response result.
Optionally, the service processing node 93 comprises a plurality of cluster servers 931;
the processing control middleware 92 is configured to query the service processing node associated with the service type, and send the task information to the service processing node, and includes:
the processing control middleware 92 is configured to obtain an operation parameter fed back by each cluster server in the service processing node;
the processing control middleware 92 is configured to calculate a response priority of each cluster server through a preset load balancing algorithm;
the processing control middleware 92 is configured to select the cluster server with the highest response priority as a target server, and send the task information to the target server.
Optionally, the response system of the service request further includes a node registration server;
the processing control middleware 92 is configured to obtain the operation parameters fed back by each cluster server in the service processing node, and includes:
the cluster server is used for sending the operation parameters to the node registration server if the cluster server detects that a preset feedback condition is met;
the node registration server is used for recording the operation parameters of each cluster server;
and the node registration server is used for receiving the query instruction sent by the processing control middleware and sending the operating parameters of each cluster server in the service processing node corresponding to the node identification to the processing control middleware according to the node identification contained in the query instruction.
Optionally, the response system of the service request further includes deployment middleware; the service processing node 93 comprises a plurality of cluster servers 931; the response method of the service request further comprises the following steps:
the deployment middleware is used for acquiring the load value of each cluster server;
the deployment middleware is configured to start a standby server and add the standby server to an available device list of the service request node if it is detected that a load value of each cluster server in any service processing node is greater than a preset first load threshold;
the deployment middleware is configured to select at least one cluster server from the service processing nodes as a redundant server and close the redundant server if it is detected that the load value of each cluster server in any one of the service processing nodes is smaller than a preset second load threshold value.
Optionally, the processing control middleware 92 is configured to query the service processing node 93 associated with the service type, and send the task information to the service processing node 93, so as to output a task result of the task information through the service processing node 93, and includes:
the processing control middleware 92 is configured to obtain a response flow associated with the service request, and determine a processing order corresponding to each piece of task information based on the response flow;
the processing control middleware 92 is configured to sequentially send the service processing nodes corresponding to the respective pieces of task information based on the processing order.
Optionally, the service distribution middleware 91 is configured to send a service request to the processing control middleware, and includes:
the service distribution middleware 91 is configured to identify a topic type associated with the service request;
the service distribution middleware 91 is configured to query a pre-stored topic subscription list, determine the processing control middleware subscribing to the topic type, and send the service request to the processing control middleware.
Optionally, the service distribution middleware 91 is configured to send a service request to the processing control middleware, and includes:
the service distribution middleware 91 is configured to add the service request to a to-be-processed list, and determine a processing order of the service request in the to-be-processed list according to a receiving time of the service request;
the service distribution middleware 91 is configured to sequentially send each service request in the to-be-processed list to the processing control middleware 92 based on the processing order.
Therefore, the response system for the service request provided by the embodiment of the present invention configures corresponding service processing nodes for different service types, performs task division on the service types related to the service request through the processing control middleware to obtain a plurality of task information, and sends the task information to the corresponding service processing nodes according to the service types for processing, so as to ensure independence of processing logic of the service requests of different types, implement parallel processing of multiple types of tasks, reduce coupling degrees between different service types, and improve service response efficiency, thereby reducing duration of service response.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A response method of a service request is applied to a response system of the service request, and is characterized in that the response method of the service request comprises the following steps:
sending a service request;
identifying service types corresponding to the service requests, and configuring task information about the service requests for each service type;
inquiring a service processing node associated with the service type, and sending the task information to the service processing node so as to output a task result of the task information through the service processing node;
and generating a service response result of the service request according to the task result fed back by the service processing node, and sending the service response result.
2. The response method of claim 1, wherein the service processing node comprises a plurality of cluster servers;
the querying the service processing node associated with the service type and sending the task information to the service processing node includes:
obtaining operation parameters fed back by each cluster server in the service processing node;
calculating the response priority of each cluster server through a preset load balancing algorithm;
and selecting the cluster server with the highest response priority as a target server, and sending the task information to the target server.
3. The response method according to claim 2, wherein the response system of the service request further includes a node registration server;
the obtaining of the operation parameters fed back by each cluster server in the service processing node includes:
if the preset feedback condition is met, the operation parameters are sent to the node registration server;
recording the operating parameters of each cluster server through the node registration server;
and receiving a query instruction sent by the processing control middleware through the node registration server, and sending the operating parameters of each cluster server in the service processing node corresponding to the node identification to the processing control middleware according to the node identification contained in the query instruction.
4. The response method of claim 1, wherein the response system of the service request further comprises deployment middleware; the service processing node comprises a plurality of cluster servers; the response method of the service request further comprises the following steps:
acquiring a load value of each cluster server through the deployment middleware;
if the load value of each cluster server in any service processing node is detected to be larger than a preset first load threshold value, starting a standby server, and adding the standby server into an available equipment list of the service request node;
and if the load value of each cluster server in any service processing node is smaller than a preset second load threshold value, selecting at least one cluster server from the service processing node as a redundant server, and closing the redundant server.
5. The response method according to any one of claims 1 to 4, wherein the querying a service processing node associated with the service type and sending the task information to the service processing node to output a task result of the task information through the service processing node comprises:
acquiring a response flow associated with the service request, and determining a processing order corresponding to each task information based on the response flow;
and sequentially sending the service processing nodes corresponding to the task information to the service processing nodes based on the processing sequence.
6. The response method according to any one of claims 1 to 4, wherein said sending a service request comprises:
identifying a topic type associated with the service request;
and inquiring a pre-stored topic subscription list, determining a processing control middleware subscribing the topic type, and sending the service request to the processing control middleware.
7. The response method according to any one of claims 1 to 4, wherein said sending a service request comprises:
adding the service request to a to-be-processed list, and determining the processing order of the service request in the to-be-processed list according to the receiving time of the service request;
and sequentially sending each service request in the list to be processed based on the processing sequence.
8. A system for responding to a service request, the system comprising: service distribution middleware, processing control middleware and at least one service processing node;
the service distribution middleware is used for sending the received service request to the processing control middleware;
the processing control middleware is used for identifying the service type corresponding to the service request and configuring task information related to the service request for each service type;
the processing control middleware is used for inquiring the service processing node associated with the service type and sending the task information to the service processing node so as to output a task result of the task information through the service processing node;
and the processing control middleware is used for generating a service response result of the service request according to the task result fed back by the service processing node and sending the service response result.
9. The response system of claim 8, wherein the service processing node comprises a plurality of cluster servers;
the processing control middleware is configured to query the service processing node associated with the service type and send the task information to the service processing node, and includes:
the processing control middleware is used for acquiring the operation parameters fed back by each cluster server in the service processing node;
the processing control middleware is used for calculating the response priority of each cluster server through a preset load balancing algorithm;
and the processing control middleware is used for selecting the cluster server with the highest response priority as a target server and sending the task information to the target server.
10. The response system of claim 9, wherein the response system of the service request further comprises a node registration server;
the processing control middleware is configured to obtain the operation parameters fed back by each cluster server in the service processing node, and includes:
the cluster server is used for sending the operation parameters to the node registration server if the cluster server detects that a preset feedback condition is met;
the node registration server is used for recording the operation parameters of each cluster server;
and the node registration server is used for receiving the query instruction sent by the processing control middleware and sending the operating parameters of each cluster server in the service processing node corresponding to the node identification to the processing control middleware according to the node identification contained in the query instruction.
CN201911233030.6A 2019-12-05 2019-12-05 Service request response method and system Active CN111131401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911233030.6A CN111131401B (en) 2019-12-05 2019-12-05 Service request response method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911233030.6A CN111131401B (en) 2019-12-05 2019-12-05 Service request response method and system

Publications (2)

Publication Number Publication Date
CN111131401A true CN111131401A (en) 2020-05-08
CN111131401B CN111131401B (en) 2022-09-23

Family

ID=70497514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911233030.6A Active CN111131401B (en) 2019-12-05 2019-12-05 Service request response method and system

Country Status (1)

Country Link
CN (1) CN111131401B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614747A (en) * 2020-05-18 2020-09-01 北京奇艺世纪科技有限公司 Information processing method and device
CN112181612A (en) * 2020-08-31 2021-01-05 深圳市优必选科技股份有限公司 Task processing method and device, electronic equipment and computer readable storage medium
CN112422450A (en) * 2020-05-09 2021-02-26 上海哔哩哔哩科技有限公司 Computer equipment, and flow control method and device for service request
CN112583927A (en) * 2020-12-23 2021-03-30 北京航空航天大学 Service management system based on airborne embedded real-time operating system
CN112583929A (en) * 2020-12-23 2021-03-30 北京航空航天大学 Service management method based on airborne embedded real-time operating system
CN113419993A (en) * 2021-05-19 2021-09-21 北京达佳互联信息技术有限公司 Read-write request processing method and device, electronic equipment and storage medium
CN114928651A (en) * 2022-05-11 2022-08-19 上海柯林布瑞信息技术有限公司 Service transparent transmission method, device and equipment based on complex parameter identification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308223A (en) * 2018-09-17 2019-02-05 平安科技(深圳)有限公司 A kind of response method and equipment of service request
CN109584105A (en) * 2018-11-12 2019-04-05 平安科技(深圳)有限公司 A kind of method and system of service response
CN110311983A (en) * 2019-07-09 2019-10-08 北京字节跳动网络技术有限公司 Processing method, device, system, electronic equipment and the storage medium of service request

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308223A (en) * 2018-09-17 2019-02-05 平安科技(深圳)有限公司 A kind of response method and equipment of service request
CN109584105A (en) * 2018-11-12 2019-04-05 平安科技(深圳)有限公司 A kind of method and system of service response
CN110311983A (en) * 2019-07-09 2019-10-08 北京字节跳动网络技术有限公司 Processing method, device, system, electronic equipment and the storage medium of service request

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422450A (en) * 2020-05-09 2021-02-26 上海哔哩哔哩科技有限公司 Computer equipment, and flow control method and device for service request
CN112422450B (en) * 2020-05-09 2023-05-23 上海哔哩哔哩科技有限公司 Computer equipment, and flow control method and device for service request
CN111614747A (en) * 2020-05-18 2020-09-01 北京奇艺世纪科技有限公司 Information processing method and device
CN111614747B (en) * 2020-05-18 2023-03-10 北京奇艺世纪科技有限公司 Information processing method and device
CN112181612A (en) * 2020-08-31 2021-01-05 深圳市优必选科技股份有限公司 Task processing method and device, electronic equipment and computer readable storage medium
CN112583927A (en) * 2020-12-23 2021-03-30 北京航空航天大学 Service management system based on airborne embedded real-time operating system
CN112583929A (en) * 2020-12-23 2021-03-30 北京航空航天大学 Service management method based on airborne embedded real-time operating system
CN112583927B (en) * 2020-12-23 2022-04-15 北京航空航天大学 Service management system based on airborne embedded real-time operating system
CN112583929B (en) * 2020-12-23 2022-07-26 北京航空航天大学 Service management method based on airborne embedded real-time operating system
CN113419993A (en) * 2021-05-19 2021-09-21 北京达佳互联信息技术有限公司 Read-write request processing method and device, electronic equipment and storage medium
CN113419993B (en) * 2021-05-19 2024-06-04 北京达佳互联信息技术有限公司 Read-write request processing method and device, electronic equipment and storage medium
CN114928651A (en) * 2022-05-11 2022-08-19 上海柯林布瑞信息技术有限公司 Service transparent transmission method, device and equipment based on complex parameter identification

Also Published As

Publication number Publication date
CN111131401B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN111131401B (en) Service request response method and system
CN111401903B (en) Block chain message processing method, device, computer and readable storage medium
EP3072260B1 (en) Methods, systems, and computer readable media for a network function virtualization information concentrator
CN111131379B (en) Distributed flow acquisition system and edge calculation method
US10356004B2 (en) Software load balancer to maximize utilization
CN110034983B (en) Home equipment linkage method and system based on publish-subscribe message processing mechanism
EP2506649A1 (en) Services cloud system and service realization method
CN109831524B (en) Load balancing processing method and device
Rahman et al. Efficient edge nodes reconfiguration and selection for the internet of things
CN108449410A (en) Information management method, system and relevant apparatus in a kind of cloud platform
WO2015116449A1 (en) Methods, systems, and computer readable media for a cloud-based virtualization orchestrator
CN112866394B (en) Load balancing method, device, system, computer equipment and storage medium
Bhimani et al. Message delivery guarantee and status update of clients based on IOT-AMQP
Liu et al. Service resource management in edge computing based on microservices
CN105721553B (en) A kind of adaptive cluster message distributor
CN112448987A (en) Fusing degradation triggering method and system and storage medium
Zhang et al. Efficient online surveillance video processing based on spark framework
Zhang et al. Research on deployment method of edge computing gateway based on microservice architecture
CN115883639A (en) Web real-time message pushing method and device, equipment and storage medium
CN112256454A (en) Message delay processing method and system
Jeon et al. Hierarchical Network Data Analytics Framework for 6G Network Automation: Design and Implementation
US11671500B2 (en) Internet of things system
CN111049919B (en) User request processing method, device, equipment and storage medium
CN117076057B (en) AI service request scheduling method, device, equipment and medium
JP7163093B2 (en) Broker device, communication system, communication method, and program

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