Work order exception processing method and device, server and storage medium

By handling exceptions when the work ticket resource is created, exception events are handled and state modifications and resource cleaning or retry according to the number of resources, the problem of low resource release efficiency in the existing technology is solved, and efficient resource utilization and waste reduction are achieved.

CN119629042AActive Publication Date: 2025-03-14CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311179102.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

The resource release efficiency of the exception instances created in the prior art is inefficient, resulting in waste of resources.

Method used

When the work ticket resource is created, the exception is handled, and the number of successful work ticket resources and resources are obtained, the work ticket status is modified according to the resource quantity and resource cleaning or retry to ensure the effective release of resources.

Benefits of technology

Improve resource utilization, reduce resource waste, and ensure timely cleaning and retry of abnormal instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629042A_ABST
    Figure CN119629042A_ABST
Patent Text Reader

Abstract

The invention provides a work order exception processing method and device, a server and a storage medium. The method comprises the steps that after a server obtains a work order, work order resources can be created one by one according to the work order; when the creation of a certain work order resource is abnormal, the server can issue and process an abnormal event. According to the work order number, the server can inquire work order resources which are successfully created by the work order in a resource list, and count the number of the work order resources. And when the number of the resources is greater than or equal to 1, the server can modify the work order state in the work order list into a to-be-cleaned state. The server can also delete the work order resources according to the resource list. When the number of the resources is zero, the server can modify the work order state of the work order list to be retry. The server can also recreate work order resources of the work order. According to the method, the deletion and release of the resources in the instance of the work order are realized, and the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a method, device, server and storage medium for handling work order exceptions. Background Art

[0002] With the development of cloud computing, customers have higher and higher requirements for the accuracy of cloud product activation. Among them, customers are most concerned about whether the instance to be created in the work order can be correctly activated.

[0003] In the prior art, when an exception occurs in an instance to be created in a work order, the exception closed loop can realize the throwing and monitoring of the exception, and restore the environment variables before the exception by rolling back the stack.

[0004] However, implementing the processing of created instances through stack rollback may result in a low resource release rate, which may easily lead to resource waste. Summary of the invention

[0005] The present application provides a work order exception processing method, device, server and storage medium to solve the technical problem of low resource release efficiency of created exception instances in the prior art, which leads to waste of resources.

[0006] In a first aspect, the present application provides a method for handling work order exceptions, comprising:

[0007] When the resource creation of a work order is abnormal, an exception handling event is published, and the work order resources that have been successfully created and the resource quantity of the work order resources are obtained from the resource list;

[0008] When the number of resources is greater than or equal to 1, the work order status in the work order list is changed to pending cleanup, and the work order resources are deleted according to the resource list;

[0009] When the number of resources is 0, the work order status of the work order list is changed to pending retry, and the work order resources of the work order are recreated.

[0010] Optionally, delete the work order resources according to the resource list, including:

[0011] Publish the event of starting cleanup and change the status of the work order in the work order list to being cleaned up;

[0012] For each work order resource, a resource cleanup event is published and the record corresponding to the resource number of the work order resource is deleted.

[0013] Optionally, the method further comprises:

[0014] When all the work order resources of the work order in the resource list are deleted successfully, a cleanup success event is published, and the work order status in the work order list is changed to pending restart.

[0015] When the deletion of a work order resource with a work order in the resource list fails, a cleanup failure event is published, and the work order status in the work order list is changed to cleanup failure.

[0016] Optionally, before obtaining the resource for which the work order has been successfully created from the resource list, the method further includes:

[0017] Get the work order, publish the start processing event, save the work order information to the work order list, and change the work order status in the work order list to being executed;

[0018] Create work order resources for each work order one by one according to the work order, and publish a resource creation event when each work order resource is successfully created, and store the work order information of the work order and the resource information of the resource in the resource list;

[0019] The work order information at least includes the work order number, and the resource information at least includes the resource number.

[0020] Optionally, according to the work order, create work order resources for each work order, including:

[0021] According to the code arrangement of each work order resource, determine the creation method of the work order resource, which includes synchronous creation and asynchronous creation;

[0022] According to the creation method of the work order resource, call the interface corresponding to the work order resource to create the work order resource;

[0023] Get the creation result of each work order resource, where the creation result includes creation success and creation failure.

[0024] Optionally, the method further comprises:

[0025] When all work order resources of the work order are created successfully, a processing success event is published and the work order status in the work order list is changed to success.

[0026] Optionally, before modifying the work order status of the work order list, the method further includes:

[0027] Query and verify the current status of the work order.

[0028] In a second aspect, the present application provides a work order exception processing device, comprising:

[0029] The acquisition module is used to publish and handle exception events when the resource creation of the work order is abnormal, and obtain the work order resources that have been successfully created and the resource quantity of the work order resources from the resource list;

[0030] The processing module is used to change the work order status in the work order list to pending cleanup when the number of resources is greater than or equal to 1, and delete the work order resources according to the resource list; when the number of resources is 0, change the work order status in the work order list to pending retry, and recreate the resources of the work order.

[0031] Optionally, the processing module is specifically configured to:

[0032] Publish the event of starting cleanup and change the status of the work order in the work order list to being cleaned up;

[0033] For each work order resource, a resource cleanup event is published and the record corresponding to the resource number of the work order resource is deleted.

[0034] Optionally, the processing module is further configured to:

[0035] When all work order resources in the resource list are deleted successfully, a cleanup success event is published, and the work order status in the work order list is changed to pending restart.

[0036] When there is a work order resource in the resource list that fails to be deleted, a cleanup failure event is published and the work order status in the work order list is changed to cleanup failure.

[0037] Optionally, the processing module is further configured to:

[0038] Get the work order, publish the start processing event, save the work order information to the work order list, and change the work order status in the work order list to being executed;

