WO2020063769A1 - 一种用户请求的处理方法、装置及服务器 - Google Patents

一种用户请求的处理方法、装置及服务器 Download PDF

Info

Publication number
WO2020063769A1
WO2020063769A1 PCT/CN2019/108212 CN2019108212W WO2020063769A1 WO 2020063769 A1 WO2020063769 A1 WO 2020063769A1 CN 2019108212 W CN2019108212 W CN 2019108212W WO 2020063769 A1 WO2020063769 A1 WO 2020063769A1
Authority
WO
WIPO (PCT)
Prior art keywords
user request
user
information
identification information
outstanding
Prior art date
Application number
PCT/CN2019/108212
Other languages
English (en)
French (fr)
Inventor
赵琦
Original Assignee
北京金山云网络技术有限公司
北京金山云科技有限公司
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 北京金山云网络技术有限公司, 北京金山云科技有限公司 filed Critical 北京金山云网络技术有限公司
Publication of WO2020063769A1 publication Critical patent/WO2020063769A1/zh

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/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
    • H04L67/62Establishing a time schedule for servicing the requests
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Definitions

  • the present application relates to the field of network technologies, and in particular, to a method, device, and server for processing user requests.
  • the client needs to cooperate with the corresponding server in the network, that is, the server and the service program, and the corresponding server in the network provides the corresponding Services, where the client can also be called the client.
  • the client obtains the services provided by the server by sending a user request to the server, that is, the client accesses the server, often by sending a user request to the server.
  • a user request is a request for a service from the server.
  • the user request may include various requests such as a login request and a video request.
  • the server After receiving the user request, the server will respond to the user request to provide the service requested by the client.
  • the service provided by the server needs to be restarted.
  • the server needs to perform operations such as updating or maintenance on a regular or irregular basis.
  • the server needs to be restarted after the update or maintenance. Restarting when the server is down, restarting the server causes the service programs running on the server to restart, or restarts when the service programs fail.
  • the service will not perform any processing on these user requests after restarting. This will cause these user requests to not be processed accordingly and users will not be able to handle them.
  • the user experience is very bad for getting the services you need.
  • the purpose of the embodiments of the present application is to provide a method, a device, and a server for processing user requests, so as to continue to complete unfinished user requests after the service is restarted, and improve the user experience.
  • Specific technical solutions are as follows:
  • an embodiment of the present application provides a method for processing a user request, which is applied to a server.
  • the method includes: after the service is restarted, querying a pre-recorded user request information table to obtain an exit identifier requested by the user Information, the user request information table records exit identification information corresponding to the user request, and the exit identification information is used to indicate the completion status of the user request; determining whether the user request is based on the exit identification information Complete; when it is determined that the user request is not completed, the incomplete user request is executed.
  • determining whether the user request is completed according to the exit identification information includes: determining that the user request is not completed when the exit identification information is empty or a predetermined value.
  • executing the incomplete user request includes: querying the pre-recorded user request information table to obtain an execution status of the incomplete user request.
  • Information the user request information table records the execution status information requested by the user, and the execution status information is used to indicate the execution status requested by the user; according to the execution status information, the uncompleted user is executed request.
  • the execution status of the outstanding user request includes a specific phase completion status or a specific phase in progress status; and executing the outstanding user request according to the execution status information includes: If the execution status of the uncompleted user request is a specific phase in progress, the uncompleted user request is executed from the specific phase; if the execution status of the uncompleted user request is a specific phase completion state, Then, starting from the next execution phase of the specific phase, execution of the outstanding user request continues.
  • the method further includes: performing a cleaning operation on the pre-recorded user request information table according to a preset cleaning time, and deleting the user request information table in which the exit identification information indicates that the The user requests the corresponding information.
  • the method further includes: after receiving at least one user request sent by at least one application, based on the execution process of the at least one user request, recording the at least one in the user request information table.
  • a user requests corresponding information, and the information corresponding to the at least one user request includes at least an exit identifier corresponding to the user request.
  • an embodiment of the present application provides a user request processing device, which is applied to a server.
  • the device includes: an information table lookup module configured to detect and query a pre-recorded user request information table after a service restart, Obtain the exit identification information requested by the user, and the exit request identification information corresponding to the user request is recorded in the user request information table, and the exit identification information is used to indicate a completion status of the user request; a status determination module, configured To determine whether the user request is completed according to the exit identification information; the request processing module is configured to execute the incomplete user request when it is determined that the user request is incomplete.
  • the status determination module includes a status determination sub-module configured to determine that the user request is not completed when the exit identification information is empty or a predetermined value.
  • the request processing module includes: a query submodule configured to query the pre-recorded user request information table to obtain execution status information of the outstanding user request, and the user request information table The execution status information requested by the user is recorded, and the execution status information is used to indicate the execution status requested by the user; the processing submodule is configured to execute the outstanding user request according to the execution status information.
  • the execution status of the outstanding user request includes a specific phase completion status or a specific phase in progress status;
  • the processing submodule includes: a first processing unit configured to, if the outstanding user request The execution status of a particular phase is in progress, and the unfinished user request is executed from the particular phase;
  • the second processing unit is configured to, if the execution status of the unfinished user request is a particular phase completion status , Starting from the next execution phase of the specific phase, execution of the outstanding user request continues.
  • the apparatus further includes a cleaning module configured to perform a cleaning operation on the pre-recorded user request information table according to a preset cleaning time, and delete an exit identifier in the user request information table.
  • the information indicates the information corresponding to the completed user request.
  • the apparatus further includes an information table recording module configured to receive information from the user based on an execution process of the at least one user request after receiving at least one user request sent by at least one application end.
  • the table records information corresponding to the at least one user request, and the information corresponding to the at least one user request includes at least an exit identifier corresponding to the user request.
  • an embodiment of the present application further provides a server including a processor, a memory, and a communication bus, where the processor and the memory complete communication with each other through the communication bus; the memory is used to store a computer program; the processor, When the program stored in the memory is executed, the processing method steps requested by any of the users are implemented.
  • an embodiment of the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and the computer program implements a processing method requested by any user when the computer program is executed by a processor. step.
  • an embodiment of the present application further provides a computer program configured to execute, when running, any processing method step requested by the user.
  • the pre-recorded user request information table is queried to obtain the exit identification information requested by the user.
  • the user request information table records the exit identification information and exit identification information corresponding to the user request. It is used to indicate the completion status of the user request; to determine whether the user request is completed according to the exit identification information; when it is determined that the user request is not completed, the incomplete user request is executed. It can be seen that after the service restarts, the user requests that are not completed due to the restart can continue to be completed, greatly improving the user experience.
  • FIG. 1 is a flowchart of a method for processing a user request according to an embodiment of the present application
  • FIG. 2 is a specific flowchart of step S103 in the embodiment shown in FIG. 1;
  • FIG. 3 is a flowchart of a manner for determining whether a processing result is accurate according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a user request processing device according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
  • embodiments of the present application provide a method, device, server, computer-readable storage medium, and computer program for processing user requests.
  • the method for processing user requests may be applied to any server that needs to process user requests, and may specifically be a server.
  • the user request can be sent directly from the user to the server, or it can be sent from another server to the server. For example, after a server receives a user request, it will be forwarded when it needs the assistance of another server to realize the user request.
  • the above-mentioned request sent from the client to the server, and the request forwarded between the servers can be considered as a user request.
  • a method for processing user requests is applied to a server.
  • the method includes:
  • the user request information table records exit identification information corresponding to the user request, and the exit identification information is used to indicate a completion status of the user request.
  • step S102 Determine whether the user request is completed according to the exit identification information. When it is determined that the user request is not completed, perform step S103;
  • the pre-recorded user request information table is queried to obtain the exit identification information requested by the user.
  • the user request information table records the exit identification information corresponding to the user request.
  • the identification information is used to indicate the completion status of the user request; determine whether the user request is completed according to the exit identification information; when it is determined that the user request is not completed, the incomplete user request is executed.
  • the "service” mentioned in the embodiment of the present application is an application type that generally runs in the background. It can usually provide some functions for users locally and through the network. Specifically, it can be provided for the client and set on the server. Service procedures.
  • the “service” may be various types of cloud services, and may include a virtual machine management service, a resource scheduling service, and a gateway service.
  • a tenant can initiate a virtual machine management request when it needs to manage a virtual machine, for example, a virtual machine creation request, a virtual machine deletion request, a software uninstall request, etc., and the cloud server can receive these requests. , And extract the request parameters and so on through the gateway service to determine the specific content indicated by the virtual machine management request.
  • the cloud server needs to find a suitable physical machine among the physical machines in the machine room.
  • the resource scheduling service can be used to schedule the physical machine resources in the machine room. To determine the appropriate physical machine to use to create the virtual machine.
  • the specific implementation of creating a virtual machine can be implemented through a virtual machine management service, and the virtual machine management service can be used to create the tenant's virtual machine in the identified physical machine.
  • the virtual machine management service can also implement virtual machine management functions such as virtual machine deletion and software uninstallation.
  • the service needs to be restarted for some reason.
  • the server regularly or irregularly performs operations such as update or maintenance.
  • the server needs to be restarted after the update or maintenance, or the server fails and needs to be restarted, and the restart of the server causes the service program set on the server to restart.
  • the service program itself may restart after a failure.
  • the service restarts it is likely that some user requests are being processed, that is, the restart occurs during the processing of user requests, and therefore, these user requests have not been completed.
  • a user request information table is set, which is used to record information related to the user request, such as whether it has been executed Completed, which stage to execute, the context, environment, parameters, and other information required to execute each stage requested by the user, and which information is specifically recorded are not limited, and those skilled in the art can set as needed.
  • the user request information table records exit identification information corresponding to the user request, and the exit identification information may be used to indicate the completion status of the user request, that is, whether the user request has been processed. After the server restarts, it may query the pre-recorded user request information table to obtain the exit identification information requested by the user.
  • the server records the corresponding exit identification information when the user request is completed. If the exit identification information requested by a user is not recorded in the user request information table, that is, when the exit identification information is empty, the description is provided. The user request was not completed. Then after the service restarts, the user request information table can be traversed to find out whether the user request information table records corresponding exit identification information. Use this to determine whether the user request has been completed.
  • the exit identification information can be recorded in any form, as long as it can identify that the user's request has been processed, and can be export identification information composed of letters, numbers, a combination of the two, and the like, which are not specifically limited or described here. For example, it can be c1, G, ywc *, 5 #, and so on. In addition, the exit identification information corresponding to each user request may be the same or different, which is reasonable.
  • the server can execute step S103, that is, execute the determined outstanding user requests, and then complete the user requests, provide users with corresponding services, and improve the user experience.
  • step S103 executes the determined outstanding user requests, and then complete the user requests, provide users with corresponding services, and improve the user experience.
  • the specific method for the server to execute the determined outstanding user request will be described later as an example.
  • the user request information table recorded by the server can be shown in the following table:
  • the exit identification information When the exit identification information is empty, the user request is incomplete. Then, because user request 2 in the above table does not have exit identification information, that is, the exit identification information is empty, so the server can determine that user request 2 is an uncompleted user request, and user request 1 and user request 3 are completed. User request.
  • the foregoing step of determining whether the user request is completed according to the exit identification information may include:
  • the server only records the exit identification information corresponding to the user request when the user request processing is completed. Then, when the exit identification information corresponding to a user request is empty, it indicates that the user request is not processed.
  • the server when the server queries the above user request information table, if there is a user request without exit identification information, the server can determine that there are outstanding user requests. If there is no user request without exit identification information, , Then it means that there are no outstanding user requests, and the server can do nothing.
  • the server when the user request is not processed, the server records the exit identification information corresponding to the user request to a predetermined value. Until the user request is processed, the server can change the exit identification information to another value. When the exit identification information corresponding to a user request is a predetermined value, it indicates that the user request is not processed.
  • the specific value of the predetermined value is not specifically limited in the embodiment of the present application. For example, the value may be 0, 25, WWC, or the like.
  • the server when the server queries the above user request information table, if there is a user request with exit identification information of 25, the server can determine that there are outstanding user requests. If there is no exit identification information, 25 user requests, it means that there are no outstanding user requests, and then the server can not perform operations.
  • the server can determine that the user request is incomplete when the exit identification information is empty or a predetermined value. In this way, it can quickly and accurately determine whether there are outstanding user requests and improve the processing speed of user requests. And accuracy.
  • the step of executing the incomplete user request may include:
  • S201 Query the pre-recorded user request information table to obtain execution status information of the outstanding user request;
  • the server can determine the execution status information of the outstanding user request.
  • the server can record the execution status information requested by the user in the user request information table.
  • the execution status information is used to indicate the execution status requested by the user, that is, to indicate the stage to which the user requests execution.
  • the user request information table can also record various execution status information during the processing of the user request. For example, it can include various information carried by the user request, the network environment related to the user request, and the user request. Processing status, etc.
  • the processing status may include a processing progress identifier, a suspension identifier, and the like.
  • the server may record the suspension identifier corresponding to the user request.
  • the pre-recorded user request information table can also be queried to obtain the recorded execution status information.
  • the server can also determine the execution status information of the outstanding user request in any other manner that can determine the execution status information requested by the user, which is not specifically limited herein. For example, by monitoring the processing progress of a user request, if the processing progress does not change within a preset period of time, the user request is likely to be suspended, and the server can determine that its execution status information is suspended.
  • S202 Execute the outstanding user request according to the execution status information.
  • the server can query the pre-recorded user request information table to obtain the execution status information of the uncompleted user request, and then execute the uncompleted user request according to the execution status information to ensure that the user needs Services to enhance user experience.
  • the execution status of the uncompleted user request may include a specific phase completion status or a specific phase in progress status, and the specific phase refers to a specific one or a specific phase.
  • the server may also record the execution status information corresponding to each user request according to multiple processing stages when recording the above-mentioned user request information table.
  • the server receives a user request to create a virtual machine request.
  • the server In the process of processing the user request, the server generally has two execution phases.
  • the first phase is the scheduling phase, which performs resource scheduling to determine the virtual machine resources created.
  • the second stage is the virtual machine creation stage, based on the determined resources, the virtual machine is created, configured and online.
  • the server can record the execution status information in the above user request information table: when the execution is in the scheduling phase, the execution status information can be recorded as indicating that the scheduling is in progress; when the scheduling phase is completed, the execution status information can be recorded as indicating that the scheduling is complete; when the execution is in During the creation phase, the execution status information can be recorded to indicate that the virtual machine is being created; and when the creation phase is completed, the execution status information can be recorded to indicate that the virtual machine is completed. Then, based on the recorded execution status information, the execution phase of the request to create a virtual machine can be known.
  • the virtual machine creation stage is the next stage of the first stage.
  • the progress of the schedule indicates the state of the first stage, and the completion of the schedule indicates the state of the first stage.
  • the above-mentioned execution of the outstanding user request according to the execution status information includes:
  • execution status of the outstanding user request is a specific phase in progress status, starting from the specific phase, execute the outstanding user request; if the execution status of the outstanding user request is a specific phase completion Status, starting from the next execution phase of the specific phase, and continuing to execute the outstanding user request.
  • the server determines that the outstanding user request is in a certain stage according to the execution status information of the query of the outstanding user request, then the execution status of the outstanding user request when the service restarts is still in progress A specific stage of processing, then in order to ensure that the outstanding user request can be completed, the server can start the specific stage of the outstanding user request processing and execute the outstanding user request.
  • the server determines that the outstanding user request is in a specific phase according to the execution status information of the incomplete user request, the execution status of the outstanding user request when the service is restarted is that the processing in the specific phase has been completed. Completed, in order to ensure that the outstanding user request can be completed, while avoiding repeated processing and wasting computing resources, the server can continue to execute the outstanding user request starting from the next execution phase of a specific phase.
  • the server can execute the second phase, that is, the virtual machine creation phase. If the execution status information of the above-mentioned incomplete user requests queried by the server is in the schedule, then the incomplete user requests are in the service The execution state during the restart is the first stage in progress, and the server can re-execute the first stage, that is, reschedule processing.
  • the server executes an uncompleted user request from a specific phase; the execution status of an uncompleted user request is specific
  • the phase is completed, starting from the next execution phase of a specific phase, the uncompleted user request is continued to be executed, so that it can be processed in a targeted manner according to the various execution states of the uncompleted user request. While ensuring that unfinished user requests are completed accurately, waste of resources is avoided.
  • the related information requested by one or more users processed by the server can include the above-mentioned exit identification information and execution status information, and can also include the relevant context, environment, parameters, callback methods and other information of each stage requested by the user.
  • Information can be recorded in the above-mentioned user request information table, so each user request is correspondingly recorded with a huge data structure. Therefore, in order to ensure the performance of the server and improve the resource utilization rate, as an implementation manner of the embodiment of this application, The above method may further include:
  • a cleaning operation is performed on the pre-recorded user request information table, and the user request information table is deleted, and the exit identification information indicates information corresponding to the completed user request.
  • the preset cleaning time can be set according to factors such as the number of user requests processed by the actual server, for example, it can be every 24 hours, every 20 hours, every 3 days, etc., which is not specifically limited herein.
  • the server cleans the pre-recorded user request information table according to a preset cleaning time
  • the server deletes the information corresponding to the completed user request when the exit identification information indicates the completion. Information, and the information corresponding to outstanding user requests needs to be retained.
  • the server performs a cleaning operation of the user request information table.
  • the user request information table is shown in the following table:
  • the portal identification information can be used to instruct the server to start processing the corresponding user request, that is, when the server receives a user request and starts processing the user request, it can record the portal identification information requested by the user.
  • the execution status information requested by the user may include information such as entry identification information and exit identification information, where the entry identification information indicates that the user requests execution to begin, the exit identification information indicates that the user has requested execution completion, and the entry identification information and exit identification information can be regarded as two Two special execution status information indicating the processing status of the user request.
  • the user request Q2 and the user request Q3 do not have exit identification information, it means that the user request Q2 and the user request Q3 are uncompleted user requests. Then, when the user request information table is cleaned, the user request Q2 and the user request may not be deleted. The user requests information about Q3.
  • the server can perform a cleaning operation on the pre-recorded user request information table according to a preset cleaning time, and delete information corresponding to the completed user request in the user request information table.
  • the resources such as the storage space of the user request information table and the time required to look up the table can be saved, the performance of the server end can be guaranteed, and the resource utilization rate can be improved.
  • the user request information table may be preset. After receiving at least one user request sent by at least one application end, based on an execution process of the at least one user request, in the The user request information table records information corresponding to the at least one user request, and the information corresponding to the at least one user request includes at least an exit identifier corresponding to the user request.
  • the server can process the received at least one user request sent by at least one application end based on the During the execution process of the processed user request, information corresponding to at least one user request is recorded in a user request information table.
  • the recorded information corresponding to the processed user request may include any information about the user request such as exit identification information, entry identification information, context, and callback method, which is not specifically limited herein.
  • the user request information table may be configured in advance, or may be generated in real time when the user request is first received, and it may record at least one piece of information related to the user request.
  • the server after receiving at least one user request sent by at least one application, the server can record information corresponding to at least one user request in the user request information table based on the execution process of the at least one user request. To ensure that after the service restarts, the recorded information can be used to accurately execute outstanding user requests.
  • the foregoing steps of executing the uncompleted user request may include:
  • the processing method corresponding to the processing method information requested by the user is used to process the outstanding user request.
  • the server executes the unfinished user request, it can determine the processing method information of the user request recorded in the user request information table, and then execute the unfinished user request by using the processing method corresponding to the determined processing method information.
  • the processing mode information requested by the user may be a network interface
  • the server executes the outstanding user request, it can call the network interface recorded in the user request information table to execute the outstanding user request.
  • the network interface is an interface called when the server responds to a user request. Since the server has processed the outstanding user request before restarting, that is, calling the network interface to respond to it, the server can record the network interface as its processing method information.
  • the server can call the network interface to execute the uncompleted user request.
  • the server when processing the user request, can record the processing method information requested by each user, and the processing method information requested by the user can be a network interface. In this way, after the service restarts, the recorded network interface can be recorded. Executing the unfinished user request ensures a correct response to the unfinished user request, obtains a correct response result, and further improves the user experience.
  • the method may further include:
  • the server can judge whether the processing result is accurate when the above-mentioned uncompleted user request is executed. Then, if the processing is not accurate, the uncompleted user request is processed again to ensure that the correct service is provided to the user and the user is guaranteed. Experience. If the processing result is accurate, the server can do nothing.
  • the server can determine whether the processing result is accurate when the above-mentioned uncompleted user request is executed, and if the processing is inaccurate, the uncompleted user is processed again. Request to ensure that the correct service is provided to the user.
  • the foregoing step of determining whether the processing result is accurate may include:
  • the server can record the service type corresponding to each user request when processing each user request, such as video services, login services, logout services, and so on.
  • the server when the server reprocesses the outstanding user request to obtain the processing result, it can determine the target service type corresponding to the outstanding user request according to the correspondence between the recorded user request and the service type.
  • the correspondence between the user request and the service type recorded by the server is: user request 1 corresponds to service type f1, user request 2 corresponds to service type f2, user request 3 corresponds to service type f3, and user request 4 corresponds to service type f2. Then, if after the service restarts, it is determined that the user request 3 is an uncompleted user request, the server can determine the target server type corresponding to the uncompleted user request 3 as f2 according to the corresponding relationship.
  • step S302. Determine whether the processing result meets the target service type, and if so, perform step S303; if not, perform step S304;
  • the server After determining the target service type corresponding to the outstanding user request, the server can determine whether the processing result obtained by executing the outstanding user request conforms to the target service type. If so, step S303 is performed, and if not, execute Step S304.
  • step S301 if the processing result obtained by the server executing the outstanding user request 3 belongs to the service type f2, the processing result conforms to the target service type; if the server reprocesses the outstanding user request 3
  • the obtained processing result belongs to the service type f1, f3, or other service types, so the processing result obviously does not conform to the target service type.
  • the processing result obtained by the server on executing the outstanding user request matches the target service type, then the processing result belongs to the target service type, and then the processing result can be determined to be accurate. Conversely, if the server determines that the processing result obtained by executing an uncompleted user request does not conform to the target service type, then it indicates that the processing result does not belong to the target service type, then it can be determined that the processing result is inaccurate.
  • the server when the server processes each user request, it can record the type of service it requested. In this way, after the service is restarted, the outstanding user request is executed to obtain the processing result, and the processing can be judged. Whether the result meets the target service type corresponding to the outstanding user request. Furthermore, it can quickly determine whether the processing result obtained by executing the outstanding user request is accurate, so that when the processing result is inaccurate, the server can process again. This outstanding user request guarantees that the outstanding user request is processed correctly and further improves the user experience.
  • the server can add This information is recorded in a form, the above-mentioned user request information form, so that it can be queried when needed. For example, this can be shown in the following table:
  • user request Q2 and user request Q3 do not have exit identification information
  • it can traverse the form to determine that user request Q2 and user request Q3 do not have exit identification information. It is determined that the user request Q2 and the user request Q3 are outstanding user requests. Further, the server can also query the suspension identifier in the table to determine that the user request Q3 has a suspension identifier Z3, and then determine that the execution status of the user request Q3 is suspended, and then the server can process the user request Q3 accordingly.
  • the server can query the table to determine that the network interface used to respond to the user request Q3 before the restart is the network interface J1 *, and then when processing the user request Q3, the server can call The network interface J1 * responds to the user request Q3 to obtain the processing result.
  • the server can also query the table to determine that the service type corresponding to the user request Q3 is service type 2. Then, the server can determine the user request Q3 Whether the processing result obtained after reprocessing is consistent with service type 2. If so, it indicates that the server's execution of the user request Q3 is correct and can provide users with accurate services.
  • the server can re-execute the user request Q3 to ensure that the user is correctly responded to Request Q3 to provide users with required services and improve user experience.
  • the embodiment of the present application further provides a processing device for user requests.
  • the following describes an apparatus for processing a user request provided by an embodiment of the present application.
  • the apparatus for processing user requests provided in the embodiments of the present application can be applied to any server that needs to process user requests.
  • a user request processing device is applied to a server, and the device includes:
  • the information table lookup module 410 is configured to detect and query a pre-recorded user request information table after the service is restarted, to obtain exit identification information requested by the user, and the user request information table records an exit identification corresponding to the user request. Information, the exit identification information is used to indicate the completion status of the user request;
  • a state determination module 420 configured to determine whether the user request is completed according to the exit identification information
  • the request processing module 430 is configured to execute the incomplete user request when it is determined that the user request is incomplete.
  • the pre-recorded user request information table is queried to obtain the exit identification information requested by the user.
  • the user request information table records the exit identification information corresponding to the user request.
  • the identification information is used to indicate the completion status of the user request; it is determined whether the user request is completed according to the exit identification information; when it is determined that the user request is not completed, the incomplete user request is executed.
  • the state determination module 420 may include:
  • the state determination submodule (not shown in FIG. 4) is configured to determine that the user request is not completed when the exit identification information is empty or a predetermined value.
  • the request processing module 430 may include:
  • the query submodule (not shown in FIG. 4) is configured to query the pre-recorded user request information table to obtain execution status information of the outstanding user request, and the user request information table records the user Requested execution status information, where the execution status information is used to indicate the execution status requested by the user;
  • a processing sub-module (not shown in FIG. 4) is configured to execute the outstanding user request according to the execution status information.
  • the execution status of the uncompleted user request may include a completion status of a specific phase or a progress status of a specific phase;
  • the processing sub-module may include:
  • a first processing unit (not shown in FIG. 4) configured to execute the outstanding user request from the specific phase if the execution status of the outstanding user request is a specific phase in progress;
  • a second processing unit (not shown in FIG. 4) configured to continue the execution of the unfinished user from the next execution phase of the specific phase if the execution status of the uncompleted user request is a specific phase completion status Completed user request.
  • the foregoing apparatus may further include:
  • the cleaning module (not shown in FIG. 4) is configured to perform a cleaning operation on the pre-recorded user request information table according to a preset cleaning time, delete the user request information table, and exit identification information indicates completion Of users requested the corresponding information.
  • the foregoing apparatus may further include:
  • An information table recording module (not shown in FIG. 4), configured to record in the user request information table based on an execution process of the at least one user request after receiving at least one user request sent by at least one application end
  • the information corresponding to the at least one user request, and the information corresponding to the at least one user request includes at least an exit identifier corresponding to the user request.
  • an embodiment of the present application further provides a server, as shown in FIG. 5, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504.
  • the memory 503 completes communication with each other through the communication bus 504.
  • the processor 501 is configured to execute the following steps when executing a program stored in the memory 503:
  • the user request information table records the exit identification information corresponding to the user request, and the exit identification information is used for Indicate the completion status of the user request;
  • the outstanding user request is executed.
  • the pre-recorded user request information table is queried to obtain the exit identification information requested by the user.
  • the user request information table records the exit identification information corresponding to the user request.
  • the identification information is used to indicate the completion status of the user request; it is determined whether the user request is completed according to the exit identification information; when it is determined that the user request is not completed, the incomplete user request is executed.
  • the communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the figure only uses a thick line to represent, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the server and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far from the foregoing processor.
  • the aforementioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP network processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the above-mentioned determining whether the user request is completed according to the exit identification information may include:
  • executing the incomplete user request may include:
  • the user request information table records the execution status information requested by the user, and the execution status information is used to indicate The execution status requested by the user;
  • the execution status of the uncompleted user request may include a completion status of a specific phase or a progress status of a specific phase;
  • the above-mentioned execution of the outstanding user request according to the execution status information may include:
  • execution status of the outstanding user request is the completion status of a specific phase, starting from the next execution phase of the specific phase, execution of the outstanding user request is continued.
  • the foregoing method may further include:
  • a cleaning operation is performed on the pre-recorded user request information table, and the user request information table is deleted, and the exit identification information indicates information corresponding to the completed user request.
  • the recording manner of the user request information table may include:
  • An embodiment of the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
  • the user request information table records the exit identification information corresponding to the user request, and the exit identification information is used for Indicate the completion status of the user request;
  • the outstanding user request is executed.
  • the pre-recorded user request information table is queried to obtain the exit identification information requested by the user.
  • the user request information table records the user Request the corresponding exit identification information, which is used to indicate the completion status of the user request; determine whether the user request is completed according to the exit identification information; when it is determined that the user request is incomplete, execute the incomplete user request.
  • the above-mentioned determining whether the user request is completed according to the exit identification information may include:
  • executing the incomplete user request may include:
  • the user request information table records the execution status information requested by the user, and the execution status information is used to indicate The execution status requested by the user;
  • the execution status of the uncompleted user request may include a completion status of a specific phase or a progress status of a specific phase;
  • the above-mentioned execution of the outstanding user request according to the execution status information may include:
  • execution status of the outstanding user request is the completion status of a specific phase, starting from the next execution phase of the specific phase, execution of the outstanding user request is continued.
  • the foregoing method may further include:
  • a cleaning operation is performed on the pre-recorded user request information table, and the user request information table is deleted, and the exit identification information indicates information corresponding to the completed user request.
  • the recording manner of the user request information table may include:
  • the information corresponding to the at least one user request is recorded in the user request information table, and the at least one user
  • the information corresponding to the request includes at least the exit identifier corresponding to the user request.
  • An embodiment of the present application further provides a computer program, where the computer program is used to execute the following steps when running:
  • the user request information table records the exit identification information corresponding to the user request, and the exit identification information is used for Indicate the completion status of the user request;
  • the outstanding user request is executed.
  • the computer program when the computer program is running, after the service is restarted, it can query the pre-recorded user request information table to obtain the exit identification information requested by the user.
  • the user request information table records the corresponding user request.
  • the exit identification information is used to indicate the completion status of the user request; according to the exit identification information, it is determined whether the user request is completed; when it is determined that the user request is not completed, the outstanding user request is executed. In this way, after the service restart, user requests that are not completed due to restart can continue to be completed, greatly improving the user experience.
  • the above-mentioned determining whether the user request is completed according to the exit identification information may include:
  • executing the incomplete user request may include:
  • the user request information table records the execution status information requested by the user, and the execution status information is used to indicate The execution status requested by the user;
  • the execution status of the uncompleted user request may include a completion status of a specific phase or a progress status of a specific phase;
  • the above-mentioned execution of the outstanding user request according to the execution status information may include:
  • execution status of the outstanding user request is the completion status of a specific phase, starting from the next execution phase of the specific phase, execution of the outstanding user request is continued.
  • the foregoing method may further include:
  • a cleaning operation is performed on the pre-recorded user request information table, and the user request information table is deleted, and the exit identification information indicates information corresponding to the completed user request.
  • the recording manner of the user request information table may include:
  • the information corresponding to the at least one user request is recorded in the user request information table, and the at least one user
  • the information corresponding to the request includes at least the exit identifier corresponding to the user request.
  • the present application provides a method, device, server, computer-readable storage medium, and computer program for processing user requests.
  • a pre-recorded user request information table is queried to obtain exit identification information requested by the user and a user request information table.
  • the exit identification information corresponding to the user request is recorded therein, and the exit identification information is used to indicate the completion status of the user request; it is determined whether the user request is completed according to the exit identification information; when it is determined that the user request is not completed, the incomplete user request is executed.

