WO2019075863A1 - 一种服务响应方法及其终端 - Google Patents

一种服务响应方法及其终端 Download PDF

Info

Publication number
WO2019075863A1
WO2019075863A1 PCT/CN2017/113571 CN2017113571W WO2019075863A1 WO 2019075863 A1 WO2019075863 A1 WO 2019075863A1 CN 2017113571 W CN2017113571 W CN 2017113571W WO 2019075863 A1 WO2019075863 A1 WO 2019075863A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
service request
user terminal
party
party interface
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.)
Ceased
Application number
PCT/CN2017/113571
Other languages
English (en)
French (fr)
Inventor
覃娆
覃无愧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2019075863A1 publication Critical patent/WO2019075863A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

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/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Definitions

  • the present application belongs to the field of network technologies, and in particular, to a service response method and a terminal thereof.
  • the service requester it is easy to make the service response time too long, causing the communication link between the service requester and the main server to be interrupted due to the connection failure, so that the service response fails and the processing result cannot be returned to the service.
  • the requester reduces the success rate of the service response.
  • maintaining the long-term occupation of the communication link during the waiting process also reduces the utilization efficiency of the network resources.
  • the embodiment of the present application provides a service response method and a terminal thereof, so as to solve the existing service response method, the service requester and the main server need to maintain a long-distance connection, thereby facilitating the response of the service. Too long, the communication link between the service requester and the main server is interrupted due to the connection, the communication response is reduced, and the communication link is kept occupied during the waiting process. The problem of the efficiency of the use of network resources.
  • a first aspect of the embodiments of the present application provides a service response method, where the service response method includes: Obtaining a service request sent by the user terminal;
  • connection suspension signal includes a request identifier corresponding to the service request and a service response confirmation identifier
  • a service response method and a terminal thereof provided by the embodiments of the present application have the following beneficial effects: [0014]
  • the embodiment of the present application improves the utilization efficiency of network resources, and improves the success rate of service response.
  • FIG. 1 is a flowchart of an implementation of a service response method according to a first embodiment of the present application
  • FIG. 2 is a flowchart of a specific implementation of a service response method S105 according to a second embodiment of the present application;
  • FIG. 3 is a specific implementation flow of a service response method S105 according to a third embodiment of the present application.
  • FIG. 4 is a flowchart of a specific implementation of a service response method S101 according to a fourth embodiment of the present invention;
  • FIG. 5 is a specific implementation of a service response method according to a fifth embodiment of the present application; Flow chart
  • FIG. 6 is a structural block diagram of a service response terminal according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the embodiment of the present application determines the service response parameter corresponding to the service request, and sends a connection suspension signal to the user terminal to suspend the communication between the user terminal and the service service response terminal.
  • Connecting, and receiving the resource release instruction returned by the user terminal, indicating that the user terminal has released its local connection resource, and the service response terminal also releases the port that communicates with the user terminal; and then based on the service response parameter, Invoking the corresponding third-party interface to respond to the service request and obtaining the service result, and re-establishing a communication connection with the user terminal, returning the service result to the user terminal, and solving the existing service response method, requiring the service requester to remain long with the main server
  • the connection between the two is easy to make the service response time too long, which causes the communication link between the service requester and the main server to be interrupted due to the connection, which reduces the success rate of the service response and keeps the waiting process.
  • FIG. 1 is a flowchart showing an implementation of a service response method provided by a first embodiment of the present application, which is described in detail as follows:
  • the user terminal may send a service request to the terminal device through the built-in service client.
  • a communication connection is established with the terminal device, and then a service request is transmitted through the communication connection.
  • the user terminal may also initiate a service request through a webpage page corresponding to the terminal device.
  • the web page after the web page is loaded on the user terminal, it indicates that the user terminal has established a communication connection with the terminal client, and then the user can send a service request through the web page displayed on the user terminal.
  • the user inputs a corresponding user account name or the like in the webpage page to log in to the service system corresponding to the webpage page, and the generated service request will further include the user identifier.
  • the terminal device after receiving the service request sent by the user terminal, the terminal device first needs to determine a service response parameter corresponding to the service request. Specifically, the user terminal identifies the service corresponding to the service request. The service type, and then according to the preset service type and the correspondence list of the service response parameters, the query responds to the service response parameter corresponding to the service type.
  • the service response parameter specifically includes a third-party interface required to respond to the service request.
  • the service response parameter determined by the terminal device will include The third-party interface required for the request should be served.
  • connection suspension signal is sent to the user terminal, where the connection suspension signal includes a request identifier corresponding to the service request and a service response confirmation identifier.
  • connection in order to prevent the connection between the user terminal and the terminal device that responds to the service request, the connection is invalid, and therefore, the service request sent by the user terminal is received, and it is determined that the service request needs to be invoked in response to the service request.
  • the three-way interface ⁇ will generate a connection abort signal, and then send the connection abort signal to the user terminal to suspend the communication connection between the user terminal and the terminal device. It should be noted that, since the terminal device needs to return the service processing result to the user terminal after generating the processing result corresponding to the service request, in this embodiment, only the communication connection between the terminal device and the user terminal is suspended, and It is not the termination of the communication connection between the terminal device and the user terminal.
  • the connection suspension signal specifically includes a service identifier corresponding to the service request and a service response confirmation identifier.
  • the service identifier is specifically: After generating a service request, the user terminal allocates a unique identification code for each service request, which is used to identify the identity information of the service request. Since the number of service requests initiated by the user terminal to the terminal device is more than one, the user terminal can determine the service identifier included in the suspension signal after receiving the suspension signal sent by the terminal device.
  • the abort signal corresponds to which service request initiated by its service terminal.
  • the connection abort signal further includes a service response confirmation identifier, and the service response confirmation identifier is used to notify the user terminal that the service request sent by the terminal device is successfully received by the terminal device, and the corresponding service response process is performed.
  • the terminal device changes the connection state of the communication connection between the user terminal and the terminal device to a pending state, where the to-be-suspended state is specifically: the terminal device It is not in the full-duplex working state, but can only receive the information returned by the user terminal in one direction, and no longer send information to the user terminal.
  • the user terminal after receiving the suspension signal sent by the terminal device, the user terminal determines that the service request corresponding to the service identifier included in the suspension signal is responding to the service terminal, so in order to avoid the long-distance and terminal devices
  • a resource release instruction is generated according to the connection suspension signal, and the resource release instruction is returned to the terminal device to inform the terminal device to release the communication connection resource with the user terminal.
  • the user terminal after the user terminal sends the resource release command, the user terminal also sets the working state of the communication port corresponding to the terminal device to an idle state, so that the user terminal will not be in the state before the communication connection is restarted.
  • the service request sends a message.
  • the terminal device in addition to releasing the corresponding communication resource, changes the working state of the port corresponding to the communication with the user terminal from the occupied state to the idle state, so that the communication port can communicate with other users through the communication port.
  • the terminal communicates and accepts information sent by other terminal devices, such as a service request or a communication connection request.
  • the terminal device after transmitting the connection suspension signal, the terminal device has adjusted the communication connection with the user terminal from the full-duplex state to the working state in which the user terminal transmits the information in one-way, and in S104, the terminal device will communicate the communication.
  • the connection is changed to the full pause state, and the port corresponding to the communication connection is changed to idle.
  • the terminal device after receiving the service request sent by the user terminal and determining the service response parameter corresponding to the service request, extracts the third-party interface indicated in the service response parameter, and the service response parameter. All third-party interfaces included in the communication establish a communication connection, and respond to the service request sent by the user terminal based on all the third interfaces and related functional modules local to the terminal device. The specific operation of the response service request is related to the content of the service request.
  • the terminal device sends a service request to each third-party interface corresponding to the service response parameter, and after receiving the service request, the server corresponding to the third-party interface extracts the corresponding three-room interface.
  • the content is requested, and the service content obtained by the extraction is responded to by the server corresponding to the third-party interface, and the corresponding response result is returned to the terminal device, so after the terminal device obtains the processing result returned by each third-party interface, the terminal device determines The service request has responded to completion and performs the related operations of S10 6.
  • S106 a communication connection request is sent to the user terminal, and a communication connection with the user terminal is established.
  • the terminal device after generating the processing result corresponding to the service request, restarts the communication connection between the user terminal and the terminal device in S1 01, and thus sends a communication connection to the user terminal. request.
  • the communication connection request includes a service request identifier.
  • the terminal device sends the communication connection request to the user terminal according to the network communication address corresponding to the user terminal, and after receiving the communication connection request, the user terminal extracts the service request identifier included in the communication connection request, and sends the service request identifier to the communication connection request.
  • the port corresponding to the service request is adjusted from the idle state to the occupied state, and it is confirmed that the communication connection with the terminal device is established.
  • the terminal device before transmitting the communication connection request, determines the port number corresponding to the service request before receiving, and adjusts the idle state to the occupied state based on the working state of the port number. And sending a communication connection request to the user terminal through the port.
  • the user terminal can also return a connection confirmation signal, and the terminal device also confirms that the communication connection between the two parties has been established, and performs the related operation of S107.
  • the terminal device after confirming that the communication connection is established, the terminal device returns a processing result corresponding to the service request based on the communication connection to the user terminal.
  • the terminal device may perform a connectivity test on the communication connection before transmitting the processing result to test whether the communication link between the two is successfully connected.
  • the terminal device may send a ping protocol packet, so that the user terminal returns a ping result based on the ping protocol, and if the terminal device receives the ping result within a preset time threshold, it indicates communication between the two. The link is connected, and the processing result is returned to the user terminal. If the ping result is not received within the preset time threshold, the related operation of S106 is returned. In this case, it is possible that the communication port that the user terminal previously sent the service request is being occupied by other applications, and thus the connection is not successful, and thus the operation of establishing the communication connection needs to be re-executed.
  • the service response method determines the service response parameter corresponding to the service request after acquiring the service request sent by the user terminal, and sends a connection suspension signal to the user terminal. Suspending the communication connection between the user terminal and the service service response terminal, and receiving The resource release instruction returned to the user terminal indicates that the user terminal has released its local connection resource, and the service response terminal also releases the port that communicates with the user terminal; and then invokes the corresponding number based on the service response parameter.
  • the three-party interface responds to the service request and obtains the service result, and re-establishes a communication connection with the user terminal, and returns the service result to the user terminal.
  • the service response method provided by the embodiment of the present application does not need to maintain a communication connection with the service response terminal to wait for the processing result, but receives the service request of the user at the service response terminal. After that, the communication connection between the two is suspended, and the communication resources are released, thereby avoiding the long-distance connection and the transmission of the communication failure. And after the service response terminal generates the corresponding processing result through the third-party interface, re-establishes a connection with the user terminal, and returns the processing result to the user terminal. It can be seen that in the foregoing communication process, the user terminal does not have a connection with the service response terminal. Waiting for no interaction data occurs, but the transmission is required to establish a communication connection, which improves the utilization efficiency of network resources and improves the success rate of service response.
  • FIG. 2 is a flowchart showing a specific implementation of a service response method S105 according to the second embodiment of the present application.
  • a service response method S10 5 provided in this embodiment includes the following steps, which are described in detail as follows:
  • the service response parameter includes at least two third-party interfaces and a calling order corresponding to each of the third-party interfaces, and the third-party interface responds to the service request, and generates a location
  • the processing result corresponding to the service request includes:
  • the service request is sent to a third-party interface whose calling order is the first call based on the calling order of each of the third-party interfaces.
  • the service request needs to invoke at least two third-party interfaces to respond
  • the corresponding service response parameter includes, in addition to the third-party interface, a calling order of each third-party calling interface, and the calling sequence Used to indicate the order in which third-party interfaces are invoked in response to the service request.
  • the terminal device after determining the service response parameter of the service request, extracts the third-party interface included in the service response parameter and determines the calling order corresponding to each third-party interface. After obtaining the calling sequence corresponding to each third-party interface, the terminal device determines the third-party interface invoked in the calling sequence and connects with the third-party interface. In this embodiment, after the terminal device connects with the third-party interface whose calling order is the first call, the service request sent by the user terminal is sent to the terminal device. So that the third-party interface generates corresponding processing data based on the service request.
  • the next calling order is determined repeatedly according to the calling order of the third-party interface.
  • the third-party interface sends the service request and the processing data to the operation of the third-party interface of the next calling sequence until receiving the processing result returned by the third-party interface corresponding to the last node
  • the corresponding processing data is returned to the terminal device, because the processed data is not the final processing result, but an intermediate quantity.
  • the processing data is not returned to the user, but the next node that returns the processing data is determined based on the calling order of each third-party interface, and then the third-party interface corresponding to the next node is connected, and the service request is made.
  • processing data returned by the previous node sent to the third-party interface corresponding to the next node, and then receiving the third-party interface corresponding to the next node, based on the service request and the processing data of the previous node, and returning the processing data corresponding to the node to Terminal Equipment.
  • the terminal device repeatedly performs the above steps until the processing data returned by the third-party interface corresponding to the last node is received, that is, the processing result. Because the processing data returned by the third-party interface corresponding to the last node does not need to call more third-party interfaces to respond again, that is, the processed data is the processed data finally obtained by the service request, and therefore, it is recognized as the processing result. .
  • a plurality of third-party interfaces are invoked and a corresponding calling sequence is specified, thereby implementing a response of a relatively complex service request, thereby expanding the applicable scope of the service response method. Further, multiple iterations of processing data through multiple third-party interfaces further improve the accuracy of the processing results.
  • FIG. 3 is a flowchart showing a specific implementation of a service response method S105 according to a third embodiment of the present application.
  • a service response method S10 provided by this embodiment is provided with respect to the embodiment shown in FIG.
  • the service response parameter includes at least two the third-party interfaces, and the processing result corresponding to the service request is generated by the third-party interface in response to the service request, and further includes: In S301, the number of the third-party interfaces included in the service response parameter is obtained, and a thread corresponding to the number is started.
  • the terminal device does not respond to the service request by means of serial invocation, but simultaneously initiates a plurality of third-party interfaces to respond to the service request. First, the terminal device determines its corresponding service response parameter according to the service request, and then the terminal device extracts the number of third-party interfaces included in the service response parameter, and starts a thread corresponding to the number.
  • the terminal device adjusts the corresponding number of ports from the idle state to the occupied state, and controls each port to connect with the third-party interface indicated in the service response parameter, and the terminal device also configures the corresponding interface for each third-party interface on the local device.
  • the computing resource in response to each of the above third-party interfaces, responds to a service request sent by the user terminal.
  • each of the third-party interfaces is concurrently invoked by the thread, so that a third-party server corresponding to the third-party interface responds to the service request, and returns the service request by using the third-party interface.
  • Corresponding processing sub-results are concurrently invoked by the thread, so that a third-party server corresponding to the third-party interface responds to the service request, and returns the service request by using the third-party interface.
  • the terminal device starts a plurality of threads, and concurrently invokes multiple third-party interfaces indicated in the service response parameter to respond to the service request initiated by the user terminal. Specifically, the terminal device sends the service request to the multiple third-party interfaces through the thread that is started, so that the third-party server corresponding to the third-party interface executes its corresponding service content according to the service request.
  • a processing sub-result is generated, and the processing sub-result is returned to the terminal through the corresponding third-party interface. device.
  • the processing sub-result is specifically the processing data that the third-party interface has completed the response operation for the service request, and is obtained according to the service request. Therefore, after returning the processing sub-result to the terminal device, the third-party interface determines Whether there is still a service request that is not responded to in the server corresponding to the third-party interface. If not, it indicates that the third-party interface has completed all service tasks allocated by the terminal device, and this will break between the third-party interface and the terminal device. Communication connection.
  • the terminal device after receiving the processing sub-results returned by the respective third-party interfaces, the terminal device generates a processing result corresponding to the service request based on the respective processing sub-results.
  • FIG. 4 is a flowchart showing a specific implementation of a service response method S101 according to a fourth embodiment of the present application.
  • the service request sent by the user terminal in the service response method provided by this embodiment further includes S401 ⁇ S403, which are as follows:
  • the communication synchronization instruction is used to notify the terminal device that the corresponding communication resource needs to be allocated to establish a communication link between the two, and the communication is synchronized.
  • the instructions are used to initialize the communication resources in the communication link of the terminal device to match the communication settings between the two. If a communication connection is established between the user terminal and the terminal device, the communication synchronization command is used to restart the communication connection and initialize communication resources allocated by the terminal device to the communication link.
  • the terminal device after receiving the communication synchronization command sent by the user terminal, the terminal device sets the communication parameter of the port that communicates with the user terminal according to the communication protocol included in the communication synchronization instruction, so that The port matches the communication connection.
  • a synchronization completion instruction is returned to the user terminal according to the communication synchronization instruction; wherein the synchronization completion instruction includes a port identifier of the port.
  • a synchronization completion instruction is generated, where the synchronization completion instruction includes the port identifier of the port that communicates with the user terminal, so that Tell the terminal device its assigned communication port.
  • the user terminal after receiving the synchronization completion instruction returned by the terminal device, the user terminal extracts the port identifier included in the synchronization completion instruction, and in a signal or information that interacts with the terminal device later, The port identifier is encapsulated in a data packet to communicate through a port corresponding to the port identifier of the terminal device.
  • connection confirmation signal returned by the user terminal according to the synchronization completion instruction is received; wherein the connection confirmation signal includes the service request.
  • the user terminal after confirming that the two parties have established a communication connection, the user terminal will return a connection confirmation signal to the terminal device to inform the terminal device that data interaction can be performed through the communication connection.
  • the user terminal also encapsulates the service request in the connection confirmation signal, and the terminal device receives the connection. After the acknowledgement signal, the service request included in the connection confirmation signal is extracted, thereby achieving the purpose of acquiring the service request sent by the user terminal.
  • the operation of sending a service request is also integrated in the process of establishing a communication connection between the terminal device and the user terminal, thereby reducing the time required for the user terminal to send the service request.
  • FIG. 5 is a flowchart showing a specific implementation of a service response method according to a fifth embodiment of the present application.
  • the service response method S103 provided in this embodiment further includes the following steps, which are as follows:
  • the method further includes:
  • the terminal device determines a service field corresponding to the service request based on a preset service request field division algorithm, and extracts a service number corresponding to the service request from the service field.
  • the service number is used to indicate the type of service requested by the service.
  • a service type of the service request is determined based on a preset relationship list of a service number and a service type.
  • the terminal device after determining the service number included in the service request, the terminal device queries the preset relationship list of the service number and the service type, and then determines the service type corresponding to the service request.
  • one service number corresponds to one service type
  • one service type may correspond to multiple service numbers. Since different user terminals have different coding rules, corresponding service numbers in the generated service requests also have certain differences. Therefore, corresponding to the same service type, the service numbers corresponding to different user terminals will not necessarily be the same.
  • the terminal device determines whether the service type is a local service request, and if the service type is a local service request, performing a related operation of S503; On the other hand, if it is determined that the service type is a call service request, the related operation of S504 is performed.
  • the determining condition of determining whether the service type is a local service request is specifically: whether a third-party interface needs to be called to respond to the service request.
  • the third-party interface is not required to be invoked in response to the service type, it is determined to be a local service type; conversely, if a third-party interface needs to be invoked in response to the service type, it is determined to invoke the service request. [0082] In S503, if the service type is a local service request, maintaining a communication connection with the user terminal, responding to the service request.
  • the terminal device determines that the service type is a local service request, it indicates that the response can be completed only by the local service response module in response to the service request, and the response time of the response service request is relatively short.
  • the communication connection between the two is not exceeded due to waiting for the processing result, so in this case, the terminal device will not perform the operation of transmitting the suspension signal to suspend the communication connection between the two, but keep the two A communication connection between the parties and responding to the service request immediately.
  • the terminal device determines that the service type is a calling service request, it indicates that, in response to the service request, a third-party interface other than the local service response module needs to be invoked to complete the response operation of the service request, Therefore, the response time of the service request is relatively long, and the communication connection between the two may be exceeded due to waiting for the processing result. Therefore, in this case, the operation of transmitting the suspension signal is executed to suspend the connection between the two. Communication connection.
  • the terminal device first filters the processing task before the extraction operation, determines a corresponding response policy, and maintains a communication connection and responds to the local response service request, thereby reducing frequent communication connections between the two. State switching; for the service request that needs to invoke the third interface, the operation of temporarily suspending the connection is performed, thereby avoiding the occurrence of the response failure due to the excessive waiting, thereby improving the efficiency and success rate of the service response.
  • FIG. 6 is a structural block diagram of a service response terminal according to an embodiment of the present application.
  • the unit included in the service response terminal is used to execute each step in the embodiment corresponding to FIG. 1.
  • please refer to the related description in the embodiment corresponding to FIG. 1 and FIG. For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the service response terminal includes:
  • a service request obtaining unit 61 configured to acquire a service request sent by the user terminal;
  • the service response parameter determining unit 62 determines, according to the service request, a service response parameter corresponding to the service request, where the service response parameter includes: a third party connection P required to respond to the service request;
  • connection suspension signal sending unit 63 is configured to send a connection suspension signal to the user terminal, where the connection suspension signal includes a request identifier corresponding to the service request and a service response confirmation identifier;
  • the resource release instruction receiving unit 64 is configured to receive a resource release instruction returned by the user terminal according to the connection suspension signal, and change an operation state of the communication corresponding port with the user terminal to idle;
  • the service response unit 65 is configured to invoke the third-party interface indicated in the service response parameter, and generate a processing result corresponding to the service request by using the third-party interface to respond to the service request.
  • a communication connection restarting unit 66 configured to send a communication connection request to the user terminal, and establish a communication connection with the user terminal;
  • a processing result returning unit 67 configured to return the processing result to the user through the communication connection
  • the service response parameter includes at least two of the third-party interfaces and a calling sequence corresponding to each of the third-party interfaces
  • the service response unit 65 includes:
  • a first node response unit configured to send the service request to a third-party interface in which the calling order is the first call, based on each of the third-party interface calling sequences;
  • a processing data feedback unit configured to: if the processing data returned by the third-party interface in which the calling sequence is the first call is received according to the service request, repeating the determination according to the third-party interface calling sequence The third-party interface of the calling sequence sends the service request and the processing data to the operation of the third-party interface of the next calling sequence until receiving the processing result returned by the third-party interface corresponding to the last node.
  • the service response parameter includes at least two of the third-party interfaces
  • the service response unit 65 further includes:
  • a thread starting unit configured to acquire the number of the third-party interfaces included in the service response parameter, and start a thread corresponding to the number
  • a concurrent response unit configured to concurrently invoke each of the third-party interfaces by the thread, so that the first The third-party server corresponding to the three-party interface responds to the service request, and returns a processing sub-result corresponding to the service request by using the third-party interface;
  • the processing result generating unit is configured to receive the processing sub-send sent by each third-party interface, and generate the processing result.
  • the service request obtaining unit 61 further includes:
  • a communication synchronization instruction receiving unit configured to receive a communication synchronization instruction sent by the user terminal
  • the synchronization completion instruction sending unit is configured to return a synchronization completion instruction to the user terminal according to the communication synchronization instruction, where the synchronization completion instruction includes the port identifier of the port corresponding to the communication with the user terminal;
  • connection confirmation command receiving unit is configured to receive a connection confirmation signal returned by the user terminal according to the synchronization completion instruction, where the connection confirmation signal includes the service request.
  • the terminal device further includes:
  • a service number obtaining unit configured to acquire a service number of a service field in the service request
  • a service type determining unit configured to determine a service type of the service request based on a preset relationship list of the service number and the service type;
  • a local service response unit configured to: if the service type is a local service request, maintain a communication connection with the user terminal, and respond to the service request;
  • the remote service response unit is configured to: if the service type is a call service request, perform the operation of sending a connection suspension signal to the user terminal.
  • the service response terminal provided by the embodiment of the present application does not need to maintain a communication connection with the user terminal to wait for the processing result, but after the service response terminal receives the service request of the user, the two are suspended.
  • the terminal device 7 of this embodiment includes: a processor 70, a memory 71, and computer readable instructions 72 stored in the memory 71 and operable on the processor 70, such as a service response program .
  • the processor 70 executes the computer readable instructions 72 to implement the steps in the foregoing various service response method embodiments, such as FIG. S101 to S107 are shown.
  • the processor 70 executes the computer readable instructions 72 to implement the functions of the various units in the various apparatus embodiments described above, such as the functions of the modules 61 through 67 shown in FIG.
  • the computer readable instructions 72 may be partitioned into one or more units, the one or more units being stored in the memory 71 and executed by the processor 70 to Complete this application.
  • the one or more units may be a series of computer readable instruction instructions that are capable of performing a particular function for describing the execution of the computer readable instructions 72 in the terminal device 7.
  • the computer readable instructions 72 may be divided into a service request acquisition unit, a service response parameter determination unit, a connection suspension signal transmission unit, a resource release instruction reception unit, a service response unit, a communication connection restart unit, and a processing result return unit,
  • the specific functions of each unit are as follows:
  • a service request obtaining unit configured to acquire a service request sent by the user terminal
  • the service response parameter determining unit determines, according to the service request, a service response parameter corresponding to the service request, where the service response parameter includes: a third-party interface required to respond to the service request
  • connection suspension signal sending unit configured to send a connection suspension signal to the user terminal, where the connection suspension signal includes a request identifier corresponding to the service request and a service response confirmation identifier;
  • a resource release instruction receiving unit configured to receive a resource release instruction returned by the user terminal according to the connection suspension signal, and change an operation state of the communication corresponding port with the user terminal to idle
  • a service response unit configured to invoke the third-party interface indicated in the service response parameter, and generate a processing result corresponding to the service request by using the third-party interface to respond to the service request;
  • a communication connection restarting unit configured to send a communication connection request to the user terminal, and establish a communication connection with the user terminal
  • a processing result returning unit configured to return the processing result to the user terminal by using the communication connection

