Task dispatching method and device, computer readable storage medium, and electronic device

By obtaining and querying the target object identifier in the task dispatch method, querying its status information, and changing it within a preset time period, the problem of non-real-time task dispatch in the existing technology is solved, and real-time performance and lower cost are achieved. Error rate.

CN113792950BActive Publication Date: 2024-10-22BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011400293.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-02
Publication Date
2024-10-22
Estimated Expiration
2040-12-02

AI Technical Summary

Technical Problem

Existing task dispatching methods cause the dispatch results to be inconsistent with the status of the party completing the task when the network is abnormal, and cannot meet real-time requirements.

Method used

By obtaining the target object identification when receiving business information, querying the target status information, and changing the status information within a preset time period, the task dispatch results are determined based on the change results to avoid inconsistent dispatch results caused by network anomalies.

Benefits of technology

It achieves real-time task dispatch, optimizes user experience, and reduces the error rate of dispatch results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113792950B_ABST
    Figure CN113792950B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the field of computer technology, and relates to a task dispatching method and device, a computer-readable storage medium, and an electronic device. The method includes: when receiving business information, obtaining a target object identifier from the business information; querying the target state information corresponding to the target object identifier, and obtaining the target task corresponding to the target object; changing the target state information within a preset time period according to the business information to obtain a change result, and determining the dispatch result of the target task according to the change result. In the present disclosure, on the one hand, when receiving business information, the target state information is first changed, and then the change of the business information is notified to the downstream, which meets the real-time nature of task dispatching; on the other hand, the dispatch result of the target task is determined according to the change result, which avoids the inconsistency between the dispatch result and the business information due to network anomalies, which not only optimizes the user experience, but also reduces the error rate of the dispatch result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a task dispatching method and task dispatching device, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the development of computer technology, more and more people choose to use the Internet to conduct online medical consultations, online car reservations, online meal orders, online delivery, etc. In these transactions, the task dispatcher and the task completer belong to two independent systems. The task dispatcher needs to dispatch tasks to the task completer, and the function of the task dispatcher depends on the current status of the task completer.

[0003] In the related art, the solutions adopted are 2PC (Two-phase commitment protocol), TCC (Try-Confirm-Cancel), local message table or transaction information. Specifically, in the first way, when an abnormality occurs in the network, the dispatch result of the task dispatcher will be inconsistent with the current state of the task completion party. In addition, once the system where the task completion party is located fails, the task dispatcher will not continue to dispatch tasks until the fault is eliminated, which cannot meet the real-time nature of task dispatch; in the second way, the task completion party needs to make multiple requests to the task dispatcher, which also cannot meet the real-time nature of task dispatch; in the third and fourth ways, after receiving the status change information of the task completion party, the task dispatcher will not be notified first, which also cannot meet the real-time nature of task dispatch.

[0004] In view of this, there is an urgent need in the art to develop a new task dispatching method and device.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a task dispatching method, a task dispatching device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of lack of real-time performance in the task dispatching process due to the limitations of related technologies, at least to a certain extent.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to the first aspect of an embodiment of the present invention, the method includes: when business information is received, obtaining a target object identifier from the business information; querying the target state information corresponding to the target object identifier, and obtaining a target task corresponding to the target object identifier; changing the target state information within a preset time period based on the business information to obtain a state change result, and determining a dispatch result of the target task based on the state change result.

[0009] In an exemplary embodiment of the present invention, obtaining the target object identifier from the business information includes: obtaining a status identifier corresponding to the business information, and obtaining a preset status identifier; determining whether the status identifier is consistent with the preset status identifier to obtain an identifier determination result; if the identifier determination result is that the status identifier is consistent with the preset status identifier, obtaining the target object identifier from the business information.

[0010] In an exemplary embodiment of the present invention, the querying of the target state information corresponding to the target object identifier includes: acquiring a state information list, and querying the target state information corresponding to the target object identifier from the state information list.

[0011] In an exemplary embodiment of the present invention, determining the dispatch result of the target task based on the state change result includes: judging whether state event information corresponding to the state change result is received within the preset time period to obtain a first state judgment result; and determining the dispatch result of the target task based on the first state judgment result.