Landscapes

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

Abstract

本申请实施例提供了一种用户请求的处理方法、装置及服务器,所述方法应用于服务端,所述方法包括:在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。可见,在服务重启后可以通过检测确定存在的未完成的用户请求,进而确定未完成的用户请求的完成状态,进而执行未完成的用户请求,以提供给用户所需的服务,大大提升用户体验

Description

一种用户请求的处理方法、装置及服务器
本申请要求于2018年9月30日提交中国专利局、申请号为201811158059.8发明名称为“一种用户请求的处理方法、装置及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络技术领域,特别是涉及一种用户请求的处理方法、装置及服务器。
背景技术
为保证应用程序的正常运行,使用户能够正常使用应用程序所提供的本地功能,客户端需要与网络中相应的服务端,即服务器和服务程序互相配合,由网络中相应的服务端来提供相应的服务,其中,客户端也可称为用户端。
客户端通过向服务端发出用户请求来获取服务端提供的服务,即,客户端访问服务端,往往通过发送用户请求至服务端的方式实现,用户请求即为向服务端请求服务的请求,例如,用户请求可以包括登录请求、视频请求等各种请求。服务端接收到用户请求后,便会响应该用户请求,以提供客户端所请求的服务。
为了提供更好的服务或者修复问题,服务端提供的服务需要进行重启,例如,服务器需要定时或不定时地进行更新或维护等操作,进行更新或维护后一般需要重启服务器,或者,服务器出现故障宕机重启,服务器的重启使得服务器上运行的服务程序也会重启,或者服务程序出现故障重启。目前,对于在服务端提供的服务重启时还未完成的用户请求,服务在重启后不会对这些的用户请求进行任何处理,这样就会导致这些用户请求无法得到相应的处理,用户也就无法获得所需要的服务,用户体验非常不好。
发明内容
本申请实施例的目的在于提供一种用户请求的处理方法、装置及服务器,以在服务重启后继续完成未完成的用户请求,提高用户体验。具体技术方案 如下:
第一方面,本申请实施例提供了一种用户请求的处理方法,应用于服务端,所述方法包括:在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;根据所述出口标识信息,确定所述用户请求是否完成;当确定所述用户请求未完成时,执行所述未完成的用户请求。
在一实施方式中,所述根据所述出口标识信息,确定所述用户请求是否完成包括:当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
在一实施方式中,所述当确定所述用户请求未完成时,执行所述未完成的用户请求包括:查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;根据所述执行状态信息,执行所述未完成的用户请求。
在一实施方式中,所述未完成的用户请求的执行状态包括特定阶段完成状态或特定阶段进行中状态;所述根据所述执行状态信息,执行所述未完成的用户请求,包括:如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
在一实施方式中,所述方法还包括:根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
在一实施方式中,所述方法还包括:在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
第二方面,本申请实施例提供了一种用户请求的处理装置,应用于服务端,所述装置包括:信息表查找模块,配置为在服务重启后,检测查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;状态确定模块,配置为根据所述出口标识信息,确定所述用户请求是否完成;请求处理模块,配置为当确定所述用户请求未完成时,执行所述未完成的用户请求。
在一实施方式中,所述状态确定模块包括:状态确定子模块,配置为当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
在一实施方式中,所述请求处理模块包括:查询子模块,配置为查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;处理子模块,配置为根据所述执行状态信息,执行所述未完成的用户请求。
在一实施方式中,所述未完成的用户请求的执行状态包括特定阶段完成状态或特定阶段进行中状态;所述处理子模块包括:第一处理单元,配置为如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;第二处理单元,配置为如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
在一实施方式中,所述装置还包括:清理模块,配置为根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
在一实施方式中,所述装置还包括:信息表记录模块,配置为接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
第三方面,本申请实施例还提供了一种服务器,包括处理器、存储器和 通信总线,其中,处理器、存储器通过通信总线完成相互间的通信;存储器,用于存放计算机程序;处理器,用于执行存储器上所存放的程序时,实现上述任一用户请求的处理方法步骤。
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一用户请求的处理方法步骤。
第五方面,本申请实施例还提供了一种计算机程序,所述计算机程序配置为在运行时执行上述任一用户请求的处理方法步骤。
本申请实施例所提供的方案中,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。可见,在服务重启后,可以继续完成因重启而未完成的用户请求,大大提升用户体验。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种用户请求的处理方法的流程图;
图2为图1所示实施例中步骤S103的具体流程图;
图3为本申请实施例所提供的判断处理结果是否准确的一种方式的流程图;
图4为本申请实施例所提供的一种用户请求的处理装置的结构示意图;
图5为本申请实施例所提供的一种服务端的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了在服务重启后继续完成未完成的用户请求,提高用户体验,本申请实施例提供了一种用户请求的处理方法、装置、服务器、计算机可读存储介质及计算机程序。
下面首先对本申请实施例所提供的一种用户请求的处理方法进行介绍。
本申请实施例所提供的一种用户请求的处理方法可以应用于任意需要处理用户请求的服务端,具体可以为服务器。其中,用户请求可以是用户端直接发送至服务端,也可以是其他服务端发送至服务端的,例如,在某服务端接收到用户请求后,为实现该用户请求需要其他服务端的协助时会转发用户请求或者生成相关的请求发送至其他服务端。上述用户端发送至服务端的请求,以及服务端之间转发相关的请求,均可认为是用户请求。
如图1所示,一种用户请求的处理方法,应用于服务端,所述方法包括:
S101,在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息;
所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态。
S102,根据所述出口标识信息,确定所述用户请求是否完成,当确定所述用户请求未完成时,执行步骤S103;
S103,执行所述未完成的用户请求。
可见,本申请实施例所提供的方案中,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态; 根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以继续完成因重启而未完成的用户请求,大大提升用户体验。
本申请实施例中所言“服务”,其为一种应用程序类型,一般在后台运行,通常可以在本地和通过网络为用户提供一些功能,具体可以是为客户端提供服务的、设置在服务器上的服务程序。例如,本申请实施例中,“服务”可以为各种类型的云服务,可以包括虚拟机管理服务、资源调度服务以及网关服务等。
具体来说,在云服务场景中,租户在需要对虚拟机进行管理时可以发起虚拟机管理请求,例如,虚拟机创建请求、虚拟机删除请求、软件卸载请求等,云服务器可以接收到这些请求,并通过网关服务进行请求参数的提取等,以确定虚拟机管理请求所指示的具体内容。
当虚拟机管理请求所指示的具体内容为创建虚拟机时,云服务器需要在机房内的物理机中找出合适的物理机,此时便可以通过资源调度服务对机房内的物理机资源进行调度,以确定合适的物理机,用于创建虚拟机。
创建虚拟机的具体实现便可以通过虚拟机管理服务实现,通过虚拟机管理服务可以在确定出的物理机中创建该租户的虚拟机。当然,虚拟机管理服务还可以实现虚拟机删除、软件卸载等虚拟机管理功能。
由于一些原因服务需要进行重启。例如,服务器定时或不定时地进行更新或维护等操作,进行更新或维护后一般需要重启服务器,或者,服务器出现故障宕机,需要进行重启,而服务器的重启使得服务器上设置的服务程序需要重启,或者,服务程序本身也可能出现故障重启。而在服务重启时,很可能有一些用户请求正在处理中,即,重启发生在用户请求的处理过程中,因此,这些用户请求尚未完成。
本申请实施例中,在服务重启后,为了保证用户体验,为了可以继续处理这些未完成的用户请求,设置了用户请求信息表,该表用于记录用户请求相关的信息,例如,是否已经执行完成,执行到哪个阶段,执行该用户请求的每个阶段所需要的上下文、环境、参数等信息,具体记录哪些信息不限, 本领域技术人员可以按需设置。
本申请实施例中,用户请求信息表中记录有用户请求对应的出口标识信息,该出口标识信息可以用于指示用户请求的完成状态,即该用户请求是否已经处理完成。服务端在重启后,可以查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息。
在一种实施方式中,服务端在用户请求完成时记录其对应的出口标识信息,那么如果用户请求信息表中未记录某用户请求的出口标识信息,即出口标识信息为空时,则说明该用户请求未完成。那么在服务重启后,可以遍历该用户请求信息表,以查找该用户请求信息表是否记录有对应的出口标识信息。以此来判断该用户请求是否已经完成。
其中,出口标识信息可以采用任意形式记录,只要可以标识用户请求已处理完成即可,可以为字母、数字、二者组合等方式构成的出口标识信息,在此不做具体限定及说明。例如,可以为c1、G、ywc*、5#等等。另外,每个用户请求对应的出口标识信息可以相同,也可以不同,这都是合理的。
如果存在未完成的用户请求,服务端便可以执行步骤S103,即执行所确定的未完成的用户请求,进而完成该用户请求,为用户提供相应的服务,提升用户体验。后续将会对服务端执行所确定的未完成的用户请求的具体方式进行举例介绍。
举例说明,服务端记录的用户请求信息表可以如下表所示:
用户请求 出口标识信息
用户请求1 a
用户请求2  
用户请求3 a
出口标识信息为空时,则说明该用户请求未完成。那么,由于上表中用户请求2不具有出口标识信息,即出口标识信息为空,所以根据该表格服务端可以确定用户请求2为未完成的用户请求,用户请求1及用户请求3为已完成的用户请求。
作为本申请实施例的一种实施方式,如图2所示,上述根据所述出口标识信息,确定所述用户请求是否完成的步骤,可以包括:
当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
在一种实施方式中,服务端只有在用户请求处理完成时才记录该用户请求对应的出口标识信息,那么当某用户请求对应的出口标识信息为空时,说明该用户请求未处理完成。
也就是说,服务端在查询上述用户请求信息表时,如果存在不具有出口标识信息的用户请求,那么服务端便可以确定存在未完成的用户请求,如果不存在不具有出口标识信息的用户请求,那么便说明不存在未完成的用户请求,那么服务端便可以不进行操作。
在另一种实施方式中,在用户请求未处理完成时服务端记录该用户请求对应的出口标识信息为预定值,直到该用户请求处理完成时服务端可以更改出口标识信息为其他值,那么当某用户请求对应的出口标识信息为预定值时,说明该用户请求未处理完成。对于该预定值的具体取值本申请实施例在此不做具体限定,例如,可以为0、25、WWC,等等。
假设上述预定值为25,那么服务端在查询上述用户请求信息表时,如果存在出口标识信息为25的用户请求,那么服务端便可以确定存在未完成的用户请求,如果不存在出口标识信息为25的用户请求,那么便说明不存在未完成的用户请求,那么服务端便可以不进行操作。
可见,在本实施例中,服务端可以在出口标识信息为空或者预定值时,确定用户请求未完成,通过该方式可以快速准确地确定是否存在未完成的用户请求,提高用户请求的处理速度及准确度。
作为本申请实施例的一种实施方式,如图2所示,上述当确定所述用户请求未完成时,执行所述未完成的用户请求的步骤,可以包括:
S201,查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息;
为了更好地完成上述未完成的用户请求,服务端可以确定未完成的用户 请求的执行状态信息,服务端在处理用户请求时,可以在上述用户请求信息表中记录用户请求的执行状态信息,该执行状态信息用于指示用户请求的执行状态,即指示该用户请求执行到哪个阶段。
具体来说,用户请求信息表除了记录上述出口标识,还可以记录用户请求处理过程中的各种执行状态信息,例如,可以包括用户请求携带的各种信息、用户请求相关的网络环境、用户请求的处理状态等。其中,处理状态可以包括处理进度标识、暂停标识等,在用户请求的处理暂停时,服务端可以对应于该用户请求记录暂停标识。
这样,在服务重启后,也就可以查询预先记录的用户请求信息表,以获取所记录的执行状态信息。
当然,服务端也可以通过其他任意能够确定用户请求的执行状态信息的方式来确定上述未完成的用户请求的执行状态信息,在此不做具体限定。例如,可以通过监测用户请求的处理进度,如果在预设时间段内处理进度没有变化,那么该用户请求很可能已经处于暂停状态,服务端则可以确定其执行状态信息为暂停状态。
S202,根据所述执行状态信息,执行所述未完成的用户请求。
获取上述未完成的用户请求对应的执行状态信息后,服务端便可以根据执行状态信息,执行未完成的用户请求。如果未完成的用户请求的执行状态信息表征其还在进行中状态,则可以继续执行该未完成的用户请求;如果未完成的用户请求的执行状态信息表征其为暂停状态,则可以重新开始处理该未完成的用户请求。
可见,在本实施例中,服务端可以查询预先记录的用户请求信息表,获取未完成的用户请求的执行状态信息,进而根据执行状态信息,执行未完成的用户请求,以保证提供用户所需的服务,提升用户体验。
作为本申请实施例的一种实施方式,上述未完成的用户请求的执行状态可以包括特定阶段完成状态或特定阶段进行中状态,该特定阶段指的是具体的某一种或某一个阶段。
由于对于用户请求的处理过程来说,一般可能包括多个处理阶段,那么 服务端在记录上述用户请求信息表时也可以按照多个处理阶段来记录每个用户请求对应的执行状态信息。
例如,服务端接收到用户请求为创建虚拟机请求,在处理该用户请求的过程中,服务端一般有两个执行阶段,第一阶段是调度阶段,进行资源调度,以确定创建的虚拟机资源;第二阶段是虚拟机创建阶段,基于所确定的资源,对虚拟机进行创建、配置上线等。
那么服务端可以在上述用户请求信息表中记录执行状态信息:当执行处于调度阶段,执行状态信息可以记录为指示调度进行中;调度阶段完成,执行状态信息可以记录为指示调度完成;当执行处于创建阶段,执行状态信息可以记录为指示虚拟机创建中;而创建阶段完成,执行状态信息可以记录为指示虚拟机创建完成。则,基于所记录的执行状态信息,就可以知悉创建虚拟机请求的执行阶段。
假设调度阶段为第一阶段,则,虚拟机创建阶段为所述第一阶段的下一阶段,调度进行中即表示第一阶段进行状态,调度完成即表示第一阶段完成状态。
针对这种情况而言,上述根据所述执行状态信息,执行所述未完成的用户请求,包括:
如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
如果服务端根据查询到的上述未完成的用户请求的执行状态信息确定该未完成的用户请求为特定阶段进行中状态,那么说明该未完成的用户请求在服务重启时的执行状态为还在进行特定阶段的处理过程,那么为了保证可以完成该未完成的用户请求,服务端可以从该未完成的用户请求处理过程的特定阶段开始,执行该未完成的用户请求。
如果服务端根据查询到的上述未完成的用户请求的执行状态信息确定该未完成的用户请求为特定阶段完成状态,那么说明该未完成的用户请求在服 务重启时的执行状态为特定阶段处理已完成,那么为了保证可以完成该未完成的用户请求,同时避免重复处理浪费运算资源,服务端可以从特定阶段的下一执行阶段开始,继续执行未完成的用户请求。
依然以用户请求为创建虚拟机请求为例,如果服务端查询到的上述未完成的用户请求的执行状态信息为调度完成,那么说明该未完成的用户请求在服务重启时的执行状态为第一阶段处理已完成,服务端便可以执行第二阶段,即虚拟机创建阶段;如果服务端查询到的上述未完成的用户请求的执行状态信息为调度中,那么说明该未完成的用户请求在服务重启时的执行状态为第一阶段进行中状态,服务端便可以进行重新执行第一阶段,即重新调度处理。
可见,在本实施例中,服务端在未完成的用户请求的执行状态为特定阶段进行中状态时,从特定阶段开始,执行未完成的用户请求;在未完成的用户请求的执行状态为特定阶段完成状态时,从特定阶段的下一执行阶段开始,继续执行未完成的用户请求,这样,可以保证能够根据未完成的用户请求的各种不同的执行状态,有针对性地进行处理,在保证准确完成未完成的用户请求的同时,避免资源的浪费。
由于服务端处理的1个或者多个用户请求的相关信息,可包括上述出口标识信息、执行状态信息,还可包括用户请求的每个阶段的相关上下文、环境、参数、回调方法等信息,这些信息均可以记录在上述用户请求信息表中,因此每个用户请求都对应记录有一个庞大的数据结构,因此为了保证服务端的性能,提高资源利用率,作为本申请实施例的一种实施方式,上述方法还可以包括:
根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
其中,该预先设定的清理时间可以根据实际服务端处理的用户请求的数量等因素设定,例如,可以每为24小时、每20小时、每3天等,在此不做具体限定。
为了不影响未完成的用户请求的继续执行,服务端在按照预先设定的清 理时间,对预先记录的用户请求信息表进行清理操作时,删除的为出口标识信息指示已完成的用户请求对应的信息,而对于未完成的用户请求对应的信息需要保留。
例如,假设预先设定的清理时间为每24小时,当达到该预先设定的清理时间时,服务端进行用户请求信息表的清理操作。此时,用户请求信息表如下表所示:
用户请求 入口标识信息 出口标识信息 上下文 回调方法
用户请求Q1 入口标识Ra 出口标识Ca 上下文1 回调方法1
用户请求Q2 入口标识Rb   上下文2 回调方法1
用户请求Q3 入口标识Rc   上下文3 回调方法2
用户请求Q4 入口标识Rd 出口标识Cc 上下文4 回调方法3
用户请求Qn 入口标识Rn 出口标识Cn 上下文n 回调方法n
其中,入口标识信息可以用于指示服务端开始处理对应的用户请求,也就是说服务端接收到某用户请求后开始处理该用户请求时便可以记录该用户请求的入口标识信息。上述用户请求的执行状态信息可以包括入口标识信息、出口标识信息等信息,其中,入口标识信息指示用户请求开始执行,出口标识信息指示用户请求执行完成,入口标识信息和出口标识信息可以视为两个指示用户请求处理状态的两个特殊执行状态信息。
由于用户请求Q2及用户请求Q3不具有出口标识信息,那么说明用户请求Q2及用户请求Q3为未完成的用户请求,那么在进行用户请求信息表的清理操作时,便可以不删除用户请求Q2及用户请求Q3的相关信息。
可见,在本实施例中,服务端可以根据预先设定的清理时间,对预先记录的用户请求信息表进行清理操作,删除用户请求信息表中,已执行完成的用户请求对应的信息。这样,可以在保证未完成的用户请求可以顺利完成的前提下,节约用户请求信息表的存储空间和查表所需占用的时间等资源,保证服务端的性能,提高资源利用率。
作为本申请实施例的一种实施方式,用户请求信息表可以是预先设置的,在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用 户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
为了准确记录用户请求对应的用户请求信息表,以保证能够准确及时地对未完成的用户请求进行处理,服务端在处理所接收到的至少一个应用端发送的至少一个用户请求时,可以基于所处理的用户请求的执行过程,将至少一个用户请求对应的信息记录于用户请求信息表中。
其中,记录的所处理的用户请求对应的信息可以包括用户请求对应的出口标识信息、入口标识信息、上下文、回调方法等任何关于该用户请求的信息,在此不做具体限定。
用户请求信息表可以是预先配置好的,也可以是在首次收到用户请求时实时生成的,其可以记录至少一条用户请求相关的信息。
可见,在本实施例中,服务端在接收到至少一个应用端发送的至少一个用户请求后,可以基于至少一个用户请求的执行过程,在上述用户请求信息表中记录至少一个用户请求对应的信息,以保证后续在服务重启后,可以利用所记录的信息准确地执行未完成的用户请求。
针对上述用户请求信息表记录有用户请求的处理方式信息的情况而言,上述执行所述未完成的用户请求的步骤,可以包括:
采用所述用户请求的处理方式信息对应的处理方式,处理所述未完成的用户请求。
服务端在执行未完成的用户请求时,可以确定用户请求信息表中记录的该用户请求的处理方式信息,进而采用所确定的处理方式信息对应的处理方式执行该未完成的用户请求。
在一种实施方式中,上述用户请求的处理方式信息可以为网络接口;
那么服务端在执行未完成的用户请求时,可以调用用户请求信息表中记录的网络接口,执行该未完成的用户请求。
其中,网络接口即为服务端响应用户请求时所调用的接口。由于对于未 完成的用户请求,服务端在重启前已经对其开始处理,也就是调用网络接口对其进行响应,那么服务端便可以记录该网络接口,作为其处理方式信息。
这样,在服务重启后,该用户请求被确定为未完成的用户请求,那么为了保证正确响应未完成的用户请求,服务端便可以调用该网络接口,执行该未完成的用户请求。
可见,在实施例中,服务端在处理用户请求时,可以记录每个用户请求的处理方式信息,而用户请求的处理方式信息可以为网络接口,这样,在服务重启后,可以所记录网络接口执行该未完成的用户请求,保证正确响应该未完成的用户请求,得到正确的响应结果,进一步提升用户体验。
为了确定是否正确响应上述未完成的用户请求,上述方法还可以包括:
在重新处理完成所述未完成的用户请求时,判断处理结果是否准确;如果不准确,再次重新处理所述未完成的用户请求。
服务端在执行完成上述未完成的用户请求时,可以判断处理结果是否准确,进而,在处理不准确时,再一次重新处理该未完成的用户请求,以确保向用户提供正确的服务,保证用户体验。如果处理结果准确,那么服务端则可以不进行操作。
可见,在本实施例中,为了进一步提升用户体验,服务端可以在执行完成上述未完成的用户请求时,可以判断处理结果是否准确,在处理不准确时,再一次重新处理该未完成的用户请求,以确保向用户提供正确的服务。
作为本申请实施例的一种实施方式,如图3所示,上述判断处理结果是否准确的步骤,可以包括:
S301,根据已记录的用户请求与服务类型的对应关系,确定所述未完成的用户请求对应的目标服务类型;
为了判断服务端对未完成的用户请求的处理结果是否准确,服务端在处理每个用户请求时,可以记录每个用户请求对应的服务类型,例如,视频服务、登录服务、退出服务等。
这样,服务端在对未完成的用户请求进行重新处理得到处理结果时,便 可以根据已记录的用户请求与服务类型的对应关系,确定该未完成的用户请求所对应的目标服务类型。
例如,服务端记录的用户请求与服务类型的对应关系为:用户请求1对应服务类型f1,用户请求2对应服务类型f2,用户请求3对应服务类型f3,用户请求4对应服务类型f2。那么如果在服务重启后,确定用户请求3为未完成的用户请求,那么服务端可以根据该对应关系,确定未完成的用户请求3所对应的目标服务端类型为f2。
S302,判断所述处理结果是否符合所述目标服务类型,如果符合,则执行步骤S303;如果不符合,则执行步骤S304;
在确定了未完成的用户请求对应的目标服务类型后,服务端可以判断执行未完成的用户请求得到的处理结果是否符合该目标服务类型,如果符合,则执行步骤S303,如果不符合,则执行步骤S304。
依然以上述步骤S301中例子为例,如果服务端执行未完成的用户请求3得到的处理结果属于服务类型f2,那么该处理结果便符合目标服务类型;如果服务端重新处理未完成的用户请求3得到的处理结果属于服务类型f1、f3或者其他服务类型,那么显然该处理结果便不符合目标服务类型。
S303,确定所述处理结果准确;
S304,确定所述处理结果不准确。
如果服务端执行未完成的用户请求得到的处理结果符合目标服务类型,那么说明该处理结果属于目标服务类型,那么便可以确定该处理结果是准确的。相反的,如果服务端判断执行未完成的用户请求得到的处理结果不符合目标服务类型,那么说明该处理结果不属于目标服务类型,那么便可以确定该处理结果是不准确的。
可见,在本实施例中,服务端在处理每个用户请求时,可以记录其所请求的服务类型,这样,在服务重启后,执行未完成的用户请求得到处理结果时,便可以判断该处理结果是否符合该未完成的用户请求对应的目标服务类型,进而,可以快速确定对该未完成的用户请求执行所得到的处理结果是否准确,以便在处理结果不准确时,服务端可以再次重新处理该未完成的用户 请求,保证正确处理未完成的用户请求,进一步提升用户体验。
为了便于服务端对未完成的用户请求进行处理,对于上述服务端记录的用户请求的各种信息,例如,入口标识信息、出口标识信息、服务类型、网络接口、暂停标识等,服务端可以将这些信息记录在一个表格中,即上述用户请求信息表,以便在需要进行查询。例如,可以如下表所示:
用户请求 入口标识信息 出口标识信息 暂停标识 服务类型 网络接口
用户请求Q1 入口标识Ra 出口标识Ca   服务类型1 网络接口J1*
用户请求Q2 入口标识Rb     服务类型1 网络接口J2*
用户请求Q3 入口标识Rc   暂停标识Z3 服务类型2 网络接口J1*
用户请求Q4 入口标识Rd 出口标识Cc   服务类型3 网络接口J3*
 