[0039] Create work order resources for each work order one by one according to the work order, and publish a resource creation event when each work order resource is successfully created, and store the work order information of the work order and the resource information of the resource in the resource list;

[0040] The work order information at least includes the work order number, and the resource information at least includes the resource number.

[0041] Optionally, the processing module is specifically configured to:

[0042] According to the code arrangement of each work order resource, determine the creation method of the work order resource, which includes synchronous creation and asynchronous creation;

[0043] According to the creation method of the work order resource, call the interface corresponding to the work order resource to create the work order resource.

[0044] Optionally, the processing module is further configured to:

[0045] When all work order resources of the work order are created successfully, a processing success event is published and the work order status in the work order list is changed to success.

[0046] Optionally, before modifying the work order status of the work order list, the method further includes:

[0047] Query and verify the current status of the work order.

[0048] In a third aspect, the present application provides a server, comprising: a processor, and a memory communicatively connected to the processor;

[0049] The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method in the first aspect and any possible design of the first aspect.

[0050] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the method in the first aspect and any possible design of the first aspect.

[0051] The work order exception processing method, device, server and storage medium provided in the present application create work order resources one by one according to the work order after obtaining the work order; when a work order resource is created abnormally, issue a processing exception event; according to the work order number, query the work order resources that have been successfully created for the work order in the resource list, and count the resource quantity of the work order resources; when the resource quantity is greater than or equal to 1, change the work order status in the work order list to pending cleanup; delete the work order resources according to the resource list; when the resource quantity is 0, change the work order status in the work order list to pending retry; and recreate the work order resources of the work order to improve resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0053] Figure 1 A schematic diagram of a work order service scenario provided in an embodiment of the present application;

[0054] Figure 2 A flowchart of a method for handling work order exceptions provided in one embodiment of the present application;

[0055] Figure 3 An example of abnormal handling of a work order provided in one embodiment of the present application;

[0056] Figure 4 A flowchart of a method for handling work order exceptions provided in one embodiment of the present application;

[0057] Figure 5 An example of abnormal handling of a work order provided in one embodiment of the present application;

[0058] Figure 6 A schematic diagram of the structure of a work order exception processing device provided in one embodiment of the present application;

[0059] Figure 7 A schematic diagram of the hardware structure of a server provided in one embodiment of the present application.

[0060] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0062] During the execution of a program, if an exception occurs in one of the steps, the entire process will fail. Exception closed loop refers to the recovery of program operations before the step where the exception occurs, the exception prompt, and the re-operation after the exception is repaired. At present, the common method is to throw an exception during program execution and monitor the program in real time. The server can be set with a threshold. When the monitoring value exceeds the threshold, it can be identified as a fault and an alarm is issued.

[0063] With the development of the cloud computing industry, customers have higher and higher requirements for the accuracy of cloud product activation. Among them, customers are most concerned about whether the instance to be created in the work order can be correctly activated. In order to ensure the correct execution of customer work orders, the exception closed loop process is introduced in the existing technology. At present, the main functions of the exception closed loop are to realize the throwing of exceptions, real-time monitoring, setting thresholds, alarm processing, etc. In addition, the existing exception closed loop can also realize the rollback of the stack through the virtual machine principle.

[0064] In the prior art, the main focus of the abnormal closed loop is to discover the abnormality and recover the abnormality. The prior art can prompt the operation and maintenance personnel to locate the problem in time through the alarm after the abnormality is discovered, thereby improving the user experience. The prior art can also recover the abnormality through rollback. However, the prior art mainly focuses on the recovery of environmental variables, and rarely pays attention to how to recycle the instances that have been created before the abnormality occurs. Especially for cloud computing related products, both customers and suppliers are more concerned about the creation of instance resources, rather than the release of abnormal instance resources.

[0065] In order to solve the above technical problems, the embodiment of the present application provides a method for handling work order exceptions. The method of the present application describes in detail how to recycle the instances created in the previous process after the exception is found. The process mainly includes two steps: publishing the abnormal instance arrangement and cleaning the abnormal instance arrangement. The implementation of the method reduces the occurrence of unknown instances and the occupation of resource space. Among them, the process of publishing the abnormal instance arrangement mainly involves publishing the start processing event after obtaining the work order; publishing the resource creation event after each resource is created; if an exception occurs in the resource creation, publishing the processing exception event; after all resources of the work order are successfully created, publishing the processing success event 4 events. Among them, after publishing the processing exception event, the server needs to clean up the abnormal instances that have been created. This process is the abnormal instance arrangement. The process mainly involves publishing the start cleaning event; if there are resources that have been created, the resource cleaning event; if the resource deletion of the work order is successful, the cleaning success event is published; if the resource deletion of the work order fails, the cleaning failure event 4 events are published.

[0066] The following is an introduction to exemplary application scenarios of the embodiments of the present application.

[0067] Figure 1 A schematic diagram of a work order service scenario provided by an embodiment of the present application is shown. Figure 1 As shown, the user can send a work order request to the server through the user terminal. The server can create an instance of the work order upon receiving the work order request. Each instance is equivalent to a work order resource. When all instances of the work order are created, the server can inform the user that the creation is successful.

[0068] In this application, the server is used as the execution subject to execute the work order exception handling method of the following embodiment. Specifically, the execution subject can be a hardware device of the server, or a software application implementing the following embodiment in the server, or a computer-readable storage medium installed with the software application implementing the following embodiment, or a code of the software application implementing the following embodiment.

[0069] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0070] Figure 2 A flowchart of a work order exception handling method provided by an embodiment of the present application is shown. Figure 1 Based on the embodiment shown, Figure 2 As shown, with the server as the execution subject, the method of this embodiment may include the following steps:

[0071] S101. When a work order resource creation exception occurs, publish a processing exception event, and obtain the work order resources for which the work order has been successfully created and the resource quantity of the work order resources that have been successfully created from the resource list.

[0072] In this embodiment, after obtaining the work order, the server can create work order resources one by one according to the work order. When a work order resource is created abnormally, the server can publish a processing abnormal event. Optionally, the work order resource creation abnormality at least includes the failure to create the work order resource. Optionally, the work order resource creation abnormality can also include that the creation time of the work order resource exceeds a threshold. Optionally, the work order resource creation abnormality can also include that the parameters of the work order resource are abnormal during the creation process. The server can determine the work order number of the current work order through the work order list. The server can query the work order resources that have been successfully created for the work order in the resource list based on the work order number. Among them, the resource list is used to record the work order resources that have been successfully created for the work order. The server can obtain the work order resources that have been successfully created for the work order from the resource list. The server can also obtain the resource quantity of the work order resources that have been successfully created for the work order from the resource list.

[0073] Optionally, the server sends an abnormal event to inform the technician that there is a work order creation failure. The technician can view the work order list on the display page and determine the work order in which the abnormality occurs. Optionally, the display page may also include a cleanup button. Optionally, the cleanup button is used by the technician to control the deletion and release of the work order resources that failed to be created. When the user clicks the cleanup button, the server can start to clean up the work order resources of the work order that failed to be created. Optionally, the display page of the work order list may include a first number of work orders. The first number of work orders may include a second number of work orders that failed to be created. Among them, the second number is less than or equal to the first number. The setting of the first number and the second number is only to distinguish the number of the two work orders. Optionally, the technician can directly click the cleanup button. The server will sequentially delete and release the work order resources of the second number of work orders that failed to be created. Optionally, the technician can select some or all of the work orders in the second number of work orders and click the cleanup button. The server will sequentially delete and release the work order resources of the selected work orders that failed to be created. Optionally, the server may sequentially obtain the work orders that failed to be created according to the order of the work orders in the work order list, and process the work orders that failed to be created one by one.

[0074] Optionally, when the server obtains a work order that failed to be created, the server can store the work order number of the work order in a thread variable (ThreadLocal) so that the thread corresponding to the work order number is the current thread. Optionally, when the thread corresponding to the work order is the current thread, the server queries the work order resources that have been successfully created for the work order and the resource quantity of the work order resources from the resource list.

[0075] Optionally, when the work order resource has not been cleared, the status of the work order resource in the work order list may be success. Optionally, when the server counts the work order resources of the work order, the work order resources with a status of success may be counted.

[0076] S102. When the number of resources is greater than or equal to 1, the work order status in the work order list is changed to pending cleanup, and the work order resources are deleted according to the resource list.

[0077] In this embodiment, the server can determine whether the number of resources is greater than or equal to 1. When the number of resources is greater than or equal to 1, it means that at least one work order resource of the work order has been successfully created. The server needs to delete these work order resources to release the resources of the instance that failed to be created. When the server determines that there are work order resources that have been successfully created, the work order status in the work order list can be modified to be cleared. The cleared status is used to indicate that there is at least one work order resource in the work order that failed to be created that needs to be cleared. The server can delete the work order resources corresponding to the work order one by one according to the resource list. Optionally, the work order status can be a column in the work order list.

[0078] In one example, the specific process of deleting a work order resource may include:

[0079] Step 1: Publish the start cleanup event and change the work order status in the work order list to cleanup in progress.

[0080] In this step, the server can publish a start cleanup event. The server can also change the work order status in the work order list to being cleaned up.

[0081] Step 2: For each work order resource, publish a resource cleanup event and delete the record corresponding to the resource number of the work order resource.

[0082] In this step, the server can sequentially obtain the work order resources of the work order from the resource list. When the server obtains a work order resource, the server can publish a resource cleanup event for the work order resource. Optionally, the server can obtain the work order resource from the resource list, and specifically obtain the resource number of the work order resource. Optionally, in order to distinguish resource cleanup events of different work order resources, the resource cleanup event may include the resource number of the cleaned work order resource. The server can delete the work order resource by deleting the record corresponding to the resource number of the work order resource. Optionally, the server can also delete the work order resource by releasing resources. For example, when the resource is a bandwidth resource, the server can delete the work order resource by releasing the bandwidth resource. After the deletion of the work order resource is completed, the bandwidth resource can be obtained by other instances. The other instance can be an instance of another work order. Alternatively, the other instance can also be another instance of the work order.

[0083] Optionally, when a work order resource is deleted, the server may record in the resource list that the status of the work order resource is deleted. Optionally, when a work order resource is cleaned up but the cleanup fails, the server may record in the resource list that the status of the work order resource is failed. Optionally, when the status of the work order resource is failed, the server may also record in the resource list the failure reason for the failure to delete the work order resource.

[0084] In one example, when all the work order resources of the work order in the resource list are deleted successfully, the server can publish a cleanup success event. The server can modify the work order status in the work order list to be restarted. The restart status is used to indicate that all the work order resources that have been created in the work order have been deleted, and the server can re-create the work order.

[0085] In another example, when at least one work order resource of the work order in the resource list fails to be deleted, the server can publish a cleanup failure event. The server can modify the work order status in the work order list to a cleanup failure. In the above-mentioned work order resource deletion process, the server deletes the work order resources of the work order one by one according to the resource list. When a work order resource fails to be deleted, the server records the result of the deletion failure. Optionally, in a deletion process, when a work order resource fails to be deleted, the server will not retry to delete the work order resource. The server will continue to delete the next work order resource. Optionally, in a deletion process, when a work order resource fails to be deleted, the server can try to delete the work order resource multiple times according to a preset number of retries. If the work order resource is successfully deleted within the number of retries, the server continues to delete other work order resources. If the work order resource is still not successfully deleted when the number of retries is exhausted, the server abandons the deletion of the work order resource and continues to delete other work order resources. Optionally, the server may generate a deletion failure reminder based on the resource information of the work order resource that failed to be deleted, so as to inform the technician that the deletion of the work order resource failed, and the technician may analyze the deletion failure of the work order resource.