[0012] In an exemplary embodiment of the present invention, determining the dispatch result of the target task according to the first state judgment result includes: if the first state judgment result is receiving the state event information, maintaining the dispatch result of the target task according to the state change result.

[0013] In an exemplary embodiment of the present invention, determining the dispatch result of the target task based on the first state judgment result includes: if the first state judgment result is that the state event information has not been received, receiving the current state information corresponding to the target object identifier after the preset time period; judging the current state information and the state change result to obtain a second state judgment result; if the second state judgment result is that the current state information and the state change result are consistent, maintaining the dispatch result of the target task according to the state change result; if the second state judgment result is that the current state information and the state change result are inconsistent, changing the dispatch result of the target task according to the state change result.

[0014] In an exemplary embodiment of the present invention, the receiving of the current status information corresponding to the target object identifier after the preset time length includes: obtaining compensation information and determining the preset time length corresponding to the compensation information; and receiving the current status information corresponding to the target object identifier after the preset time length.

[0015] According to the second aspect of an embodiment of the present invention, the device includes: an acquisition module, configured to acquire a target object identifier from the business information when business information is received; a query module, configured to query target state information corresponding to the target object identifier, and acquire a target task corresponding to the target object identifier; a dispatch module, configured to change the target state information within a preset time period based on the business information to obtain a state change result, and determine the dispatch result of the target task based on the state change result.

[0016] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the task dispatching method of any of the above exemplary embodiments is implemented.

[0017] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the task dispatching method in any of the above exemplary embodiments is implemented.

[0018] It can be seen from the above technical solutions that the event data processing method, event data processing device, computer storage medium and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0019] In the method and apparatus provided by the exemplary embodiments of the present disclosure, on the one hand, when business information is received, the target status information is first changed, and then the change of the business information is notified to the downstream, thereby meeting the real-time nature of task dispatching; on the other hand, the dispatching result of the target task is determined according to the change result, thereby avoiding the inconsistency between the dispatching result and the business information due to network anomalies, which not only optimizes the user experience but also reduces the error rate of the dispatching results.

[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0022] Figure 1 A schematic diagram schematically shows a flow chart of a task dispatching method in an embodiment of the present disclosure;

[0023] Figure 2 A schematic diagram of a process of obtaining a target object identifier from business information in an embodiment of the present disclosure is schematically shown;

[0024] Figure 3 A schematic diagram of a process for determining a target task dispatch result according to a state change result in an embodiment of the present disclosure is schematically shown;

[0025] Figure 4 A schematic diagram of a process for determining a target task dispatch result based on a first state judgment result in an embodiment of the present disclosure is schematically shown;

[0026] Figure 5 A schematic diagram of a process of receiving current state information corresponding to a target object identifier after a preset time period in an embodiment of the present disclosure is schematically shown;

[0027] Figure 6 A schematic diagram schematically illustrates a process flow of task dispatching in an application scenario in an exemplary embodiment of the present disclosure;

[0028] Figure 7 A schematic diagram of the structure of a task dispatching device in an embodiment of the present disclosure is shown;

[0029] Figure 8 An electronic device schematically illustrating a task dispatching method in an embodiment of the present disclosure;

[0030] Fig. 9 A computer-readable storage medium schematically illustrates a task dispatching method in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0032] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0033] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0034] In view of the problems existing in the related technologies, the present disclosure proposes a method for task dispatching. Figure 1 A flowchart of the task dispatching method is shown, such as Figure 1 As shown, the task dispatching method includes at least the following steps:

[0035] Step S110: When receiving the business information, obtain the target object identifier from the business information.

[0036] Step S120: Query the target state information corresponding to the target object identifier, and obtain the target task corresponding to the target object identifier.

[0037] Step S130: According to the business information, the target status information is modified within a preset time period to obtain a status change result, and the target task dispatch result is determined according to the status change result.

[0038] In the method and apparatus provided by the exemplary embodiments of the present disclosure, on the one hand, when business information is received, the target status information is first changed, and then the change of the business information is notified to the downstream, thereby meeting the real-time nature of task dispatching; on the other hand, the dispatching result of the target task is determined according to the change result, thereby avoiding the inconsistency between the dispatching result and the business information due to network anomalies, which not only optimizes the user experience but also reduces the error rate of the dispatching results.