Landscapes

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

Abstract

本申请提供了一种服务响应方法及其终端,适用于网络技术领域,包括:获取用户终端发送的服务请求;基于服务请求,确定服务请求对应的服务响应参数;向用户终端发送连接中止信号;接收用户终端根据连接中止信号返回的资源释放指令,并将与用户终端进行通信对应端口的工作状态变更为空闲;调用服务响应参数中指示的第三方接口,并通过第三方接口响应服务请求,生成服务请求对应的处理结果;向用户终端发送通信连接请求,建立与用户终端之间的通信连接;返回处理结果至用户终端。本申请解决了现有服务响应方法响应服务响应的成功率低,以及网络资源的利用效率低的问题。

Description

一种服务响应方法及其终端
[0001] 本申请申明享有 2017年 10月 20日递交的申请号为 201710982776.1、 名称为 "一种 服务响应方法及其终端"中国专利申请的优先权, 该中国专利申请的整体内容以 参考的方式结合在本申请中。
技术领域
[0002] 本申请属于网络技术领域, 尤其涉及一种服务响应方法及其终端。
背景技术
[0003] 随着科学技术的不断发展, 网络所提供的服务种类也越来越多, 服务融合度也 越来越高。 在大多数情况下, 对于同一个服务请求, 除了该服务请求对应的主 服务器参与响应外, 还需要调用一个甚至多个第三方接口共同执行该服务请求 。 对于上述需要调用第三方接口的情况, 现有的服务响应技术, 需要服务请求 方与主服务器保持长吋间连接, 当主服务器获取了各个第三方接口的执行结果 后, 才将对应的服务响应结果返回给服务请求方, 从而容易使得服务响应吋间 过长, 导致服务请求方与主服务器之间的通信链路因连接超吋而导致通信中断 , 以致服务响应失败, 无法将处理结果返回给服务请求方, 降低了服务响应的 成功率。 另一方面, 在等待过程中保持通信链路长吋间占用, 也降低了网络资 源的利用效率。
技术问题
[0004] 有鉴于此, 本申请实施例提供了一种服务响应方法及其终端, 以解决现有服务 响应方法, 需要服务请求方与主服务器保持长吋间连接, 从而容易使得服务响 应吋间过长, 导致服务请求方与主服务器之间的通信链路因连接超吋而导致通 信中断, 降低了服务响应的成功率, 以及在等待过程中保持通信链路长吋间占 用, 也降低了网络资源的利用效率的问题。
问题的解决方案
技术解决方案
[0005] 本申请实施例的第一方面提供了一种服务响应方法, 所述服务响应方法包括: [0006] 获取用户终端发送的服务请求;
[0007] 基于所述服务请求, 确定所述服务请求对应的服务响应参数; 其中, 所述服务 响应参数包括: 响应所述服务请求所需的第三方接口;
[0008] 向所述用户终端发送连接中止信号; 其中, 所述连接中止信号包含所述服务请 求对应的请求标识以及服务响应确认标识;
[0009] 接收所述用户终端根据所述连接中止信号返回的资源释放指令, 并将与所述用 户终端进行通信对应端口的工作状态变更为空闲;
[0010] 调用所述服务响应参数中指示的所述第三方接口, 并通过所述第三方接口响应 所述服务请求, 生成所述服务请求对应的处理结果;
[0011] 向所述用户终端发送通信连接请求, 建立与所述用户终端之间的通信连接; [0012] 通过所述通信连接返回所述处理结果至所述用户终端。
发明的有益效果
有益效果
[0013] 实施本申请实施例提供的一种服务响应方法及其终端具有以下有益效果: [0014] 本申请实施例提高了网络资源的利用效率, 以及提高了服务响应的成功率。
对附图的简要说明
附图说明
[0015] 图 1是本申请第一实施例提供的一种服务响应方法的实现流程图;
[0016] 图 2是本申请第二实施例提供的一种服务响应方法 S105的具体实现流程图; [0017] 图 3是本申请第三实施例提供的一种服务响应方法 S105的具体实现流程图; [0018] 图 4是本申请第四实施例提供的一种服务响应方法 S101的具体实现流程图; [0019] 图 5是本申请第五实施例提供的一种服务响应方法的具体实现流程图;
[0020] 图 6是本申请一实施例提供的一种服务响应终端的结构框图;
[0021] 图 7是本申请一实施例提供的一种终端设备的示意图。
本发明的实施方式
[0022] 为了使本申请的目的、 技术方案及优点更加清楚明白, 以下结合附图及实施例 , 对本申请进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅仅用 以解释本申请, 并不用于限定本申请。
[0023] 本申请实施例通过在获取到用户终端发送的服务请求后, 确定该服务请求对应 的服务响应参数, 并向用户终端发送连接中止信号以暂停用户终端以及服务服 务响应终端之间的通信连接, 并接收到用户终端返回的资源释放指令, 则表示 用户终端已经将其本地的连接资源释放, 此吋服务响应终端也同吋释放与该用 户终端进行通信的端口; 然后基于服务响应参数, 调用对应的第三方接口响应 该服务请求并得到服务结果, 并重新与用户终端建立通信连接, 将该服务结果 返回给用户终端, 解决了现有服务响应方法, 需要服务请求方与主服务器保持 长吋间连接, 从而容易使得服务响应吋间过长, 导致服务请求方与主服务器之 间的通信链路因连接超吋而导致通信中断, 降低了服务响应的成功率, 以及在 等待过程中保持通信链路长吋间占用, 也降低了网络资源的利用效率的问题。 在本申请实施例中, 流程的执行主体为安装有服务响应程序的终端设备, 终端 设备包括手机、 计算机设备、 平板电脑等终端。 图 1示出了本申请第一实施例提 供的服务响应方法的实现流程图, 详述如下:
[0024] 在 S101中, 获取用户终端发送的服务请求。
[0025] 在本实施例中, 用户终端可通过内置的服务客户端向终端设备发送服务请求。
在该情况下, 用户终端在幵启该服务客户端吋, 则与终端设备建立通信连接, 继而通过该通信连接发送服务请求。
[0026] 在本实施例中, 用户终端也可以通过终端设备对应的网页页面发起服务请求。
在该情况下, 在网页页面于用户终端上加载完成后, 则表示用户终端与终端客 户已建立通信连接, 继而用户可通过用户终端上显示的网页页面发送服务请求 。 具体地, 用户在网页页面中输入对应的用户账户名等登录至该网页页面对应 的服务系统, 继而生成的服务请求将包含用户标识。
[0027] 在 S102中, 基于所述服务请求, 确定所述服务请求对应的服务响应参数; 其中 , 所述服务响应参数包括: 响应所述服务请求所需的第三方接口。
[0028] 在本实施例中, 终端设备在接收到用户终端发送的服务请求后, 首先需要确定 该服务请求对应的服务响应参数。 具体地, 用户终端识别该服务请求对应的服 务类型, 继而根据预设的服务类型以及服务响应参数的对应关系列表, 査询响 应该服务类型所对应的服务响应参数。
[0029] 在本实施例中, 服务响应参数具体包含响应该服务请求所需的第三方接口。 由 于在响应服务请求的过程中, 除了通过主服务器, 即终端设备, 响应该服务请 求外, 还可能需要调用对应的第三方接口协助主服务器, 因而终端设备确定的 服务响应参数中, 将包含响应该服务请求所需的第三方接口。
[0030] 在 S103中, 向所述用户终端发送连接中止信号; 其中, 所述连接中止信号包含 所述服务请求对应的请求标识以及服务响应确认标识。
[0031] 在本实施例中, 为了避免用户终端与响应服务请求的终端设备长吋间进行连接 而导致连接失效, 因此在接收到用户终端发送的服务请求, 并确定响应该服务 请求需要调用第三方接口吋, 将生成一个连接中止信号, 继而将该连接中止信 号发送至该用户终端, 以暂停用户终端与终端设备两者之间的通信连接。 需要 说明的是, 由于终端设备在生成服务请求对应的处理结果后, 需要将该服务处 理结果返回给用户终端, 因而在本实施例中, 只是中止终端设备与用户终端之 间的通信连接, 而并非终止终端设备与用户终端之间的通信连接。
[0032] 在本实施例中, 连接中止信号具体包含服务请求对应的服务标识以及服务响应 确认标识。 其中, 服务标识具体为: 用户终端在生成一个服务请求后, 将为每 个服务请求分配一个唯一标识码, 用于标识该服务请求的身份信息。 由于用户 终端在一段吋间内, 向终端设备发起的服务请求的数量不止一个, 因此, 用户 终端在接收到终端设备发送的中止信号后, 提取该中止信号中包含的服务标识 , 即可确定该中止信号对应其服务终端发起的哪一个服务请求。 除此之外, 连 接中止信号还包含服务响应确认标识, 该服务响应确认标识用于告知用户终端 , 其发送的服务请求以被终端设备成功接收, 并进行对应的服务响应流程。
[0033] 在本实施例中, 终端设备在发送完成连接中止信号后, 则将用户终端与终端设 备之间的通信连接的连接状态变更为待中止状态, 其中该待中止状态具体为: 终端设备并非处于全双工的工作状态, 而是只能单向接收用户终端返回的信息 , 不再向用户终端发送信息。
[0034] 在 S104中, 接收所述用户终端根据所述连接中止信号返回的资源释放指令, 并 将与所述用户终端进行通信对应端口的工作状态变更为空闲。
[0035] 在本实施例中, 用户终端在接收到终端设备发送的中止信号后, 将判定该中止 信号包含的服务标识对应的服务请求正在服务终端进行响应, 因此为了避免长 吋间与终端设备通信连接而导致连接失效, 则根据该连接中止信号生成一个资 源释放指令, 并将该资源释放指令返回给终端设备, 以告知终端设备释放与用 户终端之间的通信连接资源。 于此同吋, 用户终端将该资源释放指令发送完毕 后, 用户终端也设置与终端设备对应的通信端口的工作状态变更为空闲状态, 从而用户终端在通信连接重新启动前, 将不再就该服务请求发送信息。
[0036] 在本实施例中, 终端设备除了释放对应的通信资源外, 还将与用户终端进行通 信对应的端口的工作状态, 由占用状态变更为空闲状态, 从而可以通过该通信 端口与其他用户终端进行通信, 并接受其他终端设备发送的信息, 如服务请求 或通信连接请求等。 具体地, 终端设备在发送连接中止信号后, 已经将与用户 终端之间的通信连接由全双工状态调整为单向接收用户终端发送信息的工作状 态, 在 S104中, 终端设备会将该通信连接变更为全暂停状态, 并将该通信连接 对应的端口变更为空闲。
[0037] 在 S105中, 调用所述服务响应参数中指示的所述第三方接口, 并通过所述第三 方接口响应所述服务请求, 生成所述服务请求对应的处理结果。
[0038] 在本实施例中, 终端设备在接收到用户终端发送的服务请求并确定该服务请求 对应的服务响应参数后, 将提取该服务响应参数中指示的第三方接口, 并与服 务响应参数中包含的所有第三方接口建立通信连接, 并基于所有第三接口以及 终端设备本地的相关功能模块响应用户终端发送的服务请求。 其中, 响应服务 请求的具体操作与服务请求的内容相关。
[0039] 在本实施例中, 终端设备将服务请求发送给服务响应参数中对应的各个第三方 接口, 第三方接口对应的服务器在接收到该服务请求后, 将提取与其本身三房 接口对应的请求内容, 并基于该提取得到的服务内容通过第三方接口对应的服 务器进行响应, 并将对应的响应结果返回给终端设备, 因而终端设备在获取到 各个第三方接口返回的处理结果后, 将判定该服务请求已响应完成, 并执行 S10 6的相关操作。 [0040] 在 S106中, 向所述用户终端发送通信连接请求, 建立与所述用户终端之间的通 信连接。
[0041] 在本实施例中, 终端设备在生成服务请求对应的处理结果后, 将重新启动在 S1 01中用户终端与终端设备之间进行交互通信的通信连接, 因此将向用户终端发 送通信连接请求。
[0042] 可选地, 在本实施例中, 通信连接请求包含服务请求标识。 终端设备将用户终 端对应的网络通信地址, 将该通信连接请求发送给用户终端, 用户终端在接收 到该通信连接请求后, 将提取该通信连接请求中包含的服务请求标识, 并将之 前发送给服务请求对应的端口由空闲状态调整为占用状态, 并确认建立与终端 设备之间的通信连接。
[0043] 可选地, 在本实施例中, 终端设备在发送通信连接请求前, 将确定之前接收该 服务请求对应的端口号, 并基于该端口号的工作状态由空闲状态调整为占用状 态, 并通过该端口向用户终端发送通信连接请求。 优选地, 用户终端还可以返 回一个连接确认信号, 继而终端设备也确认双方的通信连接已经建立, 并执行 S 107的相关操作。
[0044] 在 S107中, 通过所述通信连接返回所述处理结果至所述用户终端。
[0045] 在本实施例中, 终端设备确认通信连接建立完成后, 将基于该通信连接将服务 请求对应的处理结果返回给用户终端。 优选地, 终端设备在发送处理结果之前 , 可对该通信连接进行连通测试, 以测试两者之间的通信链路是否连通成功。 具体地, 终端设备可发送一个 ping协议包, 以便基于用户终端基于该 ping协议返 回一个 ping结果, 若终端设备在预设的吋间阈值内接受到该 ping结果, 则表示两 者之间的通信链路已经连通, 继而将该处理结果返回给用户终端; 若在预设的 吋间阈值内未接收到 ping结果, 则返回执行 S106的相关操作。 在该情况下, 可能 用户终端之前发送服务请求的通讯端口正在被其他应用占用, 因此未成功连接 , 因而需要重新执行通信连接建立的操作。
[0046] 以上可以看出, 本申请实施例提供的一种服务响应方法通过在获取到用户终端 发送的服务请求后, 确定该服务请求对应的服务响应参数, 并向用户终端发送 连接中止信号以暂停用户终端以及服务服务响应终端之间的通信连接, 并接收 到用户终端返回的资源释放指令, 则表示用户终端已经将其本地的连接资源释 放, 此吋服务响应终端也同吋释放与该用户终端进行通信的端口; 然后基于服 务响应参数, 调用对应的第三方接口响应该服务请求并得到服务结果, 并重新 与用户终端建立通信连接, 将该服务结果返回给用户终端。 与现有的服务响应 方法相比, 本申请实施例提供的服务响应方法用户终端与服务响应终端无需长 吋间保持通信连接以等待处理结果, 而是在服务响应终端在接收到用户的服务 请求后, 则暂停两者的之间的通信连接, 并释放通信资源, 从而避免长吋间连 接而到吋通讯失效的情况发送。 并且在服务响应终端通过第三方接口生成对应 的处理结果后, 重新与用户终端建立连接, 并将该处理结果返回给用户终端, 可见在上述通信过程中, 用户终端与服务响应终端并不存在连接等待而无交互 数据的情况发生, 而是需要传输吋才建立通信连接, 提高了网络资源的利用效 率, 以及提高了服务响应的成功率。
[0047] 图 2示出了本申请第二实施例提供的一种服务响应方法 S105的具体实现流程图 。 参见图 2所示, 相对于图 1所述实施例, 本实施例提供的一种服务响应方法 S10 5包括以下步骤, 详述如下:
[0048] 进一步地, 所述服务响应参数中包含至少两个所述第三方接口和每个所述第三 方接口对应的调用次序, 所述通过所述第三方接口响应所述服务请求, 生成所 述服务请求对应的处理结果, 包括:
[0049] 在 S201中, 基于每个所述第三方接口的调用次序, 将所述服务请求发送至调用 次序为第一调用的第三方接口。
[0050] 在本实施例中, 服务请求需要调用至少两个第三方接口进行响应吋, 其对应的 服务响应参数除了包含第三方接口外, 还包含各个第三方调用接口的调用次序 , 该调用次序用于表示响应该服务请求吋调用第三方接口的次序。
[0051] 在本实施例中, 终端设备在确定了服务请求的服务响应参数后, 将提取该服务 响应参数包含的第三方接口并确定各个第三方接口对应的调用次序。 终端设备 在获取了各个第三方接口对应的调用次序后, 将确定该调用次序中第一调用的 第三方接口, 并与该第三方接口进行连接。 在本实施例中, 终端设备与调用次 序为第一调用的第三方接口进行连接后, 将向其发送用户终端发送的服务请求 , 以便第三方接口基于该服务请求生成对应的处理数据。
[0052] 在 S202中, 若接收到所述调用次序为第一调用的第三方接口根据所述服务请求 返回的处理数据, 则根据所述第三方接口的调用次序, 重复执行确定下一调用 次序的第三方接口, 将所述服务请求以及所述处理数据发送至所述下一调用次 序的第三方接口的操作, 直到接收到末节点对应的第三方接口返回的处理结果
[0053] 在本实施例中, 首节点的第三方接口对该服务请求响应完毕后, 将对应的处理 数据返回给终端设备, 由于该处理数据并非最终的处理结果, 而是一个中间量 , 因此并不将该处理数据返回给用户, 而是基于各个第三方接口的调用次序, 确定该返回该处理数据的下一个节点, 继而与该下一节点对应的第三方接口进 行连接, 并将服务请求以及上一节点返回的处理数据, 发送给该下一节点对应 的第三方接口, 继而接收下一节点对应的第三方接口基于服务请求以及上一节 点的处理数据, 返回该节点对应的处理数据给终端设备。 终端设备重复执行上 述步骤, 直到接收到末节点对应的第三方接口返回的处理数据, 即处理结果。 由于末节点对应的第三方接口返回的处理数据, 并不需要再次调用更多的第三 方接口进行响应了, 即该处理数据即为服务请求最终得到的处理数据, 因此, 将其识别为处理结果。
[0054] 在本申请实施例中, 通过调用多个第三方接口并规定对应的调用次序, 从而实 现较为复杂的服务请求的响应, 从而扩大了服务响应方法的适用范围。 进一步 地, 通过多个第三方接口对处理数据的多次迭代, 也进一步提高了处理结果的 准确性。
[0055] 图 3示出了本申请第三实施例提供的一种服务响应方法 S105的具体实现流程图
。 参见图 3所示, 相对于图 1所述实施例, 本实施例提供的一种服务响应方法 S10
5还包括以下步骤, 详述如下:
[0056] 进一步地, 所述服务响应参数中包含至少两个所述第三方接口, 所述通过所述 第三方接口响应所述服务请求, 生成所述服务请求对应的处理结果, 还包括: [0057] 在 S301中, 获取所述服务响应参数中包含的所述第三方接口的个数, 并启动与 所述个数对应的线程。 [0058] 在本实施例中, 与图 2所示的实施例不同, 终端设备并非通过串行调用的方式 响应服务请求, 而是同吋启动多个第三方接口对该服务请求进行响应。 首先, 终端设备根据服务请求确定其对应的服务响应参数, 继而终端设备提取该服务 响应参数包含的第三方接口的个数, 并启动与该个数相对应的线程。 具体地, 终端设备将对应数量的端口由空闲状态调整为占用, 并控制各个端口与服务响 应参数中指示的第三方接口进行连接, 同吋终端设备在本地设备也为每个第三 方接口配置对应的运算资源, 以调用上述各个第三方接口响应用户终端发送的 服务请求。
[0059] 在 S302中, 通过所述线程并发调用各个所述第三方接口, 以使所述第三方接口 对应的第三方服务器响应所述服务请求, 并通过所述第三方接口返回所述服务 请求对应的处理子结果。
[0060] 在本实施例中, 终端设备将同吋启动多条线程, 并发调用服务响应参数中指示 的多个第三方接口响应用户终端发起的服务请求。 具体地, 终端设备通过上述 启动的线程, 同吋将服务请求发送给多个第三方接口, 以便第三方接口对应的 第三方服务器根据服务请求执行其对应的服务内容。
[0061] 在本实施例中, 各个第三方接口对应的服务器在执行完成服务请求中对应的服 务内容后, 将生成一个处理子结果, 并将该处理子结果通过对应的第三方接口 返回给终端设备。 需要说明的是, 处理子结果具体为该第三方接口对于该服务 请求已完成响应操作, 并根据该服务请求得到的处理数据, 因而, 第三方接口 在返回处理子结果给终端设备后, 将判定是否第三方接口对应的服务器中是否 仍存在未被响应的服务请求, 若否, 则表明该第三方接口已完成终端设备分配 的所有服务任务, 此吋将断幵第三方接口与终端设备之间的通信连接。
[0062] S303中, 接收各个第三方接口发送的所述处理子结果, 并生成所述处理结果。
[0063] 在本实施例中, 终端设备在接收到各个第三方接口返回的处理子结果后, 将基 于各个处理子结果, 生成服务请求对应的处理结果。
[0064] 在本申请实施例中, 通过并发调用多个第三方接口同吋相应用户终端发起的服 务请求, 从而提高了服务响应的效率, 减少了用户的等待吋间, 也减少了终端 设备与第三方接口之间的连接吋间, 减少资源的占用率。 [0065] 图 4示出了本申请第四实施例提供的一种服务响应方法 S101的具体实现流程图 。 参见图 4所示, 相对于图 1至图 3所述实施例, 本实施例提供的一种服务响应方 法中所述获取用户终端发送的服务请求, 还包含 S401~S403, 详述如下:
[0066] 在 S401中, 接收所述用户终端发送的通信同步指令。
[0067] 在本实施例中, 用户终端在向终端设备发起任务请求前, 需要建立两者之间的 通信链路, 因此将发送通信同步指令。 需要说明的是, 若用户终端与终端设备 之间并非建立通信连接, 则该通信同步指令用于告知终端设备需要分配对应的 通信资源, 以建立两者之间的通信链路, 且该通信同步指令用于初始化终端设 备该通信链路中的通信资源, 以使两者之间的通信设置相匹配。 若用户终端与 终端设备之间以建立通信连接, 则该通信同步指令用于重新启动该通信连接, 并初始化终端设备分配给该通信链路的通信资源。
[0068] 在本实施例中, 终端设备在接收到该用户终端发送的通信同步指令后, 将根据 该通信同步指令中包含的通信协议, 设置与用户终端进行通信的端口的通信参 数, 以使端口与通信连接相匹配。
[0069] 在 S402中, 根据所述通信同步指令向所述用户终端返回同步完成指令; 其中, 所述同步完成指令包含所述端口的端口标识。
[0070] 在本实施例中, 终端设备设置完成通信同步指令中对应的通信参数后, 将生成 一个同步完成指令, 其中该同步完成指令中包含了与用户终端进行通信的端口 的端口标识, 以便告知终端设备其分配的通信端口。
[0071] 在本实施例中, 用户终端在接收到终端设备返回的同步完成指令后, 将提取该 同步完成指令中包含的端口标识, 并在以后与终端设备进行交互的信号或信息 中, 将该端口标识封装于数据包内, 以便通过终端设备的上述端口标识对应的 端口进行通信。
[0072] 在 S403中, 接收所述用户终端根据所述同步完成指令返回的连接确认信号; 其 中, 所述连接确认信号包含所述服务请求。
[0073] 在本实施例中, 用户终端在确认两者双方已经建立通信连接后, 将向终端设备 返回一个连接确认信号, 以告知终端设备可通过该通信连接进行数据交互。 其 中, 用户终端还将服务请求封装于连接确认信号中, 终端设备在接收到该连接 确认信号后, 将提取该连接确认信号中包含的服务请求, 从而实现获取用户终 端发送服务请求的目的。
[0074] 在本申请实施例中, 通过在终端设备与用户终端在建立通信连接的过程中, 将 发送服务请求的操作也整合其中, 从而减少用户终端发送服务请求所需的吋间
, 进一步提高了服务响应的效率。
[0075] 图 5示出了本申请第五实施例提供的一种服务响应方法的具体实现流程图。 参 见图 5所示, 相对于图 1所述实施例, 本实施例提供的一种服务响应方法 S103之 前还包括以下步骤, 详述如下:
[0076] 进一步地, 在所述向所述用户终端发送连接中止信号之前, 还包括:
[0077] 在 S501中, 获取所述服务请求中服务字段的服务编号。
[0078] 在本实施例中, 终端设备将基于预设的服务请求字段划分算法, 确定该服务请 求中对应的服务字段, 并从该服务字段中提取该服务请求对应的服务编号。 其 中, 该服务编号用于表示该服务请求的服务类型。
[0079] 在 S502中, 基于预设的服务编号与服务类型的对应关系列表, 确定所述服务请 求的服务类型。
[0080] 在本实施例中, 终端设备在确定服务请求中包含的服务编号后, 将査询其预设 的服务编号与服务类型的对应关系列表, 继而确定该服务请求对应的服务类型 。 具体地, 一个服务编号对应于一个服务类型, 而一个服务类型可对应于多个 服务编号, 由于不同的用户终端存在不同的编码规则, 因此生成的服务请求中 对应的服务编号也存在一定的差异, 因而对应于同一个服务类型, 不同用户终 端所对应的服务编号将不一定相同。
[0081] 在本实施例中, 终端设备在识别了该服务请求对应的服务类型后, 将判定该服 务类型是否为本地服务请求, 若该服务类型为本地服务请求, 则执行 S503的相 关操作; 反之, 若判定该服务类型为调用服务请求, 则执行 S504的相关操作。 具体地, 判定服务类型是否本地服务请求的判定条件具体为: 是否需要调用第 三方接口响应该服务请求。 若响应该服务类型无需调用第三方接口, 则判定为 本地服务类型; 反之, 若响应该服务类型需要调用第三方接口, 则判定为调用 服务请求。 [0082] 在 S503中, 若所述服务类型为本地服务请求, 则保持与所述用户终端的通信连 接, 响应所述服务请求。
[0083] 在本实施例中, 终端设备若判定该服务类型为本地服务请求, 则表示响应该服 务请求只需通过本地的服务响应模块也能够完成响应, 响应服务请求的吋间相 对较短, 并不会因等待处理结果而导致两者之间的通信连接超吋, 因此在该情 况下, 终端设备将不执行发送中止信号的操作, 以暂停两者之间的通信连接, 而是保持两者之间的通信连接, 并马上对该服务请求进行响应。
[0084] 在 S504中, 若所述服务类型为调用服务请求, 则执行所述向所述用户终端发送 连接中止信号的操作。
[0085] 在本实施例中, 终端设备若判定该服务类型为调用服务请求, 则表示响应该服 务请求需要调用除本地的服务响应模块之外的第三方接口才能完成该服务请求 的响应操作, 因此响应服务请求的吋间相对较长, 可能会因等待处理结果而导 致两者之间的通信连接超吋, 因此在该情况下, 将执行发送中止信号的操作, 以暂停两者之间的通信连接。
[0086] 在本申请实施例中, 终端设备在提取操作前首先对待处理任务进行筛选, 确定 对应的响应策略, 对于本地响应的服务请求则保持通信连接并响应, 减少两者 之间通信连接频繁状态切换; 而对于需要调用第三接口的服务请求, 则执行暂 吋中断连接的操作, 从而避免因超吋等待而导致响应失败的情况发生, 从而提 高了服务响应的效率以及成功率。
[0087] 应理解, 上述实施例中各步骤的序号的大小并不意味着执行顺序的先后, 各过 程的执行顺序应以其功能和内在逻辑确定, 而不应对本申请实施例的实施过程 构成任何限定。
[0088] 图 6示出了本申请一实施例提供的一种服务响应终端的结构框图, 该服务响应 终端包括的各单元用于执行图 1对应的实施例中的各步骤。 具体请参阅图 1与图 1 所对应的实施例中的相关描述。 为了便于说明, 仅示出了与本实施例相关的部 分。
[0089] 参见图 6, 所述服务响应终端包括:
[0090] 服务请求获取单元 61, 用于获取用户终端发送的服务请求; [0091] 服务响应参数确定单元 62, 基于所述服务请求, 确定所述服务请求对应的服务 响应参数; 其中, 所述服务响应参数包括: 响应所述服务请求所需的第三方接 P ;
[0092] 连接中止信号发送单元 63, 用于向所述用户终端发送连接中止信号; 其中, 所 述连接中止信号包含所述服务请求对应的请求标识以及服务响应确认标识;
[0093] 资源释放指令接收单元 64, 用于接收所述用户终端根据所述连接中止信号返回 的资源释放指令, 并将与所述用户终端进行通信对应端口的工作状态变更为空 闲;
[0094] 服务响应单元 65, 用于调用所述服务响应参数中指示的所述第三方接口, 并通 过所述第三方接口响应所述服务请求, 生成所述服务请求对应的处理结果;
[0095] 通信连接重启单元 66, 用于向所述用户终端发送通信连接请求, 建立与所述用 户终端之间的通信连接;
[0096] 处理结果返回单元 67, 用于通过所述通信连接返回所述处理结果至所述用户终 山
[0097] 可选地, 所述服务响应参数中包含至少两个所述第三方接口和每个所述第三方 接口对应的调用次序, 服务响应单元 65包括:
[0098] 首节点响应单元, 用于基于每个所述第三方接口调用次序, 将所述服务请求发 送至调用次序为第一调用的第三方接口;
[0099] 处理数据反馈单元, 用于若接收到所述调用次序为第一调用的第三方接口根据 所述服务请求返回的处理数据, 则根据所述第三方接口调用次序, 重复执行确 定下一调用次序的第三方接口, 将所述服务请求以及所述处理数据发送至所述 下一调用次序的第三方接口的操作, 直到接收到末节点对应的第三方接口返回 的处理结果。
[0100] 可选地, 所述服务响应参数中包含至少两个所述第三方接口, 服务响应单元 65 还包括:
[0101] 线程启动单元, 用于获取所述服务响应参数中包含的所述第三方接口的个数, 并启动与所述个数对应的线程;
[0102] 并发响应单元, 用于通过所述线程并发调用各个所述第三方接口, 以使所述第 三方接口对应的第三方服务器响应所述服务请求, 并通过所述第三方接口返回 所述服务请求对应的处理子结果;
[0103] 处理结果生成单元, 用于接收各个第三方接口发送的所述处理子结果, 并生成 所述处理结果。
[0104] 可选地, 服务请求获取单元 61还包括:
[0105] 通信同步指令接收单元, 用于接收所述用户终端发送的通信同步指令;
[0106] 同步完成指令发送单元, 用于根据所述通信同步指令向所述用户终端返回同步 完成指令; 其中, 所述同步完成指令包含所述与所述用户终端进行通信对应端 口的端口标识;
[0107] 连接确认指令接收单元, 用于接收所述用户终端根据所述同步完成指令返回的 连接确认信号; 其中, 所述连接确认信号包含所述服务请求。
[0108] 可选地, 所述终端设备还包括:
[0109] 服务编号获取单元, 用于获取所述服务请求中服务字段的服务编号;
[0110] 服务类型确定单元, 用于基于预设的服务编号与服务类型的对应关系列表, 确 定所述服务请求的服务类型;
[0111] 本地服务响应单元, 用于若所述服务类型为本地服务请求, 则保持与所述用户 终端的通信连接, 响应所述服务请求;
[0112] 异地服务响应单元, 用于若所述服务类型为调用服务请求, 则执行所述向所述 用户终端发送连接中止信号的操作。
[0113] 因此, 本申请实施例提供的服务响应终端同样无需与用户终端长吋间进行保持 通信连接以等待处理结果, 而是在服务响应终端在接收到用户的服务请求后, 则暂停两者的之间的通信连接, 并释放通信资源, 从而避免长吋间连接而到吋 通讯失效的情况发送, 提高了网络资源的利用效率, 以及提高了服务响应的成 功率。
[0114] 图 7是本申请另一实施例提供的一种终端设备的示意图。 如图 7所示, 该实施例 的终端设备 7包括: 处理器 70、 存储器 71以及存储在所述存储器 71中并可在所述 处理器 70上运行的计算机可读指令 72, 例如服务响应程序。 所述处理器 70执行 所述计算机可读指令 72吋实现上述各个服务响应方法实施例中的步骤, 例如图 1 所示的 S101至 S107。 或者, 所述处理器 70执行所述计算机可读指令 72吋实现上 述各装置实施例中各单元的功能, 例如图 6所示模块 61至 67功能。
[0115] 示例性的, 所述计算机可读指令 72可以被分割成一个或多个单元, 所述一个或 者多个单元被存储在所述存储器 71中, 并由所述处理器 70执行, 以完成本申请 。 所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令指令 段, 该指令段用于描述所述计算机可读指令 72在所述终端设备 7中的执行过程。 例如, 所述计算机可读指令 72可以被分割成服务请求获取单元、 服务响应参数 确定单元、 连接中止信号发送单元、 资源释放指令接收单元、 服务响应单元、 通信连接重启单元以及处理结果返回单元, 各单元具体功能如下:
[0116] 服务请求获取单元, 用于获取用户终端发送的服务请求;
[0117] 服务响应参数确定单元, 基于所述服务请求, 确定所述服务请求对应的服务响 应参数; 其中, 所述服务响应参数包括: 响应所述服务请求所需的第三方接口
[0118] 连接中止信号发送单元, 用于向所述用户终端发送连接中止信号; 其中, 所述 连接中止信号包含所述服务请求对应的请求标识以及服务响应确认标识;
[0119] 资源释放指令接收单元, 用于接收所述用户终端根据所述连接中止信号返回的 资源释放指令, 并将与所述用户终端进行通信对应端口的工作状态变更为空闲
[0120] 服务响应单元, 用于调用所述服务响应参数中指示的所述第三方接口, 并通过 所述第三方接口响应所述服务请求, 生成所述服务请求对应的处理结果;
[0121] 通信连接重启单元, 用于向所述用户终端发送通信连接请求, 建立与所述用户 终端之间的通信连接;
[0122] 处理结果返回单元, 用于通过所述通信连接返回所述处理结果至所述用户终端
[0123] 以上所述实施例仅用以说明本申请的技术方案, 而非对其限制; 尽管参照前述 实施例对本申请进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本申请各 实施例技术方案的精神和范围, 均应包含在本申请的保护范围之内。

