Function recovery execution method and device, equipment and storage medium
By decomposing the total function into multiple function groups and determining their association relationships, the efficiency of function recovery execution is achieved, and the problem of extended function recovery execution time in the prior art is solved, and the system performance is improved.
Patent Information
- Application Number
- CN202311762468.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
The existing function recovery execution method starts from scratch when it is necessary to restore the function but not complete the execution, resulting in a longer function execution time and degradation of the overall system performance.
The total function is decomposed into several function groups, including a main function group and several subfunction groups, each function group includes at least one function segment, determine the association relationship between the function groups, and execute the total function based on the association relationship. When it is necessary to restore the execution of the total function, the execution will be resumed based on the currently executed function segment and association relationship.
Through refined function group division and association determination, it can conveniently and accurately locate the starting position that needs to be restored, avoiding the extended function execution time and improving the overall performance of the system.
Smart Images

Figure CN120179456A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a method, apparatus, device, and storage medium for resuming the execution of functions. Background Art
[0002] Artificial Intelligence (AI) technology is a technology that uses machines and computers to simulate human perception, understanding, learning, and thinking. AI technology is realized relying on an AI system. The workflow of the AI system can be summarized into the following three steps: First, perform input to obtain raw data; then perform processing to calculate and reason about the data; finally, perform output to obtain a conclusion or a prediction result.
[0003] The AI system often needs to be updated by restarting. When restarting, it often means that the old version needs to stop, and the functions that have not been executed completely in the old version need to be run continuously in the new version. These functions include complex model startup, resource creation, etc.
[0004] The existing function resume execution method of the AI system usually starts from the beginning to execute the functions that have not been executed completely when it is necessary to resume the execution of the functions that have not been executed completely, resulting in an extended function execution time and a reduction in the overall performance of the system. Summary of the Invention
[0005] The present invention provides a method, apparatus, device, and storage medium for resuming the execution of functions, so as to solve the technical problem that when the existing function resume execution method needs to resume the execution of the functions that have not been executed completely, it starts from the beginning to execute the functions that have not been executed completely, resulting in an extended function execution time and a reduction in the overall performance of the system.
[0006] The present invention provides a method for resuming the execution of functions, including: decomposing a total function into a plurality of function groups, the plurality of function groups including a main function group and a plurality of sub-function groups, and each function group including at least one function segment; determining the association relationship between the function groups, and executing the total function based on the association relationship; when it is necessary to resume the execution of the total function, resuming the execution of the total function according to the currently executed function segment and the association relationship.
[0007] Further, the decomposing the total function into a plurality of function groups includes:
[0008] Decomposing the total function into a plurality of function groups according to different implemented functions.
[0009] Further, the executing the total function based on the association relationship includes:
[0010] According to the association relationship, determine two associated function segments in two mutually associated function groups, and set a connection pair between the two associated function segments; execute the two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, convert the running parameters of the associated function groups into the running parameters of the main function group through the connection pair.
[0011] Further, the step of executing the two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, converting the running parameters of the associated function groups into the running parameters of the main function group through the connection pair includes:
[0012] When executing the total function, if the current function segment points to an associated function group through a connection pair, after executing the current function segment, convert the running parameters of the current function group into the running parameters of the associated function group, and execute the associated function group according to the running parameters of the associated function group; after all the sub-function groups associated with a connection pair in the main function group are executed, convert the running parameters of the last executed sub-function group into the running parameters of the main function group, and execute the next function segment in the main function group according to the running parameters of the main function group;
[0013] If the current function segment does not point to an associated function group through a connection pair, execute the next function segment.
[0014] Further, the function resumption execution method further includes:
[0015] Store the converted running parameters into the shared data structure of each function segment.
[0016] Further, the step of resuming the execution of the total function according to the currently executed function segment and the association relationship includes:
[0017] Taking the currently executed function segment as the starting position for resuming the execution of the total function, determine the running parameters of the function group to be executed according to the connection pair during the execution process, and resume the execution of the total function according to the association relationship and the running parameters of the function group to be executed.
[0018] Further, the step of determining the association relationship between the function groups includes:
[0019] Determine the association relationship between the function groups according to the preset function execution order.
[0020] The present invention also provides a function resumption execution device, including:
[0021] A function group division module is used to decompose the total function into several function groups. The several function groups include a main function group and several sub-function groups, and each function group includes at least one function segment. A total function execution module is used to determine the association relationship between the function groups and execute the total function based on the association relationship. A total function resume execution module is used to resume the execution of the total function according to the currently executed function segment and the association relationship when it is necessary to resume the execution of the total function.
[0022] The present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the function resume execution method as described above is implemented.
[0023] The present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the function resume execution method as described above.
[0024] In the present invention, by decomposing the total function into several function groups, the several function groups include a main function group and several sub-function groups, and each function group includes at least one function segment. Through the division of the function groups, functions with different functions can be realized in a refined manner, so that the starting position to be resumed can be conveniently and accurately located to resume the function execution, avoiding the extension of the function execution time, and thus effectively improving the overall performance of the system. Moreover, in the embodiments of the present invention, by determining the association relationship between the function groups and executing the total function based on the association relationship, the execution of function resume can be carried out in an orderly manner according to the association relationship between the function groups, ensuring that the function resume execution process proceeds in the correct order, avoiding chaos and errors, and being able to avoid the decline of the overall performance of the system.
[0025] Furthermore, in the present invention, connection pairs are set according to the association relationship of the function groups, and two mutually associated function groups are executed according to the connection pairs. After the associated function groups are executed, the running parameters of the associated function groups are converted into the running parameters of the main function group through the connection pairs, which can ensure that in the process of function resume execution, each function group and the function segments inside it are normally executed, reducing the occurrence of situations where the system performance declines due to data execution errors or inability to execute. Description of the Drawings
[0026] Figure 1 is a schematic flowchart of a function resume execution method provided by an embodiment of the present invention;
[0027] Figure 2 is another schematic flowchart of a function resume execution method provided by an embodiment of the present invention;
[0028] Figure 3 It is a schematic structural diagram of a function resume execution device provided by an embodiment of the present invention. Detailed implementation manners
[0029] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0030] In the description of the present application, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.
[0031] In the description of the present application, it should be noted that unless otherwise clearly defined and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.
[0032] Artificial Intelligence (AI) technology is a technology that uses machines and computers to simulate human perception, understanding, learning, and thinking. The AI technology is realized relying on the AI system. The working process of the AI system can be summarized into the following three steps: First, perform input to obtain the original data; then perform processing to calculate and reason about the data; finally perform output to obtain a conclusion or a prediction result.
[0033] The AI system often needs to be updated by restarting. When restarting, it often means that the old version needs to stop, and the functions that have not been completed in the old version need to be run continuously in the new version. These functions include complex model startup, resource creation, etc.
[0034] In the existing function resumption execution method of an AI system, when it is necessary to resume the execution of an unfinished function, the unfinished function is usually executed from the beginning, resulting in an extended execution time of the function and a reduction in the overall performance of the system. To overcome the deficiencies of the prior art, the present invention proposes a function resumption execution method, which records the execution status and progress before the function restarts. When the AI system restarts due to an update, the context of the unfinished function is restored, and the execution continues from the position where it was executed before the restart, thereby greatly reducing the time for function resumption execution.
[0035] Please refer to Figure 1 , a function resumption execution method provided by an embodiment of the present invention includes:
[0036] S1. Decompose the total function into several function groups. The several function groups include a main function group and several sub-function groups, and each function group includes at least one function segment 。
[0037] The function resumption execution method provided by an embodiment of the present invention is applicable to an AI system. Especially when the AI system needs to be updated and restarted, it can perform context restoration on the unfinished function and continue execution from the position where it was executed before the restart, thereby greatly reducing the time for function resumption execution. Further, based on the concept of the present invention, applying the function resumption execution method provided by the present invention to computer systems such as service operating systems and embedded systems should also be within the protection scope of the present invention.
[0038] In the embodiment of the present invention, the total function can be decomposed into several function groups according to actual needs. For example, the function can be decomposed according to different implemented functions, according to different logical branches, according to code reusability, or according to code complexity, etc.
[0039] The relationship between the main function group and the sub-function group in the embodiment of the present invention is not absolute. The sub-function group can also be the main function group of another total function.
[0040] By decomposing the total function into several function groups in the embodiment of the present invention, and each function group includes at least one function segment, it is convenient to accurately locate the execution progress of the total function according to the execution status of the function segment, thereby effectively improving the convenience and accuracy of resuming the execution of the total function.
[0041] S2. Determine the association relationship between the function groups and execute the total function based on the association relationship.
[0042] In the embodiments of the present invention, each divided function group can implement a specific function. According to the preset function execution order or function implementation order, the association relationship existing between function groups can be determined. Based on this association relationship, the total function is executed, which can ensure that the total function implements the corresponding function according to the preset execution order or function implementation order, and can, according to the association relationship between function groups, orderly execute the function recovery, ensuring that the function recovery execution process proceeds in the correct order, avoiding chaos and errors, and thus being able to avoid the degradation of the overall system performance.
[0043] S3. When it is necessary to resume the execution of the total function, resume the execution of the total function according to the currently executed function segment and the association relationship.
[0044] In the embodiments of the present invention, the initial position when resuming the execution of the total function can be determined by determining the currently executed function segment. The execution order of function segments in a function group has been determined and set. Based on this initial position and the previously determined association relationship between function groups, it can be determined whether the next function segment to be executed is a function segment of the current function group or an associated function group, which can quickly and conveniently resume the execution of the total function, avoid the extension of the function execution time, and thus can effectively improve the efficiency of the function recovery execution, and further can effectively improve the overall system performance.
[0045] In some embodiments, step S1: Decompose the total function into several function groups, including the following sub-steps:
[0046] Decompose the total function into several function groups according to different implemented functions.
[0047] In the embodiments of the present invention, the total function can be a function for implementing complex functions. For example, the total function can be a function for order operations. Decomposing the total function into several function groups according to different implemented functions can be:
[0048] Decompose the total function of order operations into corresponding function groups such as inventory operations, coupon operations, and payment operations. The inventory operation includes multiple function segments, such as function segments corresponding to operations such as invoking inventory services, database records, and sending inventory shortage notifications.
[0049] In the embodiments of the present invention, decomposing the total function into several function groups according to different implemented functions can clearly divide the total function into several functional modules. When the function execution is interrupted or needs to continue to be executed in a new system, the current execution position can be accurately located, thereby effectively improving the convenience and accuracy of the function recovery execution.
[0050] In some embodiments, step S2: Execute the total function based on the association relationship, including the following sub-steps:
[0051] S21. Determine two associated function segments in two mutually associated function groups according to the association relationship, and set a connection pair between the two associated function segments.
[0052] In an embodiment of the present invention, the main function group can be associated with multiple sub-function groups. The two function groups are associated through a connection pair, and the connection pair respectively points to an associated function segment in the two function groups. When the execution reaches the associated function segment, the next required function group and the corresponding function segment are determined through the connection pair.
[0053] Please refer to Figure 2 , in an embodiment of the present invention, the total function is divided into a main function group (main stagegroup) and several sub-function groups (sub stagegroup). The main function group includes stagegroup1, and the sub-function groups include stagegroup2, stagegroup3, stagegroup4, stagegroup5, and stagegroup6.
[0054] At least one function segment (stage) is set in each function group. For example, the main function group includes stage1, stage2, stage3, stage4, stage5, and stage6, etc. Stage2 in the main function group stagegroup1 points to stage2 in the sub-function group stagegroup2 through a connection pair, so as to realize the association between the main function group stagegroup1 and the sub-function group stagegroup2; Stage3 in the sub-function group stagegroup2 points to stage1 in the sub-function group stagegroup3 through a connection pair (connect-pair), so as to realize the association between the sub-function group stagegroup2 and the sub-function group stagegroup3.
[0055] S22. Execute two mutually associated function groups according to the connection pair, and after the execution of the associated function group is completed, convert the running parameters of the associated function group into the running parameters of the main function group through the connection pair.
[0056] In an embodiment of the present invention, the running parameter is the parameter required for running the function group. For example, the running parameters of the function group corresponding to the inventory operation may include information such as the order number, the quantity of items, and the item model. In an embodiment of the present invention, the conversion method of the running parameter can be to convert the running parameter of the current function group into the parameter required for the next function group according to the association relationship between the function groups, or to dynamically adjust the running parameter of the current function group according to the real-time requirement of the system to obtain the running parameter required for the next function group.
[0057] The subgroup of functions may have a next-level associated function group. After all cascaded associated function groups are executed, it is necessary to return to the main function group to execute the next function segment or connection pair. Therefore, the present invention converts the running parameters of the associated function group into the running parameters of the main function group through the connection pair.
[0058] In some embodiments, step S22, execute two mutually associated function groups according to the connection pair, and after the associated function group is executed, convert the running parameters of the associated function group into the running parameters of the main function group through the connection pair, including the following sub-steps:
[0059] S221. When executing the total function, if the current function segment points to an associated function group through a connection pair, after executing the current function segment, convert the running parameters of the current function group into the running parameters of the associated function group, and execute the associated function group according to the running parameters of the associated function group; after all the sub-function groups associated with a connection pair in the main function group are executed, convert the running parameters of the last executed sub-function group into the running parameters of the main function group, and execute the next function segment in the main function group according to the running parameters of the main function group.
[0060] S222. If the current function segment does not point to an associated function group through a connection pair, execute the next function segment.
[0061] In the embodiments of the present invention, the function segments in the function group are executed according to a preset execution order.
[0062] Please continue to refer to Figure 2 , stage2 of the main function group stagegroup1 is associated with the subgroup of functions stagegroup2 through a connection pair, stage3 in the subgroup of functions stagegroup2 is associated with the subgroup of functions stagegroup4, and after the subgroup of functions stagegroup4 is executed, the running parameters of the subgroup of functions stagegroup4 are converted into the running parameters of the main function group stagegroup1 through the connection pair, so as to execute stage3 and subsequent function segments of the main function group stagegroup1 according to the running parameters of the main function group stagegroup1.
[0063] In some embodiments, the function resumption execution method further includes:
[0064] Store the obtained converted running parameters in the shared data structure of each function segment.
[0065] In an embodiment of the present invention, by storing the obtained operation parameters after conversion into the shared data structure of each function segment, when the execution progress of the total function reaches any function segment, the operation parameters of the function group can be conveniently and quickly obtained according to the shared data structure in the function segment to resume the execution of the function, thereby effectively reducing the execution time of the function and improving the efficiency of resuming the execution of the function.
[0066] In some embodiments, step S3, resuming the execution of the total function according to the currently executed function segment and the association relationship, includes:
[0067] Taking the currently executed function segment as the starting position for resuming the execution of the total function, determining the operation parameters of the function group to be executed according to the connection pair during the execution process, and resuming the execution of the total function according to the association relationship and the operation parameters of the function group to be executed.
[0068] In an embodiment of the present invention, the operation parameters of the currently executed function group can be converted into the operation parameters of the next function group to be executed through the connection pair, so as to determine the operation parameters of the function group to be executed.
[0069] Please continue to refer to Figure 2 , if the function is interrupted and the currently executed function segment is stage3 in the sub-function group stagegroup2, the next sub-function group to be executed, stagegroup4, can be determined according to the connection pair pointed to by stage3. At this time, the operation parameters of stagegroup2 are converted into the operation parameters of stagegroup4 according to the connection pair, and stagegroup4 is executed. After executing stagegroup4, the operation parameters of stagegroup4 are converted into the operation parameters of stagegroup1 according to the connection pair pointed to stagegroup4, and stagegroup1 is executed according to the operation parameters of stagegroup1.
[0070] In an embodiment of the present invention, the starting position for resuming the execution of the function is determined according to the currently executed function segment, the next function group to be executed is determined according to the association relationship, and the operation parameters to be executed can be determined according to the connection relationship, thereby being able to quickly and accurately resume the execution of the function.
[0071] In some embodiments, step S2, determining the association relationship between function groups, includes:
[0072] Determining the association relationship between function groups according to the preset function execution order.
[0073] In the embodiments of the present invention, determining the association relationship between function groups according to the preset function execution order helps to accurately locate the effective recovery points, enabling the total function to be restored to the normal state in a timely manner when interrupted, and reducing data loss and execution errors.
[0074] Implementing the embodiments of the present invention has the following beneficial effects:
[0075] In the embodiments of the present invention, the total function is decomposed into several function groups. The several function groups include a main function group and several sub-function groups, and each function group includes at least one function segment. By dividing the function groups, functions with different functions can be refined, so that the starting position to be restored can be conveniently and accurately located to resume function execution, avoiding the extension of function execution time, and thus effectively improving the overall performance of the system. In addition, in the embodiments of the present invention, by determining the association relationship between function groups and executing the total function based on the association relationship, the execution of function recovery can be carried out in an orderly manner according to the association relationship between function groups, ensuring that the function recovery execution process proceeds in the correct order, avoiding chaos and errors, and preventing the overall performance of the system from degrading.
[0076] Furthermore, in the embodiments of the present invention, connection pairs are set according to the association relationship of function groups, and two mutually associated function groups are executed according to the connection pairs. After the associated function groups are executed, the running parameters of the associated function groups are converted into the running parameters of the main function group through the connection pairs, which can ensure that each function group and its internal function segments are normally executed during the function recovery execution process, reducing the occurrence of situations where system performance degrades due to data execution errors or inability to execute.
[0077] Please refer to Figure 3 , based on the same inventive concept as the above embodiments, the embodiments of the present invention also provide a function recovery execution device, including:
[0078] A function group division module 10, configured to decompose the total function into several function groups. The several function groups include a main function group and several sub-function groups, and each function group includes at least one function segment.
[0079] A total function execution module 20, configured to determine the association relationship between function groups and execute the total function based on the association relationship.
[0080] A total function recovery execution module 30, configured to, when it is necessary to resume the execution of the total function, resume the execution of the total function according to the currently executed function segment and the association relationship.
[0081] In some embodiments, the function group division module 10 is further configured to:
[0082] Decompose the total function into several function groups according to different functions implemented.
[0083] In some embodiments, the total function execution module 20 is further configured to:
[0084] According to the association relationship, determine two associated function segments in two mutually associated function groups, and set a connection pair between the two associated function segments.
[0085] Execute two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, convert the running parameters of the associated function groups into the running parameters of the main function group through the connection pair.
[0086] In some embodiments, executing two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, converting the running parameters of the associated function groups into the running parameters of the main function group through the connection pair includes:
[0087] When executing the total function, if the current function segment points to an associated function group through the connection pair, after executing the current function segment, convert the running parameters of the current function group into the running parameters of the associated function group, and execute the associated function group according to the running parameters of the associated function group; after all the sub-function groups associated with a connection pair in the main function group are executed, convert the running parameters of the last executed sub-function group into the running parameters of the main function group, and execute the next function segment in the main function group according to the running parameters of the main function group.
[0088] If the current function segment does not point to an associated function group through the connection pair, execute the next function segment.
[0089] In some embodiments, the apparatus further includes a data storage module for:
[0090] Store the converted running parameters into the shared data structure of each function segment.
[0091] In some embodiments, the total function resume execution module 30 is further configured to:
[0092] Use the currently executed function segment as the starting position for resuming the execution of the total function, determine the running parameters of the function groups to be executed according to the connection pair during the execution process, and resume the execution of the total function according to the association relationship and the running parameters of the function groups to be executed.
[0093] In some embodiments, the total function execution module 20 is further configured to:
[0094] Determine the association relationship between function groups according to the preset function execution order.
[0095] Correspondingly, an embodiment of the present invention further provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the function recovery execution method of any one of the above embodiments is implemented.
[0096] The terminal device of this embodiment includes: a processor, a memory, and a computer program and computer instructions stored in the memory and executable on the processor. When the processor executes the computer program, each step in the first embodiment above is implemented, for example Figure 1 the steps S1 to S3 shown. Alternatively, when the processor executes the computer program, the functions of each module / unit in the above device embodiment are implemented, such as the general function execution module 20.
[0097] Exemplarily, the computer program can be divided into one or more modules / units. One or more modules / units are stored in the memory and executed by the processor to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device. For example, the general function execution module 20 is used to determine the association relationship between function groups and execute the general function based on the association relationship.
[0098] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of the terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.
[0099] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc. The processor is the control center of the terminal device and connects various parts of the entire terminal device through various interfaces and lines.
[0100] The memory can be used to store computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and by invoking the data stored in the memory, the processor can implement various functions of the terminal device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function, etc.; the data storage area can store the data created according to the use of the mobile terminal, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0101] Among them, if the modules / units integrated in the terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0102] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. Among them, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the function recovery execution method of any one of the above embodiments.
[0103] In the above specific embodiments, the object, technical solution and beneficial effects of the present invention have been further described in detail. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for resuming function execution, characterized in that, Comprising: Decompose the total function into a number of function groups, where the number of function groups includes a main function group and a number of sub-function groups, and each function group includes at least one function segment; Determine the association relationship between the function groups, and execute the total function based on the association relationship; When it is necessary to resume the execution of the total function, resume the execution of the total function according to the currently executed function segment and the association relationship.
2. The method for resuming function execution according to claim 1, characterized in that, The decomposing the total function into a number of function groups includes: Decompose the total function into a number of function groups according to different implemented functions.
3. The method for resuming function execution according to claim 1, characterized in that, The executing the total function based on the association relationship includes: According to the association relationship, determine two associated function segments in two mutually associated function groups, and set a connection pair between the two associated function segments; Execute two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, convert the running parameters of the associated function groups into the running parameters of the main function group through the connection pair.
4. The method for resuming function execution according to claim 3, characterized in that, The executing two mutually associated function groups according to the connection pair, and after the execution of the associated function groups is completed, converting the running parameters of the associated function groups into the running parameters of the main function group through the connection pair includes: When executing the total function, if the current function segment points to an associated function group through a connection pair, after executing the current function segment, convert the running parameters of the current function group into the running parameters of the associated function group, and execute the associated function group according to the running parameters of the associated function group; after all sub-function groups associated with a connection pair in the main function group are executed, convert the running parameters of the last executed sub-function group into the running parameters of the main function group, and execute the next function segment in the main function group according to the running parameters of the main function group; If the current function segment does not point to an associated function group through a connection pair, execute the next function segment.
5. The method for resuming function execution according to claim 3, characterized in that, Also included: Store the converted running parameters into the shared data structure of each function segment.
6. The method for resuming function execution according to claim 1, characterized in that, The resuming the execution of the total function according to the currently executed function segment and the association relationship includes: Taking the currently executed function segment as the starting position for resuming the execution of the total function, determine the running parameters of the function groups to be executed according to the connection pair during the execution process, and resume the execution of the total function according to the association relationship and the running parameters of the function groups to be executed.
7. The method for resuming function execution according to claim 1, characterized in that, The determining the association relationship between the function groups includes: Determine the association relationship between the function groups according to the preset function execution order.
8. A device for resuming function execution, characterized in that, Comprising: A function group division module for decomposing the total function into a number of function groups, where the number of function groups includes a main function group and a number of sub-function groups, and each function group includes at least one function segment; A total function execution module for determining the association relationship between the function groups and executing the total function based on the association relationship; A total function resuming execution module for resuming the execution of the total function according to the currently executed function segment and the association relationship when it is necessary to resume the execution of the total function.
9. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the function recovery execution method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program; wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the function recovery execution method according to any one of claims 1 to 7.