[0039] The following is a detailed description of each step of the task dispatching method.

[0040] In step S110, when the business information is received, the target object identifier is obtained from the business information.

[0041] In the exemplary embodiment of the present disclosure, business information refers to information sent by the party who completes the task. For example, if the party who completes the task is a doctor, the business information may be information sent by the doctor when he / she closes the consultation, information sent by the doctor when he / she opens the consultation, information sent by the doctor when he / she is busy, information requesting a reduction in the amount of tasks assigned, or information requesting an increase in the amount of tasks assigned, and this exemplary embodiment does not specifically limit this.

[0042] For example, if the party completing the task is a driver, the business information may be information when the driver is online, or information when the driver is offline, or information sent when the driver is completing a task, or information sent when the driver completes a task. This exemplary embodiment does not specifically limit this.

[0043] For example, if the party who completes the task is a delivery man, the business information may be the information when the delivery man starts to accept the task, or the information when the delivery man no longer accepts the task, or the information when the delivery man requests to re-verify the delivery address, or the information when the delivery man clicks that the goods have been delivered, or the information when the delivery man requests to delay the delivery of the goods. This exemplary embodiment does not make any special limitations on this.

[0044] For example, if the party who completes the task is a delivery driver, the business information may be information when the driver starts to accept tasks, information when the driver no longer accepts tasks, information when the driver is unable to contact the consignee, information when the driver delays delivery time, or information when the driver requests re-verification of the delivery address. This exemplary embodiment does not specifically limit this.

[0045] It is worth noting that any scenario that requires both task completion and task dispatching falls within the scope of protection of this application, and any information sent by the task completer to the task dispatcher falls within the business information of this application.

[0046] The target object identifier refers to the identifier of the task completer who sends the business information. The target object identifier can be the name of the task completer, the identification number of the task completer, the nickname of the task completer, the ID number of the task completer, or any information that can uniquely represent the task completer, and this exemplary embodiment does not specifically limit this.

[0047] For example, if the party completing the task is doctor A, doctor A can change the status to the closed diagnosis status by clicking the closed diagnosis control on the terminal. After clicking the closed diagnosis control, the task dispatcher will receive business information corresponding to the closed diagnosis operation, and the business information will include the target object identifier corresponding to doctor A. The specific target object identifier can be the real name of doctor A.

[0048] When the task dispatcher receives the business information sent by doctor A, the real name of the doctor corresponding to doctor A can be obtained from the business information.

[0049] In an alternative embodiment, Figure 2 A schematic diagram of the process of obtaining the target object identifier from the business information is shown in FIG. Figure 2 As shown, the method at least includes the following steps: In step S210, a state identifier corresponding to the business information is obtained, and a preset state identifier is obtained.

[0050] The status identifier represents the identifier of the business information type.

[0051] Specifically, the status identifier may be a number, a string of characters, or a paragraph of text, and this exemplary embodiment does not specifically limit this.

[0052] For example, if the person who completes the task is a doctor, the business information may be information when the doctor opens the clinic, information when the doctor closes the clinic, information when the doctor requests to add a medical questionnaire, information when the doctor requests to reduce a medical questionnaire, information when the doctor reports an abnormality in task dispatching, and information when the doctor reports that the abnormality in task dispatching has been resolved.

[0053] The business information sent by the doctor when opening and closing the clinic is set as Class A business information, and there is a status identifier A corresponding to the Class A business information. Similarly, the information of the doctor's request to add a medical questionnaire and the information of the doctor's request to close the medical questionnaire are set as Class B information, and there is a status identifier B corresponding to the Class B business information. The business information of the doctor reporting the occurrence and elimination of abnormalities in task dispatch is set as Class C business information, and there is a status identifier C corresponding to the Class C business information.

[0054] The preset status identifier refers to a preset identifier corresponding to a type of business information.

[0055] For example, if the party completing the task is a doctor, the party issuing the task needs to decide whether to assign the task to the doctor based on the doctor's current closed or open clinic status. At this time, the preset status identifier needs to be consistent with the status identifier corresponding to the doctor's open or closed clinic status, and the status identifier corresponding to the doctor's closed or open clinic status is A, so the preset status transfer identifier is set to A.