Claims

权利要求书
[权利要求 1] 一种服务响应方法, 其特征在于, 包括:
获取用户终端发送的服务请求;
基于所述服务请求, 确定所述服务请求对应的服务响应参数; 其中, 所述服务响应参数包括: 响应所述服务请求所需的第三方接口; 向所述用户终端发送连接中止信号; 其中, 所述连接中止信号包含所 述服务请求对应的请求标识以及服务响应确认标识;
接收所述用户终端根据所述连接中止信号返回的资源释放指令, 并将 与所述用户终端进行通信对应端口的工作状态变更为空闲; 调用所述服务响应参数中指示的所述第三方接口, 并通过所述第三方 接口响应所述服务请求, 生成所述服务请求对应的处理结果; 向所述用户终端发送通信连接请求, 建立与所述用户终端之间的通信 连接;
通过所述通信连接返回所述处理结果至所述用户终端。
[权利要求 2] 根据权利要求 1所述的服务响应方法, 其特征在于, 所述服务响应参 数中包含至少两个所述第三方接口和每个所述第三方接口对应的调用 次序, 所述通过所述第三方接口响应所述服务请求, 生成所述服务请 求对应的处理结果, 包括:
基于每个所述第三方接口调用次序, 将所述服务请求发送至调用次序 为第一调用的第三方接口;
若接收到所述首节点对应的第三方接口根据所述服务请求返回的处理 数据, 则根据所述第三方接口的调用次序, 重复执行确定下一调用次 序的第三方接口, 将所述服务请求以及所述处理数据发送至所述下一 调用次序的第三方接口的操作, 直到接收到末节点对应的第三方接口 返回的处理结果。
[权利要求 3] 根据权利要求 1所述的服务响应方法, 其特征在于, 所述服务响应参 数中包含至少两个所述第三方接口, 所述通过所述第三方接口响应所 述服务请求, 生成所述服务请求对应的处理结果, 包括: 获取所述服务响应参数中包含的所述第三方接口的个数, 并启动与所 述个数对应的线程;
通过所述线程并发调用各个所述第三方接口, 以使所述第三方接口对 应的第三方服务器响应所述服务请求, 并通过所述第三方接口返回所 述服务请求对应的处理子结果;
接收各个第三方接口发送的所述处理子结果, 并生成所述处理结果。
[权利要求 4] 根据权利要求 1-3任一项所述的服务响应方法, 其特征在于, 所述获 取用户终端发送的服务请求, 包括:
接收所述用户终端发送的通信同步指令;
根据所述通信同步指令向所述用户终端返回同步完成指令; 其中, 所 述同步完成指令包含所述与所述用户终端进行通信对应端口的端口标 识;
接收所述用户终端根据所述同步完成指令返回的连接确认信号; 其中 , 所述连接确认信号包含所述服务请求。
[权利要求 5] 根据权利要求 4所述的服务响应方法, 其特征在于, 在所述向所述用 户终端发送连接中止信号之前, 还包括:
获取所述服务请求中服务字段的服务编号;
基于预设的服务编号与服务类型的对应关系列表, 确定所述服务请求 的服务类型;
若所述服务类型为本地服务请求, 则保持与所述用户终端的通信连接 , 响应所述服务请求;
若所述服务类型为调用服务请求, 则执行所述向所述用户终端发送连 接中止信号的操作。
[权利要求 6] —种服务响应终端, 其特征在于, 包括:
服务请求获取单元, 用于获取用户终端发送的服务请求;
服务响应参数确定单元, 基于所述服务请求, 确定所述服务请求对应 的服务响应参数; 其中, 所述服务响应参数包括: 响应所述服务请求 所需的第三方接口; 连接中止信号发送单元, 用于向所述用户终端发送连接中止信号; 其 中, 所述连接中止信号包含所述服务请求对应的请求标识以及服务响 应确认标识;
资源释放指令接收单元, 用于接收所述用户终端根据所述连接中止信 号返回的资源释放指令, 并将与所述用户终端进行通信对应端口的工 作状态变更为空闲;
服务响应单元, 用于调用所述服务响应参数中指示的所述第三方接口 , 并通过所述第三方接口响应所述服务请求, 生成所述服务请求对应 的处理结果;
通信连接重启单元, 用于向所述用户终端发送通信连接请求, 建立与 所述用户终端之间的通信连接;
处理结果返回单元, 用于通过所述通信连接返回所述处理结果至所述 用户终端。
[权利要求 7] 根据权利要求 6所述的服务响应终端设备, 其特征在于, 所述服务响 应参数中包含至少两个所述第三方接口和每个所述第三方接口对应的 调用次序, 服务响应单元包括:
首节点响应单元, 用于基于每个所述第三方接口调用次序, 将所述服 务请求发送至调用次序为第一调用的第三方接口; 处理数据反馈单元, 用于若接收到所述调用次序为第一调用的第三方 接口根据所述服务请求返回的处理数据, 则根据所述第三方接口调用 次序, 重复执行确定下一调用次序的第三方接口, 将所述服务请求以 及所述处理数据发送至所述下一调用次序的第三方接口的操作, 直到 接收到末节点对应的第三方接口返回的处理结果。
[权利要求 8] 根据权利要求 6所述的服务响应终端, 其特征在于, 所述服务响应参 数中包含至少两个所述第三方接口, 服务响应单元还包括: 线程启动单元, 用于获取所述服务响应参数中包含的所述第三方接口 的个数, 并启动与所述个数对应的线程;
并发响应单元, 用于通过所述线程并发调用各个所述第三方接口, 以 使所述第三方接口对应的第三方服务器响应所述服务请求, 并通过所 述第三方接口返回所述服务请求对应的处理子结果;
处理结果生成单元, 用于接收各个第三方接口发送的所述处理子结果 , 并生成所述处理结果。
[权利要求 9] 根据权利要求 6-8任一项所述的服务响应终端, 其特征在于, 服务请 求获取单元还包括:
通信同步指令接收单元, 用于接收所述用户终端发送的通信同步指令 同步完成指令发送单元, 用于根据所述通信同步指令向所述用户终端 返回同步完成指令; 其中, 所述同步完成指令包含所述与所述用户终 端进行通信对应端口的端口标识;
连接确认指令接收单元, 用于接收所述用户终端根据所述同步完成指 令返回的连接确认信号; 其中, 所述连接确认信号包含所述服务请求
[权利要求 10] 根据权利要求 9所述的服务响应终端, 其特征在于, 所述终端设备还 包括:
服务编号获取单元, 用于获取所述服务请求中服务字段的服务编号; 服务类型确定单元, 用于基于预设的服务编号与服务类型的对应关系 列表, 确定所述服务请求的服务类型;
本地服务响应单元, 用于若所述服务类型为本地服务请求, 则保持与 所述用户终端的通信连接, 响应所述服务请求; 异地服务响应单元, 用于若所述服务类型为调用服务请求, 则执行所 述向所述用户终端发送连接中止信号的操作。
[权利要求 11] 一种终端设备, 其特征在于, 所述终端设备包括存储器、 处理器以及 存储在所述存储器中并可在所述处理器上运行的计算机可读指令, 所 述处理器执行所述计算机可读指令吋实现如下步骤:
获取用户终端发送的服务请求;
基于所述服务请求, 确定所述服务请求对应的服务响应参数; 其中, 所述服务响应参数包括: 响应所述服务请求所需的第三方接口; 向所述用户终端发送连接中止信号; 其中, 所述连接中止信号包含所 述服务请求对应的请求标识以及服务响应确认标识;
接收所述用户终端根据所述连接中止信号返回的资源释放指令, 并将 与所述用户终端进行通信对应端口的工作状态变更为空闲; 调用所述服务响应参数中指示的所述第三方接口, 并通过所述第三方 接口响应所述服务请求, 生成所述服务请求对应的处理结果; 向所述用户终端发送通信连接请求, 建立与所述用户终端之间的通信 连接;
通过所述通信连接返回所述处理结果至所述用户终端。
[权利要求 12] 根据权利要求 11所述的终端设备, 其特征在于, 所述服务响应参数中 包含至少两个所述第三方接口和每个所述第三方接口对应的调用次序 , 所述通过所述第三方接口响应所述服务请求, 生成所述服务请求对 应的处理结果, 包括:
基于每个所述第三方接口的调用次序, 将所述服务请求发送至调用次 序为第一调用的第三方接口;
若接收到所述调用次序为第一调用的第三方接口根据所述服务请求返 回的处理数据, 则根据所述第三方接口的调用次序, 重复执行确定下 一调用次序的第三方接口, 将所述服务请求以及所述处理数据发送至 所述下一调用次序的第三方接口的操作, 直到接收到末节点对应的第 三方接口返回的处理结果。
[权利要求 13] 根据权利要求 11所述的终端设备, 其特征在于, 所述服务响应参数中 包含至少两个所述第三方接口, 所述通过所述第三方接口响应所述服 务请求, 生成所述服务请求对应的处理结果, 包括:
获取所述服务响应参数中包含的所述第三方接口的个数, 并启动与所 述个数对应的线程;
通过所述线程并发调用各个所述第三方接口, 以使所述第三方接口对 应的第三方服务器响应所述服务请求, 并通过所述第三方接口返回所 述服务请求对应的处理子结果;
接收各个第三方接口发送的所述处理子结果, 并生成所述处理结果。
[权利要求 14] 根据权利要求 11-13任一项所述的终端设备, 其特征在于, 所述获取 用户终端发送的服务请求, 包括:
接收所述用户终端发送的通信同步指令;
根据所述通信同步指令向所述用户终端返回同步完成指令; 其中, 所 述同步完成指令包含所述与所述用户终端进行通信对应端口的端口标 识;
接收所述用户终端根据所述同步完成指令返回的连接确认信号; 其中 , 所述连接确认信号包含所述服务请求。
[权利要求 15] 根据权利要求 14所述的终端设备, 其特征在于, 在所述向所述用户终 端发送连接中止信号之前, 还包括:
获取所述服务请求中服务字段的服务编号;
基于预设的服务编号与服务类型的对应关系列表, 确定所述服务请求 的服务类型;
若所述服务类型为本地服务请求, 则保持与所述用户终端的通信连接 , 响应所述服务请求;
若所述服务类型为调用服务请求, 则执行所述向所述用户终端发送连 接中止信号的操作。
[权利要求 16] —种计算机可读存储介质, 所述计算机可读存储介质存储有计算机可 读指令, 其特征在于, 所述计算机可读指令被处理器执行吋实现如下 步骤:
获取用户终端发送的服务请求;
基于所述服务请求, 确定所述服务请求对应的服务响应参数; 其中, 所述服务响应参数包括: 响应所述服务请求所需的第三方接口; 向所述用户终端发送连接中止信号; 其中, 所述连接中止信号包含所 述服务请求对应的请求标识以及服务响应确认标识;
接收所述用户终端根据所述连接中止信号返回的资源释放指令, 并将 与所述用户终端进行通信对应端口的工作状态变更为空闲;
调用所述服务响应参数中指示的所述第三方接口, 并通过所述第三方 接口响应所述服务请求, 生成所述服务请求对应的处理结果; 向所述用户终端发送通信连接请求, 建立与所述用户终端之间的通信 连接;
通过所述通信连接返回所述处理结果至所述用户终端。
[权利要求 17] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述服务 响应参数中包含至少两个所述第三方接口和每个所述第三方接口对应 的调用次序, 所述通过所述第三方接口响应所述服务请求, 生成所述 服务请求对应的处理结果, 包括:
基于每个所述第三方接口调用次序, 将所述服务请求发送至调用次序 为第一调用的第三方接口;
若接收到所述首节点对应的第三方接口根据所述服务请求返回的处理 数据, 则根据所述第三方接口的调用次序, 重复执行确定下一调用次 序的第三方接口, 将所述服务请求以及所述处理数据发送至所述下一 调用次序的第三方接口的操作, 直到接收到末节点对应的第三方接口 返回的处理结果。
[权利要求 18] 根据权利要求 16所述的计算机可读存储介质, 其特征在于, 所述服务 响应参数中包含至少两个所述第三方接口, 所述通过所述第三方接口 响应所述服务请求, 生成所述服务请求对应的处理结果, 包括: 获取所述服务响应参数中包含的所述第三方接口的个数, 并启动与所 述个数对应的线程;
通过所述线程并发调用各个所述第三方接口, 以使所述第三方接口对 应的第三方服务器响应所述服务请求, 并通过所述第三方接口返回所 述服务请求对应的处理子结果;
接收各个第三方接口发送的所述处理子结果, 并生成所述处理结果。
[权利要求 19] 根据权利要求 16-18任一项所述的计算机可读存储介质, 其特征在于 , 所述获取用户终端发送的服务请求, 包括: 接收所述用户终端发送的通信同步指令;
根据所述通信同步指令向所述用户终端返回同步完成指令; 其中, 所 述同步完成指令包含所述与所述用户终端进行通信对应端口的端口标 识;
接收所述用户终端根据所述同步完成指令返回的连接确认信号; 其中 , 所述连接确认信号包含所述服务请求。
[权利要求 20] 根据权利要求 19所述的计算机可读存储介质, 其特征在于, 在所述向 所述用户终端发送连接中止信号之前, 还包括: 获取所述服务请求中服务字段的服务编号;
基于预设的服务编号与服务类型的对应关系列表, 确定所述服务请求 的服务类型;
若所述服务类型为本地服务请求, 则保持与所述用户终端的通信连接 , 响应所述服务请求;
若所述服务类型为调用服务请求, 则执行所述向所述用户终端发送连 接中止信号的操作。
PCT/CN2017/113571 2017-10-20 2017-11-29 一种服务响应方法及其终端 Ceased WO2019075863A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710982776.1 2017-10-20
CN201710982776.1A CN107770269B (zh) 2017-10-20 2017-10-20 一种服务响应方法及其终端

