Service scheduling method and device, equipment and storage medium

By employing a checkpoint-based service fault tolerance/reuse mechanism and a multi-level caching strategy, the inefficiency of microservice autonomy and service integration solutions is addressed, achieving resource conservation and accelerated service processing.

CN120020718BActive Publication Date: 2026-01-09BEIJING DUYOU INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311542563.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2026-01-09
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

Existing microservice autonomy solutions waste bandwidth and resources and increase service latency, while service integration solutions are limited by hardware, resulting in inefficient service scheduling.

Method used

A checkpoint-based service fault tolerance/reuse mechanism is adopted, which uses a multi-level cache progressive invalidation strategy and unified coordination of the service scheduling layer to accelerate the processing of idempotent services.

Benefits of technology

Maximize resource conservation, reduce service time, and improve the efficiency of service processing, especially for time-consuming services, by significantly accelerating the service processing flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020718B_ABST
    Figure CN120020718B_ABST
Patent Text Reader

Abstract

The present disclosure provides a service scheduling method and device, equipment and storage medium, relates to the technical field of computer application, specifically relates to the technical field of cloud computing, data storage, data detection and the like, and can be applied to the scene of scheduling multiple services, and a specific implementation scheme comprises: receiving input data and at least one adjustment parameter of a user; obtaining a data detection result of the input data; judging whether each adjustment parameter exists in a first checkpoint in turn; when the adjustment parameter exists in the first checkpoint, outputting an adjustment result corresponding to the adjustment parameter; when the adjustment parameter does not exist in the first checkpoint, adjusting the data detection result through a first operator corresponding to the adjustment parameter, and outputting an adjustment result corresponding to the adjustment parameter. The present disclosure can perform service fault tolerance / reuse mechanism based on the checkpoint, and can greatly accelerate the service processing flow for idempotent services, especially for services with long time consumption.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer application, in particular to the technical fields of cloud computing, data storage, data detection, etc., and can be applied to the scenario of scheduling multiple services, and particularly relates to a service scheduling method and device, equipment and storage medium. BACKGROUND

[0002] With the continuous development of computer information processing technology, a large number of information processing systems need to schedule multiple services.

[0003] Currently, there are two solutions for multi-service scheduling. One is micro-service autonomy, and the other is service integration.

[0004] However, the current micro-service autonomy solution wastes bandwidth and resources and increases service time consumption. The service integration solution is limited by hardware. SUMMARY

[0005] The present disclosure provides a service scheduling method, device, equipment and storage medium, which can perform service fault tolerance / reuse mechanism based on checkpoints, and can greatly accelerate the service processing flow for idempotent services, especially for services with longer time consumption.

[0006] According to a first aspect of the present disclosure, a service scheduling method is provided, the method comprising:

[0007] receiving input data and at least one adjustment parameter of a user; obtaining a data detection result of the input data; sequentially determining whether each adjustment parameter exists in a first checkpoint; when the adjustment parameter exists in the first checkpoint, outputting an adjustment result corresponding to the adjustment parameter; when the adjustment parameter does not exist in the first checkpoint, adjusting the data detection result through a first operator corresponding to the adjustment parameter, and outputting an adjustment result corresponding to the adjustment parameter, the first operator being configured to output an adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

[0008] According to a second aspect of the present disclosure, a service scheduling device is provided, the device comprising a receiving unit, an obtaining unit, a determining unit and an outputting unit.

[0009] The receiving unit is configured to receive input data and at least one adjustment parameter of a user.

[0010] The obtaining unit is configured to obtain a data detection result of the input data.

[0011] The determining unit is configured to sequentially determine whether each adjustment parameter exists in a first checkpoint.

[0012] The outputting unit is configured to output an adjustment result corresponding to the adjustment parameter when the adjustment parameter exists in the first checkpoint.

[0013] The output unit is further configured to, when the adjustment parameter does not exist in the first checkpoint, adjust the data detection result by a first operator corresponding to the adjustment parameter, and output an adjustment result corresponding to the adjustment parameter, the first operator being configured to output the adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

[0014] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.

[0015] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, the computer instructions being used to enable a computer to perform the method according to the first aspect.

[0016] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, the computer program being used to implement the method according to the first aspect when executed by a processor.

[0017] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:

[0019] Figure 1 A flowchart of a service scheduling method provided by an embodiment of the present disclosure is shown;

[0020] Figure 2 A flowchart of a service scheduling method provided by an embodiment of the present disclosure is shown; Figure 1 An implementation flowchart of S102 in the method is shown;