[0056] In step S220, it is determined whether the state identifier is consistent with the preset state identifier to obtain an identifier determination result.

[0057] The obtained state identifier and the preset state identifier are judged to obtain an identifier judgment result.

[0058] For example, the acquired state identifier is A, the acquired preset state identifier is B, and it is determined whether the state identifier A is consistent with the preset state identifier B to obtain an identifier determination result.

[0059] In step S230, if the identification judgment result is that the state identification is consistent with the preset state identification, the target object identification is obtained from the business information.

[0060] When the identification judgment result is that the state identification is consistent with the preset state identification, the target state identification is obtained from the business information.

[0061] For example, the preset status identifier obtained is A. If the status identifier obtained is the status identifier A corresponding to the business information sent when the doctor opens and closes the clinic, it is obvious that the status identifier is consistent with the preset status identifier. At this time, the target object identifier obtained from the business information with the status identifier A can be the doctor's real name.

[0062] In this exemplary embodiment, a judgment logic is added before obtaining the target object identifier, and the status identifier corresponding to the business information and the preset status identifier are judged. When the status identifier corresponding to the business information and the preset status identifier are consistent, the target object identifier is obtained from the business information. This avoids the situation where it is still necessary to obtain the target object identifier from the business information when the status identifier and the preset status identifier are inconsistent, avoids unnecessary performance loss, and makes the logic of the method more perfect.

[0063] In step S120, the target state information corresponding to the target object identifier is queried, and the target task corresponding to the target object identifier is acquired.

[0064] In an exemplary embodiment of the present disclosure, when the task completer generates information, the business information will be sent to the task dispatcher first. This allows the task dispatcher to obtain the status of the task completer as soon as possible, so as to decide whether to continue dispatching tasks to the task completer or to suspend dispatching tasks to the task completer, thereby meeting the real-time nature of task dispatch.

[0065] The target status information determines whether the dispatcher dispatches the target task corresponding to the target object identifier, and the target status information corresponds to the target object identifier. Specifically, the target status information can be a number, a string, or a piece of text. This exemplary embodiment does not make any special limitation on this.

[0066] For example, if there are doctors A, B and C in the task completion party, and doctor A is currently in the open clinic state, doctor B is currently in the closed clinic state, and doctor C is currently in the open clinic state. If the target object identifier corresponding to doctor A is obtained, the target state information obtained on the task dispatching party is the open clinic state.

[0067] In an optional embodiment, querying the target state information corresponding to the target object identifier includes: acquiring a state information list, and querying the target state information corresponding to the target object identifier from the state information list.

[0068] The status information list is in the task dispatcher, and the status information list contains the status information of all task completers.

[0069] For example, if there are three doctors on the task completion side, namely, Doctor A, Doctor B, and Doctor C. The acquired status information list contains three target object identifiers corresponding to Doctor A, Doctor B, and Doctor C, respectively, namely, Doctor A's real name Zhang San, Doctor B's real name Li Si, Doctor C's real name Liu Yi. In addition, the status information list also contains the status information corresponding to Zhang San: closed, the status information corresponding to Li Si: open, and the status information corresponding to Liu Yi: open.

[0070] If the obtained target object identifier is Zhang San, the target state information queried from the state information list is the state information corresponding to Zhang San.

[0071] In the embodiments of the present disclosure, querying the target state information and the corresponding target task corresponding to the target object identifier at the task dispatching party helps to subsequently ensure the consistency of business information and task dispatching results.

[0072] In step S130, the target state information is changed within a preset time period according to the business information to obtain a state change result, and the distribution result of the target task is determined according to the state change result.

[0073] In an exemplary embodiment of the present disclosure, a temporary change is made to the acquired target status information according to business information within a preset time period to obtain a status change result, and how to dispatch the target task is determined according to the status change result.

[0074] The preset duration can be 30 seconds, 10 seconds, or any time value, which is not specifically limited in this exemplary embodiment, and the determination of the preset duration is related to the needs of the task completion party. For example, if the task completion party is a doctor, and the doctor is in the open state, the longest idle time that the doctor can accept in the open state is 30 seconds, and the preset duration is 30 seconds.