[0086] In one example, each time the server modifies the work order status corresponding to a work order in the work order list, it needs to query and verify the current status of the work order. Specifically, the server can obtain the current status of the work order and compare the current status with the target status that needs to be modified. If the current status is consistent with the target status, it means that the work order is already in the target status. If the current status is inconsistent with the target status, it means that the work order status needs to be modified. Optionally, the server can also verify whether the jump of the work order from the current status to the target status is correct. Specifically, in this step, the target status can be to be cleared. In this embodiment, in order to reduce repetition and redundancy, the server no longer adds the query and verification process each time the work order status is modified, but in actual processing, the server will perform the query and verification process in this example each time the work order status is modified.

[0087] S103. When the number of resources is 0, the work order status of the work order list is changed to pending retry, and the work order resources of the work order are recreated.

[0088] In this embodiment, the server can determine whether the resource quantity is 0. Optionally, the server can determine whether the resource quantity is 0 after step S101. Optionally, the server can also determine whether the resource quantity is 0 after completing the execution of step S102 and re-acquiring the resource quantity. When the resource quantity is 0, it means that the work order resources of the work order have not been successfully created. At this time, the server can modify the work order status in the work order list to be retried. Among them, the work order status to be retried is used to indicate that the server can recreate an instance of the work order. Specifically, the server can achieve the re-creation of the work order by recreating the work order resources of the work order.

[0089] Optionally, since the number of resources is the work order resource with a successful status corresponding to the work order in the resource list, when the number of resources of the work order resource is 0, there may be a work order resource that failed to be deleted. Therefore, before the server modifies the work order status to pending retry, the server can obtain the number of work order resources with a failed status corresponding to the work order in the resource list. When the number is 0, the server can set the work order status of the work order in the work order list to pending retry. Otherwise, when the number is greater than or equal to 0, the server can obtain the resource number of the work order resource with a failed status. The server can generate failure notification information based on the work order number. Optionally, the server can also obtain the failure reason of the work order resource with a failed status from the resource list. The server can generate failure notification information based on the failure reason. The technician can repair the work order resource based on the failure notification information so that the work order resource can be deleted normally. Optionally, after completing the repair of all work order resources in the failure notification information, the technician can click the cleanup button to clean up the work order resources of the work order again.

[0090] The work order exception handling method provided in the present application is that the server can create work order resources one by one according to the work order after obtaining the work order. When a work order resource is created abnormally, the server can publish an exception event. The server can query the work order resources that have been successfully created for the work order in the resource list according to the work order number, and count the number of resources of the work order resources. When the number of resources is greater than or equal to 1, the server can modify the work order status in the work order list to be cleared. The server can also delete the work order resources according to the resource list. When the number of resources is 0, the server can modify the work order status of the work order list to be retried. The server can also recreate the work order resources of the work order. In the present application, by modifying the work order status in the list when the work order resource is created abnormally, the work order status is displayed, so that the technician can determine the creation of the work order according to the work order status. In the present application, by deleting the work order resources that have been created by the work order, the deletion and release of resources in the instance of the work order are realized, and the resource utilization rate is improved.

[0091] Based on the above embodiment, when the server determines that the number of work order resources that have been created by the work order is greater than or equal to 0, the server can delete these work order resources. Figure 3 As shown, taking the Server Load Balancer (SLB) as an example, it is assumed that the SLB work order specifically includes four steps that need to be created: creating the SLB itself, creating the ipv4 bandwidth, creating the ipv4 elastic public network IP (Elastic IP, EIP), and binding the ipv4 EIP to the SLB. This example assumes that the SLB work order fails at the step of binding the EIP to the SLB. In the above embodiment, the deletion process of the work order resources of the SLB work order can specifically include the following steps:

[0092] S201. When the technician checks the SLB work order list and finds that the work order status is to be cleaned up, he clicks the clean up button.

[0093] S202. The server saves the work order number of the SLB work order into a thread variable (ThreadLocal).

[0094] S203. The server may query the resource list for the work order resources and resource quantities that have been successfully created for the SLB work order according to the work order number.

[0095] S204. The server determines whether the resources of the work order are empty by judging whether the number of resources of the successfully created work order resources is 0. When the number of resources is 0, it means that the resources of the work order are empty, and the server executes step S220. Otherwise, when the number of resources is not 0, it means that the resources of the work order are not empty, and the server executes step S205. Assume that when the number of resources is not 0, the SLB work order can include 3 successfully created work order resources.

[0096] S205. If the resources of the work order are not empty, the resources need to be cleaned up according to the principle of cleaning up the resources created later first. Therefore, after this step, the server can continue to execute step S210 and start to clean up the work order resources. At the same time, the server also needs to continue to execute S206 and subsequent steps to complete the release of events and the modification of the work order status during the operation.

[0097] S206: When the server starts to clean up the work order resources, the server may publish a start cleanup event.

[0098] S207. The server may call the work order state machine processor and obtain the work order number through ThreadLocal.

[0099] S208. The server may query the work order status of the work order corresponding to the work order number through the resource processing state machine. The server may also verify the work order status. When the verification is successful, the server may continue to execute step S209. Otherwise, the server may end the operation corresponding to the work order.

[0100] S209. The server changes the work order status to being cleaned up.

[0101] S210. The server determines whether there are work order resources that need to be cleared based on the number of work order resources that have been created. If there are work order resources that need to be cleared, the server continues to execute step S211. Otherwise, the server jumps to step S214.