[0021] Figure 3 Another flowchart of a service scheduling method provided by an embodiment of the present disclosure is shown;

[0022] Figure 4 A flowchart of a service scheduling method provided by an embodiment of the present disclosure is shown; Figure 1 Another implementation flowchart of S102 in the method is shown;

[0023] Figure 5 A composition diagram of a service scheduling device provided by an embodiment of the present disclosure is shown;

[0024] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is provided for embodiments of the present disclosure. DETAILED DESCRIPTION

[0025] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of embodiments of the present disclosure to assist in understanding them. These should be considered in a descriptive sense only and not limiting. Therefore, it will be readily understood by those of ordinary skill in the art that various changes in form and details can be made therein without departing from the scope and spirit of the present disclosure. Also, in the following description, descriptions of well-known functions and constructions are omitted for clarity and conciseness.

[0026] It should be understood that, in the embodiments of the present disclosure, the character " / " generally represents that the associated objects before and after are in an "or" relationship. The terms "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0027] With the continuous development of computer information processing technology, a large number of information processing systems need to schedule multiple services.

[0028] Currently, there are two solutions for multi-service scheduling. One is micro-service autonomy, and the other is service integration.

[0029] However, the current micro-service autonomy solution wastes bandwidth and resources and increases service time consumption. The service integration solution is limited by hardware.

[0030] Exemplarily, for the existing multi-service scheduling, there are two solutions: micro-service autonomy and service integration. Micro-service autonomy refers to the provider of a single service providing its own independent service, taking small autonomy as an essential feature, decomposing monolithic application services into independent service units, decoupling system function modules, and facilitating service upgrade, elastic expansion, and service reuse. Micro-service autonomy will cause data flow to be repeatedly transmitted between serial services, wasting bandwidth and resources, and causing linear growth of transmission time consumption, increasing service time consumption. If a certain link in the serial service fails, the user needs to reinitiate the request, and the service serial starts to transmit data processing from the beginning.

[0031] Service integration is a technology that integrates multiple different services together to provide a more complete solution. It can combine different services into a single service and access and manage it through an interface. This technology can make enterprises more efficient in managing and integrating various services, thereby improving the efficiency and effectiveness of business processes. In order to solve the problem of long time-consuming in the process of streaming data transmission, the first thought is always to transmit the data only once, process the data within the same service, and then return it to the user. This solution is simple and crude, but has a fatal flaw. With too high a degree of service integration, vertical expansion becomes a bottleneck and a problem that must be solved. Hardware limits the high degree of integration.

[0032] In this background art, the present disclosure provides a service scheduling method, which can perform service fault tolerance / reuse mechanism based on checkpoints. For idempotent services, especially services with long time consumption, the service processing flow can be greatly accelerated.

[0033] Exemplarily, the execution subject of the service scheduling method can be a computer or a server, or can also be other devices with data processing capability. The execution subject of the method is not limited herein.

[0034] In some embodiments, the server can be a single server, or can also be a server cluster composed of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. The specific implementation of the server is not limited in the present disclosure.

[0035] Figure 1 The flowchart of the service scheduling method provided by the embodiments of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the method can include S101-S105. Figure 1

[0036] S101, receiving input data and at least one adjustment parameter of a user.

[0037] Exemplarily, taking the user using photo editing software to edit the photo as an example, the input data of the user can include the original photo taken by the user, and the adjustment parameter can include beautification parameters such as acne and mole parameters, intelligent white balance parameters, sharpening parameters, slim face parameters, and intelligent color brightening parameters.

[0038] S102, obtaining a data detection result of the input data.

[0039] Exemplarily, after receiving the input data of the user, the input data can be input into the operator corresponding to the input data, and the input data is detected by the operator corresponding to the input data to obtain the data detection result corresponding to the input data.

[0040] ​S103, sequentially determine whether each adjustment parameter exists in the first checkpoint.

[0041] Exemplarily, the first checkpoint can be understood as a region that caches data corresponding to each operation before the current operation, for example, taking the user using photo editing software to edit photos as an example, the data can include each adjustment parameter, the operation can be understood as determining whether each adjustment parameter exists in the first checkpoint, and the region can be understood as a region on the memory of a terminal device running the photo editing software. The first checkpoint and the first checkpoint can be different regions of the same cache. The first checkpoint can also be referred to as a cache, or a data storage area, etc., which is not limited herein. The adjustment parameter can be compared with the data in the first checkpoint to determine whether the first checkpoint contains at least one adjustment parameter input by the user.