用户请求Qn 入口标识Rn 出口标识Cn   服务类型n 网络接口Jn*
可见,在该表格中,由于用户请求Q2及用户请求Q3不具有出口标识信息,那么服务端在重启后,便可以通过遍历该表格,确定用户请求Q2及用户请求Q3不具有出口标识信息,进而确定用户请求Q2及用户请求Q3为未完成的用户请求。进一步的,服务端还可以通过查询该表格中的暂停标识,确定用户请求Q3具有暂停标识Z3,进而确定用户请求Q3的执行状态为暂停状态,那么,服务端便可以相应的处理用户请求Q3。
在一种实现方式中,服务端可以通过查询该表格,确定在重启前所调用的用于响应用户请求Q3的网接口为网络接口J1*,那么在处理用户请求Q3时,服务端便可以调用网络接口J1*响应用户请求Q3,以得到处理结果。
接下来,为了确定在对用户请求Q3进行处理时是否正确处理用户请求Q3,服务端还可以通过查询表格,确定用户请求Q3对应的服务类型为服务类型2,那么服务端可以确定对用户请求Q3进行重新处理所得到的处理结果是否符合服务类型2,如果符合,说明服务端对用户请求Q3的执行是正确的,可以为用户提供准确的服务。
如果对用户请求Q3进行执行所得到的处理结果不符合服务类型2,说明 服务端对用户请求Q3所进行的执行是错误的,那么服务端则可以再次重新执行用户请求Q3,以保证正确响应用户请求Q3,向用户提供所需服务,提升用户体验。
相应于上述用户请求的处理方法,本申请实施例还提供了一种用户请求的处理装置。
下面对本申请实施例所提供的一种用户请求的处理装置进行介绍。
本申请实施例所提供的一种用户请求的处理装置可以应用于任意需要处理用户请求的服务端。
如图4所示,一种用户请求的处理装置,应用于服务端,所述装置包括:
信息表查找模块410,配置为在服务重启后,检测查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
状态确定模块420,配置为根据所述出口标识信息,确定所述用户请求是否完成;
请求处理模块430,配置为当确定所述用户请求未完成时,执行所述未完成的用户请求。
可见,本申请实施例所提供的方案中,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以继续完成因重启而未完成的用户请求,大大提升用户体验。
作为本申请实施例的一种实施方式,上述状态确定模块420可以包括:
状态确定子模块(图4中未示出),配置为当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
作为本申请实施例的一种实施方式,上述请求处理模块430可以包括:
查询子模块(图4中未示出),配置为查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
处理子模块(图4中未示出),配置为根据所述执行状态信息,执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述未完成的用户请求的执行状态可以包括特定阶段完成状态或特定阶段进行中状态;
上述处理子模块可以包括:
第一处理单元(图4中未示出),配置为如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
第二处理单元(图4中未示出),配置为如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述装置还可以包括:
清理模块(图4中未示出),配置为根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
作为本申请实施例的一种实施方式,上述装置还可以包括:
信息表记录模块(图4中未示出),配置为在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
相应于上述用户请求的处理方法,本申请实施例还提供了一种服务器,如图5所示,包括处理器501、通信接口502、存储器503和通信总线504, 其中,处理器501,通信接口502,存储器503通过通信总线504完成相互间的通信,
存储器503,用于存放计算机程序;
处理器501,用于执行存储器503上所存放的程序时,实现如下步骤:
在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
根据所述出口标识信息,确定所述用户请求是否完成;
当确定所述用户请求未完成时,执行所述未完成的用户请求。
可见,本申请实施例所提供的方案中,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以继续完成因重启而未完成的用户请求,大大提升用户体验。
上述服务器提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述服务器与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific  Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
作为本申请实施例的一种实施方式,上述根据所述出口标识信息,确定所述用户请求是否完成可以包括:
当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
作为本申请实施例的一种实施方式,上述当确定所述用户请求未完成时,执行所述未完成的用户请求可以包括:
查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
根据所述执行状态信息,执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述未完成的用户请求的执行状态可以包括特定阶段完成状态或特定阶段进行中状态;
上述根据所述执行状态信息,执行所述未完成的用户请求,可以包括:
如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述方法还可以包括:
根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
作为本申请实施例的一种实施方式,上述用户请求信息表的记录方式,可以包括:
在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一 个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:
在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
根据所述出口标识信息,确定所述用户请求是否完成;
当确定所述用户请求未完成时,执行所述未完成的用户请求。
可见,本申请实施例所提供的方案中,计算机程序被处理器执行时,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以继续完成因重启而未完成的用户请求,大大提升用户体验。
作为本申请实施例的一种实施方式,上述根据所述出口标识信息,确定所述用户请求是否完成可以包括:
当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
作为本申请实施例的一种实施方式,上述当确定所述用户请求未完成时,执行所述未完成的用户请求可以包括:
查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
根据所述执行状态信息,执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述未完成的用户请求的执行状态可以包括特定阶段完成状态或特定阶段进行中状态;
上述根据所述执行状态信息,执行所述未完成的用户请求,可以包括:
如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述方法还可以包括:
根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
作为本申请实施例的一种实施方式,上述用户请求信息表的记录方式,可以包括:
在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
本申请实施例还提供了一种计算机程序,所述计算机程序用于在运行时执行以下步骤:
在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
根据所述出口标识信息,确定所述用户请求是否完成;
当确定所述用户请求未完成时,执行所述未完成的用户请求。
可见,本申请实施例所提供的方案中,计算机程序在运行时可以在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以 继续完成因重启而未完成的用户请求,大大提升用户体验。
作为本申请实施例的一种实施方式,上述根据所述出口标识信息,确定所述用户请求是否完成可以包括:
当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
作为本申请实施例的一种实施方式,上述当确定所述用户请求未完成时,执行所述未完成的用户请求可以包括:
查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
根据所述执行状态信息,执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述未完成的用户请求的执行状态可以包括特定阶段完成状态或特定阶段进行中状态;
上述根据所述执行状态信息,执行所述未完成的用户请求,可以包括:
如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
作为本申请实施例的一种实施方式,上述方法还可以包括:
根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
作为本申请实施例的一种实施方式,上述用户请求信息表的记录方式,可以包括:
在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对 应的出口标识。
工业实用性:
本申请提供一种用户请求的处理方法、装置、服务器、计算机可读存储介质及计算机程序,在服务重启后,查询预先记录的用户请求信息表,获取用户请求的出口标识信息,用户请求信息表中记录有用户请求对应的出口标识信息,出口标识信息用于指示用户请求的完成状态;根据出口标识信息,确定用户请求是否完成;当确定用户请求未完成时,执行未完成的用户请求。这样,在服务重启后可以继续完成因重启而未完成的用户请求,大大提升用户体验。
需要说明的是,对于上述装置、服务器、计算机可读存储介质及计算机程序实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
进一步需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (15)

  1. 一种用户请求的处理方法,其中,应用于服务端,所述方法包括:
    在服务重启后,查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
    根据所述出口标识信息,确定所述用户请求是否完成;
    当确定所述用户请求未完成时,执行所述未完成的用户请求。
  2. 如权利要求1所述的方法,其中,所述根据所述出口标识信息,确定所述用户请求是否完成包括:
    当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
  3. 如权利要求1所述的方法,其中,所述当确定所述用户请求未完成时,执行所述未完成的用户请求包括:
    查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
    根据所述执行状态信息,执行所述未完成的用户请求。
  4. 如权利要求3所述的方法,其中,所述未完成的用户请求的执行状态包括特定阶段完成状态或特定阶段进行中状态;
    所述根据所述执行状态信息,执行所述未完成的用户请求,包括:
    如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
    如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
  5. 如权利要求1所述的方法,其中,所述方法还包括:
    根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理 操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
  6. 如权利要求1所述的方法,其中,所述方法还包括:
    在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
  7. 一种用户请求的处理装置,其中,应用于服务端,所述装置包括:
    信息表查找模块,配置为在服务重启后,检测查询预先记录的用户请求信息表,获取所述用户请求的出口标识信息,所述用户请求信息表中记录有所述用户请求对应的出口标识信息,所述出口标识信息用于指示所述用户请求的完成状态;
    状态确定模块,配置为根据所述出口标识信息,确定所述用户请求是否完成;
    请求处理模块,配置为当确定所述用户请求未完成时,执行所述未完成的用户请求。
  8. 如权利要求7所述的装置,其中,所述状态确定模块包括:
    状态确定子模块,配置为当所述出口标识信息为空或者预定值时,确定所述用户请求未完成。
  9. 如权利要求7所述的装置,其中,所述请求处理模块包括:
    查询子模块,配置为查询所述预先记录的用户请求信息表,获取所述未完成的用户请求的执行状态信息,所述用户请求信息表中记录有所述用户请求的执行状态信息,所述执行状态信息用于指示所述用户请求的执行状态;
    处理子模块,配置为根据所述执行状态信息,执行所述未完成的用户请求。
  10. 如权利要求9所述的装置,其中,所述未完成的用户请求的执行状 态包括特定阶段完成状态或特定阶段进行中状态;
    所述处理子模块包括:
    特定处理单元,配置为如果所述未完成的用户请求的执行状态为特定阶段进行中状态,则从所述特定阶段开始,执行所述未完成的用户请求;
    第二处理单元,配置为如果所述未完成的用户请求的执行状态为特定阶段完成状态,则从所述特定阶段的下一执行阶段开始,继续执行所述未完成的用户请求。
  11. 如权利要求7所述的装置,其中,所述装置还包括:
    清理模块,配置为根据预先设定的清理时间,对所述预先记录的用户请求信息表进行清理操作,删除所述用户请求信息表中,出口标识信息指示已完成的用户请求对应的信息。
  12. 如权利要求7所述的装置,其中,所述装置还包括:
    信息表记录模块,配置为在接收到至少一个应用端发送的至少一个用户请求后,基于所述至少一个用户请求的执行过程,在所述用户请求信息表中记录所述至少一个用户请求对应的信息,所述至少一个用户请求对应的信息至少包括所述用户请求对应的出口标识。
  13. 一种服务器,其中,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,配置为存放计算机程序;
    处理器,配置为执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。
  15. 一种计算机程序,其中,所述计算机程序配置为在运行时执行权利要求1-6任一项所述的方法步骤。