[0075] For example, if the party who completes the task is doctor A, and the business information sent by doctor A is the business information corresponding to the opening of the clinic, and the preset duration is set to 30s, then the target status information corresponding to doctor A will be changed to the opening status within 30s. At this time, there are two status change results: successful change and failed change. If the status change result is successful, the target status information corresponding to doctor A is opening the clinic, and the target tasks corresponding to doctor A continue to be dispatched; if the status change result fails, the target status information corresponding to doctor A is closed, and the dispatch of target tasks corresponding to doctor A stops.

[0076] In an alternative embodiment, Figure 3 A flow chart showing the process of determining the dispatch result of the target task according to the state change result is shown as follows: Figure 3 As shown, the method at least includes the following steps: In step S310, it is determined whether state event information corresponding to the state change result is received within a preset time period to obtain a first state determination result.

[0077] After the task dispatcher sends the status change result to the task completer, the task completer changes the status information of the task completer corresponding to the target object identifier according to the status change result. If the change is successful, the corresponding status event information will be generated and sent to the task dispatcher; if the change fails, no status event information will be generated; if the change is successful, the status event information is generated, but due to network failure and other reasons, the task completer may not be able to successfully send the status event information to the task dispatcher. In this case, the task dispatcher will not be able to receive the status event information within the preset time.

[0078] The first status judgment result refers to the judgment result of whether the status event information is received within a preset time period.

[0079] For example, the preset time length is 30 seconds, and it is determined whether the task dispatching party receives the status event information within 30 seconds to obtain a first status determination result.

[0080] In step S320, the target task dispatch result is determined according to the first state judgment result.

[0081] The distribution result of the target task is determined according to the content of the first state judgment result.

[0082] For example, the first status judgment result includes two possible situations. The first situation is that the task dispatcher receives the status event information within the preset time period, and the second situation is that the task dispatcher does not receive the status event information within the preset time period. Different dispatch results of the target task can be obtained according to different first status judgment results.

[0083] In an optional embodiment, determining the target task dispatch result according to the first state judgment result includes: if the first state judgment result is receiving state event information, maintaining the target task dispatch result according to the state change result.

[0084] If the first state determination result is that state event information is received, the determined state change result must be a state change result corresponding to a successful state change.

[0085] For example, the party completing the task is doctor A, and the business information sent by doctor A is the business information corresponding to the closed diagnosis. The preset duration is 30s. After receiving the closed diagnosis information, the business information will be sent to the task dispatcher first. The task dispatcher will temporarily change the target status information corresponding to doctor A to closed diagnosis within the preset duration, and send the status change result to the party completing the task, ensuring that the task dispatcher changes the target status information corresponding to the target object identifier in real time according to the business information, preventing the situation where tasks are dispatched to doctor A after doctor A sends the closed diagnosis business information.

[0086] If the status change result is a status change result corresponding to success, the task completion party will change the status information corresponding to doctor A to the closed diagnosis state, and when the task completion party successfully changes the status corresponding to doctor A to the closed diagnosis state, it generates status event information and sends the status event information to the task dispatching party, that is, when the task dispatching party receives the status event information, it must be that the task completion party has successfully changed the target status information corresponding to the target object identifier. Based on this, because the status change result at this time is closed diagnosis, the dispatch result for the target task is the stop task dispatch corresponding to closed diagnosis.

[0087] The distribution results include two distribution results: distributing the target task and stopping the distribution of the target task.

[0088] For example, when status event information is received, the status change result must be a status change result corresponding to success. Based on this, if the status change result is to change the target status information to diagnosis within the preset time, the corresponding target task dispatch result is to dispatch the task.

[0089] If the status change result is that the target status information is changed to open for business within the preset time, the corresponding target task dispatch result is that the task is dispatched.

[0090] In an alternative embodiment, Figure 4 FIG. 4 shows a flow chart of determining the dispatch result of the target task according to the first state judgment result. Figure 4 As shown, the method at least includes the following steps: in step S410, if the first state judgment result is that no state event information is received, current state information corresponding to the target object identifier is received after a preset time period.

[0091] The current status information refers to the status information corresponding to the target object identifier in the task completion party after a preset period of time.