[0102] In this step, in the subsequent cleanup process, as the work order resources that have been created are deleted, the resource quantity will also be modified. It should be noted that the work order resources that need to be cleaned up in this step are work order resources that have not been cleaned up. After a work order resource executes the cleanup of step S211, regardless of whether the work order resource is successfully cleaned up, the work order resource is not counted as the work order resources that need to be cleaned up.

[0103] For example, the number of work order resources obtained by the server for the first time is 3. After the server completes the cleanup of work order resources 1 and 2, there are still work order resources that need to be cleaned up. When the server continues to clean up work order resource 3, all work order resources are cleaned up. Assume that the cleanup of work order resource 3 fails, at this time, all work order resources are still considered to have been cleaned up.

[0104] S211. The server performs a resource cleanup operation.

[0105] In this step, the server can clean up the work order resources one by one. Optionally, the server can continue to execute S212 and subsequent steps when executing the cleanup of each work order resource, and complete the release of events and the modification of the work order status during the operation. Optionally, after completing the cleanup of a work order resource, the server can jump to step S210 and make a judgment. Optionally, in the cleanup process of the work order resource, a time threshold can be preset in the server. When the cycle duration of the server executing steps S210 and S211 exceeds the time threshold, the deletion of the work order resource may fall into an infinite loop. Therefore, the server can end the cleanup of the work order resource and report an error. Optionally, after completing the cleanup of all work order resources, the server can jump to step S210 and make a judgment. Optionally, in the cleanup process of the work order resource, a number threshold can be preset in the server. When the server executes steps S210 and S211 in the process of deleting the work order resource of a work order, the number of cycles exceeds the number threshold, the deletion of the work order resource may fall into an infinite loop. Therefore, the server can end the cleanup of the work order resources and report an error.

[0106] S212: When the server starts to clean up the work order resources, the server may publish a resource cleanup event.

[0107] In this step, the server will publish a resource cleanup event when each work order resource is cleaned up. For example, the SLB work order includes 3 work order resources that have been successfully created. Therefore, the server will publish a total of 3 resource cleanup events.

[0108] S213. The server may call the work order state machine processor to logically delete the vm_create_resource_record record corresponding to the resource number.

[0109] In this step, the resource information of each work order resource may include a resource number. The resource number may be stored in the resource list. The server may delete the vm_create_resource_record record corresponding to each work order resource according to the resource number.

[0110] Optionally, after completing the deletion of this step, the server may also modify the status of the work order resource of the work order in the resource list to deletion according to the work order state machine processor.

[0111] S214: The server may determine whether all the created work order resources of the work order have been successfully cleared according to the clearing result of step S211. If all the work order resources have been successfully cleared, the server may jump to step S220. Otherwise, the server may execute step S215.

[0112] S215: If there is a resource cleanup failure during the resource cleanup process, the server may throw an exception. While throwing the exception, the server may continue to execute S216 and subsequent steps to complete the release of events and the modification of the work order status during the operation.

[0113] S216. When the server throws an exception, the server may publish a cleanup failure event.

[0114] S217. The server can call the work order state machine processor and obtain the work order number through ThreadLocal.

[0115] S218. The server may query the work order status of the work order corresponding to the work order number through the resource processing state machine. The server may also verify the work order status. When the verification is successful, the server may continue to execute step S209. Otherwise, the server may end the operation corresponding to the work order.

[0116] S219. The server changes the work order status to cleanup failure.

[0117] S220, the server completes the application and cleanup of the work order resources of the work order. At the same time, the server can continue to execute S221 and subsequent steps to complete the release of events and the modification of the work order status during the operation.

[0118] S221, when the server can publish a cleanup success event.

[0119] S222. The server can call the work order state machine processor and obtain the work order number through ThreadLocal.

[0120] S223. The server may query the work order status of the work order corresponding to the work order number through the resource processing state machine. The server may also verify the work order status. When the verification is successful, the server may continue to execute step S209. Otherwise, the server may end the operation corresponding to the work order.

[0121] S224. The server changes the work order status to clear successfully.

[0122] Figure 4 A flowchart of a work order exception handling method provided by an embodiment of the present application is shown. Figures 1 to 3 Based on the embodiment shown, Figure 3 As shown, with the server as the execution subject, the method of this embodiment may include the following steps:

[0123] S301, obtain a work order, publish a start processing event, save the work order information of the work order into a work order list, and modify the work order status of the work order list to be in progress. The work order information at least includes the work order number.

[0124] In this embodiment, the server can obtain a work order. The work order can be created by a user through a user terminal. Alternatively, the work order can also be created through a device such as a salesperson terminal, a business hall terminal, etc. After obtaining the work order, the server can publish a start processing event for the work order. The start processing event is used to indicate that the work order has begun to be created. The server can add the work order information of the work order to the work order list. The server can modify the work order status of the work order in the work order list to being executed. Among them, the work order information of the work order includes at least the work order number of the work order. The work order number.

[0125] S302: Create work order resources of the work order one by one according to the work order, and publish a resource creation event when each work order resource is successfully created, and store the work order information of the work order and the resource information of the resource in the resource list, wherein the resource information at least includes the resource number.

[0126] In this embodiment, the server can create the required work order resources in the work order one by one according to the work order. Optionally, the server can create an instance for each work order resource. The server can publish a successful creation event of the work order resource when a work order resource is successfully created. The successful creation event is used to indicate that the work order resource in the work order is successfully created. The server can save the resource information of the successfully created work order resource in the resource list. In order to facilitate the distinction between work order resources of different work orders, the resource list can also include work order information. Optionally, the work order information in the resource list includes at least the work order number of the work order. Among them, the resource information includes at least the resource number of the work order resource. Optionally, the resource number can be set according to the resource type, and the same resource can correspond to the same resource number. The server can uniquely determine a work order resource based on the combination of the work order number and the resource number. Optionally, the resource number can uniquely correspond to a work order resource.