PCT/CN2019/108212 2018-09-30 2019-09-26 一种用户请求的处理方法、装置及服务器 WO2020063769A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811158059.8A CN109286672B (zh) 2018-09-30 2018-09-30 一种用户请求的处理方法、装置及服务器
CN201811158059.8 2018-09-30

Publications (1)

Publication Number Publication Date
WO2020063769A1 true WO2020063769A1 (zh) 2020-04-02

Family

ID=65182600

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/108212 WO2020063769A1 (zh) 2018-09-30 2019-09-26 一种用户请求的处理方法、装置及服务器

Country Status (2)

Country Link
CN (1) CN109286672B (zh)
WO (1) WO2020063769A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109286672B (zh) * 2018-09-30 2020-11-27 北京金山云网络技术有限公司 一种用户请求的处理方法、装置及服务器
CN116095143A (zh) * 2023-02-21 2023-05-09 深圳依时货拉拉科技有限公司 服务重启方法、装置、电子设备以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438248A (zh) * 2006-05-03 2009-05-20 Bea系统公司 事务恢复机制
CN101567805A (zh) * 2009-05-22 2009-10-28 清华大学 并行文件系统发生故障后的恢复方法
WO2013041728A2 (en) * 2011-09-23 2013-03-28 Hybrid Logic Ltd System for live -migration and automated recovery of applications in a distributed system
CN104618471A (zh) * 2015-01-23 2015-05-13 天津大学 面向不同终端的应用程序状态转移方法
CN109286672A (zh) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 一种用户请求的处理方法、装置及服务器

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08137904A (ja) * 1994-11-14 1996-05-31 Daikin Ind Ltd 動画cdromソフト制作支援方法およびその装置
JP3704022B2 (ja) * 2000-04-25 2005-10-05 株式会社東芝 無線通信システム、無線制御局および無線通信方法
JP4254718B2 (ja) * 2005-01-31 2009-04-15 ブラザー工業株式会社 コンテンツ提供システム,クライアントデバイス,サーバおよびプログラム
CN107092598A (zh) * 2016-02-17 2017-08-25 阿里巴巴集团控股有限公司 数据存储位置信息的管理方法和装置
CN108076134A (zh) * 2017-10-31 2018-05-25 努比亚技术有限公司 记录信息获取方法、终端、服务器及计算机可读存储介质
CN108459842B (zh) * 2018-01-29 2021-05-14 北京奇艺世纪科技有限公司 一种模型配置方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101438248A (zh) * 2006-05-03 2009-05-20 Bea系统公司 事务恢复机制
CN101567805A (zh) * 2009-05-22 2009-10-28 清华大学 并行文件系统发生故障后的恢复方法
WO2013041728A2 (en) * 2011-09-23 2013-03-28 Hybrid Logic Ltd System for live -migration and automated recovery of applications in a distributed system
CN104618471A (zh) * 2015-01-23 2015-05-13 天津大学 面向不同终端的应用程序状态转移方法
CN109286672A (zh) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 一种用户请求的处理方法、装置及服务器