[0092] For example, the party completing the task is doctor A. If the first status judgment information is that the status event information has not been received, there may be three situations. The first situation is that the task dispatching party fails to change the target status information within the preset time, and thus does not generate status event information; the second situation is that the task dispatching party successfully changes the target status information within the preset time, but the task completing party fails to change the target status information; the third situation is that the task dispatching party successfully changes the target status information within the preset time, but due to a fault or network problem, the task dispatching party does not receive the status event information.

[0093] Furthermore, in the first case, because the target status information corresponding to doctor A is not successfully changed to closed clinic within the preset time period, the corresponding current status is still open clinic.

[0094] In the second and third cases, the target status information corresponding to doctor A is changed successfully within the preset time, but the task completion party fails to change the target status information, resulting in the current status information corresponding to doctor A still being open; if the task completion party successfully changes the target status information, but due to a fault or network problem, the task dispatching party does not receive the status event information, then the current status information corresponding to doctor A is closed.

[0095] In step S420, the current state information and the state change result are judged to obtain a second state judgment result.

[0096] There are two situations for the status change results. One is that the task dispatcher successfully changes the target status information within the preset time, and the other is that the task dispatcher fails to change the target status information within the preset time.

[0097] Specifically, in the first case, there may be two types of current state information, and in the second case, there may be one type of current state information.

[0098] For example, if the party who completes the task is doctor A, the business information sent by doctor A is closed, and the status change result obtained is that the target status information is changed to closed within the preset time period, but the party who completes the task fails to change the target status information. At this time, the current status information obtained is open, and the status change result and the current status information open are judged to obtain a second status judgment result.

[0099] In step S430 , if the second state determination result is that the current state information is consistent with the state change result, the dispatch result of the target task is maintained according to the state change result.

[0100] If the current state information is consistent with the state change result, keep the target task dispatch result consistent with the state change result.

[0101] For example, if the current status information is consistent with the status change result, it means that the task dispatcher did not receive the status event information due to a fault or network problem, and the task dispatcher has changed the target status information to the diagnosis status within the preset time. At this time, it remains consistent with the diagnosis status and does not dispatch tasks to the task completer.

[0102] In step S440 , if the second state determination result is that the current state information is inconsistent with the state change result, the dispatch result of the target task is changed according to the state change result.

[0103] If the current status information and the status change result are inconsistent, change the dispatch result of the target task.

[0104] For example, if the current status information and the status change result are inconsistent, it means that the target status information is changed successfully within the preset time, but the task completion party fails to change the target status information, resulting in the current status corresponding to doctor A still being open for treatment, or the task dispatching party fails to successfully change the target status information to closed for treatment within the preset time, and the corresponding current status is still open for treatment.

[0105] In these two cases, the current status information is inconsistent with the status change result. If the current status information is open clinic, it means that the task assignor has changed the target status information to closed clinic within the preset time. At this time, the task assignor should change the open clinic to closed clinic based on the current status information and not assign the task to doctor A. Conversely, if the current status information is closed clinic, the task assignor should change the closed clinic to open clinic based on the current status information and assign the task to doctor A.

[0106] In an alternative embodiment, Figure 5 A schematic diagram of a process of receiving current state information corresponding to a target object identifier after a preset time period is shown. Figure 5As shown, the method includes at least the following steps: In step S510, compensation information is obtained, and a preset duration corresponding to the compensation information is determined.

[0107] The compensation information refers to a piece of information generated based on the target object identifier.

[0108] For example, the party completing the task is a doctor, who obtains compensation information and determines that the preset duration corresponding to the compensation information is 30 seconds.

[0109] In step S520, current state information corresponding to the target object identifier is received after a preset time period.

[0110] When the task dispatcher does not receive the status event information within the preset time, it obtains the target object identifier from the compensation information and receives the current status information corresponding to the target object identifier sent by the task completer.

[0111] In an exemplary embodiment of the present disclosure, on the one hand, when business information is received, the target status information is first changed, and then the change of the business information is notified to the downstream, thereby meeting the real-time nature of task dispatching; on the other hand, the dispatching result of the target task is determined according to the change result, thereby avoiding the inconsistency between the dispatching result and the business information due to network anomalies, which not only optimizes the user experience but also reduces the error rate of the dispatching results.

[0112] The following is a detailed description of the method for processing event data in the embodiment of the present disclosure in conjunction with an application scenario.