[0127] In one example, the process of the server creating work order resources for the work orders one by one may specifically include:

[0128] Step 1: The server determines the creation method of the work order resource according to the code arrangement of each work order resource, and the creation method includes synchronous creation and asynchronous creation.

[0129] Step 2: The server calls the interface corresponding to the work order resource according to the creation method of the work order resource to create the work order resource.

[0130] Step 3: The server obtains the creation result of each work order resource, including creation success and creation failure.

[0131] In this step, the server can determine whether the work order resource is successfully created through the data returned by the interface. Optionally, the server can also be set with a time threshold. When the interface corresponding to the work order resource still does not feedback information after exceeding the time threshold, the server can determine that the creation result of the work order resource is a creation failure.

[0132] S303. When all work order resources of the work order are successfully created, a processing success event is published, and the work order status of the work order list is changed to success.

[0133] In this embodiment, the server may create work order resources sequentially. The server may publish a successful processing event when the creation of the last work order resource is completed. Optionally, since the interface corresponding to the work order resource is asynchronous, the event of the completion of the creation of the work order resource may be unrelated to the order of the work order resources in the work order. Therefore, a statistical variable may be set for each work order in the server. The server may add 1 to the statistical variable when a work order resource of the work order is completed. The server may use the statistical variable to determine whether all the work order resources of the work order have been created.

[0134] S304: When the resource creation of the work order is abnormal, publish a processing abnormal event, and obtain the work order resources that have been successfully created and the resource quantity of the work order resources from the resource list.

[0135] S305. When the number of resources is greater than or equal to 1, the work order status in the work order list is changed to pending cleanup, and the work order resources are deleted according to the resource list.

[0136] S306. When the number of resources is 0, the work order status of the work order list is changed to pending retry, and the resources of the work order are recreated.

[0137] Among them, steps S304 to S306 are Figure 2 The implementation of steps S101 to S103 in the embodiment is similar, and will not be repeated here in this embodiment.

[0138] The work order exception handling method provided in the present application can publish a start processing event after obtaining the work order. The server can save the work order information of the work order to the work order list, and modify the work order status of the work order list to be executed. Among them, the work order information includes at least the work order number. The server can create the work order resources of the work order one by one, and publish a resource creation event when each work order resource is successfully created. The server can store the work order information of the successfully created work order and the resource information of the resource to the resource list. Among them, the resource information includes at least the resource number. When all the work order resources of the work order are successfully created, the server can publish a successful processing event. The server can modify the work order status of the work order list to success. When the resource creation of the work order is abnormal, the server can publish a processing exception event, and the server can obtain the work order resources that have been successfully created for the work order and the resource quantity of the work order resources from the resource list. When the number of resources is greater than or equal to 1, the server can modify the work order status in the work order list to be cleared, and delete the work order resources according to the resource list. When the number of resources is 0, the server can modify the work order status of the work order list to be retried, and recreate the resources of the work order. In this application, by deleting the work order resources that have been successfully created, the work order resources are deleted and released, thereby improving resource utilization.

[0139] Based on the above embodiments, Figure 3 Take the SLB work order as an example. Figure 5 As shown in the figure, the execution process of the SLB work order may include:

[0140] S401. The server obtains an SLB work order request sent by other terminals.

[0141] S402: The server starts processing the work order. After the server starts processing the work order, the server can execute S406 and subsequent steps to complete operations such as modifying the work order status.

[0142] S403: The server may publish a start processing event.

[0143] S404. The server may save the work order information to ThreadLocal through the work order state machine processor.

[0144] S405. The server may modify the work order status of the work order in the work order list to being executed.

[0145] S406. The server can obtain work order information through ThreadLocal

[0146] S407. The server may insert a vm_operate_resource_params record.

[0147] In this step, the server can insert the work order information obtained in step S406 as a record into the work order list. Specifically, the work order information can be a row in the work order list. In this example, the table name of the work order list can be vm_operate_resource_params. Optionally, the work order list can be displayed on a display page. The technician can determine the status of the SLB work order through the display page to determine whether a retry or cleanup is required. Specifically, the server can save the work order information and the work order processing method information in the vm_operate_resource_params. The work order processing method information is used to implement reflective calls during the retry process of step S435.

[0148] S408: The server may determine whether it is necessary to create a work order resource. If it is necessary to create a work order resource, the server may continue to execute step S409. Otherwise, the server may jump to step S422 to determine whether an exception occurs during the synchronization process of resource creation.

[0149] S409: The server may determine whether the resource creation mode of the work order resource is synchronous creation or asynchronous creation. When the creation mode of the work order resource is synchronous, the server may continue to execute step S410. Otherwise, when the creation mode of the work order resource is asynchronous, the server may jump to step S415.

[0150] In this step, when there is a work order resource that needs to be created, the server can sequentially obtain a work order resource that needs to be created according to the work order. The server can determine whether the resource creation mode of the work order resource is synchronous creation or asynchronous creation according to the code arrangement.

[0151] S410: The server creates the work order resource.

[0152] S411, the work order resource is created successfully. At the same time, the server can execute step S412 and subsequent steps after the work order resource is created successfully to complete operations such as modifying the work order status. Optionally, the work order resource is created successfully including the synchronous creation success of step S410 and the asynchronous creation success of steps S415 to S419.

[0153] S412: The server issues a resource creation event. The resource creation event may include resource information of the currently created work order resource. The resource information may include at least a resource number.

[0154] S413. The server can obtain the work order information through the resource processing event processor through ThreadLocal.

[0155] S414. The server may write a record in vm_create_resource_record.

