Service order processing method, device, equipment, medium and program product
Patent Information
- Application Number
- CN202110454210.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-04-26
Smart Images

Figure CN113222689B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment, medium and program product for processing a service order. Background Art
[0002] With the rapid development of the Internet, residents can send service orders through the Internet, and users who provide services to residents can obtain service orders through the Internet for processing, thereby meeting residents' needs. However, when multiple users can process the same service order, for example, when multiple Internet doctors are in the department corresponding to the same outpatient order and can all process the outpatient order; or when multiple deliverymen in the same delivery area can all process the same meal order, how to obtain the service order is the key.
[0003] At present, the main way to obtain service orders is to store the service orders sent by residents in a data storage device through the server. When the concurrency requirement is high, the service orders can also be loaded into the cache in advance. When a user's query request is received, the service orders that the user can process are obtained from the data storage device or cache and displayed in the service order list, which is convenient for the user to select the service order. The user selects the service order he wants to process from the service order list and further processes the selected service order.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: in the process of obtaining service orders, since the head orders in the data storage device and the cache are easily competed for by users concurrently, the service orders at the back are ignored, resulting in a long processing time for the service orders and low processing efficiency. Summary of the invention
[0005] The present application provides a service order processing method, apparatus, device, medium and program product to solve the problem that in the process of obtaining service orders, the head orders in the data storage device and the cache are easily competed for by users concurrently, resulting in no one paying attention to the orders at the back, resulting in a long service order processing time and low processing efficiency.
[0006] In a first aspect, an embodiment of the present application provides a method for processing a service order, including:
[0007] Receiving a query request sent by a user's terminal device, the query request including user information and a page number parameter, the page number parameter being used to determine a page number of a service order list;
[0008] According to the user information, the order grabbing activity corresponding to the user is obtained from an activity list, where the activity list includes order grabbing activities corresponding to multiple users;
[0009] According to the order grabbing activity, the page number parameter and the total number of the order pool, a first order pool number is obtained, and a to-be-processed service order is obtained from the first order pool corresponding to the first order pool number, where different service orders are stored in each order pool;
[0010] generating the service order list according to the service orders to be processed;
[0011] The service order list is returned to the user's terminal device.
[0012] In a possible design of the first aspect, before generating the service order list according to the service orders to be processed, the method further includes:
[0013] If the number of service orders obtained is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of the order pool, the second order pool number is calculated based on the first order pool number, the number of recursions and the total number of the order pool, and the service orders to be processed continue to be obtained from the second order pool corresponding to the second order pool number. This step is repeated until the number of service orders to be processed obtained reaches the number of orders that can be displayed in the service order list. The number of recursions is used to indicate the number of order pools of service orders that have been obtained.
[0014] In another possible design of the first aspect, the order grabbing activities of the multiple users in the activity list are arranged in descending order, and the acquiring the order grabbing activity corresponding to the user from the activity list according to the user information includes:
[0015] According to the user information, query the arrangement position of the user information in the activity list;
[0016] According to the arrangement position, the order grabbing activity corresponding to the user is determined.
[0017] Optionally, the method further includes:
[0018] The order grabbing activity corresponding to the user is updated to the first place in the activity list.
[0019] In another possible design of the first aspect, the method further includes:
[0020] receiving a refresh request sent by the terminal device of the user, wherein the refresh request is used to instruct to re-acquire a service order list;
[0021] According to the refresh request, the page number parameter in the query request is updated to obtain a new page number parameter;
[0022] According to the order grabbing activity, the new page number parameter and the total number of the order pool, a third order pool number is obtained, and a new to-be-processed service order is obtained from the third order pool corresponding to the third order pool number;
[0023] Generate a new service order list according to the new service orders to be processed;
[0024] The new service order list is returned to the user's terminal device.
[0025] In yet another possible design of the first aspect, before receiving the query request sent by the terminal device of the user, the method further includes:
[0026] Number multiple order pools;
[0027] According to the number of each order pool, the acquired service orders are stored in the multiple order pools respectively.
[0028] Optionally, storing the acquired service orders into the multiple order pools respectively according to the number of each order pool includes:
[0029] According to the remaining capacity of each order pool, the acquired service orders are stored in the order pool in sequence according to the order pool number. The remaining capacity of each order pool is used to indicate the number of orders that can still be stored in the order pool.
[0030] Optionally, the method further includes:
[0031] If no new service order is obtained, the orders in the order pool with the later order pool number are transferred to the order pool with the earlier order pool number according to the remaining capacity of each order pool.
[0032] In a second aspect, an embodiment of the present application provides a service order processing device, including:
[0033] A receiving module, configured to receive a query request sent by a user's terminal device, wherein the query request includes user information and a page number parameter, and the page number parameter is used to determine a page number of a service order list;
[0034] A processing module, configured to obtain, according to the user information, the order grabbing activity corresponding to the user from an activity list, wherein the activity list includes order grabbing activities corresponding to multiple users;
[0035] The processing module is further used to obtain a first order pool number according to the order grabbing activity, the page number parameter and the total number of order pools, and obtain a to-be-processed service order from the first order pool corresponding to the first order pool number, where the service orders stored in each order pool are different;
[0036] The processing module is further used to generate the service order list according to the service orders to be processed;
[0037] The sending module is used to return the service order list to the terminal device of the user.
[0038] In a possible design of the second aspect, the processing module is also used to calculate the second order pool number according to the first order pool number, the number of recursions and the total number of order pools if the number of service orders obtained is less than the number of orders that can be displayed in the service order list and the number of recursions does not exceed the total number of the order pool, and continue to obtain the service orders to be processed from the second order pool corresponding to the second order pool number, repeating this step until the number of service orders to be processed obtained reaches the number of orders that can be displayed in the service order list, and the number of recursions is used to indicate the number of order pools of service orders that have been obtained.
[0039] In another possible design of the second aspect, the order grabbing activities of the multiple users in the activity list are arranged in descending order, and the processing module is specifically configured to:
[0040] According to the user information, query the arrangement position of the user information in the activity list;
[0041] According to the arrangement position, the order grabbing activity corresponding to the user is determined.
[0042] Optionally, the processing module is further used to:
[0043] The order grabbing activity corresponding to the user is updated to the first place in the activity list.
[0044] In another possible design of the second aspect, the receiving module is further used to receive a refresh request sent by the terminal device of the user, where the refresh request is used to instruct to re-acquire the service order list;
[0045] The processing module is further used to update the page number parameter in the query request according to the refresh request to obtain a new page number parameter;
[0046] The processing module is further used to obtain a third order pool number according to the order grabbing activity, the new page number parameter and the total number of the order pool, and obtain a new to-be-processed service order from the third order pool corresponding to the third order pool number;
[0047] The processing module is further used to generate a new service order list according to the new service order to be processed;
[0048] The sending module is further used to return the new service order list to the user's terminal device.
[0049] In yet another possible design of the second aspect, the processing module is further configured to:
[0050] Number multiple order pools;
[0051] According to the number of each order pool, the acquired service orders are stored in the multiple order pools respectively.
[0052] Optionally, the processing module is specifically used to:
[0053] According to the remaining capacity of each order pool, the acquired service orders are stored in the order pool in sequence according to the order pool number. The remaining capacity of each order pool is used to indicate the number of orders that can still be stored in the order pool.
[0054] Optionally, the processing module is further used to:
[0055] If no new service order is obtained, the orders in the order pool with the later order pool number are transferred to the order pool with the earlier order pool number according to the remaining capacity of each order pool.
[0056] In a third aspect, an embodiment of the present application provides a server, comprising: a processor, a transceiver, a memory, and computer program instructions stored in the memory and executable on the processor, wherein the processor is used to implement the first aspect and the methods provided by various possible designs when executing the computer program instructions.
[0057] In a fourth aspect, an embodiment of the present application may provide a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect and the methods provided by various possible designs.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the first aspect and the methods provided by various possible designs.
[0059] The processing method of the service order provided in the embodiment of the present application, the server receives the query request sent by the user's terminal device, wherein the query request includes user information and a page number parameter, and the page number parameter is used to determine the page number of the service order list. After that, the server obtains the order grabbing activity corresponding to the user from the activity list according to the user information, and obtains the first order pool number according to the order grabbing activity, the page number parameter and the total number of order pools, and obtains the service order to be processed from the first order pool corresponding to the first order pool number. Finally, the server generates a service order list according to the service order to be processed, and returns the service order list to the user's terminal device. Among them, the activity list includes the order grabbing activity corresponding to multiple users, and the service orders stored in each order pool are different. The server obtains the service order to be processed from the first order pool corresponding to the first order pool number obtained according to the order grabbing activity, the page number parameter and the total number of order pools, so that the server can obtain the service order from different parts of the data storage device, provide a differentiated service order list for users using the terminal device, reduce the processing time of the service order, and improve the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1A A schematic diagram of an application scenario of the method for processing a service order provided in an embodiment of the present application;
[0061] Figure 1B A schematic diagram of a principle of a method for processing a service order provided in an embodiment of the present application;
[0062] Figure 2 A flowchart of a method for processing a service order according to an embodiment of the present application;
[0063] Figure 3 A schematic diagram of an activity list provided in Example 1 of the present application;
[0064] Figure 4 A flowchart of a second embodiment of a method for processing a service order provided in an embodiment of the present application;
[0065] Figure 5 A flowchart of a third embodiment of a method for processing a service order provided in an embodiment of the present application;
[0066] Figure 6 A flowchart of a fourth embodiment of a method for processing a service order provided in an embodiment of the present application;
[0067] Figure 7 A flowchart of a fifth embodiment of a method for processing a service order provided in an embodiment of the present application;
[0068] Figure 8A schematic diagram of the structure of an embodiment of a device for processing a service order provided in an embodiment of the present application;
[0069] Fig. 9 A schematic diagram of the structure of a server provided in an embodiment of the present application.
[0070] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] Before introducing the embodiments of the present application, the application scenarios of the embodiments of the present application are first explained:
[0073] With the rapid development of the Internet, residents can meet their needs without leaving their homes. Residents can send service orders through the Internet according to their own needs, and users who provide services to residents can obtain service orders through the Internet for processing, thereby meeting residents' needs.
[0074] Taking the Internet hospital as an example, when residents feel unwell, they can send a service order, that is, a medical questionnaire, to the corresponding outpatient clinic in the Internet hospital according to the part of the body that is unwell. The doctor in the outpatient clinic selects the medical questionnaire that he can handle, communicates with the residents based on the content of the medical questionnaire, and makes further processing. However, since multiple doctors in the same outpatient clinic can handle the same medical questionnaire, how each doctor obtains the medical questionnaire is the key.
[0075] At present, the way for each doctor to obtain the medical questionnaire is mainly to store the obtained medical questionnaire in the data storage device through the server. When the concurrency requirement is high, in order to increase the speed at which the doctor obtains the medical questionnaire, the medical questionnaire can also be loaded into the cache in advance. When the doctor wants to obtain the medical questionnaire, he needs to send a query request to the server. After receiving the query request, the server obtains the top order that the doctor can process in the data storage device or cache according to the query request, and displays it in the service order list, so that the doctor can choose the medical questionnaire. The doctor selects the medical questionnaire he wants to process from the service order list and further processes the selected medical questionnaire.
[0076] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: in the process of obtaining service orders, since the head orders in the data storage device and the cache are easily competed for by users concurrently, the service orders at the back are not taken care of, resulting in a long processing time for the service orders and low processing efficiency. In addition, the server needs to pull all the service orders that the doctor can process from the data storage device or the cache each time. When the number of service orders is large, the data packet size of the service orders is large, resulting in a large input / output (IO) pressure on the server.
[0077] In response to the above problems, the invention of this application is conceived as follows: In the current solution, since the medical consultation form selected by the doctor according to the service order list is the head order in the data storage device or cache, the head order can be processed first, resulting in the service orders at the back having to wait for a long time before being processed, the processing time is long, and the processing efficiency is low. Based on this, the inventor found that if the server can start to obtain service orders from different locations in the data storage device or cache, then the doctor can process service orders at different locations in the data storage device or cache each time, which can solve the problem in the prior art that the service orders at the back of the data storage device or cache have to wait for a long time before being processed, reducing the processing time and thus improving the processing efficiency.
[0078] For example, the service order processing method provided in the embodiment of the present application can be applied to Figure 1A In a schematic diagram of an application scenario shown in FIG. Figure 1A A schematic diagram of an application scenario of the service order processing method provided in the embodiment of the present application is used to solve the above technical problems. Figure 1A As shown, the application scenario may include: at least one terminal device ( Figure 1ATwo terminal devices are shown, namely, terminal device A and terminal device B) and a server, wherein each terminal device and the server can communicate through a network. Optionally, the application scenario shown in FIG1 may also include a data storage device connected to the server, wherein a plurality of order pools are arranged in the data storage device, and X order pools are used as an example for illustration, namely, order pool A, order pool B, order pool C...order pool X.
[0079] For example, in Figure 1A In the application scenario shown, the server can obtain the service order sent by terminal device A through the network and store the service order in a data storage device. The server can also obtain the query request sent by terminal device B through the network, process the stored service order according to the query request, obtain the service order from the order pool, generate a service order list, and return the service order list to terminal device B, so that the user can select the service order in the service order list. The user using terminal device B selects the service order in the service order list according to the service order list sent by the server, communicates with the resident using terminal device A corresponding to the service order, and further processes the service order.
[0080] If the user cannot obtain a suitable service order from the service order list of terminal device B, the user can also send a refresh request to the server. The server receives the refresh request sent by terminal device B, obtains a new service order list for terminal device B, and returns the new service order list to terminal device B.
[0081] It should be noted that Figure 1A This is only a schematic diagram of an application scenario provided by the embodiment of the present application. Figure 1A does not limit the equipment included in Figure 1A The positional relationship between the devices in the Figure 1A In the embodiment, the data storage device may be an external memory relative to the server. In other cases, the data storage device may also be placed in the server.
[0082] For example, based on the above application scenario, Figure 1B A schematic diagram of a method for processing a service order provided in an embodiment of the present application. Figure 1B As shown, the server may include a timing module 11, a receiving module 12, an activity acquisition module 13, a calculation module 14, and an order pool control module 15.
[0083] The timing module 11 is used to store service orders into multiple order pools at a certain frequency.
[0084] The receiving module 12 is mainly used to receive a query request sent by a user's terminal device, and obtain the user information and page number parameters carried in the request.
[0085] The activity acquisition module 13 is mainly used to obtain the order grabbing activity corresponding to the user from the activity list according to the user information.
[0086] The calculation module 14 is mainly used to obtain the page number parameter in the query request received by the receiving module 12, the order grabbing activity obtained by the activity acquisition module 13, and the total number of the order pool, and obtain the first order pool number.
[0087] If the number of service orders acquired by the order pool control module 15 is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of order pools, the calculation module 14 is further used to calculate the second order pool number according to the first order pool number, the number of recursions and the total number of order pools. The calculation is repeated until the number of service orders to be processed acquired by the order pool control module 15 reaches the number of orders that can be displayed in the service order list.
[0088] The order pool control module 15 is used to obtain the to-be-processed service order from the first order pool corresponding to the first order pool number.
[0089] The order pool control module 15 is further used to obtain the to-be-processed service order in the corresponding second order pool according to the second order pool number, and repeat the acquisition until the calculation module 14 no longer calculates a new order pool number.
[0090] The technical solution of the present application is described in detail below through specific embodiments.
[0091] It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0092] Figure 2 The flowchart of the first embodiment of the method for processing a service order provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the service order processing method may include the following steps:
[0093] S101: receiving a query request sent by a user's terminal device.
[0094] In this step, in order to provide a service order list to the user using the terminal device so that the user can select a service order to be processed, the server first needs to accept a query request sent by the user through the terminal device.
[0095] The query request includes user information and page number parameters.
[0096] Exemplarily, the user information may be a user ID, or other information used to mark the user identity in the prior art, which may be set according to actual conditions, and this solution does not limit this.
[0097] Exemplarily, the page number parameter is used to determine the page number of the service order list. For example, the page number parameter can be 1, 2, 3, 4, etc., or other positive integers. It can be set according to actual conditions, and this solution does not limit this.
[0098] For example, in an application scenario of consulting an Internet hospital, the user information may be the name of each doctor in the Internet hospital, such as: Doctor A, Doctor B, Doctor C, etc., or the work number corresponding to each doctor.
[0099] S102: According to the user information, the order grabbing activity corresponding to the user is obtained from the activity list.
[0100] In this step, after the server receives the query request, it needs to obtain the order grabbing activity corresponding to the user from the activity list based on the user information carried in the query request, so as to obtain the pending service orders based on the user's order grabbing activity.
[0101] Exemplarily, the server may obtain the activity list through an ordered set (zset) solution of a remote dictionary server (Redis), or through other methods in the prior art. The selection may be based on actual conditions, and this solution does not limit this.
[0102] The activity list includes the order grabbing activities corresponding to multiple users, and the order grabbing activities of the multiple users in the activity list are arranged in descending order.
[0103] It should be understood that all users in the activity list can process all service orders in each order pool.
[0104] Optionally, there is a mapping relationship between the ranking position in the activity list and the order grabbing activity. For example, the order grabbing activity of the user ranked first in the activity list is 1, the order grabbing activity of the user ranked second in the activity list is 2, and so on. It should be understood that there may be other forms of mapping relationships between the ranking position in the activity list and the order grabbing activity, and this solution does not impose specific restrictions on this.
[0105] In a specific implementation, the server queries the ranking position of the user information in the activity list based on the user information carried in the query request, and determines the order grabbing activity corresponding to the user based on the ranking position through a mapping relationship between the ranking position and the order grabbing activity.
[0106] For example, in the application scenario of Internet hospital consultation, Figure 3 This is a schematic diagram of the activity list provided in Example 1 of this application. Figure 3 As shown, the activity list includes information of multiple users, such as doctor A and doctor B, among which the doctor with greater order-grabbing activity is ranked higher in the activity list. For example, doctor A's order-grabbing activity is greater than doctor B's, then doctor A is ranked ahead of doctor B in the activity list.
[0107] For example, if the user information in the query request is doctor A, the server needs to obtain the order-grabbing activity of doctor A. The server first needs to obtain the position of doctor A in the activity list, such as Figure 3 As shown, doctor A is ranked first in the activity list. Then, based on the mapping relationship between the ranking position in the activity list and the order grabbing activity, the order grabbing activity of doctor A is obtained, that is, the activity of doctor A is 1.
[0108] S103: Obtain a first order pool number according to the order grabbing activity, the page number parameter, and the total number of the order pool, and obtain a to-be-processed service order from the first order pool corresponding to the first order pool number.
[0109] In this step, in order to solve the problem in the prior art that service orders queued at the back have to wait a long time before being processed, the service orders to be processed can be stored in different order pools in advance, and the order pool for obtaining the service orders can be determined based on the order grabbing activity, page number parameters and the total number of order pools, and the service orders to be processed are obtained from the order pool.
[0110] The order pool is used to store pending service orders. The service orders stored in each order pool are different, and each order pool is marked with a corresponding number.
[0111] Exemplarily, the order pool may be numbered in the form of 1, 2, 3, 4, etc., or in other numbering forms, which may be set according to actual conditions, and this embodiment of the present solution does not impose any specific restrictions on this.
[0112] In a specific implementation, the server can obtain the first order pool number through the code (index+A-1)%count according to the order grabbing activity, the page number parameter and the total number of order pools. Among them, index is the order grabbing activity of the user, A is the page number parameter, and count is the total number of order pools. After the server obtains the first order pool number, it obtains the pending service orders from the first order pool corresponding to the first order pool number. The number of the pending service orders does not exceed the number of orders that can be displayed in the service order list.
[0113] Furthermore, if the number of service orders obtained is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of order pools, the second order pool number is calculated by the code (startindex+step)%count according to the first order pool number, the number of recursions and the total number of order pools. Where startindex is the first order pool number, and step is the number of recursions. Next, continue to obtain pending service orders from the second order pool corresponding to the second order pool number, and repeat this step until the number of pending service orders obtained reaches the number of orders that can be displayed in the service order list.
[0114] Among them, the number of recursions is used to represent the number of order pools that have obtained service orders. When the number of recursions exceeds the total number of order pools, if the above steps are repeated, service orders will be obtained again from the order pool that has obtained service orders, which makes it easy to obtain service orders repeatedly.
[0115] S104: Generate a service order list according to the service orders to be processed.
[0116] In this step, after the server obtains the pending service orders, it can generate a service order list for the pending service orders to facilitate subsequent users to view.
[0117] Optionally, the to-be-processed service orders may be arranged in a certain preset order, and a service order list may be generated from the arranged to-be-processed service orders.
[0118] Exemplarily, the preset order can be the time order in which the server receives the service orders, or the alphabetical order of the names of the residents who send the service orders, or other orders. It can be pre-set according to actual needs, and this solution does not specifically limit this.
[0119] Optionally, the service order list may include the name of the resident who sent the service order, the order details, the time when the service order was sent, and may also include other detailed information of the service order. This application does not make specific settings for this.
[0120] For example, in the application scenario of Internet hospital consultation, the service order list may include the name of the resident who sent the medical questionnaire, a detailed description of the discomfort, the time when the medical questionnaire was sent, etc.
[0121] Furthermore, the server also needs to update the user's corresponding order-grabbing activity to the first place in the activity list.
[0122] In a specific implementation, for the application scenario of Internet hospital consultation, after the server generates a service order list, it will asynchronously trigger an activity list and put the doctor at the head of the activity list, indicating that the doctor has just become active, that is, the doctor's corresponding order-grabbing activity is updated to the first place in the activity list.
[0123] S105: Return the service order list to the user's terminal device.
[0124] In this step, the server may return the generated service order list to the user's terminal device through the browser or client.
[0125] Optionally, the service order list may be displayed in a graphical user interface in the terminal device, so that the user can select the service order to be processed through the graphical user interface.
[0126] The processing method of the service order provided in the embodiment of the present application, the server receives the query request sent by the user's terminal device, wherein the query request includes user information and a page number parameter, and the page number parameter is used to determine the page number of the service order list. After that, the server obtains the order grabbing activity corresponding to the user from the activity list according to the user information, and obtains the first order pool number according to the order grabbing activity, the page number parameter and the total number of order pools, and obtains the service order to be processed from the first order pool corresponding to the first order pool number. Finally, the server generates a service order list according to the service order to be processed, and returns the service order list to the user's terminal device. Among them, the activity list includes the order grabbing activity corresponding to multiple users, and the service orders stored in each order pool are different. The server obtains the service order to be processed from the first order pool corresponding to the first order pool number obtained according to the order grabbing activity, the page number parameter and the total number of order pools, so that the server can obtain the service order from different parts of the data storage device, provide a differentiated service order list for users using the terminal device, reduce the processing time of the service order, and improve the processing efficiency.
[0127] In addition, in an embodiment of the present application, compared with adding a disorder module in the prior art and using the disorder module to disrupt the order of service orders in the data storage device, the server only needs to pull the service orders in the order pool. Since the size of the data packet of the service order in each order pool is small, the IO pressure of the server can be effectively reduced.
[0128] Exemplarily, based on the above embodiments, Figure 4 This is a flow chart of a second embodiment of the method for processing a service order provided in the embodiment of the present application. Figure 4 As shown, in this embodiment, the service order processing method may further include the following steps:
[0129] Step 1: Receive a query request sent by a user's terminal device, the query request including user information and page number parameters;
[0130] Step 2: Based on the user information, obtain the user's order-grabbing activity;
[0131] Step 3: Get the total quantity of the order pool;
[0132] Step 4: According to the order grabbing activity, page number parameters and the total number of order pools, obtain the first order pool number, and obtain the service order to be processed from the first order pool corresponding to the first order pool number;
[0133] Step 5: Determine whether the number of service orders obtained is equal to the number of orders that can be displayed in the service order list. If so, jump to step 9; if not, set the number of recursions to 2 and jump to step 6;
[0134] Step 6: Calculate a new order pool number based on the first order pool number, the number of recursions, and the total number of order pools, and continue to obtain pending service orders from the order pool corresponding to the new order pool number;
[0135] Step 7: Determine whether the total number of service orders obtained is equal to the number of orders that can be displayed in the service order list. If so, jump to step 9; if not, jump to step 8;
[0136] Step 8: Determine whether the number of recursions exceeds the total number of order pools. If so, jump to step 9. If not, add 1 to the number of recursions and jump to step 6.
[0137] Step 9: Generate a service order list from the obtained pending service orders;
[0138] Step 10: Asynchronously trigger the activity list;
[0139] Step 11: Return the service order list to the user's terminal device.
[0140] Exemplarily, based on the above embodiments, Figure 5 This is a flow chart of a third embodiment of the method for processing a service order provided in the embodiment of the present application. Figure 5 As shown, in this embodiment, S103 may further include the following steps:
[0141] Step 1: Get the first order pool number based on the order grabbing activity, page number parameters and the total number of order pools.
[0142] For example, the present application embodiment takes the application scenario of Internet hospital consultation as an example for illustration. Figure 5 As shown, in this application scenario, the total number of order pools is 4, and the order pools are numbered 1, 2, 3, and 4 respectively. Each order pool can store up to 10 service orders, and the number of orders that can be displayed in the service order list is 10. Specifically, the number of orders in the order pools numbered 1, 2, 3, and 4 are 10, 10, 5, and 0 respectively. Among them, the user information is doctor X,
[0143] Among them, the server obtains the doctor's order-grabbing activity according to the activity list, and the doctor's activity is 3.
[0144] In this step, the first order pool number is obtained through the code (index+A-1)%count, and the first order pool number is 3.
[0145] Step 2: Obtain the service order to be processed from the first order pool corresponding to the first order pool number.
[0146] In this step, the service orders to be processed are obtained from the order pool numbered 3. The number of service orders obtained in this step is 5. Since the number of service orders obtained by the server is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of order pools, it is necessary to continue to obtain the service orders to be processed.
[0147] Step 3: Calculate the second order pool number according to the first order pool number, the number of recursions and the total number of order pools, and obtain the service order to be processed from the second order pool corresponding to the second order pool number.
[0148] In this step, the number of recursions is 2, and the second order pool number is calculated by the code (startindex+step)%count. The second order pool number is obtained by calculation as 4, and the service orders to be processed are obtained from the order pool numbered 4. The number of service orders obtained in this step is 0. Since the total number of service orders obtained by the server is 5, which is less than the number of orders that can be displayed in the service order list (10), and the number of recursions does not exceed the total number of order pools, it is necessary to continue to obtain service orders to be processed.
[0149] Step 4: Calculate the new order pool number based on the second order pool number, the number of recursions, and the total number of order pools. Obtain pending service orders from the new order pool corresponding to the new order pool number, generate a service order list, and update the user's corresponding order grabbing activity to the first place in the activity list.
[0150] In this step, the number of recursions is 3, and the new order pool number is calculated by the code (startindex+step)%count. The new order pool number is calculated to be 1, and the service orders to be processed are obtained from the order pool with order pool number 1. The number of service orders obtained in this step is 5. At this time, the total number of service orders obtained by the server is 10, which is equal to the number of orders that can be displayed in the service order list, and the acquisition of service orders to be processed stops.
[0151] Furthermore, the server also needs to generate a service order list based on the obtained pending service orders, and update the order grabbing activity corresponding to doctor X to the first place in the activity list.
[0152] The processing method of the service order provided in the embodiment of the present application is that the server obtains the first order pool number according to the order grabbing activity, the page number parameter and the total number of order pools, and obtains the service order to be processed from the first order pool corresponding to the first order pool number. Afterwards, the second order pool number is calculated according to the first order pool number, the number of recursions and the total number of order pools. Finally, the new order pool number is calculated according to the second order pool number, the number of recursions and the total number of order pools, and the user's corresponding order grabbing activity is updated to the first place in the activity list. It can be seen from this that the server can generate a service order list based on the user's order grabbing activity. When the user's order grabbing activity is different, the generated service order list is also different. It can be achieved that the medical consultation form is dispersed among doctors to a certain extent, avoiding the situation where the head medical consultation form is concentratedly snatched and the back medical consultation form is not swiped, effectively improving the processing efficiency of the medical consultation form.
[0153] Exemplarily, based on the above embodiments, Figure 6 This is a flow chart of a fourth embodiment of the method for processing a service order provided in the present application. Figure 6 As shown, in this embodiment, the service order processing method may further include the following steps:
[0154] S201: Receive a refresh request sent by a user's terminal device.
[0155] In this step, based on the above embodiment, if the service order list returned by the server to the terminal device does not contain the service order required by the user, the server may also receive a refresh request sent by the user's terminal device and re-obtain a new service order list based on the refresh request.
[0156] In a specific implementation, the user's terminal device generates a refresh request in response to the user clicking a page turning control in the graphical user interface and sends it to the server. The server receives the refresh request sent by the terminal device to subsequently re-acquire the service order list according to the refresh instruction.
[0157] It should be understood that the refresh request generated by the terminal device according to the page turning control is used to instruct the retrieval of the service order list, that is, to change a batch of service orders to be processed and generate a new service order list, rather than being used to instruct the display of the next page of content as in the prior art.
[0158] S202: According to the refresh request, the page number parameter in the query request is updated to obtain a new page number parameter.
[0159] In this step, the server updates the page number parameter in the previous query request according to the obtained refresh request to obtain a new page number parameter so as to re-acquire new service orders to be processed.
[0160] Optionally, the page number parameter can be increased by 1, or the page number parameter can be randomly changed so that the new page number parameter is different from the previous page number parameter. The page number parameter can also be updated in other ways to obtain a new page number parameter. This can be selected according to actual conditions, and the embodiment of the present application does not impose specific restrictions on this.
[0161] S203: Obtain the third order pool number according to the order grabbing activity, the new page number parameter and the total number of the order pool, and obtain a new to-be-processed service order from the third order pool corresponding to the third order pool number.
[0162] In this step, the technical terms, technical effects, technical features, and optional implementation methods of step S203 can be understood with reference to step S103, and repeated contents will not be repeated here.
[0163] S204: Generate a new service order list according to the new service orders to be processed.
[0164] In this step, the technical terms, technical effects, technical features, and optional implementation methods of step S204 can be understood with reference to step 104, and repeated contents will not be repeated here.
[0165] S205: Return the new service order list to the user's terminal device.
[0166] In this step, the technical terms, technical effects, technical features, and optional implementation methods of step S205 can be understood with reference to step S105, and repeated contents will not be repeated here.
[0167] In the method for processing service orders provided in the embodiment of the present application, the server receives a refresh request sent by the user's terminal device, and updates the page number parameter in the query request according to the refresh request to obtain a new page number parameter. Afterwards, the server obtains the third order pool number according to the order grabbing activity, the new page number parameter and the total number of order pools, and obtains a new pending service order from the third order pool corresponding to the third order pool number. Finally, the server generates a new service order list based on the new pending service order, and returns the new service order list to the user's terminal device. Among them, the refresh request is used to indicate the retrieval of the service order list. The server retrievals the new service order list according to the refresh request, which provides greater convenience for users to process service orders, and further provides users with more choices in selecting service orders.
[0168] Exemplarily, based on the above embodiments, Figure 7 The flowchart of the fifth embodiment of the method for processing a service order provided in the embodiment of the present application is shown in FIG. Figure 7 As shown, in this embodiment, before the above S101, the following steps may also be included:
[0169] S301: Numbering multiple order pools.
[0170] In this step, in order to facilitate the subsequent acquisition of pending service orders according to the order pool numbers, the server first needs to number multiple order pools.
[0171] Among them, multiple order pools can be numbered using the numbering method in the prior art. The order pools can be numbered 1, 2, 3, 4, etc., or other digital numbers. The method for numbering multiple order pools and the numbering of the order pools can be set according to actual needs, and this solution does not impose specific restrictions on this.
[0172] S302: According to the number of each order pool, the obtained service orders are stored in multiple order pools respectively.
[0173] In this step, after the server obtains the service order sent by the resident through the terminal device, in order to facilitate the subsequent acquisition of the pending service orders from the order pool, the server needs to store the service order in multiple order pools.
[0174] Optionally, taking the application scenario of Internet hospital consultation as an example, the server can store the obtained service orders (that is, consultation orders for the same department) in the department order pool, so as to facilitate the subsequent storage of the orders stored in the department order pool into multiple order pools.
[0175] The server may utilize a preset frequency to store the acquired service orders into a plurality of order pools at a time corresponding to the frequency.
[0176] The frequency of storing service orders in the order pool can be pre-set by filling the pool.
[0177] The process of storing service orders from the first order pool to the last order pool is called a storage process.
[0178] In a specific implementation, the server stores the acquired service orders in the order pool in sequence according to the remaining capacity of each order pool and in the order of the order pool numbers. The server can store the acquired service orders in the order pool in the order of the order pool numbers from small to large, so that the number of orders in the order pool reaches the maximum number of service orders that can be stored in the order pool, and the remaining capacity of the order pool is 0.
[0179] Among them, the remaining capacity of each order pool is used to indicate the number of orders that can still be stored in the order pool.
[0180] Furthermore, if the server does not obtain new service orders, the orders in the order pool with the later order pool number are transferred to the order pool with the earlier order pool number according to the remaining capacity of each order pool. When there is remaining capacity in the order pool with the smallest order pool number, the service orders in the order pool with the largest order pool number are transferred to the order pool with the earlier order pool number.
[0181] For example, a total of 4 order pools are used for illustration. At this time, the maximum number of service orders that can be stored in the order pool is 10, and the number of service orders in the order pools numbered 1, 2, 3, and 4 are 10, 7, 5, and 0, respectively. The server obtains a total of 2 service orders sent by residents.
[0182] The server first checks the remaining capacity of the order pool numbered 1, which is 1 order, and stores the 1 service order in the order pool numbered 1. The order pool numbered 1 reaches 10 orders, and the server obtains the remaining capacity of the order pool numbered 2, which is 3 orders. Since the server only has 1 service order left, the server stores the 1 service order in the order pool numbered 2. At this time, the remaining capacity of the order pool numbered 2 is 1 order.
[0183] Furthermore, since the server has not obtained a new service order at this time, the server checks the number of orders in the order pool numbered 4. Since there is no service order in the order pool numbered 4, the server continues to check the number of orders in the order pool numbered 3. The number of orders in the order pool numbered 3 is 5, so 1 service order is taken from the order pool numbered 3 and stored in the order pool numbered 2.
[0184] In the method for processing service orders provided in the embodiment of the present application, the server numbers multiple order pools, and then stores the obtained service orders in multiple order pools according to the number of each order pool. The method can continuously store service orders in multiple order pools, and by setting the frequency of storing service orders and the maximum number of service orders that can be stored in the order pool, the order pool is in a high-load state, meeting the server's demand for obtaining service orders from the order pool.
[0185] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0186] Figure 8 A schematic diagram of the structure of an embodiment of a device for processing service orders provided in an embodiment of the present application.
[0187] like Figure 8 As shown, the service order processing device may include:
[0188] The receiving module 81 is used to receive a query request sent by a user's terminal device, where the query request includes user information and a page number parameter, and the page number parameter is used to determine the page number of the service order list.
[0189] In a specific implementation, the receiving module 81 can be used to implement Figure 1B The function of the receiving module 12 is implemented in the embodiment of the present invention.
[0190] A processing module 82 is used to obtain the order grabbing activity corresponding to the user from the activity list according to the user information, where the activity list includes the order grabbing activity corresponding to multiple users;
[0191] The processing module 82 is further used to obtain the first order pool number according to the order grabbing activity, the page number parameter and the total number of the order pool, and obtain the service order to be processed from the first order pool corresponding to the first order pool number, and the service orders stored in each order pool are different;
[0192] The processing module 82 is further configured to generate a service order list according to the service orders to be processed.
[0193] In a specific implementation, the processing module 82 can be used to implement Figure 1B The functions of the timing module 11, the activity acquisition module 13, the calculation module 14, and the order pool control module 15.
[0194] The sending module 83 is used to return the service order list to the user's terminal device.
[0195] Exemplarily, in a possible design of this embodiment, the processing module 82 is also used to calculate the second order pool number according to the first order pool number, the number of recursions and the total number of order pools if the number of service orders obtained is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of order pools, and continue to obtain the service orders to be processed from the second order pool corresponding to the second order pool number, and repeat this step until the number of service orders to be processed obtained reaches the number of orders that can be displayed in the service order list. The number of recursions is used to indicate the number of order pools of service orders that have been obtained.
[0196] For example, in another possible design of this embodiment, the order grabbing activities of multiple users in the activity list are arranged in descending order, and the processing module 82 is specifically used to:
[0197] According to the user information, query the ranking position of the user information in the activity list;
[0198] Determine the user's corresponding order-grabbing activity based on the ranking position.
[0199] Optionally, the processing module 82 is further configured to:
[0200] Used to update the user's corresponding order-grabbing activity to the first place in the activity list.
[0201] Exemplarily, in another possible design of this embodiment, the receiving device 81 is further used to receive a refresh request sent by a terminal device of the user, where the refresh request is used to instruct to re-acquire the service order list;
[0202] The processing module 82 is further used to update the page number parameter in the query request according to the refresh request to obtain a new page number parameter;
[0203] The processing module 82 is further used to obtain the third order pool number according to the order grabbing activity, the new page number parameter and the total number of the order pool, and obtain a new to-be-processed service order from the third order pool corresponding to the third order pool number;
[0204] The processing module 82 is further used to generate a new service order list according to the new service order to be processed;
[0205] The sending module 83 is also used to return the new service order list to the user's terminal device.
[0206] Exemplarily, in another possible design of this embodiment, the processing module 82 is further configured to:
[0207] Number multiple order pools;
[0208] According to the number of each order pool, the obtained service orders are stored in multiple order pools respectively.
[0209] Optionally, the processing module 82 is specifically configured to:
[0210] According to the remaining capacity of each order pool, the acquired service orders are stored in the order pool in the order of the order pool numbers. The remaining capacity of each order pool is used to indicate the number of orders that can still be stored in the order pool.
[0211] Optionally, the processing module 82 is further configured to:
[0212] If no new service orders are obtained, the orders in the order pools with later order pool numbers are transferred to the order pools with earlier order pool numbers according to the remaining capacity of each order pool.
[0213] The service order processing device provided in the embodiment of the present application can be used to execute the service order processing method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0214] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0215] Fig. 9 This is a schematic diagram of the structure of the server provided in the embodiment of the present application. Fig. 9 As shown, the server may include: a processor 91, a transceiver 92, a memory 93, and computer program instructions stored in the memory 93 and executable on the processor 91. When the processor 91 executes the computer program instructions, the service order processing method provided in any of the aforementioned embodiments is implemented.
[0216] The transceiver 92 is used to communicate with other computers. Optionally, in hardware implementation, the above Figure 8 The receiving module 81 and the sending module 84 in the illustrated embodiment correspond to the transceiver 92 in this embodiment, which constitutes a communication interface.
[0217] Optionally, the above-mentioned components of the server may be connected via a system bus.
[0218] The memory 93 may be a separate storage unit or a storage unit integrated in a processor. The number of processors may be one or more.
[0219] It should be understood that the processor 91 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present application can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0220] The system bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The system bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory may include random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.
[0221] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned memory (storage medium) includes: read-only memory (English: read-only memory, abbreviated as: ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.
[0222] The server provided in the embodiment of the present application can be used to execute the service order processing method provided in any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0223] An embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the above-mentioned service order processing method.
[0224] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0225] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0226] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the above-mentioned service order processing method can be implemented.
[0227] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing a service order, characterized in that: include: Number multiple order pools; According to the remaining capacity of each order pool, the service orders obtained are stored in the order pool in the order of the order pool numbers. The remaining capacity of each order pool is used to indicate the number of orders that can be stored in the order pool. Receiving a query request sent by a user's terminal device, the query request including user information and a page number parameter, the page number parameter being used to determine a page number of a service order list; According to the user information, the order grabbing activity corresponding to the user is obtained from an activity list, where the activity list includes order grabbing activities corresponding to multiple users; According to the order grabbing activity, the page number parameter and the total number of the order pool, a first order pool number is obtained, and the service order to be processed is obtained from the first order pool corresponding to the first order pool number, where the service orders stored in each order pool are different; wherein the first order pool number is obtained by taking the remainder of the total number of the order pool by adding the order grabbing activity to the page number parameter minus one; generating the service order list according to the service orders to be processed; The service order list is returned to the user's terminal device.
2. The method according to claim 1, characterized in that Before generating the service order list according to the service orders to be processed, the method further includes: If the number of service orders obtained is less than the number of orders that can be displayed in the service order list, and the number of recursions does not exceed the total number of the order pool, the second order pool number is calculated based on the first order pool number, the number of recursions and the total number of the order pool, and the service orders to be processed continue to be obtained from the second order pool corresponding to the second order pool number. This step is repeated until the number of service orders to be processed obtained reaches the number of orders that can be displayed in the service order list. The number of recursions is used to indicate the number of order pools of service orders that have been obtained.
3. The method according to claim 1, characterized in that The order grabbing activities of the multiple users in the activity list are arranged in descending order, and obtaining the order grabbing activity corresponding to the user from the activity list according to the user information includes: According to the user information, query the arrangement position of the user information in the activity list; According to the arrangement position, the order grabbing activity corresponding to the user is determined.
4. The method according to claim 3, characterized in that The method further comprises: The order grabbing activity corresponding to the user is updated to the first place in the activity list.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: receiving a refresh request sent by the terminal device of the user, wherein the refresh request is used to instruct to re-acquire a service order list; According to the refresh request, the page number parameter in the query request is updated to obtain a new page number parameter; According to the order grabbing activity, the new page number parameter and the total number of the order pool, a third order pool number is obtained, and a new to-be-processed service order is obtained from the third order pool corresponding to the third order pool number; Generate a new service order list according to the new service orders to be processed; The new service order list is returned to the user's terminal device.
6. The method according to claim 1, characterized in that The method further comprises: If no new service order is obtained, the orders in the order pool with the later order pool number are transferred to the order pool with the earlier order pool number according to the remaining capacity of each order pool.
7. A service order processing device, characterized in that: include: A processing module is used to number multiple order pools; according to the remaining capacity of each order pool, the obtained service orders are stored in the order pool in sequence according to the order pool number, and the remaining capacity of each order pool is used to indicate the number of orders that can be stored in the order pool; A receiving module, configured to receive a query request sent by a user's terminal device, wherein the query request includes user information and a page number parameter, and the page number parameter is used to determine a page number of a service order list; The processing module is further configured to obtain, according to the user information, the order grabbing activity corresponding to the user from an activity list, wherein the activity list includes order grabbing activities corresponding to multiple users; The processing module is further used to obtain a first order pool number according to the order grabbing activity, the page number parameter and the total number of the order pool, and obtain the service order to be processed from the first order pool corresponding to the first order pool number, and the service orders stored in each order pool are different; wherein the first order pool number is obtained by taking the remainder of the total number of the order pool by adding the order grabbing activity to the page number parameter minus one; The processing module is further used to generate the service order list according to the service orders to be processed; The sending module is used to return the service order list to the terminal device of the user.
8. A server, comprising: A processor, a transceiver, a memory, and computer program instructions stored in the memory and executable on the processor, wherein the processor is used to implement the service order processing method according to any one of claims 1 to 6 when executing the computer program instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the service order processing method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it is used to implement the service order processing method according to any one of claims 1 to 6.