[0113] Figure 6 A flow chart of task dispatching in an application scenario is shown, which includes a doctor status system, a dispatching system and compensation information. Object 610 is doctor Zhang San in the doctor status system. Step S620 is a basic data verification and business logic verification process. Step S630 is a process of changing the state of the target object in the dispatching system. Step S640 is a process in which the doctor status system obtains the change result in step S630 and selects an execution step according to different change results. Step S650 is a process in which the doctor status system changes the state of the target object. Step S660 is a process in which an execution step is selected according to different state change results in step S650. Step S670 is a process in which it is determined whether state event information exists. Step S680 is a process in which it obtains current state information corresponding to the target object identifier from the doctor status system. Step S690 is a process in which it determines the result of task dispatching. Information 600 is compensation information. 661 is the execution result of step S640. 662 is the execution result of step S660. 691 and 692 are the execution results of step S690. 663 is state event information.

[0114] Specifically, when Doctor Zhang in the doctor system clicks on the control corresponding to the consultation, the doctor system will respond to Doctor Zhang's click operation and obtain the business information corresponding to Doctor Zhang. In step S620, the doctor status system will perform basic data verification and business logic verification on the obtained business information. The basic data verification is to determine whether the status identifier of the business information is consistent with the preset status identifier. The business logic verification process is that when the received business information is the information corresponding to the consultation, the business information corresponding to the consultation obtained later will be automatically ignored, so as to avoid multiple responses caused by the doctor's misoperation and avoid unnecessary performance loss.

[0115] In step S630, the target status information of doctor Zhang San is temporarily changed to the closed diagnosis corresponding to the business information within a preset time period, and the target task corresponding to doctor Zhang San is obtained.

[0116] In step S640, when the target status information of doctor Zhang San is successfully changed to closed consultation within the preset time period, step S650 will be executed. In step S650, the target status information of doctor Zhang San is changed in the doctor status system.

[0117] At this time, there are two results of changing the target status information. One is that the target status system of Doctor Zhang San is changed successfully in the doctor status system, which is result 662. At this time, a prompt message is sent to Doctor Zhang San to inform Doctor Zhang San that his status has been successfully changed to closed diagnosis, and a status event message 663 is generated.

[0118] The other is that the target status information of Doctor Zhang San in the doctor status system fails to be changed. At this time, Doctor Zhang San will be reminded that the status change failed, that is, result 661, and the current status information of Doctor Zhang San is open for consultation.

[0119] When the target status information of Doctor Zhang San is not changed to closed clinic within the preset time, a prompt message will be sent to Doctor Zhang San, informing Doctor Zhang San that the status change failed at this time, that is, result 661, and that the current status information of Doctor Zhang San is open clinic.

[0120] In the above situation, the task dispatching system will receive the status event information only when the target status information of doctor Zhang San is changed successfully in the doctor status system and no failure occurs.

[0121] In step S630, the dispatching system determines whether status event information is received. If status event information is received, the status change result in step S630 will continue to be maintained, and the target task will not be dispatched. If no status event information is received, the target object identifier is obtained from the compensation information 600, and step S680 is executed to obtain the current status information corresponding to the target status identifier from the doctor status system. If the current status information obtained at this time is consistent with the status change result in step S630, both are closed, the status change result is maintained, and result 691 is obtained to stop dispatching the target task. If the current status information obtained at this time is inconsistent with the status change result in step S630, the status change result is closed, and the current status information is open, then the status change result is changed from closed to open to obtain result 692 and dispatch the target task.

[0122] In this application scenario, on the one hand, when business information is received, the target status information is changed first, and then the change of business information is notified to the downstream, which meets the real-time nature of task dispatch; on the other hand, the dispatch result of the target task is determined according to the change result, avoiding the inconsistency between the dispatch result and the business information due to network anomalies, which not only optimizes the user experience, but also reduces the error rate of dispatch results.

[0123] In addition, in an exemplary embodiment of the present disclosure, a task dispatching device is also provided. Figure 7 A schematic diagram of the structure of the task dispatching device is shown in FIG. Figure 7 As shown, the event data processing device 700 may include: an acquisition module 710, a query module 720 and a dispatch module 730. Among them:

[0124] The acquisition module 710 is configured to obtain the target object identifier from the business information when receiving the business information; the query module 720 is configured to query the target state information corresponding to the target object identifier and obtain the target task corresponding to the target object identifier; the dispatch module 730 is configured to change the target state information within a preset time period according to the business information to obtain a state change result, and determine the dispatch result of the target task according to the state change result.

[0125] The specific details of the above-mentioned task dispatching device 700 have been described in detail in the corresponding task dispatching method, so they will not be repeated here.

[0126] It should be noted that, although several modules or units of the task dispatching device 700 are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.

[0127] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0128] Refer to the following Figure 8 An electronic device 800 according to such an embodiment of the present invention is described. Figure 8 The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0129] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0130] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0131] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 821 and / or a cache memory unit 822 , and may further include a read-only memory unit (ROM) 823 .

[0132] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, such program modules 825 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the reality of a network environment.

[0133] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0134] The electronic device 800 may also communicate with one or more external devices 870 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0135] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0136] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0137] refer to Fig. 9 As shown, a program product 900 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0138] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0139] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0140] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0141] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0142] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A task dispatching method, characterized in that: The method comprises: When receiving the business information, obtaining the target object identifier from the business information; the business information is information sent by the party completing the task, and the target object identifier is the identifier of the party completing the task; Querying the target state information corresponding to the target object identifier, and obtaining the target task corresponding to the target object identifier; The target state information is changed within a preset time period according to the business information to obtain a state change result, and the distribution result of the target task is determined according to the state change result; the determination of the preset time period is related to the target state information.

2. The task dispatching method according to claim 1, characterized in that: The acquiring the target object identifier from the business information includes: Obtaining a status identifier corresponding to the service information and obtaining a preset status identifier; Determine whether the state identifier is consistent with the preset state identifier to obtain an identifier determination result; If the identification judgment result is that the state identification is consistent with the preset state identification, the target object identification is obtained from the business information.

3. The task dispatching method according to claim 1, characterized in that: The querying of the target state information corresponding to the target object identifier includes: A status information list is obtained, and target status information corresponding to the target object identifier is searched from the status information list.

4. The task dispatching method according to claim 1, characterized in that: The step of determining the target task dispatch result according to the state change result includes: Determine whether status event information corresponding to the status change result is received within the preset time period to obtain a first status determination result; The dispatch result of the target task is determined according to the first state judgment result.

5. The task dispatching method according to claim 4, characterized in that: The step of determining the target task dispatch result according to the first state judgment result includes: If the first state determination result is that the state event information is received, the dispatch result of the target task is maintained according to the state change result.

6. The task dispatching method according to claim 4, characterized in that: The step of determining the target task dispatch result according to the first state judgment result includes: If the first state judgment result is that the state event information has not been received, receiving the current state information corresponding to the target object identifier after the preset time period; Determine the current state information and the state change result to obtain a second state determination result; If the second state judgment result is that the current state information is consistent with the state change result, maintaining the target task dispatch result according to the state change result; If the second state determination result is that the current state information is inconsistent with the state change result, the dispatch result of the target task is changed according to the state change result.

7. The task dispatching method according to claim 6, characterized in that: The receiving the current state information corresponding to the target object identifier after the preset time period includes: Obtaining compensation information, and determining a preset duration corresponding to the compensation information; After the preset time period, current state information corresponding to the target object identifier is received.

8. A dispatch processing device, characterized in that: include: An acquisition module, configured to acquire a target object identifier from the business information when receiving the business information; The business information is information sent by the party completing the task, and the target object identifier is the identifier of the party completing the task; A query module is configured to query the target state information corresponding to the target object identifier and obtain the target task corresponding to the target object identifier; The dispatching module is configured to change the target state information within a preset time period according to the business information to obtain a state change result, and determine the dispatching result of the target task according to the state change result; the determination of the preset time period is related to the target state information.

9. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the task dispatching method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the task dispatching method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Task management system and method of distributed system

    CN103294534A

  • Mission distribution method and device

    CN106682872A

  • Task preferential distribution method, device and system

    CN107657379A

  • Project task management method, apparatus, computer device, and storage medium

    CN109146431A

  • Task management method and apparatus, and readable storage medium

    CN109409646A