[0156] In this step, the server may insert the work order information obtained in step S413 as a record into the resource list. Specifically, the work order information may include the work order number. The server may also determine the work order resource currently being processed based on the work order information, and write the work order resource into the resource list. Specifically, the resource list may include the work order number, the resource number, and the resource destruction method information. Among them, the resource destruction method information is used to destroy the successfully created work order resource when the work order creation fails.

[0157] S415. The server saves the work order information to redis. Optionally, the server may save the resource information of the currently processed work order resource to redis.

[0158] S416. The message queue (MQ) of the server may send a request to create a resource. Optionally, the server may send the request to create a resource to Yunchang. Optionally, Yunchang may be a platform for asynchronously creating the work order resource.

[0159] S417: The server receives the MQ message. Optionally, the MQ message may be information related to the creation result of the work order resource fed back by Yunchang.

[0160] S418. The server obtains the work order information from redis so that the server can switch to the process corresponding to the work order and continue to execute it.

[0161] S419. The server saves the work order information to ThreadLocal.

[0162] S420: The server determines whether the work order resource is created successfully. If it is created successfully, the server jumps to step S411. Otherwise, the server executes step S421.

[0163] S421, the server may throw an exception when the creation is unsuccessful. If the server throws an exception, it is OK to jump to step S423.

[0164] S422. After no work order resources need to be created, the server can determine whether an exception occurs during the synchronous execution. If an exception occurs, the server executes step S423. Since the asynchronous exception has been thrown, if no exception occurs, it means that all work order resources of the work order are successfully created, and the server executes step S429.

[0165] S423, the server publishes a processing exception event. For example, in this example, when the server is processing an SLB work order, an exception occurs when creating an ipv4 EIP. At this time, the server will publish a processing exception event.

[0166] S424. The server can obtain the work order information through the work order status processor through ThreadLocal.

[0167] S425. The server may query the current state of the resource processing state machine.

[0168] S426. The server determines whether a work order resource has been created. Specifically, the server determines whether there is a work order resource that has been successfully created for the work order. If there is a work order resource that has been created, jump to step S427. Otherwise, if there is no work order resource that has been successfully created, jump to step S428.

[0169] S427. If there is a work order resource that has been successfully created, the server changes the work order status of the work order in the work order list to pending cleanup.

[0170] In this step, for example, before creating the ipv4 EIP, the server has completed the two steps of creating the SLB itself and creating the ipv4 bandwidth. Therefore, the server can change the status to pending cleanup. It should be noted that if the EIP instance that failed to create has returned the EIP's universally unique identifier (UUID), it means that the resources of the EIP instance have been successfully created, but the creation of the EIP instance ultimately failed due to other reasons such as network interruption. At this point, since the server has completed the return of the EIP's UUID, the server needs to publish a resource creation event before issuing a work order to handle the exception event to ensure that the EIP resource can be deleted during the resource deletion process.

[0171] S428. If there is a work order resource that has been successfully created, the server changes the work order status of the work order in the work order list to pending retry.

[0172] S429. The entire process of creating resources is executed successfully.

[0173] S430: The server may publish a processing success event.

[0174] S431. The server can obtain the work order information through the work order status processor and ThreadLocal.

[0175] S432. The server may query the current state of the resource processing state machine.

[0176] S433. The server changes the work order status of the work order in the work order list to success.

[0177] S434. When the work order status of the SLB work order in the work order list is pending retry, the server can obtain a retry instruction triggered by the technician clicking a retry button.

[0178] S435. The server may query information on the method for processing the SLB work order.

[0179] In this step, the method for processing the SLB work order may include information such as the work order resources that the SLB work order needs to process, the deletion or release method of each work order resource, etc. Optionally, the processing method information of the SLB work order can be stored in the work order list. Optionally, the processing method of each work order resource of the SLB work order can be stored in the resource list. Therefore, the server can obtain the processing method by querying the work order list and / or the resource list. After the server completes the query of the processing method of the SLB work order, the server can jump to step S402 to implement the reflection call.

[0180] Figure 6 A schematic diagram of the structure of a work order exception processing device provided in an embodiment of the present application is shown. Figure 6 As shown, the work order exception processing device 10 of this embodiment is used to implement the operation corresponding to the server in any of the above method embodiments. The work order exception processing device 10 of this embodiment includes:

[0181] The acquisition module 11 is used to publish and process the abnormal event when the resource creation of the work order is abnormal, and obtain the work order resources and the resource quantity of the work order resources that have been successfully created from the resource list;

[0182] Processing module 12 is used to change the work order status in the work order list to pending cleanup when the number of resources is greater than or equal to 1, and delete the work order resources according to the resource list; when the number of resources is 0, change the work order status in the work order list to pending retry, and recreate the resources of the work order.

[0183] Optionally, the processing module 12 is specifically configured to:

[0184] Publish the event of starting cleanup and change the status of the work order in the work order list to being cleaned up;

[0185] For each work order resource, a resource cleanup event is published and the record corresponding to the resource number of the work order resource is deleted.

[0186] Optionally, the processing module 12 is further configured to:

[0187] When all work order resources in the resource list are deleted successfully, a cleanup success event is published, and the work order status in the work order list is changed to pending restart.

[0188] When there is a work order resource in the resource list that fails to be deleted, a cleanup failure event is published and the work order status in the work order list is changed to cleanup failure.

[0189] Optionally, the processing module 12 is further configured to:

[0190] Get the work order, publish the start processing event, save the work order information to the work order list, and change the work order status in the work order list to being executed;

[0191] Create work order resources for each work order one by one according to the work order, and publish a resource creation event when each work order resource is successfully created, and store the work order information of the work order and the resource information of the resource in the resource list;

[0192] The work order information at least includes the work order number, and the resource information at least includes the resource number.

[0193] Optionally, the processing module 12 is specifically configured to:

[0194] According to the code arrangement of each work order resource, determine the creation method of the work order resource, which includes synchronous creation and asynchronous creation;