[0042] Based on the above embodiment, exemplarily, taking the user using photo editing software to edit photos as an example, the scheduling service divides the scheduling stage into two stages: a detection stage and a beautification stage. In the beautification stage, the operator can only request in series, and the time consumption will increase linearly with the number of capabilities, and can be deployed centrally. The adjustment parameters in the beautification stage can include spot and mole parameters, intelligent white balance parameters, sharpening parameters, face slimming parameters, intelligent color brightening parameters, etc. It can be determined in turn whether each adjustment parameter is cached in the photo editing software, i.e., whether each adjustment parameter exists in the first checkpoint.

[0043] S104, when the first checkpoint contains the adjustment parameter, output the adjustment result corresponding to the adjustment parameter.

[0044] Exemplarily, the state of the adjustment parameter can be read in the first checkpoint, and the state of the adjustment parameter is divided into state available and state empty. When the state of the adjustment parameter is read as available, it means that the first checkpoint contains the adjustment parameter, and the adjustment parameter can be offset, i.e., the adjustment result corresponding to the adjustment parameter is obtained and output, and then the next adjustment parameter in the first checkpoint is determined whether it is cached, until all adjustment parameters are determined.

[0045] Based on the above embodiment, exemplarily, when the face slimming parameter input by the user is 20%, the state of the face slimming parameter of 20% can be read in the first checkpoint. When the state of the face slimming parameter of 20% is read as available, it means that the first checkpoint contains the adjustment parameter of the face slimming parameter of 20%, and the adjustment parameter of the face slimming parameter of 20% can be offset, i.e., the result corresponding to the face slimming parameter of 20% is obtained and output.

[0046] S105, when the first checkpoint does not contain the adjustment parameter, the data detection result is adjusted by the first operator corresponding to the adjustment parameter, and the adjustment result corresponding to the adjustment parameter is output.

[0047] The first operator is configured to output an adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

[0048] For example, the state of the adjustment parameter can be read in the first checkpoint. The state of the adjustment parameter is divided into a state available and a state empty. When the state of the adjustment parameter is read as empty, it indicates that the adjustment parameter does not exist in the first checkpoint. The data detection result can be adjusted according to the adjustment parameter by using the first operator corresponding to the adjustment parameter, so as to obtain the adjustment result corresponding to the adjustment parameter, and the adjustment result corresponding to the adjustment parameter is output. Then, it is determined whether the next adjustment parameter is cached in the first checkpoint until all adjustment parameters are determined.

[0049] For example, when the user inputs a face slimming parameter of 20%, the state of the face slimming parameter of 20% can be read in the first checkpoint. When the state of the face slimming parameter of 20% is read as empty, it indicates that the face slimming parameter of 20% does not exist in the first checkpoint. The data detection result can be adjusted according to the face slimming parameter of 20% by using the first operator corresponding to the face slimming parameter, so as to obtain the face contour after face slimming of 20%, that is, the adjustment result corresponding to the face slimming parameter of 20%, and the adjustment result is output. The data detection result can include the face contour, the position of the facial features on the face, the skin beautification data corresponding to the face, and the like.

[0050] The present disclosure receives input data and at least one adjustment parameter of a user, obtains a data detection result of the input data, and then determines whether each adjustment parameter exists in the first checkpoint. When the adjustment parameter exists in the first checkpoint, the adjustment result corresponding to the adjustment parameter is output. When the adjustment parameter does not exist in the first checkpoint, the data detection result is adjusted by using the first operator corresponding to the adjustment parameter, and the adjustment result corresponding to the adjustment parameter is output. The multi-level cache gradually invalidation strategy is adopted to maximize the resource saving and minimize the service time consumption. Based on the checkpoint, the service fault tolerance / reuse mechanism is used to greatly speed up the service processing flow for idempotent services, especially for services with long time consumption. In addition, the present disclosure splits the large operator service into modules, and then coordinates and schedules the modules by using the scheduling layer, so that the scheduling program can freely combine different resources, data interfaces, and operators.

[0051] Figure 2 The present disclosure provides Figure 1 an implementation flowchart of S102 in the present disclosure. As shown in Figure 2 ,S102 in the present disclosure can include S201-S203. Figure 1

[0052] S201. The input data is checked according to the second checkpoint.

[0053] S202. When input data exists at the second checkpoint, determine the data detection result corresponding to the input data.

[0054] For example, the status of the input data can be read at the second checkpoint. The status of the input data is divided into an available status and an empty status. When the status of the input data is read as available, it means that there is input data at the second checkpoint, and the data detection result corresponding to the input data can be obtained and output.