Publications (1)

Publication Number Publication Date
WO2019075863A1 true WO2019075863A1 (zh) 2019-04-25

Family

ID=61269828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113571 Ceased WO2019075863A1 (zh) 2017-10-20 2017-11-29 一种服务响应方法及其终端

Country Status (2)

Country Link
CN (1) CN107770269B (zh)
WO (1) WO2019075863A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336882A (zh) * 2019-07-10 2019-10-15 四川首汽交投汽车共享科技有限公司 一种用户终端与车载终端的同步通信的实现方法
US11665243B2 (en) 2019-07-25 2023-05-30 Beijing Boe Technology Development Co., Ltd. Method of establishing device correlation, and electronic device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650285B (zh) * 2018-03-08 2020-04-21 深圳市盛铂科技有限公司 一种网络应用互相连接的方法及网络接入装置
CN109639755B (zh) * 2018-10-23 2022-04-12 平安科技(深圳)有限公司 关联系统服务器解耦方法、装置、介质及电子设备
CN109462646B (zh) * 2018-11-12 2021-11-19 平安科技(深圳)有限公司 一种异常响应的方法及设备
CN110134527B (zh) * 2019-04-09 2023-05-30 创新先进技术有限公司 数据处理方法、客户端和电子设备
CN111552572A (zh) * 2020-04-30 2020-08-18 北京大米科技有限公司 任务处理方法、可读存储介质和电子设备
CN112437155B (zh) * 2020-11-20 2024-02-20 北京水滴科技集团有限公司 服务数据的处理方法、装置以及服务端设备
CN113779467A (zh) * 2021-01-05 2021-12-10 北京沃东天骏信息技术有限公司 可视化功能组件管理的方法和装置
CN115633082B (zh) * 2022-08-19 2025-02-18 珠海金山办公软件有限公司 调用中台服务的标识处理方法、装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972306A (zh) * 2006-12-01 2007-05-30 浙江大学 安全套接层协议安全代理多重认证的实现方法
CN106162943A (zh) * 2015-04-27 2016-11-23 中国移动通信集团公司 一种保活消息处理方法、装置、系统和相关设备
US20170278035A1 (en) * 2016-03-28 2017-09-28 Bank Of America Corporation System for real-time release of allocated resources based on device stage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1972306A (zh) * 2006-12-01 2007-05-30 浙江大学 安全套接层协议安全代理多重认证的实现方法
CN106162943A (zh) * 2015-04-27 2016-11-23 中国移动通信集团公司 一种保活消息处理方法、装置、系统和相关设备
US20170278035A1 (en) * 2016-03-28 2017-09-28 Bank Of America Corporation System for real-time release of allocated resources based on device stage

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336882A (zh) * 2019-07-10 2019-10-15 四川首汽交投汽车共享科技有限公司 一种用户终端与车载终端的同步通信的实现方法
CN110336882B (zh) * 2019-07-10 2022-01-14 北京首汽智行科技有限公司 一种用户终端与车载终端的同步通信的实现方法
US11665243B2 (en) 2019-07-25 2023-05-30 Beijing Boe Technology Development Co., Ltd. Method of establishing device correlation, and electronic device