[0195] According to the creation method of the work order resource, call the interface corresponding to the work order resource to create the work order resource.

[0196] Optionally, the processing module 12 is further configured to:

[0197] When all work order resources of the work order are created successfully, a processing success event is published and the work order status in the work order list is changed to success.

[0198] Optionally, before modifying the work order status of the work order list, the method further includes:

[0199] Query and verify the current status of the work order.

[0200] The work order exception processing device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.

[0201] Figure 7 FIG. 1 shows a hardware structure diagram of a server provided in an embodiment of the present application. Figure 7 As shown, the server 20 is used to implement the operations corresponding to the server in any of the above method embodiments. The server 20 of this embodiment may include: a memory 21, a processor 22 and a communication interface 24.

[0202] The memory 21 is used to store computer-executable instructions. The memory 21 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk, or an optical disk.

[0203] The processor 22 is used to execute the computer execution instructions stored in the memory to implement the work order exception handling method in the above embodiment. For details, please refer to the relevant description in the above method embodiment. The processor 22 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0204] Optionally, the memory 21 may be independent or integrated with the processor 22 .

[0205] When the memory 21 is a device independent of the processor 22, the server 20 may further include a bus 23. The bus 23 is used to connect the memory 21 and the processor 22. The bus 23 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0206] The communication interface 24 may be connected to the processor 21 via the bus 23. The processor 22 may control the communication interface 24 to implement communication with other terminals.

[0207] The server provided in this embodiment can be used to execute the above-mentioned work order exception handling method, and its implementation method and technical effect are similar, which will not be repeated in this embodiment.

[0208] The present application also provides a computer-readable storage medium, in which a computer execution program is stored. When the computer execution program is executed by a processor, it is used to implement the methods provided in the various embodiments described above.

[0209] Among them, the computer-readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a computer-readable storage medium is coupled to a processor so that the processor can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can be located in an application-specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the computer-readable storage medium can also exist in a communication device as discrete components.

[0210] Specifically, the computer-readable storage medium 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 storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0211] The present application also provides a computer program product, which includes a computer execution program, and the computer execution program is stored in a computer-readable storage medium. At least one processor of the device can read the computer execution program from the computer-readable storage medium, and at least one processor executes the computer execution program so that the device implements the methods provided in the various embodiments described above.

[0212] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0213] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0214] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0215] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0216] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0217] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0218] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0219] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0220] It should be understood that the present application is not limited to the precise 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 application is limited only by the appended claims.

Claims

1. A method for handling work order exceptions, characterized in that: The method comprises: When the resource creation of the work order is abnormal, publish and handle the abnormal event, and obtain the work order resources that have been successfully created for the work order and the resource quantity of the work order resources from the resource list; When the number of resources is greater than or equal to 1, the work order status corresponding to the work order in the work order list is changed to pending cleanup, and the work order resources are deleted according to the resource list; When the resource quantity is 0, the work order status of the work order list is modified to pending retry, and the work order resources of the work order are recreated.

2. The method according to claim 1, characterized in that Deleting the work order resource according to the resource list specifically includes: Publish a start cleanup event, and modify the work order status in the work order list to be cleaned up; For each of the work order resources, a resource cleanup event is issued, and the record corresponding to the resource number of the work order resource is deleted.

3. The method according to claim 2, characterized in that The method further comprises: When all the work order resources of the work order in the resource list are deleted successfully, a cleanup success event is published, and the work order status in the work order list is modified to pending restart; When the deletion of the work order resource of the work order in the resource list fails, a cleanup failure event is issued, and the work order status in the work order list is modified to cleanup failure.

4. The method according to any one of claims 1 to 3, characterized in that Before obtaining the resource for which the work order has been successfully created from the resource list, the method further includes: Obtain a work order, publish a start processing event, save the work order information of the work order into a work order list, and change the work order status of the work order list to being executed; According to the work order, the work order resources of the work order are created one by one, and when each of the work order resources is successfully created, a resource creation event is issued, and the work order information of the work order and the resource information of the resource are stored in a resource list; The work order information at least includes the work order number, and the resource information at least includes the resource number.

5. The method according to claim 4, characterized in that The step of creating work order resources of the work orders one by one according to the work orders specifically includes: Determine, according to the code arrangement of each of the work order resources, a creation method of the work order resource, wherein the creation method includes synchronous creation and asynchronous creation; According to the creation method of the work order resource, calling the interface corresponding to the work order resource to create the work order resource; The creation result of each of the work order resources is obtained, wherein the creation result includes creation success and creation failure.

6. The method according to claim 5, characterized in that The method further comprises: When all the work order resources of the work order are created successfully, a processing success event is published, and the work order status of the work order list is modified to success.

7. The method according to any one of claims 1 to 3, characterized in that Before modifying the work order status of the work order list, the method further includes: Query and verify the current status of the work order.

8. A work order exception processing device, characterized in that: include: An acquisition module is used to publish and process an exception event when a resource creation exception occurs in a work order, and to obtain the work order resources for which the work order has been successfully created and the resource quantity of the work order resources from a resource list; A processing module is used to modify the work order status in the work order list to be cleared when the number of resources is greater than or equal to 1, and delete the work order resources according to the resource list; when the number of resources is 0, modify the work order status in the work order list to be retried, and recreate the resources of the work order.

9. A server, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Method and system for resource preprocessing in dispatching and deployment performing process of virtual machine

    CN102946413A

  • Creating method and device of service chain, server and storage medium

    CN108199889A

  • Service processing method and device based on container technology, and computer equipment

    CN110955492A

  • Information rollback method and system, electronic equipment and storage medium

    CN113781154A

  • Object-Oriented Thread Abort Mechanism for Real Time C++ Software

    US20100031260A1