[0055] Based on the above embodiments, for example, taking a user using photo editing software to edit a photo, when the data input by the user is the original photo... Figure 1 At that time, the original data can be read at the second checkpoint. Figure 1 The state when the original is read Figure 1 When the status is available, it means that the original exists in the second checkpoint. Figure 1 This input data can be used to obtain the original... Figure 1 The corresponding data detection results are output, including the original data. Figure 1 The corresponding data detection results may include the original Figure 1 The facial contours in the original Figure 1 The position and origin of the facial features of a medium-sized human face Figure 2 Data such as skin beautification for human faces.

[0056] S203. When there is no input data in the second checkpoint, the input data is detected by the second operator corresponding to the input data to obtain the data detection result corresponding to the input data.

[0057] For example, when the state of the input data is empty, it means that there is no input data in the second checkpoint. The input data can be detected by the second operator corresponding to the input data to obtain the data detection result corresponding to the input data. The second operator is used to output the data detection result corresponding to the input data based on the input data.

[0058] Based on the above embodiments, taking, for example, a user using photo editing software to edit a photo, the scheduling service divides the scheduling phase into two stages: a detection stage and a beautification stage. The detection stage requires original image detection, which can be performed in parallel. The detection service can package a software development kit (SDK) for the photo editing scenario, saving computing resources. If this part of concurrent detection is deployed separately, it only increases the service network bandwidth, and the time consumption theoretically will not increase linearly. When the user inputs the original image... Figure 2 At that time, the original data can be read at the second checkpoint. Figure 2 The state when the original is readFigure 2 When the state is empty, it means that the original [condition] does not exist in the second checkpoint. Figure 2 This input data can be processed by the second operator on the original... Figure 2 Tests were conducted to obtain the original... Figure 2 The facial contours in the original Figure 2 The position and origin of the facial features of a medium-sized human face Figure 2 Data such as skin beautification corresponding to the human face. The second operator is applied to the original... Figure 2 Testing can include the original Figure 2 Human contour detection is performed to obtain human contour data, and the original... Figure 2 Skin beautification detection is performed to obtain skin beautification data. Human contour data is then aggregated with the skin beautification data to obtain the original... Figure 3 The corresponding data detection results. It is also possible to analyze the original... Figure 3 Integrated detection (including face detection, portrait instance segmentation, skin segmentation, etc.) is performed to obtain integrated detection data, i.e., data detection results.

[0059] This embodiment detects input data based on a second checkpoint. When input data exists at the second checkpoint, the corresponding data detection result is determined. When no input data exists at the second checkpoint, the input data is detected using the second operator corresponding to the input data to obtain the corresponding data detection result. Based on a pre-processing mechanism, all data requiring prior preparation can be pre-processed and cached. For cached data, the corresponding data detection results can be directly reused, allowing the service to focus solely on user-input data without repeatedly processing and updating externally dependent auxiliary data, significantly accelerating the service processing flow.

[0060] Figure 4 Another flowchart illustrating the service scheduling method provided in this embodiment of the disclosure is shown below. Figure 1 As shown, the method may include S301-S302.

[0061] S301. Obtain the validity period of the target checkpoint.

[0062] For example, an expiration date can be set for a target checkpoint, which may include a first checkpoint and / or a second checkpoint. It is understood that an expiration date can be set only for the first checkpoint, only for the second checkpoint, or for both the first and second checkpoints.

[0063] For example, the validity period of the target checkpoint is related to a data use scenario of the target checkpoint; the data use scenario includes a global scenario and a process scenario, the validity period of the target checkpoint in the global scenario is different from the validity period of the target checkpoint in the process scenario, the validity period of the target checkpoint can be set according to different actual data use scenarios, the continuity of business and the integrity of data are ensured, data loss and repeated work are avoided, and operation efficiency and workflow continuity are improved.