Also Published As

Publication number Publication date
CN107770269B (zh) 2019-07-19
CN107770269A (zh) 2018-03-06

Similar Documents

Publication Publication Date Title
WO2019075863A1 (zh) 一种服务响应方法及其终端
CN111580995B (zh) 基于mqtt异步通信场景下的分布式云平台与物联网智能终端的同步通信方法与系统
CN105100232B (zh) 一种不中断服务的服务端程序平滑升级的方法
CN106034084B (zh) 一种数据传输方法及装置
CN101883108B (zh) 动态认证的文件传输方法及系统
CN110971591B (zh) 一种多进程访问可信应用的方法和系统
US20190334969A1 (en) Media Downlink Transmission Control Method and Related Device
CN107528891B (zh) 一种基于WebSocket的自动集群方法及其系统
CN101453404A (zh) 一种实现负载均衡的方法及装置
CN106713238B (zh) 远程过程调用方法、装置及系统
WO2017036373A1 (zh) 一种组呼业务处理方法、终端及核心网网元
WO2010148757A1 (zh) 一种实现终端设备资源共享的方法及系统
WO2019000790A1 (zh) 一种以同步方式进行远程过程调用的方法及装置
CN103685398A (zh) 通信连接建立方法及通信系统
CN105874773A (zh) 任务处理装置、智能设备、任务处理方法及基带处理器
CN106970843B (zh) 远程调用方法和装置
CN115623057A (zh) 基于rdma的建连方法、装置、设备及存储介质
CN105814968A (zh) 一种终止呼叫的方法、应用程序处理器及调制解调器
GB2617297A (en) Bluetooth connection method and system, intelligent terminal and computer storage medium
CN106027365A (zh) 一种信息交互的方法及装置
CN115242972B (zh) 一种应用调用摄像头的方法和装置、电子设备及存储介质
CN110324390A (zh) 一种接入方法、物联网平台、应用设备、服务设备
WO2015067051A1 (zh) 测试代理方法及其装置
CN112671835B (zh) 一种请求处理的方法、装置、系统及存储介质
CN108551477A (zh) 数据传输通道建立系统、网络存储设备、服务器及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17929052

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17929052

Country of ref document: EP

Kind code of ref document: A1