Also Published As

Publication number Publication date
CN109286672B (zh) 2020-11-27
CN109286672A (zh) 2019-01-29

Similar Documents

Publication Publication Date Title
WO2019237586A1 (zh) 定时任务管理方法、装置、计算机设备及存储介质
WO2019237584A1 (zh) 容器的管理方法、装置、计算机设备及存储介质
CN107589951B (zh) 一种集群升级方法及装置
TW201918050A (zh) 訊息處理方法及裝置
CN109213604B (zh) 一种数据源的管理方法和装置
CN111897558A (zh) 容器集群管理系统Kubernetes升级方法和装置
WO2020063769A1 (zh) 一种用户请求的处理方法、装置及服务器
WO2019034095A1 (zh) 软件处理方法、装置、电子设备及计算机可读存储介质
CN115935035A (zh) Rpa流程可视化管理方法、装置、设备及可读存储介质
CN111355765B (zh) 一种网络请求的处理、发送方法及装置
CN108108126B (zh) 一种数据处理方法、装置及设备
CN113238815A (zh) 一种接口访问控制方法、装置、设备及存储介质
CN114201458B (zh) 一种信息更新方法、微服务系统及计算机可读存储介质
WO2024179138A1 (zh) 消息处理方法、装置、通信设备及存储介质
CN108132836B (zh) 一种任务分发方法、装置及电子设备
RU2696299C2 (ru) Управление при инициировании элементарных задач на серверной платформе
CN110286996A (zh) 容器实例ip切换方法、装置、计算机设备及存储介质
WO2024139011A1 (zh) 信息处理方法
CN111522626B (zh) 一种虚拟机列表生成方法、装置及电子设备
CN110674153B (zh) 一种数据一致性检测方法、装置及电子设备
CN110768834B (zh) 虚拟机配置升级结果的通知方法、系统、设备及介质
WO2019000791A1 (zh) 一种以异步方式进行远程过程调用的方法及装置
US11528185B1 (en) Automated network device provisioning
WO2020096845A1 (en) Performing actions opportunistically in connection with reboot events in a cloud computing system
CN115580522A (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: 19864514

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 1205 DATED 30/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19864514

Country of ref document: EP

Kind code of ref document: A1