[0064] Based on the above embodiment, for example, when the data use scenario of the first checkpoint is the global scenario, the first checkpoint can include a first global checkpoint; when the data use scenario of the first checkpoint is the process scenario, the first checkpoint can include a first process checkpoint. There is repeated data in the input data stream, and it is intended to deduplicate the repeated data, and it is necessary to record which data has flowed into the application. When new data flows in, it is determined whether the new data has flowed into the application according to the data that has flowed in. If the new data has flowed into the application, the result corresponding to the new data is directly and quickly returned, which can be referred to as the first global checkpoint. For the first global checkpoint, the validity period can be set to 8 hours. For such a cache, the hit probability is small, and it is commonly used for retry and recovery after system network exception, and for repeated operation of preprocessing or offset scheduling of adjusting parameters. It is necessary to cache the previously flowed-in elements in the form of state to check whether the input stream conforms to a certain specific mode. For example, it is determined whether the face data in a picture data stream can be used, which can be referred to as the first process checkpoint. For the first process checkpoint, the validity period can be set to 3 days. For such a cache, the hit probability is large, and it is commonly used for detection data cache and adjustment parameter reuse. Similarly, the second checkpoint can include a second global checkpoint and a second process checkpoint. The method for setting the validity period of the second global checkpoint and the second process checkpoint can refer to the method for setting the validity period of the first global checkpoint and the first process checkpoint, which will not be described herein again.

[0065] S302, when the validity period of the target checkpoint expires, deleting the target checkpoint.

[0066] For example, when the validity period of the target checkpoint is 8 hours, the target checkpoint can be deleted after the target checkpoint is established for 8 hours.

[0067] The embodiment can clean up invalid data in time, improve data processing efficiency, and further reduce service time consumption by acquiring the validity period of the target checkpoint and deleting the target checkpoint when the validity period of the target checkpoint expires.

[0068] In some embodiments, the method further includes, when the task is abnormal, resuming the task according to the first checkpoint or the second checkpoint.

[0069] Exemplarily, the checkpoint is a core mechanism of the scheduling layer fault tolerance / multiplexing. The scheduling layer can store a snapshot of data processed by an operator of each device and machine. In most cases, the checkpoint mechanism can be used to accelerate the service response; if the program is down, the processing data can be recovered from the snapshot.

[0070] Exemplarily, when the task is abnormal, and the checkpoint corresponding to the abnormal task is the first checkpoint, the first checkpoint can be read, and the state and execution of the error task are restored to the first checkpoint.

[0071] In the embodiment, when the task is abnormal, the task is resumed according to the first checkpoint or the second checkpoint, which can reduce the time of repeatedly executing the task and improve the efficiency of executing the task.

[0072] In some embodiments, when the adjustment parameter does not exist in the first checkpoint, after the processing result is adjusted by the operator corresponding to the adjustment parameter to obtain the adjustment result corresponding to the adjustment parameter, the method further includes: asynchronously storing the adjustment result corresponding to the adjustment parameter.

[0073] Exemplarily, after obtaining the adjustment result corresponding to the adjustment parameter, the adjustment result is output and stored asynchronously at the same time, that is, the checkpoint of the adjustment result is established, and it can also be understood that the adjustment result is cached in the state backend. At present, the state backend is divided into two kinds, Redis and BOS. Redis stores structured data (for example, detection data, which can include face contour, position of facial features in face, etc.), and BOS stores stream data (for example, pictures taken). Redis StateBackend can store structured data, and all detection sequences can be serialized and stored in the cloud cache folder (cloudcache) of the network disk. BosStateBackend is based on file system storage, which can be understood as a distributed file system. It should be noted that although BosStateBackend is selected, the data being processed is still stored in the memory of the operator, and only when the checkpoint is reached, the state snapshot is written to the specified file system.

[0074] The embodiment separates the saving of the first checkpoint and the data processing by asynchronously storing the adjustment result corresponding to the adjustment parameter, does not suspend the whole application, guarantees the normal running of the program, and directly outputs the corresponding result for the same data in the next data processing, thereby accelerating the service processing flow.

[0075] In some embodiments, when the input data does not exist in the second checkpoint, the method further includes: after processing the input data by the operator corresponding to the input data to obtain a processing result corresponding to the input data, asynchronously storing the processing result corresponding to the input data.

[0076] Exemplarily, the specific method of asynchronously storing the processing result corresponding to the input data can refer to the method of asynchronously storing the adjustment result corresponding to the adjustment parameter, which will not be described herein.

[0077] The embodiment separates the saving of the second checkpoint and the data processing by asynchronously storing the processing result corresponding to the input data, does not suspend the whole application, guarantees the normal running of the program, and directly outputs the corresponding result for the same data in the next data processing, thereby accelerating the service processing flow.

[0078] In some embodiments, the method further includes: selecting the level of consistency as exactly once.

[0079] Exemplarily, the checkpoint is a core mechanism of the scheduling layer fault tolerance / multiplexing. The scheduling layer stores snapshot of data processed by an operator of each device and machine. In most cases, the checkpoint mechanism can be used to accelerate service response; if a program crashes, the data processing can be recovered from the snapshot. Fault tolerance and consistency are two important concepts in distributed systems, and there is a close relationship between them. Fault tolerance refers to the ability of a distributed system to continue normal operation when a fault occurs, ensuring the reliability and stability of the system. Fault tolerance mechanisms include fault detection, fault recovery, and fault handling. Consistency refers to the consistent state of data in different nodes in a distributed system. For different access requests for the same data, the system should give the same result, that is, the correctness of the result obtained after successfully handling the fault and recovering is compared with the result obtained without any fault. In other words, whether the occurrence of the fault affects the result. The relationship between fault tolerance and consistency is that a system with good fault tolerance can handle node failures, network partitions, and other problems without affecting consistency, thereby ensuring high availability and high reliability of the system. At the same time, a system that guarantees consistency also needs to have certain fault tolerance capabilities, so that the system can correctly handle requests when a fault occurs, thereby ensuring the consistency of data. Consistency is divided into three levels: at-most-once: at most once, indicating that the calculation result may be lost after a fault occurs, that is, the correctness of the result cannot be guaranteed. At-least-once: at least once, indicating that the calculation result may be greater than the correct value, but will never be less than the correct value, that is, the calculation program may be over-calculated after a fault occurs, but will never be under-calculated. Exactly-once: exactly once, indicating that the system guarantees that the value of the calculation result obtained after a fault occurs is consistent with the correct value.

[0080] In this embodiment, by selecting the consistency level as exactly once, it can be guaranteed that the value of the calculation result obtained after a fault occurs is consistent with the correct value, avoiding errors and reducing resource consumption.

[0081] In some embodiments, the above method further includes creating a savepoint.

[0082] The savepoint is data that needs to be cached inside the third operator, and the third operator is any first operator or any second operator.

[0083] Exemplarily, the scheduler provides a save function that can be customized, that is, a save point. In principle, the algorithm used to create a save point is completely the same as that of a checkpoint, the difference is that the checkpoint is used and maintained by the scheduling layer, and the save point is the data that needs to be cached inside the operator, which returns this part of data to the scheduler, and the scheduler returns it to the operator in the original way, and the operator decides how to use it. The structure is that the object with the json object key persist in the data structure returned by the operator to the scheduling layer, and the value of the object will be cached by the scheduling service.

[0084] Based on the above embodiment, exemplarily, taking the user using the retouching software to retouch as an example, after obtaining the adjustment result corresponding to the adjustment parameter, the adjustment result is output, and the adjustment result is also asynchronously stored, that is, a checkpoint of the adjustment result is established, and the adjustment result is a beautified picture. Meanwhile, a save point can be created, and data such as a face contour of an original picture and positions of facial features in the original picture are cached, and the data is returned to the scheduler, and the scheduler returns the data to the operator in the original way, and the operator decides how to use the data.

[0085] The embodiment can reuse the data in the save point by creating the save point, without processing and updating the data multiple times, and the service only focuses on user data, thereby further accelerating the service processing flow.

[0086] Figure 4 The method provided by the embodiment of the present disclosure Figure 1 Another implementation flowchart of S102 in the method. Figure 5 As shown in the figure, Figure 5 S102 can include S401-S402.

[0087] S401, input the first picture into the second operator.

[0088] S402, output a data detection result corresponding to the first picture by the second operator.

[0089] Exemplarily, the input data can include the first picture, and the first picture can be an original picture of a face photographed by a user. The second operator has the function of outputting a data detection result corresponding to the first picture according to the input first picture. The first picture is input into the second operator, and the second operator can detect the first picture and output a data detection result corresponding to the first picture.

[0090] The embodiment limits the input data to include the first picture, inputs the first picture into the second operator, and then outputs a data detection result corresponding to the first picture by the second operator, so that when the input data is the first picture, a data detection result corresponding to the first picture is output by the second operator, thereby providing data support for subsequent data processing.

[0091] In an exemplary embodiment, this disclosure also provides a service scheduling apparatus that can be used to implement the service scheduling method as described in the foregoing embodiments. Figure 5 A schematic diagram illustrating the composition of a service scheduling device provided in an embodiment of this disclosure. (See diagram below.) Figure 5 As shown, the device may include: a receiving unit 501, an acquisition unit 502, a judgment unit 503, and an output unit 504.

[0092] The receiving unit 501 is used to receive user input data and at least one adjustment parameter.

[0093] The acquisition unit 502 is used to acquire the data detection results of the input data.

[0094] Judgment unit 503 is used to sequentially determine whether each adjustment parameter exists in the first check point.

[0095] Output unit 504 is used to output the adjustment result corresponding to the adjustment parameter when there is an adjustment parameter in the first check point.

[0096] The output unit 504 is also used to adjust the data detection result by the first operator corresponding to the adjustment parameter when there is no adjustment parameter in the first check point, and output the adjustment result corresponding to the adjustment parameter. The first operator is used to output the adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

[0097] Optionally, the acquisition unit 502 is specifically used to detect the input data according to the second checkpoint; when there is input data in the second checkpoint, the data detection result corresponding to the input data is determined; when there is no input data in the second checkpoint, the input data is detected by the second operator corresponding to the input data to obtain the data detection result corresponding to the input data, and the second operator is used to output the data detection result corresponding to the input data according to the input data.

[0098] Optionally, such as Figure 5 As shown, the device may further include: a setting unit 505.

[0099] Setting unit 505 is used to obtain the validity period of the target checkpoint, which includes a first checkpoint and / or a second checkpoint; when the validity period of the target checkpoint expires, the target checkpoint is deleted.

[0100] Optionally, the validity period of the target checkpoint is related to the data usage scenario of the target checkpoint; the data usage scenario includes global scenario and process scenario, and the validity period of the target checkpoint in the global scenario is different from that in the process scenario.

[0101] Optionally, such as Figure 6 As shown, the device may further include a recovery unit 506.

[0102] The recovery unit 506 is configured to recover the task according to the first checkpoint or the second checkpoint when the task is abnormal.

[0103] Optionally, as shown in the figure, the apparatus can further include a storage unit 507. Figure 6

[0104] The storage unit 507 is configured to store the adjustment result corresponding to the adjustment parameter asynchronously.

[0105] Optionally, the storage unit 507 is further configured to store the processing result corresponding to the input data asynchronously.

[0106] Optionally, the storage unit 507 is further configured to create a savepoint, and the savepoint is data that needs to be cached inside the third operator, and the third operator is any one of the first operator or any one of the second operator.

[0107] Optionally, the acquisition unit 502 is specifically configured to input the first picture into the second operator, and output the data detection result corresponding to the first picture through the second operator.

[0108] In the technical solution of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0109] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0110] In the exemplary embodiments, the electronic device includes at least one processor and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments.

[0111] In the exemplary embodiments, the readable storage medium can be a non-transitory computer readable storage medium storing computer instructions, and the computer instructions are used to make the computer execute the method according to the above embodiments.

[0112] In the exemplary embodiments, the computer program product includes a computer program, and the computer program is executed by the processor to implement the method according to the above embodiments.

[0113] ​ ​A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0114] like ​ As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0115] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0116] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The computing unit 601 performs various methods and processes described above, such as the service scheduling method. For example, in some embodiments, the service scheduling method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded onto the RAM 603 and executed by the computing unit 601, one or more steps of the service scheduling method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the service scheduling method by any other appropriate means, such as by means of firmware.

[0117] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0118] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0121] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0122] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0123] It should be understood that the various forms of flow shown above can be re-ordered, steps added or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, in a different order, or any combination thereof, so long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.

[0124] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A service scheduling method, the method comprising: The system receives user input data and at least one adjustment parameter, wherein the user input data includes the original image of the photo taken by the user, and the adjustment parameter includes enhancement parameters; The state of the original photograph is read at the second checkpoint; When the status of the original photo is read as available, it indicates that the input data of the original photo exists in the second checkpoint. The data detection result corresponding to the original photo is obtained and output. The data detection result corresponding to the original photo includes the facial outline in the original photo, the position of the facial features on the face in the original photo, and the skin beautification data corresponding to the face in the original photo. Sequentially determine whether each of the aforementioned adjustment parameters exists in the first checkpoint; When the adjustment parameter exists in the first checkpoint, the adjustment result corresponding to the adjustment parameter is output; When the adjustment parameter is not present in the first checkpoint, the data detection result corresponding to the original photo is adjusted by the first operator corresponding to the adjustment parameter, and the adjustment result corresponding to the adjustment parameter is output. The first operator is used to output the adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

2. The method according to claim 1, further comprising: When the input data is not present at the second checkpoint, the input data is detected by the second operator corresponding to the input data to obtain the data detection result corresponding to the input data. The second operator is used to output the data detection result corresponding to the input data based on the input data.

3. The method according to claim 1 or 2, further comprising: Obtain the validity period of the target checkpoint, wherein the target checkpoint includes the first checkpoint and / or the second checkpoint; When the validity period of the target checkpoint expires, the target checkpoint is deleted.

4. The method according to claim 3, wherein the validity period of the target checkpoint is related to the data usage scenario of the target checkpoint; the data usage scenario includes a global scenario and a process scenario, wherein the validity period of the target checkpoint in the global scenario is different from the validity period of the target checkpoint in the process scenario.

5. The method according to any one of claims 1-2, further comprising: When a task encounters an anomaly, the task is restored based on either the first checkpoint or the second checkpoint.

6. The method according to any one of claims 1-2, wherein after adjusting the data detection result by the operator corresponding to the adjustment parameter when the adjustment parameter is not present in the first checkpoint, to obtain the adjustment result corresponding to the adjustment parameter, the method further includes: The adjustment results corresponding to the adjustment parameters are stored asynchronously.

7. The method according to claim 2, after processing the input data using the operator corresponding to the input data to obtain the processing result corresponding to the input data when the input data is not present at the second checkpoint, the method further includes: The processing results corresponding to the input data are stored asynchronously.

8. The method according to any one of claims 1-2, further comprising: The fault tolerance level is selected as exact once.

9. The method according to any one of claims 1-2, further comprising: Create a savepoint, where the savepoint is the data that needs to be cached within the third operator, and the third operator is any one of the first operators or any one of the second operators.

10. The method according to any one of claims 1-2, wherein the input data includes a first image, and the step of obtaining the data detection result of the input data includes: Input the first image into the second operator; The second operator outputs the data detection result corresponding to the first image.

11. A service scheduling apparatus, the apparatus comprising: A receiving unit is configured to receive user input data and at least one adjustment parameter, wherein the user input data includes the original image of a photo taken by the user, and the adjustment parameter includes enhancement parameters. The acquisition unit is used to read the state of the original photo at the second checkpoint; When the status of the original photo is read as available, it indicates that the input data of the original photo exists in the second checkpoint. The data detection result corresponding to the original photo is obtained and output. The data detection result corresponding to the original photo includes the facial outline in the original photo, the position of the facial features on the face in the original photo, and the skin beautification data corresponding to the face in the original photo. The judgment unit is used to sequentially determine whether each of the adjustment parameters exists in the first checkpoint; The output unit is used to output the adjustment result corresponding to the adjustment parameter when the adjustment parameter exists in the first checkpoint; The output unit is further configured to adjust the data detection result corresponding to the original photo image by means of the first operator corresponding to the adjustment parameter when the adjustment parameter is not present in the first checkpoint, and output the adjustment result corresponding to the adjustment parameter. The first operator is configured to output the adjustment result corresponding to the adjustment parameter according to the input adjustment parameter.

12. The apparatus according to claim 11, wherein the acquiring unit is specifically used for: When the input data is not present at the second checkpoint, the input data is detected by the second operator corresponding to the input data to obtain the data detection result corresponding to the input data. The second operator is used to output the data detection result corresponding to the input data based on the input data.

13. The apparatus according to claim 11 or 12, further comprising: A setting unit is used to obtain the validity period of a target checkpoint, wherein the target checkpoint includes the first checkpoint and / or the second checkpoint; When the validity period of the target checkpoint expires, the target checkpoint is deleted.

14. The apparatus according to claim 13, wherein the validity period of the target checkpoint is related to the data usage scenario of the target checkpoint; the data usage scenario includes a global scenario and a process scenario, wherein the validity period of the target checkpoint in the global scenario is different from the validity period of the target checkpoint in the process scenario.

15. The apparatus according to any one of claims 11-12, further comprising: The recovery unit is used to recover the task based on the first checkpoint or the second checkpoint when the task encounters an anomaly.

16. The apparatus according to any one of claims 11-12, further comprising: A storage unit is used to asynchronously store the adjustment results corresponding to the adjustment parameters.

17. The apparatus of claim 16, wherein the storage unit is further configured to: The processing results corresponding to the input data are stored asynchronously.

18. The apparatus according to any one of claims 11-12, further comprising: Select the cell used to choose the fault tolerance level as exact one.

19. The apparatus of claim 16, wherein the storage unit is further configured to: Create a savepoint, where the savepoint is the data that needs to be cached within the third operator, and the third operator is any one of the first operators or any one of the second operators.

20. The apparatus according to any one of claims 11-12, wherein the input data includes a first image, and the acquisition unit is specifically used for: Input the first image into the second operator; The second operator outputs the data detection result corresponding to the first image.

21. An electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1-10.

22. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method according to any one of claims 1-10.

23. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Task calling method and device and MEC server

    CN113010299A