An application software development agent scheduling method and system
By generating and recording task snapshots and events in the cloud-edge collaborative software development environment, the problem of inconsistency between task status and development product version after communication interruption is solved, achieving accurate task recovery and efficient resource utilization.
Patent Information
- Application Number
- CN202611358043.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-24
AI Technical Summary
In a cloud-edge collaborative software development environment, after a communication interruption, it is difficult to accurately restore the task execution status and development product version of the cloud scheduling node and the edge scheduling node to be consistent, resulting in mismatch of development products, repeated execution of tasks, and waste of computing resources.
By generating a shared task snapshot when communication is normal and recording task events and development artifact versions during the interruption, the task execution results are processed based on a unified benchmark after recovery, a local task execution sequence is generated and distributed to the development agent to ensure the consistency of the task graph.
It improves the accuracy and reliability of task recovery in the cloud-edge collaborative development environment, avoids mismatch between task status and development product version, reduces duplicate execution and resource consumption, and improves scheduling continuity and development product consistency.
Smart Images

Figure CN123157374A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software technology, and more specifically, to a method and system for scheduling intelligent agents in application software development. Background Technology
[0002] With the development of large language models and intelligent agent technology, coding agents, testing agents, and document agents are increasingly being applied in application software development processes. Existing systems typically break down software development tasks into multiple interconnected sub-tasks, which are then executed by different development agents. Since testing tasks depend on the code version generated by coding tasks, and document tasks may depend on code, interfaces, and test results, there is a strong dependency and version correspondence between the execution status of different tasks and the development artifacts they read and generate.
[0003] In a cloud-edge collaborative software development environment, cloud scheduling nodes typically handle unified scheduling, while edge scheduling nodes store some task information and development artifacts to maintain necessary development activities when the network is unstable or cloud-edge communication is interrupted. After a communication interruption, the cloud and edge may continue to control the development agent to execute tasks based on their respective stored task states, resulting in different task execution states and different versions of code, test reports, or development documents for the same software project. For example, the same task may be executed repeatedly, and different tasks may continue to be executed based on different code versions.
[0004] When cloud-edge communication resumes, existing systems typically synchronize by uploading execution logs, comparing update times, using the last written result, or overwriting the edge state with the cloud state. These methods primarily focus on the task state or data records themselves, making it difficult to determine the actual validity of results generated during the disconnection period by considering the prerequisite dependencies between tasks and the version dependencies of development artifacts. It also makes it difficult to accurately determine the scope of the impact of state differences on subsequent tasks. Directly overwriting or re-executing on a large scale may result in the loss of valid development results, the continued use of invalid results by downstream tasks, or the repeated scheduling of completed and unaffected tasks, increasing computational overhead and extending the development cycle.
[0005] Therefore, the technical problem that existing application software development intelligent agent scheduling technology urgently needs to solve is: when both cloud scheduling nodes and edge scheduling nodes can participate in task execution, and the two nodes have resumed connection after communication interruption, how to accurately restore the consistency between the task execution state and the development product version, and reasonably determine the scope of tasks that need to be restored, so as to avoid mismatch of development products and waste of computing resources due to simple state overwriting or repeated scheduling. Summary of the Invention
[0006] This application aims to address the technical problem in existing cloud-edge collaborative software development environments where, after communication interruption between cloud scheduling nodes and edge scheduling nodes and their respective development tasks, it is difficult to accurately unify the task execution status and development product version upon communication recovery, which can easily lead to mismatch of development products, duplicate execution of tasks, and waste of computing resources. Therefore, this application provides an intelligent agent scheduling method and system for application software development.
[0007] This application provides a method for scheduling intelligent agents in application software development, applicable to a collaborative software development environment including cloud scheduling nodes, edge scheduling nodes, and multiple development intelligent agents, comprising the following steps:
[0008] When the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition, the cloud scheduling node periodically generates a common task snapshot. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a set of task events based on the common task snapshot and record the development artifact version.
[0009] When the communication changes from triggering the disconnection condition to not triggering the disconnection condition, candidate fork event pairs are generated for the task event set, and the results of the task events and candidate fork event pairs are judged to obtain the event results;
[0010] Generate a validity marker for the development artifact version based on the event results, and determine the affected task closure based on the validity marker;
[0011] A unified task graph is formed based on the common task snapshot. Local task rescheduling is performed on the tasks within the affected task closure to generate a local task execution sequence and send it to the corresponding development agent.
[0012] When the cloud scheduling node and the edge scheduling node confirm the unified task Figure 1 Upon completion, a new snapshot of the shared task is generated.
[0013] Furthermore, methods for generating task event sets include:
[0014] Using the last confirmed common task snapshot between the cloud scheduling node and the edge scheduling node before the communication disconnection condition is triggered as the branch starting point, each task event during the disconnection period is formed into a task event record.
[0015] All task events generated by the cloud scheduling node during the disconnection period are combined into a cloud task event set; all task events generated by the edge scheduling node during the same disconnection period are combined into an edge task event set.
[0016] The task event set includes the cloud task event set and the edge task event set.
[0017] Furthermore, methods for generating candidate fork event pairs include:
[0018] Select a task event from both the cloud task event set and the edge task event set, and compare the task identifier and the task operation object recorded in the task event.
[0019] When two task events have the same task identifier, involve the same task operation object, or involve task operation objects with a relationship, they are formed into candidate fork event pairs in the order of cloud branch task event first and edge branch task event second.
[0020] Based on the set of input development product versions and the set of task operation objects in the task event log, the overlap of input development product versions and the overlap of task operation objects are calculated.
[0021] Based on the overlap of input development artifact versions and the overlap of task operation objects, retention rules are constructed, and candidate fork event pairs that trigger the retention rules are retained.
[0022] Furthermore, methods for obtaining the outcome of an event include:
[0023] Generate input condition fingerprints and normalized output product description sequences based on task event records;
[0024] Event results include duplicate results, expired results, mergeable results, and conflicting results;
[0025] When two task events of a candidate fork event pair have the same task identifier, the same input condition fingerprint, and the same normalized output product description sequence, they are judged as duplicate results.
[0026] For task events that are not determined to be duplicate results, if the input of the task event is determined to be invalid based on the set of input development artifact versions, the event result is an expired result;
[0027] For task events that are not judged as duplicate or expired results, if the candidate fork event has no prerequisite dependencies and structural conflicts and the three-party merging and verification are passed, it is judged as a mergeable result; if there are structural conflicts or the three-party merging and verification are not passed, it is judged as a conflicting result.
[0028] Furthermore, methods for determining expiration results include:
[0029] Determine the necessary set of input development artifact versions from the set of input development artifact versions actually read from the task event;
[0030] For each development product version in the set of necessary input development product versions, find a reference development product version that has the same product identifier and is confirmed to be valid, and determine the compatibility between the development product version and the reference development product version.
[0031] The task event input is considered valid when all necessary input development artifact versions are compatible with the corresponding reference development artifact version; the task event input is considered invalid when at least one necessary input development artifact version is incompatible with the corresponding reference development artifact version.
[0032] Task events with invalid inputs and their output development artifact versions are deemed outdated.
[0033] Furthermore, methods for generating validity markers include:
[0034] Based on the event results, development product versions that are determined to be duplicates are marked as duplicates, those that are determined to be expired are marked as expired, those that are determined to be conflicting are marked as conflict pending, those whose compatibility cannot be confirmed are marked as pending verification, and those that are determined to be mergeable are marked as valid.
[0035] When the validity of a code submission version is marked as expired, conflict pending, or pending verification, the test report version and document artifact version that depend on the code submission version will be marked as associated and pending confirmation.
[0036] Validity markers include valid, duplicate, expired, conflict pending, pending verification, and association pending confirmation.
[0037] Furthermore, methods for identifying the affected task closures include:
[0038] The development product versions marked as expired and conflict pending are grouped into an invalid development product version set, and the development product versions marked as pending verification and associated pending confirmation are grouped into an uncertain development product version set. The invalid development product version set and the uncertain development product version set are merged and deduplicated to form the impact source development product version set.
[0039] On the bipartite graph composed of task events and development product versions, the influence is propagated layer by layer along the development product dependency edges actually read by the task events, starting from the set of development product versions of the influencing source, until no more task events are added, thus obtaining the closure of the affected task events.
[0040] Map the task events in the affected task event closure according to the task identifier, merge and remove duplicates to obtain the affected task closure.
[0041] Furthermore, methods for generating local task execution sequences include:
[0042] Extract the tasks within the affected task closure from the unified task graph, as well as the conflict resolution tasks determined in the conflict result judgment, to form a set of recovery candidate tasks.
[0043] Calculate the marginal avoidable late fees and repeated execution costs based on the expected completion time and execution cost of the task, and calculate the unblocking benefits based on the repeated execution costs.
[0044] Obtain the preset task value weight, marginal avoidable overdue loss, unblockable benefit, and repeated execution cost for each recovery candidate task, and normalize them respectively;
[0045] The normalized preset task value weight, marginal avoidable overdue loss, unblocking benefit, and repeated execution cost are multiplied by the corresponding preset adjustment coefficients to calculate the task recovery scheduling benefit.
[0046] The local task execution sequence is generated in descending order of the task recovery scheduling benefit values.
[0047] Furthermore, methods for generating new common task snapshots include:
[0048] Once the cloud scheduling node and the edge scheduling node confirm the unified task after recovery Figure 1 At that time, a new common mission snapshot is generated based on the restored unified mission graph, all valid development artifact versions, and the new synchronization epoch identifier.
[0049] The new shared task snapshot serves as the starting point for a new branch of disconnection.
[0050] This application provides an application software development intelligent agent scheduling system for executing the aforementioned application software development intelligent agent scheduling method; the system includes:
[0051] The task generation module generates a shared task snapshot periodically when the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a set of task events based on the shared task snapshot and record the development product version.
[0052] The result determination module generates candidate fork event pairs for the task event set after the communication changes from triggering the disconnection condition to not triggering the disconnection condition, and performs result determination on the task event and the candidate fork event pairs to obtain the event result.
[0053] The effective impact module generates a validity marker for the development artifact version based on the event result, and determines the affected task closure based on the validity marker;
[0054] The execution module forms a unified task graph based on the common task snapshot, performs local task rescheduling on the tasks within the affected task closure, generates a local task execution sequence, and distributes it to the corresponding development agent.
[0055] The task update module updates the unified task when the cloud scheduling node and the edge scheduling node confirm it. Figure 1 Upon completion, a new snapshot of the shared task is generated.
[0056] The beneficial effects of this application are as follows: This application establishes a common task status benchmark when the cloud scheduling node and the edge scheduling node are communicating normally, and records task events and corresponding development product versions respectively during the communication disconnection period. This enables consistent processing of task execution results generated during the disconnection period based on a unified benchmark after communication is restored, thereby avoiding the mismatch between task status and development product version caused by synchronization based solely on update time or overlay order, and improving the accuracy and reliability of task recovery in the cloud-edge collaborative development environment.
[0057] This application determines the effective state of the development product and its actual impact range based on the processing results of task events, and forms a unified task graph and performs local rescheduling only for affected tasks. This allows unaffected and completed tasks to retain their original execution results, reducing unnecessary duplicate execution and agent resource consumption. Simultaneously, tasks are reconfirmed at both the cloud and edge. Figure 1 This process creates a new shared task snapshot, providing a consistent scheduling benchmark for subsequent task scheduling and in the event of another communication disruption. This improves the scheduling continuity, recovery efficiency, and consistency of development outputs for application software development agents in cloud-edge collaborative scenarios. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating an application software development intelligent agent scheduling method according to this application.
[0059] Figure 2 This is an example diagram illustrating the event results obtained in this application;
[0060] Figure 3 This is a module example diagram of an intelligent agent scheduling system for application software development according to this application. Detailed Implementation
[0061] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0062] A method and system for scheduling intelligent agents in application software development includes the following embodiments:
[0063] Example 1:
[0064] A method for scheduling application software development agents is disclosed, which runs in a collaborative software development environment. The collaborative software development environment includes a cloud scheduling node, an edge scheduling node, and multiple application software development agents. Hereinafter, the application software development agents will be referred to as development agents.
[0065] The development agent includes at least a coding agent, a testing agent, and a documentation agent; the coding agent is used to generate or modify program code, the testing agent is used to execute code tests and generate test reports, and the documentation agent is used to generate development documents based on code, interfaces, or test results; the development agent refers to a software execution unit that is based on a language model or rule engine, capable of receiving task instructions and autonomously completing corresponding software development sub-tasks.
[0066] When communication between the cloud scheduling node and the edge scheduling node does not trigger a disconnection condition, the cloud scheduling node maintains the task product dependency graph and executes task scheduling, while the edge scheduling node caches the current task product dependency graph, task execution information, and necessary program code and development product versions. The task product dependency graph is a directed acyclic graph, where nodes represent tasks or development product versions, and directed edges represent the reading relationship between the task and the input development product version and the generation relationship between the task and the output development product version. By adopting a unified maintenance by the cloud scheduling node and local caching by the edge scheduling node, the scheduling benchmark can be kept consistent when communication does not trigger a disconnection condition, and after communication triggers a disconnection condition, the edge scheduling node can be provided with directly readable local input, enabling the development task to continue execution.
[0067] When the communication between the cloud scheduling node and the edge scheduling node is interrupted, the edge scheduling node enters the offline scheduling state and controls the corresponding developed intelligent agent to continue executing the task based on the locally cached task information.
[0068] To determine the communication status, the communication detection cycles are numbered with consecutively increasing positive integers. The duration of each communication detection cycle is determined during system deployment based on network round-trip latency test records of the deployment environment, and is no less than the latency required for a heartbeat message between the cloud scheduling node and the edge scheduling node to complete one round trip and reply with confirmation, ensuring that one bidirectional heartbeat message is sent and confirmed within each communication detection cycle. The bidirectional communication detection result for each communication detection cycle is recorded using binary values: one for completed bidirectional communication confirmation and zero for incomplete bidirectional communication confirmation. Completed bidirectional communication confirmation means that both the cloud scheduling node and the edge scheduling node receive the heartbeat message sent by the other party within the same communication detection cycle and both reply with confirmation messages. If the above bidirectional communication confirmation is not completed, the bidirectional communication detection result is recorded as zero.
[0069] To avoid repeated triggering of the recovery process due to short-term network jitter, the number of consecutive communication detection cycles required to determine whether communication has transitioned from a condition that triggers a disconnection to one that does not is set as a preset number of consecutive communication detection cycles, which is a positive integer. This preset number of consecutive communication detection cycles is obtained during system deployment based on communication link jitter test records. Short-term jitter events with progressively increasing durations that automatically recover after injection are injected into the communication link according to the network testing specifications of the deployment environment. The number of consecutive bidirectional communication confirmation success cycles during each short-term jitter injection is recorded, and the maximum consecutive bidirectional communication confirmation success cycle count in all records is added to the communication detection cycle count. The period is determined by a preset number of continuous communication detection periods. For the current communication detection period, a continuous communication detection period corresponding to the preset number of continuous communication detection periods is selected backward from the current communication detection period. The disconnection condition refers to the failure to complete bidirectional communication confirmation in any of the selected communication detection periods. When this occurs, the communication disconnection condition is triggered. The communication disconnection condition is not triggered only when bidirectional communication confirmation is completed in each of the selected communication detection periods. This determination is equivalent to counting all selected bidirectional communication detection results. When the number of detection results that have completed bidirectional communication confirmation is equal to the preset number of continuous communication detection periods, the communication disconnection condition is not triggered; otherwise, the communication disconnection condition is triggered.
[0070] At the end of each communication detection cycle, the current communication state is determined based on the bidirectional communication detection results up to that cycle. The disconnection period refers to the continuous time interval from the start time when the current communication state changes from not triggering the disconnection condition to triggering the disconnection condition, to the time when the current communication state first changes from triggering the disconnection condition back to not triggering the disconnection condition and then resumes communication. The disconnection start time is the end time of the communication detection cycle in which the aforementioned state transition occurs, and the communication resumption time is the end time of the communication detection cycle in which the aforementioned state resumption transition occurs. The disconnection period includes the disconnection start time but does not include the communication resumption time. During the disconnection period, the most recently determined current communication state is the one that triggers the disconnection condition.
[0071] The method of this embodiment is started when the communication state corresponding to the previous communication detection period triggers the disconnection condition, the communication state corresponding to the current communication detection period does not trigger the disconnection condition, and there are new task events generated during the disconnection period at the cloud scheduling node or the edge scheduling node; the new task event refers to the task execution event recorded by any scheduling node controlling the development agent to execute a task during the disconnection period.
[0072] In this embodiment, branch event loggers are deployed on cloud scheduling nodes and edge scheduling nodes. The branch event loggers are used to record task execution events, code version information used during task execution, input development product version, and output development product version information during the disconnection period. By using the branch event loggers to retain the above information, the execution conditions and product sources of each task event can be restored, providing a traceable basis for cross-branch comparison after communication is restored.
[0073] This embodiment also deploys an input condition fingerprint generator. The input condition fingerprint generator is used to generate an input condition fingerprint based on the task identifier, the task execution parameter set, the normalized preceding causal identifier set, the input development product version set, the code version information, the task operation object set, and the synchronization epoch identifier. The normalized preceding causal identifier set is obtained by transforming the direct preceding task event set of the task event one by one. Each direct preceding task event is transformed into a normalized preceding causal identifier composed of the preceding task identifier, the input condition fingerprint of the preceding task event, and the product identifier and content summary of the output development product version generated by the preceding task event. The unique identifier of the task event in the branch locality is not used. Thus, logically identical preceding tasks in the cloud branch and the edge branch with the same input and output content but different task event unique identifiers are transformed to obtain the same normalized preceding causal identifier, so that downstream task events that depend on its result can obtain the same input condition fingerprint.
[0074] This embodiment also deploys a fork determination executor; the fork determination executor is located on a cloud scheduling node and is used to determine duplicate results, expired results, mergeable results, and conflicting results.
[0075] This embodiment also deploys an impact closure generator; the impact closure generator is used to determine the affected downstream task events that actually read the aforementioned development product versions in a bipartite graph composed of task events and development product versions, based on development product versions marked as expired, conflict pending, pending verification, or associated pending confirmation, and to map the affected downstream task events to affected tasks.
[0076] This embodiment also deploys a scheduling master executor; the scheduling master executor is used to retain valid task results, freeze conflicting tasks, and reorder and allocate development agents for the affected local task sets.
[0077] Step 100: When the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition, the cloud scheduling node periodically generates a common task snapshot. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a task event set based on the common task snapshot and record the development product version.
[0078] The branch starting point is the most recent shared task snapshot before the disconnection start time, in which the cloud scheduling node and the edge scheduling node completed synchronization and confirmed that the content was consistent. This shared task snapshot represents the shared task state and development artifact version state before the cloud branch and the edge branch started recording new task events, and serves as a common benchmark for disconnection processing. The shared task snapshot records the task artifact dependency graph, the shared code version information set, the shared task execution state set, and the synchronization epoch identifier in a fixed order.
[0079] By selecting the task artifact dependency graph, common code version information set, common task execution status set, and synchronization epoch identifier as inputs to the common task snapshot, task dependencies, code baseline, execution progress, and disconnection batches can be fixed simultaneously, so that subsequent differences between the two branches can be determined relative to the same baseline.
[0080] Each piece of code version information in the common code version information set includes a code repository identifier, a code branch identifier, and a code commit version identifier; the synchronization epoch identifier is used to distinguish task events generated during different disconnection periods, preventing the merging of task events generated during multiple disconnections into task events during the same disconnection period.
[0081] When the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition, the cloud scheduling node periodically generates a common task snapshot and synchronizes the common task snapshot to the edge scheduling node. After synchronization, the cloud scheduling node and the edge scheduling node hold the same task artifact dependency graph, common code version information set, common task execution status set, and synchronization epoch identifier.
[0082] When communication changes from not triggering the disconnection condition to triggering the disconnection condition, both the cloud scheduling node and the edge scheduling node adopt the branch starting point and use the synchronization epoch identifier recorded in the common task snapshot corresponding to the branch starting point. The cloud branch and the edge branch respectively use the task product dependency graph, common code version information set, and common task execution state set recorded in the common task snapshot as the initial state, and record the task events and development product versions generated during the disconnection period after the initial state. The branch event recorder of the cloud scheduling node adds the cloud branch identifier to the task events generated during the disconnection period, and the branch event recorder of the edge scheduling node adds the edge branch identifier to the task events generated during the disconnection period.
[0083] Each task event during the disconnection period forms a task event record. This task event record includes, in a fixed order, a unique task event identifier, a task identifier, an identifier for this task execution attempt, information about the developing agent executing the task, a set of task execution parameters, code version information used during task execution, a set of input development artifact versions actually read, a set of output development artifact versions generated, a set of direct preceding task events, a set of task operation objects, the logical order of the task event in the local branch, the branch identifier to which the task event belongs, the synchronization epoch identifier to which the task event belongs, and the execution status of the task event. Using the above fields as input to the task event record, it is possible to distinguish the task identifier, the identifier for this task execution attempt, and the branch identifier to which the task event belongs, and to establish the correspondence between the set of task execution parameters, the set of direct preceding task events, the set of input development artifact versions, and the set of output development artifact versions, supporting subsequent determination of repetition, expiration, merging, and conflict.
[0084] The information on the developed intelligent agent includes the type and identifier of the developed intelligent agent; the set of task execution parameters includes task instructions, model version or tool version; the code version information includes code repository identifier, code branch identifier and code commit version identifier; the set of task operation objects includes at least one of the following: code file, function, interface definition, configuration item, database structure, test case or document section.
[0085] Each task event in the cloud branch uses a cloud branch identifier, and each task event in the edge branch uses an edge branch identifier; all task events generated from the same common task snapshot as the branch starting point use the synchronization epoch identifier of that common task snapshot.
[0086] The logical order of task events in the local branch is only used to determine the order of task events within the same branch, and is not used to directly compare the chronological relationship between task events in the cloud branch and task events in the edge branch; the causal relationship across branches is determined based on the synchronization epoch identifier, the set of direct preceding task events, and the set of input development artifact versions.
[0087] Before executing each coding task, testing task, or documentation task, the cloud scheduling node and the edge scheduling node record the code version information used during the execution of the task, the set of direct preceding task events, and the set of input development artifact versions by the branch event logger; after the task is completed, the branch event logger records the set of output development artifact versions, the set of task operation objects, and the execution status.
[0088] The task event set includes a cloud task event set and an edge task event set. The cloud task event set consists of all task events generated by the cloud scheduling node during the disconnection period, and the number of cloud task events is a non-negative integer. Cloud task events are arranged according to their task event sequence number within the cloud branch. The edge task event set consists of all task events generated by the edge scheduling node during the same disconnection period, and the number of edge task events is a non-negative integer. Edge task events are arranged according to their task event sequence number within the edge branch. When no task events are generated in any branch, the corresponding task event set is empty.
[0089] Each code commit version, test report version, and documentation product version is collectively referred to as a development product version. Each development product version forms a development product version record, which includes, in a fixed order, the product identifier, product type, standardized content summary, code version information used by the task event that generated the development product version, the set of task operation objects of the task event, the set of source development product versions that directly participated in generating the development product version, the task identifier of the task event, and the unique task event identifier of the task event.
[0090] The product type is used to distinguish the types of development product versions, and its value can only be a code commit version, a test report version, or a document product version. The product identifier is used to identify the correspondence between different branches and different versions of the same logical development product. It is determined by the product type and the logical position of the development product in the task product dependency graph, and does not include the branch identifier or the task event unique identifier. Specifically, the logical position of the code commit version is the repository identifier and file path of the code object in the code repository, or the qualified name of the interface definition; the logical position of the test report version is the identifier of the object under test and the test suite identifier; the logical position of the document product version is the document identifier and the document chapter identifier. Thus, the development product versions generated for the same logical development product in the cloud branch and the edge branch have the same product identifier, which is unrelated to their task event unique identifier in their respective branches. This allows the fork determination executor to perform family comparison of development product versions of different branches according to the same product identifier.
[0091] Content summaries are used to identify development product versions with identical content. They are obtained by first normalizing the development product content and then performing a summary operation on the normalized result. The normalization process is performed in a consistent and repeatable manner according to the product type. For code submissions, the text is unified to the same character encoding and the same newline character, trailing whitespace is removed, and the original order and indentation of code statements are preserved without changing the syntax structure. For test report versions, only test case identifiers, test execution conclusions, and assertion results are extracted and sorted in ascending order by test case identifiers, removing execution timestamps, execution host information, and random order. For documents... For each product version, the text is standardized to the same character encoding and newline character, and automatically generated timestamps and generation environment information are removed. The digest operation is a one-way hash operation, where the same normalization result yields the same content digest, and different normalization results yield different content digests when no digest collision occurs. The above normalization process ensures that development products with substantially the same content and differences only in character encoding, newline characters, or volatile fields obtain the same content digest. The code version information, task operation object set, task identifier, and unique task event identifier in the development product version record have the same meaning and the same value as the corresponding fields in the task event record that generated the development product version.
[0092] To ensure that development artifacts generated during the disconnection period can be processed according to this embodiment after the communication condition changes from triggering the disconnection condition to not triggering the disconnection condition, the cloud scheduling node and edge scheduling node restrict the task execution of each development agent to a mutually isolated execution environment during the disconnection period, so that the output during the disconnection period remains reversible. Specifically, coding tasks are executed in their respective independent working trees or isolated code branches, and testing and documentation tasks are executed in temporary databases and sandbox environments. During the disconnection period, the code branch and data storage corresponding to the common benchmark are not directly rewritten. For irreversible external operations such as database migration, deployment operations, release, calling external interfaces, modifying remote branches, and creating or deleting cloud resources, which cannot be undone by merging development artifacts after the communication condition changes from triggering the disconnection condition to not triggering the disconnection condition, external command idempotent keys are assigned to them. Only during the pre-commit confirmation stage, the scheduling master executor will coordinate the process after the communication condition has not been triggered and the fork determination is completed. Execution: When the same external operation occurs repeatedly in both cloud and edge branches, it is identified by the idempotency key of the external command and executed only once. Irreversible external operations that have already occurred are compensated or replayed according to the registered compensation transaction rules. The idempotency key of the external command is generated by digest operation based on the operation type, operation target identifier, and normalized operation parameters of the external operation, so that external operations with the same operation type, operation target, and operation parameters in both cloud and edge branches obtain the same idempotency key of the external command. For each type of irreversible external operation, the corresponding compensation transaction rules are registered during system deployment. The compensation transaction rules specify the inverse operation required to undo the side effects of the external operation and the triggering rules for replaying the external operation. Accordingly, this embodiment is applicable to pure development product generation tasks such as code submission versions, test report versions, and document product versions, and also covers tasks containing irreversible external operations through the above-mentioned isolation, idempotency, compensation, and pre-commit confirmation mechanisms.
[0093] The output of this step includes a set of task events and the development artifact version corresponding to each task event; the above content is used as input for generating candidate fork event pairs in step 200.
[0094] Step 200: After the communication condition changes from triggering disconnection to not triggering disconnection, candidate fork event pairs are generated for the task event set, and the task events and candidate fork event pairs are judged to obtain the event results, as follows: Figure 2 As shown.
[0095] When the communication condition changes from triggering disconnection to not triggering disconnection, the fork determination executor reads the cloud task event set and edge task event set recorded in step 100.
[0096] The fork determination executor first uses the synchronization epoch identifier as the filtering criterion, comparing only task events with the same synchronization epoch identifier; the same synchronization epoch identifier means that the corresponding task events occurred during the same disconnection period. This filtering can prevent the erroneous merging of task events generated by multiple disconnections.
[0097] Under the premise that the synchronization epoch identifiers are the same, the fork determination executor selects one task event from the cloud task event set and the edge task event set respectively; when two task events have the same task identifier, or two task events involve the same task operation object, or two task events involve task operation objects with a relationship, they will form a candidate fork event pair in a fixed order of cloud branch task event first and edge branch task event second.
[0098] Candidate fork event pairs are generated by using task identifiers, task operation objects, and the relationships between task operation objects. This can simultaneously cover situations where the same task is executed repeatedly, the same object is modified separately, and there are structural dependencies between different objects, thus limiting the scope of analysis for subsequent result determination.
[0099] Candidate fork events cover situations where cloud scheduling nodes and edge scheduling nodes execute the same task, situations where two different tasks modify the same code object, and situations where two tasks modify different objects but there are interface call relationships, configuration reference relationships, or database dependency relationships between the corresponding objects.
[0100] The aforementioned interface call relationships, configuration reference relationships, and database dependency relationships are uniformly determined through static analysis based on the code and configuration corresponding to the common benchmark, and are updated synchronously with changes to the task operation objects during the disconnection period. Interface call relationships refer to a task operation object calling or implementing an interface declared by another task operation object in its code. Configuration reference relationships refer to a task operation object reading or writing configuration items defined by another task operation object. Database dependency relationships refer to a task operation object accessing a database structure defined by another task operation object. These relationships are recorded by the branch event logger when recording the set of task operation objects, serving as the basis for determining whether two task operation objects have an association relationship and whether a definite structural dependency exists. When any of the above relationships exists between two task operation objects, it is determined that they have an association relationship and a definite structural dependency.
[0101] To filter candidate bifurcation event pairs that need further analysis, the overlap of input development product versions and the overlap of task operation objects are calculated respectively. The overlap of input development product versions is equal to the number of development product versions common to the input development product version sets of the two task events, divided by the number of development product versions after merging and deduplicating the two input development product version sets. The overlap of task operation objects is equal to the number of task operation objects common to the task operation object sets of the two task events, divided by the number of task operation objects after merging and deduplicating the two task operation object sets.
[0102] The overlap of input development product versions and task operation objects are both expressed using the Jaccard similarity coefficient, which has a value greater than or equal to zero and less than or equal to one. When the two sets are merged and deduplicated to form an empty set, the corresponding overlap is set to zero. Using the Jaccard similarity coefficient can express the degree of overlap between two sets by the ratio of the intersection to the union, so that the overlap does not lose comparability due to the difference in the total number of elements in the two sets.
[0103] Retention rules are constructed based on the overlap of input development product versions and the overlap of task operation objects, retaining candidate fork event pairs that trigger the retention rules. The retention rules for candidate fork event pairs consist of a mandatory retention condition and an overlap retention condition, which are parallel and selectively triggered. When two task events have the same task identifier, generate output development product versions with the same product identifier, or have any definite structural dependency relationship between the task operation objects of the two task events, such as interface call relationship, configuration reference relationship, or database dependency relationship, the mandatory retention condition is triggered, and the candidate fork event pair is retained regardless of the overlap value, to avoid deleting the candidate fork event pair selected by association due to an empty intersection, and to prevent contradictions between generation rules and filtering rules. When the mandatory retention condition is not triggered, if the overlap of input development product versions is greater than or equal to the input overlap filtering threshold, or the overlap of task operation objects is greater than or equal to the operation object overlap filtering threshold, the overlap retention condition is triggered, and the candidate fork event pair is also retained. The input overlap filtering threshold and the operation object overlap filtering threshold are independent of each other, and their values are both greater than or equal to zero and less than or equal to one.
[0104] For example, for tasks involving events With task events The candidate fork event pairs are respectively named as follows: and This represents the set of input development artifact versions for two task events, in order to and If the set of task operation objects represents two task events, then the input is the overlap of development artifact versions. Overlap with task operation object It can be represented as:
[0105] and ;
[0106] by This indicates the value of the mandatory retention condition indicator, which is triggered when the mandatory retention condition is met. When the mandatory retention condition is not triggered ;by This indicates the input overlap filtering threshold, to Indicates the threshold for filtering based on the overlap of the operation objects; This indicates the retention indicator value for candidate fork event pairs, when retained. When not retained Then the retention rule for candidate fork event pairs can be expressed as:
[0107] ;
[0108] in, and These are the indices of the two task events, Indicates the number of elements in the set. To represent the intersection of sets, To represent the union of sets, Represents logical OR, This indicates an indicator function that takes a value of 1 if the condition within the parentheses is true, and 0 otherwise. , .
[0109] The input overlap screening threshold and the operation object overlap screening threshold are obtained based on historical candidate bifurcation event pairs, and the screening effect is confirmed using validation samples that are independent of the threshold fitting samples. Human reviewers mark historical candidate bifurcation event pairs as either requiring further analysis or not requiring further analysis, and classify the final results for those requiring further analysis. The marked samples are divided into independent fitting sample sets and validation sample sets. Historical candidate bifurcation event pairs that trigger mandatory retention conditions do not participate in threshold fitting but are directly included in the retention results, thus ensuring that samples requiring further analysis where both the input development product version overlap and the task operation object overlap are zero are still retained due to triggering the mandatory retention condition. For other historical candidate bifurcation event pairs, the input development product version overlap and the task operation object overlap are calculated separately. Zero and the midpoint between adjacent but unequal overlap values in the fitting sample set are used as candidate thresholds. The input overlap screening threshold and the operation object overlap screening threshold are iterated through their respective candidate threshold combinations, and the candidate threshold is selected based on the desired outcome. The candidate thresholds are determined by minimizing the total number of retained event pairs while retaining all candidate bifurcation event pairs labeled as requiring further analysis from the combined sample set. This set of thresholds is then verified on the validation sample set to ensure that it still retains all candidate bifurcation event pairs labeled as requiring further analysis. If the verification fails, the thresholds are adjusted in the order that maximizes the number of retained candidate bifurcation event pairs labeled as requiring further analysis in the validation sample set and minimizes the total number of retained event pairs. When no historical labeled data exists, candidate bifurcation event pairs generated in the test environment and manually verified for continued analysis are used to divide the fitted samples and validation samples using the same process, obtaining the two thresholds mentioned above. The overlap is only used as a screening criterion for determining whether to continue analysis and is not directly used as the final criterion for determining duplicate results, mergeable results, or conflicting results. When the fitted sample set without triggering the mandatory retention condition is empty, both the input overlap screening threshold and the operation object overlap screening threshold are set to 1. When multiple candidate threshold combinations have equal optimal solutions, the threshold combination with the larger input overlap screening threshold is selected.
[0110] For example, with This represents the set of samples in the fitted sample set that did not trigger the mandatory retention condition. Represents the set of validation samples; for any sample ,by Indicates the degree of overlap between its input development artifact versions, in order to Indicates the degree of overlap of the task operation objects, in order to This indicates manually labeled values, marked as requiring further analysis. When marked as no further analysis is needed ;Will The overlap of different input development product versions is denoted in ascending order as follows: The overlap of different task operation objects is recorded in ascending order as follows: Then the input overlap candidate threshold set and the operation object overlap candidate threshold set can be represented as follows:
[0111] and ;
[0112] in, Indicates the sample index. Indicates the first The input development artifact version overlap value is taken. Indicates the first The value of overlap between task operation objects. and These are the ordinal indices of the corresponding values. and These represent the number of overlap values for two distinct categories. and These represent two sets of candidate thresholds, to and to Each adjacent value is assigned a specific position in the calculation.
[0113] for ,by This represents the retention indicator value of fitted samples that did not trigger the mandatory retention condition under a given combination of thresholds, and is expressed as... express China satisfies Given a set of feasible threshold combinations, the fitted threshold combination is obtained. It can be represented as:
[0114] ;
[0115] in, This represents the set of feasible threshold combinations for the fitting phase. Denotes the Cartesian product of two candidate threshold sets. Indicates belonging to, This represents the set of threshold combinations that minimize the objective function. and These represent the input overlap filtering threshold and the operation object overlap filtering threshold selected from the set, respectively.
[0116] for Continue to use This indicates the mandatory retention condition indicator value for the sample, and is expressed in... Indicates the retention indicator value of the verification sample; when The verification is confirmed to be successful; if the expression is not true, then... In order The most frequent value The threshold combinations are adjusted in order of the fewest values; where, Indicates sample Triggering the mandatory retention condition, Indicates sample The mandatory retention condition was not triggered; the summation formula used to adjust the threshold combination. This indicates the number of samples that need to be retained for further analysis and validation; the summation formula is used. This represents the total number of validation samples that were retained.
[0117] By using independent sets of fitted samples and validation samples, it is possible to verify whether the two determined screening thresholds still meet the retention requirements for candidate bifurcation event pairs that were not involved in the fitting, thus avoiding the evaluation of screening effectiveness based solely on fitted samples.
[0118] The fork determination executor performs result determination on the filtered candidate fork event pairs and each task event generated during the disconnection period, obtaining event results. Event results include duplicate results, expired results, mergeable results, and conflicting results. The result determination is performed in the following order: duplicate result determination, expired result determination, mergeable result determination, and conflicting result determination. To avoid mixing the attributes of a single task event with the relationship between two task events into the same classification domain, this embodiment distinguishes between two levels: event-level state and relationship-level state. The event-level state describes a single task event itself, and its value can only be valid, expired, pending verification, or duplicate copy. Expired indicates that the task event has necessary inputs that are determined to be incompatible, rendering those inputs invalid. Pending verification indicates that the task event does not have necessary inputs that are determined to be incompatible, but the compatibility of at least one necessary input cannot be confirmed. Duplicate copy indicates that the task event has a duplicate relationship with another task event, and one of them is retained as a copy record. Valid indicates that the remaining task events are confirmed to be retainable. The relationship-level state describes the relationships between the same candidate fork event pairs. The relationship between two task events can only be equivalent, mergeable, conflicting, or unrelated. Equivalence corresponds to the repetition relationship confirmed by the repetition result determination; mergeable corresponds to the mergeable relationship confirmed by the mergeable result determination; conflict corresponds to the conflicting relationship confirmed by the conflicting result determination; and unrelated indicates that the two task events neither constitute a repetition relationship nor a mergeable or conflicting relationship. Expiration result determination generates an event-level state for a single task event, while repetition result determination, mergeable result determination, and conflicting result determination generate relation-level states for candidate fork event pairs. The same task event can participate in multiple candidate fork event pairs simultaneously, thus possessing one event-level state and multiple relation-level states concurrently, eliminating the requirement for a single task event to belong to only one result category. The fork determination executor first determines the relation-level state on candidate fork event pairs and the event-level state on a single task event. Finally, it performs a unified resolution on the conflicting connected components formed by conflicting relationships and the development product version family corresponding to the same product identifier, obtaining the final processing conclusion for each task event and each development product version.
[0119] Before the execution result is determined, the input condition fingerprint generator generates an input condition fingerprint for each task event. The input condition fingerprint is generated in a fixed order, including the task identifier, the set of task execution parameters, the set of normalized preceding causal identifiers, the set of input development product versions, code version information, the set of task operation objects, and the synchronization epoch identifier. The set of normalized preceding causal identifiers is obtained by converting each of the direct preceding task events of the task event into a normalized preceding causal identifier composed of the preceding task identifier, the input condition fingerprint of the preceding task event, and the product identifier and content summary of the output development product version generated by the preceding task event. The unique identifier of the task event in the branch is not used, so that the preceding tasks with the same logic in the cloud branch and the edge branch correspond to the same normalized preceding causal identifier. Since the normalized preceding causal identifier depends on the input condition fingerprint of the preceding task event, the input condition fingerprint is generated in the causal order of the direct preceding task event first and the subsequent task event last. The input condition fingerprint of the preceding task event is generated before the task event that depends on its result.
[0120] Selecting the above inputs to generate input condition fingerprints can simultaneously represent the task identifier, the set of task execution parameters, the set of normalized pre-causal identifiers, the set of input development product versions, code version information, the set of task operation objects, and the synchronization epoch identifier, so that task events with the same execution conditions but different unique task event identifiers can obtain the same input condition fingerprints.
[0121] The input condition fingerprint generator first sorts each set-type field in ascending order by element identifier, then encodes each field according to the field type identifier, field length, and field content. The field content is encoded using UTF-8. Finally, a digest operation is performed on the byte sequence obtained by concatenating the encoded results to obtain a fixed-length input condition fingerprint. This digest operation is a one-way hash operation, where the same input yields the same digest. In the absence of a digest collision, different inputs yield different digests. The above normalization process ensures that set-type fields with different element order but the same content obtain the same normalization result. The input condition fingerprint is used to determine whether two task events have the same execution input conditions, and is not used to directly determine whether different outputs are functionally equivalent.
[0122] Since the input condition fingerprint already contains the task identifier and the set of task execution parameters, the duplicate result determination directly uses the task identifier, the input condition fingerprint, and the normalized output product description sequence for comparison, and no other key values that encode the duplicate of the task identifier and task execution parameters are generated separately.
[0123] When two task events in a candidate fork event pair have the same task identifier, the same input condition fingerprint, and the same normalized output product description sequence, the candidate fork event pair is judged as a duplicate result. The normalized output product description sequence is formed by extracting each output development product version of a task event and representing it as a product description item consisting of three items: product identifier, product type, and content summary. Then, all product description items are sorted in a fixed order of product identifier, product type, and content summary. Identical product description items are retained according to their frequency of occurrence without deduplication. Two normalized output product description sequences are the same if the two sequences contain the same product description items and their frequency of occurrence. Therefore, output development product versions with the same content summary but different product identifiers or product types will not be misjudged as the same, and the difference in the number of output development product versions will not be ignored due to deduplication.
[0124] For two task events with the same input conditions but different output contents, they are not directly judged as duplicate results, but expired result judgment or conflict result judgment is continued; for duplicate results, only one valid task status and one development artifact version are retained, and the other task event is marked as a duplicate execution record.
[0125] The object of expiration result determination is the individual task event itself generated during the disconnection period, not the candidate fork event pair; whether a task event is selected into a candidate fork event pair only determines whether it participates in duplicate result determination, mergeable result determination, and conflict result determination and obtains a relation-level state, without affecting the execution of expiration result determination for that task event; therefore, regardless of whether a task event belongs to any candidate fork event pair, the fork determination executor performs expiration result determination on it separately and generates an event-level state; the event-level state obtained by the expiration result determination of the same task event and its relation-level state obtained in each candidate fork event pair coexist independently.
[0126] In the expiration result determination, for each task event whose event-level state has not yet been marked as a duplicate copy, the necessary input development product version set that directly affects the task result is determined from the actual set of input development product versions read by the task event. Here, the task event whose event-level state has not yet been marked as a duplicate copy refers to the task event that is still retained after the duplicate result determination but is not recorded as a duplicate record in the duplicate relationship. Therefore, the necessary input development product version set is included in the actual set of input development product versions read, and will not include development product versions outside the actual set of input development product versions read.
[0127] The necessary input development artifact version set is determined from the actual input development artifact version set read according to the following executable method to ensure that different implementers obtain the same necessary input development artifact version set for the same task event; for coding tasks, the branch event logger records the source files, header files, interface definition files, and configuration files that the build system and compilation tools actually open and participate in compilation during task execution, and determines their corresponding input development artifact versions as necessary inputs; for input development artifact versions not read by the compilation tools, if static dependency slicing analysis confirms that they are not referenced by the compilation unit where the task operation object is located, they are not counted as necessary inputs; the static dependency slicing analysis takes the compilation unit where the task operation object is located as the slicing starting point, and traces outward layer by layer along the reference relationships, inclusion relationships, and symbol definition and usage relationships in the source code to form the static dependency file set of the compilation unit; when a certain When a file corresponding to an input development artifact version does not belong to the static dependency file set, it is confirmed that it is not referenced by the compilation unit where the task operation object is located. For test tasks, the input development artifact versions corresponding to the code version under test, test case baseline, and test data and dependency libraries actually loaded during test execution are determined as necessary inputs. For documentation tasks, the input development artifact versions corresponding to the code interface, test report, and document source chapter actually read by the documentation generation tool are determined as necessary inputs. The above records are uniformly collected by the branch event logger during task execution through file access records, interface call records, and build system read records, and correspond one-to-one with the objects declared in the task operation object set. When an input development artifact version that is actually read does not appear in the above read records and is not associated with the task operation object by static dependency slicing analysis, it is determined that it does not have a direct impact on the task result and is not included in the necessary input development artifact version set.
[0128] For each development product version in the set of necessary input development product versions, a reference development product version with the same product identifier is found that was confirmed to be valid after the communication changed from triggering the disconnection condition to not triggering the disconnection condition. Then, a compatibility determination is performed between the two. The compatibility determination result of each necessary input development product version and its reference development product version can only be one of three: compatible, incompatible, or incompatible. The validity of the task event input is obtained by summarizing the compatibility determination results of all necessary input development product versions: the task event input is determined to be valid only when all necessary input development product versions are compatible with their respective reference development product versions; the task event input is determined to be invalid if at least one necessary input development product version is determined to be incompatible; when there is no necessary input development product version determined to be incompatible, but the compatibility determination result of at least one necessary input development product version is incompatible, the task event input is determined to be pending verification.
[0129] The reference development product version confirmed as valid after the communication disconnection condition is changed to no disconnection condition is determined as follows to eliminate the interdependence between expiration determination and validity marking: The initial value of the reference development product version is the development product version with the same product identifier in the common task snapshot. This version is considered as the initial reference version confirmed as valid at the start of the disconnection process; when there are multiple candidate development product versions generated during the disconnection period for the same product identifier, only the candidate development product version that has been confirmed as valid or mergeable in this round of processing can replace the reference development product version with that product identifier; when there are multiple confirmed valid or mergeable candidate development product versions, the version in the descendant position is selected according to the ancestor relationship between the code commit versions used by the task event that generated the development product version. If the versions are still indistinguishable, a unique reference development product version is selected based on the ascending order of product identifier and content summary, assuming the synchronization epoch identifier is the same. The expiration determination is performed using a fixed-point iterative method. First, a round of compatibility determination is performed on all pending task events using the initial reference version, and an event-level state is generated. Then, the reference development product version of the corresponding product identifier is updated based on the development product versions confirmed as valid or mergeable in this round. Next, the compatibility determination is re-performed on the pending task events affected by the product identifiers whose reference development product versions have changed. The above iterative process is repeated until the reference development product versions of all product identifiers and the event-level states of all pending task events no longer change, so that the expiration determination result is consistent with the reference version selection and does not depend on the processing order of task events.
[0130] Compatibility is determined based on the version relationship with the version of the development artifact to be evaluated. For code commit versions, it is determined whether the code commits used by the task include necessary prerequisite code commits. Here, the lowest code commit that is confirmed to be valid after the communication is changed from triggering the disconnection condition to not triggering the disconnection condition and that must be included is called the necessary prerequisite code commit. Specifically, it is determined whether the necessary prerequisite code commit is an ancestor commit of the code commit version corresponding to the version of the development artifact to be evaluated, or whether the two are the same. When the necessary prerequisite code commit is an ancestor commit of the version of the code commit to be evaluated, or the two are the same, it means that the code commit used by the task already includes the necessary prerequisite code commit, and is therefore considered compatible. When the code commit version corresponding to the version of the development artifact to be evaluated is an ancestor commit of the necessary prerequisite code commit and the two are not the same, it means that the task is based on code execution earlier than the necessary prerequisite code commit, and the code commit used by the task has not yet included the necessary prerequisite code commit. In this case, it is not directly considered compatible, but path dependency analysis is further performed to determine whether the missing commit affects the task operation object actually read by the task. It is only considered compatible if the missing commit does not affect the task operation object actually read by the task; otherwise, it is considered incompatible.
[0131] Path dependency analysis examines each missing commit from the version of code to be judged to the necessary preceding code commits, checking the modified code files, functions, or interface definitions. It then compares these modifications with the actual task operation objects read by the task and the set of static dependency files obtained through static dependency slicing analysis. If none of the modified objects from any of the missing commits belong to the actual task operation objects read by the task or its set of static dependency files, the missing commits are deemed not to affect the actual task operation objects read by the task; otherwise, they are deemed to affect the task. For interface versions, it is determined whether the interface version number corresponding to the version of the development product to be judged is within the compatible version range declared in the reference development product version declaration. For tasks involving configuration, database structure, test baseline, or documentation sources, it is also determined whether the input configuration version or database structure version meets the task's operational requirements, and whether the input test baseline or documentation source is still a valid version. At least one of the above version relationships must correspond to the version of the development product to be judged; version relationships that do not correspond to the version of the development product to be judged are not included in the compatibility determination of that development product version.
[0132] When the comparison criteria required for the version relationship corresponding to the development product version to be judged are incomplete, making it impossible to confirm either compatibility or incompatibility, the compatibility judgment conclusion for the necessary input development product version is that compatibility cannot be confirmed. The incomplete comparison criteria include the following triggering scenarios: For code commit versions, there is no common ancestor commit between the code commit to be judged and the necessary preceding code commits, or the commit history is missing, making it impossible to determine their ancestor relationship; for interface versions, the reference development product version does not declare a compatible version range, or the interface version number of the development product version to be judged cannot be resolved; for configuration or database structure versions, the reference development product version does not register the version required for task execution, making it impossible to determine the input. Whether the configuration version or database structure version meets the task operation requirements; whether the test baseline or document source is still a valid version has not been confirmed in this round of processing; since the initial value of the reference development product version is taken from the common task snapshot, there is always a confirmed valid reference development product version in the expiration determination process for any product identifier, so the inability to confirm compatibility is only caused by the incompleteness of the above comparison basis, and not by the lack of reference development product versions; during the fixed-point iteration process, the necessary input development product versions that are determined to have incompatibility cannot be confirmed will be re-performed for compatibility determination as the reference development product version of the corresponding product identifier is updated to a confirmed valid or mergeable version, and may be converted to compatible or incompatible in subsequent iterations.
[0133] When the input of a task event is determined to be invalid, the task event and its output development artifact version are determined to be expired, and the event-level status of the task event is marked as expired. When the input of a task event is determined to be pending verification, that is, there is no necessary input development artifact version determined to be incompatible, but the compatibility determination conclusion of at least one necessary input development artifact version is that compatibility cannot be confirmed, the event-level status of the task event is marked as pending verification, and its output development artifact version is set to the pending verification status. It is not directly determined to be valid, but the corresponding validity mark is generated in step 300. When the input of a task event is determined to be valid, the event-level status of the task event is marked as valid.
[0134] In the determination of mergeable results, for candidate forked event pairs that are not judged as duplicate or expired results, it is determined whether there is a direct or transitive pre-dependency between the two task events, and whether there is a definite structural conflict between their task operation objects. The structural conflict refers to the existence of structural modifications between the task operation objects of the two task events that cannot be simultaneously established, including one task event deleting or renaming an interface called by another task event, one task event modifying the value constraints of configuration items referenced by another task event, and one task event changing the field definition of the database structure that the other task event depends on. When there is no such structural modification between the task operation objects of the two task events, it is determined that there is no definite structural conflict. When there is no direct or transitive pre-dependency between the two task events, and there is no definite structural conflict between their task operation objects, the candidate forked event pair is marked as a mergeable candidate.
[0135] For a task product dependency graph, it is determined that there is no task-level sequential dependency between two tasks only when there is no directed path from the cloud branch task to the edge branch task and no directed path from the edge branch task to the cloud branch task; if there is a directed path in either direction, it is determined that there is a task-level sequential dependency between the two tasks.
[0136] In an optional embodiment, for merging candidates of coding tasks, a common code version is used as the common ancestor version. The modifications of the cloud branch code results relative to the common ancestor version and the modifications of the edge branch code results relative to the common ancestor version are merged in a three-way manner. After the three-way merge is completed, it is checked whether there are conflicts involving the same lines of code, functions, interface definitions, or configuration items that cannot be automatically merged. The merged result is then compiled, statically verified, or subjected to impact testing. After the three-way merge is successful and all the verifications are passed, the two task events are determined to be mergeable results. If there are structural conflicts or the three-way merge and verification fail, they are determined to be conflicting results. Using a common code version to perform the three-way merge can identify the modifications made by the cloud branch and the edge branch relative to the common baseline, and verify after the merge whether the modifications of the two branches can take effect together.
[0137] In an optional embodiment, for test report versions and document artifact versions, a common retention condition is triggered when both the input code version and the necessary upstream development artifact version are valid versions. When the common retention condition is triggered, the corresponding development artifact version is allowed to be retained together, and the corresponding candidate fork event pair is determined as a mergeable result. The task operation object set does not have any common elements and is only used as a screening basis for mergeable candidates, and is not directly equivalent to a mergeable result.
[0138] In determining conflict results, the candidate fork event pair is deemed a conflict result only if it is not judged as a duplicate or expired result. When any of the following three situations occur: failure of third-party code merging, failure of compilation after merging, or failure of static structure verification after merging, the candidate fork event pair is judged as a conflict result. When one task event changes the interface, configuration, or database structure while another task event still depends on the original structure, when the development artifact versions generated by the two task events are incompatible with the input requirements of the same downstream task, or when the merge result fails the corresponding affected test, the candidate fork event pair is also judged as a conflict result.
[0139] For conflicting results, the last written result is not used to overwrite another result; the fork determination executor freezes the corresponding task and freezes downstream tasks that depend on development artifact versions with conflict pending markers, while retaining cloud branch results and edge branch results.
[0140] The output of this step includes the event-level status of each task event, the relation-level status of each candidate fork event pair and its result classification, and the development product versions that are determined to be expired, pending verification, and conflicting results; the above outputs are used in step 300 to generate validity markers for the development product versions.
[0141] Step 300: Generate a validity marker for the development artifact version based on the event result, and determine the affected task closure based on the validity marker.
[0142] Based on the determination result of step 200, a validity marker is generated for each development product version. The validity marker includes valid, duplicate, expired, conflict pending, pending verification, or associated pending confirmation. By using mutually distinguishable validity markers, the development product versions can enter the retention, deduplication, re-execution, freeze, or re-verification process respectively, and retain the traceability basis for each processing conclusion.
[0143] The development artifact version corresponding to a task event with a duplicate result is marked as duplicate; the development artifact version corresponding to a task event with an expired result is marked as expired; the development artifact version corresponding to a task event with a conflicting result is marked as conflict pending; the development artifact version corresponding to a task event with an event-level status of pending verification (i.e., a necessary input with incompatibility that cannot be confirmed) is marked as pending verification; and the development artifact version corresponding to a task event with a mergeable result is marked as valid. The validity flag of the development artifact version is written to the corresponding development artifact node. The results of task events or candidate fork events are categorized and written to the corresponding task nodes, and the task status is updated according to the result categorization.
[0144] When a code submission is marked as expired, conflict pending, or pending verification, the test report version and documentation artifact version that depend on it are not directly deleted, but are marked as associated and pending confirmation to retain traceability data. The test report version or documentation artifact version can only be restored to the valid mark when its input code version and the necessary upstream development artifact version are both confirmed to be valid.
[0145] The impact closure generator will form an invalid development product version set by combining all development product versions marked as expired and conflict pending, and an uncertain development product version set by combining all development product versions marked as pending verification and associated pending confirmation. The invalid development product version set and the uncertain development product version set will be merged and deduplicated to form the impact source development product version set, so that tasks that depend on development product versions that have not yet been confirmed as valid will also be included in the scope of freezing and re-verification, instead of being treated as confirmed as valid.
[0146] The influence of the closure generator propagates on the bipartite graph consisting of task events and development product versions, rather than on the set merged by task identifier, to avoid including task events under the same task identifier that have not actually read the affected development product version. One type of vertex in this bipartite graph consists of the task events generated during the disconnection period, and the other type consists of the development product versions. There are read edges pointing from each task event to the input development product version it actually reads, and there are generate edges pointing from each task event to the output development product version it generates.
[0147] The impact closure generator uses the set of impact source development artifact versions as the starting point for propagation. For each task event, if the set of input development artifact versions actually read by the task event and the set of impact source development artifact versions share at least one development artifact version, the task event is added to the initial set of affected task events. If the two do not share a development artifact version, the task event is not added to the initial set of affected task events. Thus, a task event under the same task identifier that only reads a valid development artifact version will not be added to the set of affected task events because another task event under the same task identifier reads an impact development artifact version.
[0148] The impact propagates layer by layer from the initial set of affected task events. Each layer of propagation yields a cumulative set of affected task events up to the current layer. When generating the next layer's set of affected task events, all task events in the current set are first retained. Then, the output development artifact versions generated by each task event in the current set are aggregated, and the aggregated results are merged and deduplicated to obtain the current layer's set of affected output development artifact versions. Next, the set of input development artifact versions actually read by each of the remaining task events is checked. If this set contains any development artifact version from the affected output development artifact version set, the task event is added to the next layer's set of affected task events. The same development artifact version connecting upstream and downstream affected task events must be both generated by a task event in the current set of affected task events and actually read by that downstream task event for the impact to propagate to that downstream task event.
[0149] Repeat the above layer-by-layer propagation process until the set of affected task events in the new layer contains the exact same task events as the set of affected task events in the previous layer. At this point, no more affected task events are added, the traversal stops, and the affected task event closure is obtained. Finally, each task event in the affected task event closure is mapped back to its corresponding task according to its task identifier, and after merging and deduplication, the affected task closure is obtained. A task is only included in the affected task closure if at least one task event of a task belongs to the affected task event closure.
[0150] Tasks that are not part of the affected task closure and whose entire output artifact versions are effectively marked remain in the completed state and are not subject to rescheduling. This step only propagates the impact along the artifact dependency edges that the task event actually reads, preventing tasks that have not actually read the affected artifact version or whose artifact version is uncertain from being included in the re-execution scope.
[0151] The output of this step includes a validity flag for the development product version, a set of invalid development product versions, a set of uncertain development product versions, and an affected task closure; the above output is used in step 400 to set the task status and form a set of recovery candidate tasks.
[0152] Step 400: Based on the common task snapshot, a unified task graph is formed, and local task rescheduling is performed on the tasks within the affected task closure to generate a local task execution sequence and send it to the corresponding development agent.
[0153] A unified task graph after recovery is formed based on the task product dependency graph, and processing is performed according to the results of step 200 and the validity marking of step 300.
[0154] For task events determined to be duplicate results, retain one valid task event and mark the remaining task events as duplicate execution records; for task events determined to be expired results, retain the expiration mark of its output development product version and restore the corresponding task to the pending execution state; for task events determined to be mergeable results and verified, write the task event and its development product version together into the unified task graph; for task events determined to be conflicting results, set them to the conflict pending state and retain the corresponding branch; at the same time, set the tasks in the affected task closure output in step 300 to the waiting for re-verification state or the pending execution state, and retain the completed state of the unaffected tasks.
[0155] For candidate fork event pairs determined to be conflicting results, the scheduling master executor generates corresponding conflict handling tasks based on the conflict causes identified in step 200 during conflict result determination. These conflict handling tasks include three types: code merging tasks, conflict verification tasks, and re-execution tasks, and are written into a unified task graph. The code merging task is for generating conflict results caused by failed three-way code merging. It uses a common code version as the common ancestor version, and combines the modifications of the cloud branch code results relative to the common ancestor version with the modifications of the edge branch code results relative to the common ancestor version as inputs to be merged. The coding agent resolves differences in identical lines of code, functions, interface definitions, or configuration items that cannot be automatically merged while preserving the modifications made by both parties. The task operation object is the result of merging and deduplicating the task operation object sets of the two conflicting task events in the candidate fork event pair, and its output is the code commit version after resolving the conflict; the conflict verification task is generated for the code commit version generated by the code merging task, as well as for the conflict results caused by compilation failure after merging, static structure verification failure after merging, or failure of the merge result to pass the affected tests. The corresponding coding agent or testing agent performs compilation, static structure verification, and affected tests on the corresponding code commit version, and writes the verification conclusion back to the validity flag of the corresponding development product version. Its task operation object is the task operation object corresponding to the verified code commit version; the re-execution task is for those that cannot be resolved by code merging. Conflict result generation includes situations where one task event changes the interface, configuration, or database structure while another task event still depends on the original structure, and situations where the development artifact versions generated by the two task events are incompatible with the input requirements of the same downstream task. The task is re-executed, using a confirmed valid or mergeable structure version as input. Conflicting tasks that still depend on the original structure or produce incompatible outputs are restored to a pending state and reassigned to development agents. The corresponding development agent then regenerates the development artifact version based on the confirmed valid input. All three conflict handling tasks establish a correspondence between the task identifier and the task operation object of the conflict task event they handle and the task being processed. The output of the code merging task serves as the conflict verification task. The input of the conflict verification task serves as the basis for confirming whether the corresponding code commit version can be restored to a valid mark. The coding tasks that are judged to have conflict results are collectively referred to as conflict coding tasks. Their conflict handling is jointly completed by the corresponding code merging task, the conflict verification task, and the re-execution task generated when the conflict cannot be resolved by code merging. When the code merging task completes the three-way merging and passes the conflict verification task, the merged code content forms a new code commit version record. The new code commit version record includes at least the corresponding artifact identifier, artifact type, normalized content summary, the two source code commit version identifiers that participated in the merging, the code merging task event identifier that generated the code commit version, and the version validity mark.Mark the new code commit as valid and identify it as a valid code version in the restored unified task graph as the corresponding artifact.
[0156] Check whether the merged task dependencies form a cycle; perform cycle checks one by one according to the writing order of the new dependencies. When a cycle is formed for the first time after adding the current new dependency edge, do not write the new dependency edge into the unified task graph, and retain the task dependencies before adding the new dependency edge, so that the unified task graph remains a directed acyclic graph.
[0157] The unified task graph preserves task events, input development artifact versions, output development artifact versions, and their version relationships. The scheduling master executor extracts tasks within the affected task closures from the unified task graph, as well as code merging tasks, conflict verification tasks, or re-execution tasks generated due to conflict handling, forming a set of recovery candidate tasks.
[0158] The scheduling master executor obtains the preset task value weight, estimated execution duration, preset deadline, marginal avoidable overdue loss, unblocking benefit, repeated execution cost, and current development agent load for each recovery candidate task, and performs local task rescheduling. Among them, the marginal avoidable overdue loss and unblocking benefit are used as positive reasons for processing the task as early as possible, and the repeated execution cost is used as the execution cost required to process the task. The current development agent load is not used as a direct weighting factor for task recovery scheduling benefits, but is used to determine the estimated start time of each recovery candidate task and the development agent allocation result.
[0159] Selecting the above inputs to perform local task rescheduling can simultaneously represent the preset task value weight, expected execution time, preset deadline, marginal avoidable overdue loss, unblockable benefit, repeated execution cost, and current development agent load, so that the generated local task execution sequence takes into account task dependencies, preset deadline, and current development agent load.
[0160] The preset task value weight is obtained and written to the task metadata when the task enters the task artifact dependency graph. When obtaining the preset task value weight, tasks whose output is read by the delivery node are prioritized over tasks whose output is not read by the delivery node; tasks on the critical path to the delivery node are prioritized over tasks not on that critical path; other tasks of the same order are arranged according to the priority of their associated requirements recorded in the requirements management system; and then tasks of the same order are arranged in descending order of the number of downstream tasks directly and indirectly blocked by the task. Tasks with the same sorting field are arranged in ascending order of task identifier. Preset task value weights are assigned as continuously decreasing positive integers according to the above sorting order. For code merging tasks, conflict verification tasks, or re-execution tasks added due to conflict handling, the highest preset task value weight among the tasks they handle is used. The preset deadline is set at any given time. When a task is created, task metadata is read from and written to the associated requirements or delivery nodes. If a task does not have an independent preset deadline, the task is searched downstream along the task artifact dependency graph or unified task graph containing the task for delivery nodes with preset deadlines, and the earliest preset deadline among them is used. If no downstream delivery node with a preset deadline exists, the task is recorded as a task with no deadline, and the marginal avoidable overdue loss of the task is set to zero. A delivery node is a target node in the task artifact dependency graph or unified task graph that represents the software function, version package, or document set to be delivered, and it has read edges with one or more development artifact versions. The overdue loss rules registered in the requirements management system include requirement identifier, delivery node identifier, preset deadline, and unit overdue loss coefficient. The overdue loss is calculated based on the duration of the expected completion time exceeding the preset deadline and the unit overdue loss coefficient.
[0161] The estimated execution time is obtained based on completed task events in the current project that are all of the same task type, developed agent type, and model or tool version. The median of the actual execution times of these completed task events is taken as the estimated execution time. If there are no completed task events with the same task type, developed agent type, and model or tool version, the preset baseline execution time recorded in the task template is read. This preset baseline execution time is the median of the actual execution times obtained from testing the same task template before system deployment. The preset deadline is derived from the task metadata. Using the median of the actual execution time can avoid a single abnormal execution record directly changing the estimated execution time. Using the preset baseline execution time of the task template as input when historical records are missing can ensure that new tasks can still participate in the completion time calculation.
[0162] To incorporate queuing and prerequisite dependencies into the completion time estimate, the estimated completion time of each recovery candidate task is not directly obtained by adding the current time to the estimated execution duration. Instead, it is iteratively calculated after a candidate execution sequence is given, as follows: For each recovery candidate task, its estimated start time is the later of the estimated completion times of all its prerequisite tasks and the earliest idle time when the required type of development agent is queued for the task according to the current candidate execution sequence. For conflict coding tasks, its estimated start time is no earlier than the estimated completion times of the corresponding code merging and conflict verification tasks. The estimated completion time of this task is equal to its estimated start time plus its estimated execution duration. First, the current time is used as the initial completion time of the completed prerequisite tasks, and an initial candidate execution sequence is given. The estimated start and completion times of each task are calculated according to the above rules. Then, the candidate execution sequence is adjusted based on the updated estimated completion times, and the calculation is repeated until the estimated start and completion times of each task no longer change. The resulting estimated completion time includes the waiting time of prerequisite tasks, the waiting time of the queue of the same type of development agent, and the time required for conflict verification and merging.
[0163] Marginal avoidable delinquency loss represents the reduction in delinquency loss compared to processing the task earlier, rather than postponing it to the next round. The expected completion time, preset deadline, and blocked downstream delivery nodes of the task in the current candidate execution sequence are input into the delinquency loss rules registered in the demand management system. The delinquency loss at the current expected completion time is calculated. The task is then moved to the end of the candidate execution sequence, and its delayed completion time is recalculated using the same iterative method. The delinquency loss at the delayed completion time is calculated using the same delinquency loss rule. Marginal avoidable delinquency loss equals the delinquency loss at the delayed completion time minus the delinquency loss at the current expected completion time; the difference is zero when it is negative. For tasks without a deadline, the marginal avoidable delinquency loss is zero.
[0164] The cost of repeated execution is calculated by aggregating the processor usage, model calls, and tool call resource consumption of completed task events of the same task type, developed agent type, and model or tool version. First, the execution cost of each completed task event is converted according to resource billing rules, and then the median execution cost is obtained. Using processor usage, model calls, and tool call resource consumption as input allows for a unified conversion of different resources into execution costs. Using the median execution cost avoids individual abnormal cost records directly altering the cost of repeated execution. Resource billing rules include the unit cost of processor usage, the unit cost of model calls, and the unit cost of tool calls. The execution cost of each completed task event is equal to the sum of the product of processor usage and the unit cost of processor usage, the product of the number of model calls or the number of calls and the unit cost of model calls, and the sum of the products of the number of tool calls and the unit cost of tool calls.
[0165] The unblocking benefit represents the scale of downstream blocking that can be relieved by processing the task. The affected task closure corresponding to the task is determined, and the execution costs of each task in the closure are summed up according to the above-mentioned method for obtaining repeated execution costs, as well as the expected execution costs of code merging tasks and conflict verification tasks generated due to conflict handling. The cost scale that allows downstream tasks to be relieved of waiting and continue execution after the task is processed is obtained as the unblocking benefit. The more downstream tasks that are directly and indirectly blocked by the task, the greater its unblocking benefit.
[0166] The current workload of the development agent is obtained by reading the execution slot status of the corresponding type of development agent and dividing the number of occupied execution slots by the total number of enabled execution slots. When the total number of enabled execution slots is zero, the corresponding development agent is marked as unschedulable and no tasks are assigned to it.
[0167] To prevent direct addition and subtraction of data with different dimensions, range normalization is performed on four indicators involved in the calculation: preset task value weight, marginal avoidable overdue loss, unblockable benefit, and repeated execution cost. For any of these indicators, the minimum and maximum values of the indicator are first determined from the set of recovery candidate tasks. When the maximum value of the indicator equals the minimum value, the normalized values of all recovery candidate tasks on that indicator are set to zero. When the maximum value of the indicator is greater than the minimum value, the normalized value of a recovery candidate task is equal to the difference between the original value of the indicator and the minimum value, divided by the difference between the maximum value and the minimum value. According to this segmentation method, when the maximum value equals the minimum value, there is no division by zero. When the maximum value is greater than the minimum value, the task with the smallest original value has a normalized value of zero, and the task with the largest original value has a normalized value of one, thus maintaining the two endpoints of range normalization and not causing additional compression of the data value range. The normalized values of each indicator obtained in this way are greater than or equal to zero and less than or equal to one.
[0168] For each candidate task to be restored, the normalized preset task value weight is multiplied by a preset task value adjustment coefficient to obtain the task value benefit item; the normalized marginal avoidable overdue loss is multiplied by a preset overdue loss avoidance adjustment coefficient to obtain the overdue loss avoidance benefit item; the normalized unblocking benefit is multiplied by a preset blocking unblocking adjustment coefficient to obtain the blocking unblocking benefit item; and the normalized repeated execution cost is multiplied by a preset execution cost adjustment coefficient to obtain the execution cost item. The task restoration scheduling benefit equals the sum of the task value benefit item, the overdue loss avoidance benefit item, and the blocking unblocking benefit item minus the execution cost item. Therefore, the more downstream delivery nodes that are blocked, the more avoidable overdue losses, and the more downstream blocking that can be unblocked, the greater the task restoration scheduling benefit and the higher the execution priority. However, the higher the execution cost required to process the task, the smaller the task restoration scheduling benefit. This makes overdue losses and downstream blocking a positive reason for early processing, avoiding situations where more overdue losses or more blocked downstream tasks are delayed.
[0169] For example, with Indicates the restoration of the candidate task set, in order to express One of the recovery candidate tasks, to Indicates task The original value of any index to be normalized, and define , Then the range normalization function can be expressed as:
[0170] ;
[0171] in, This represents the task index used to iterate through the set of recovery candidate tasks. Indicates task The original values on the same index to be normalized. and These represent the minimum and maximum values of the indicator within the set of candidate recovery tasks, respectively. Indicates task The normalized value of this indicator.
[0172] by , , and Representing tasks The preset task value weights, marginal avoidable overdue losses, unblockable benefits, and repeated execution costs are defined respectively. , , , ;by , , and Let represent the preset task value adjustment coefficient, preset overdue loss avoidance adjustment coefficient, preset blockage removal adjustment coefficient, and preset execution cost adjustment coefficient, respectively. Task recovery scheduling benefits It can be represented as:
[0173] and satisfy , , , as well as ;in, , , and These represent the normalized values of the corresponding indicators. This indicates the benefits of task resumption scheduling.
[0174] The four preset adjustment coefficients are the preset task value adjustment coefficient, the preset overdue loss avoidance adjustment coefficient, the preset blockage removal adjustment coefficient, and the preset execution cost adjustment coefficient, respectively. They are all non-negative real numbers and the sum of the four is one. They are obtained based on the manually confirmed execution order of historical recovery tasks before the first execution of local task rescheduling. The normalized values of the preset task value weight, marginal avoidable overdue loss, unblocking benefit, and repeated execution cost of historical recovery tasks are used as inputs, and the manually confirmed execution order is used as the supervision result. A linear ranking model is fitted under the constraint that the four preset adjustment coefficients are all non-negative real numbers and the sum of the four is one.
[0175] Before fitting, parallel and contradictory cases in the supervision results are processed; tasks that are clearly marked as having the same priority in the manually confirmed execution order are considered parallel and do not constitute task pairs that need to be distinguished in order, and are not included in the reverse order statistics; task pairs with completely identical normalized values of input indicators but different manually confirmed execution orders are contradictory samples that cannot be distinguished by input indicators, and are removed from the fitting samples and recorded separately, and are not included in the reverse order statistics; historical task pairs whose order is determined only by the tie rule of ascending task labels in the preset task value weight ranking are also removed from the fitting samples to avoid arbitrary differences in task labels from entering the training labels.
[0176] For each pair of historical tasks that needs to be distinguished after the above processing, the task recovery scheduling benefit of the two tasks is calculated according to the candidate adjustment coefficients. When the order of the benefit values is reversed from the order of execution confirmed by manual confirmation, it is counted as a reverse-order task pair; when the benefit values of the two tasks are equal and the order of execution confirmed by manual confirmation is strictly sequential, it is counted as an undistinguished task pair. During the solution process, a grid traversal is performed on each adjustment coefficient on a simplex consisting of four non-negative real numbers whose sum is one, with a fixed step size. This fixed step size is set to no more than one percent during system deployment. The number of reverse-order task pairs and the number of undistinguished task pairs are calculated group by group. The group of preset adjustment coefficients with the fewest reverse-order task pairs is selected. When the quantities are the same, the group with the fewest undifferentiated task pairs is selected; when both are the same, the combination with the smallest sum of squares of the four preset adjustment coefficients is selected; when the sum of squares is still the same, the preset task value adjustment coefficient, preset overdue loss avoidance adjustment coefficient, preset blockage removal adjustment coefficient, and preset execution cost adjustment coefficient are compared item by item in a fixed order, and the combination with the largest corresponding preset adjustment coefficient value is selected at the first occurrence of a different value, thus obtaining a unique set of preset adjustment coefficients; when there are no historical recovery tasks, the recovery tasks constructed using the test environment and whose execution order has been manually confirmed are used to obtain the above four preset adjustment coefficients in the same process; the above four preset adjustment coefficients remain unchanged during the same local task rescheduling process.
[0177] Among the recovery candidate tasks whose prerequisite tasks have all been completed, the execution priority is determined in descending order of task recovery scheduling benefits. Since the marginal avoidable delay loss depends on the expected completion time, and the expected completion time depends on the candidate execution sequence, the scheduling master executor generates a local task execution sequence iteratively. First, without considering the marginal avoidable delay loss, an initial candidate execution sequence is given in descending order of task recovery scheduling benefits. The expected completion time of each task is calculated as described above. Then, the marginal avoidable delay loss is updated accordingly, and the task recovery scheduling benefits and candidate execution sequences are recalculated. This process is repeated until the candidate execution sequence no longer changes. When a previously encountered candidate task reappears during the iteration process... When selecting an execution sequence, the iteration stops, and the sequence with the highest total task recovery scheduling benefit is selected from the candidate execution sequences that have appeared. If the total task recovery scheduling benefits are the same, a unique sequence is determined according to the lexicographical order of the task identifiers in ascending order. The scheduling master executor combines the task recovery scheduling benefit, the expected execution duration, the preset deadline, and the current development agent load to generate a local task execution sequence, and distributes the coding task, test task, and documentation task to the corresponding coding agent, test agent, and documentation agent, respectively. For conflicting coding tasks, a code merging task or a conflict verification task is generated first. Test tasks and documentation tasks that depend on this code version are not distributed before the conflicting coding task is processed.
[0178] The output of this step includes the restored unified task graph, the local task execution sequence, and the execution results of each developing agent; the above output is used in step 500 to record the restoration results and update the common benchmark.
[0179] Step 500: When the cloud scheduling node and the edge scheduling node confirm the unified task Figure 1 Upon completion, a new snapshot of the shared task is generated.
[0180] After the partial task rescheduling is completed, the cloud scheduling node records the number of duplicate tasks eliminated, the number of expired tasks identified, the number of mergeable results, the number of conflicting tasks, and the number of development artifact versions with pending verification marks, based on the results of step 200 and the execution results of step 400. The cloud scheduling node also records the number of tasks actually re-executed, the number of valid tasks that did not participate in the re-execution, and the relationship between the restored code version, test report version, and document artifact version.
[0181] Once the cloud scheduling node and the edge scheduling node confirm the unified task after recovery Figure 1 Upon completion, a new common task snapshot is generated based on the restored unified task graph, all valid development artifact versions, and the new synchronization epoch identifier. This new snapshot records the restored unified task graph, the set of code version information confirmed to be consistent after recovery, the set of task execution states confirmed to be consistent after recovery, and the new synchronization epoch identifier in a fixed order. Consistency confirmation includes: cloud scheduling nodes and edge scheduling nodes respectively normalizing and encoding the restored unified task graph, all valid development artifact versions, the set of code version information confirmed to be consistent after recovery, and the set of task execution states confirmed to be consistent after recovery in a fixed order, and calculating a consistency digest. When the consistency digests of both parties are identical and the synchronization epoch identifier update confirmation is completed, the restored unified task is determined. Figure 1 To.
[0182] By using a unified task graph, valid development artifact versions, and new synchronization epoch identifiers to generate a new common task snapshot after recovery, a consistent task and version benchmark can be provided for subsequent disconnections, and subsequent task events can be distinguished from task events during this disconnection.
[0183] Each piece of code version information in the confirmed consistent code version information set after recovery includes a code repository identifier, a code branch identifier, and a code commit version identifier; the new synchronization epoch identifier corresponds to the new common task snapshot and is used to identify the task events generated during a subsequent disconnection.
[0184] When subsequent communication changes from not triggering the disconnection condition to triggering the disconnection condition again, the new common task snapshot is used as the starting point of the new branch, and steps 100 to 500 are repeated.
[0185] Thus, after the cloud-edge communication changed from triggering the disconnection condition to not triggering the disconnection condition, this embodiment completed the identification of duplicate results, expired results, mergeable results, and conflicting results of different execution branches generated by the dependency graph of the same task product. It only rescheduled or re-verified local tasks affected by expired results, conflicting results, pending verification marks, or associated pending confirmation marks, avoiding the repeated execution of all coding tasks, testing tasks, and document tasks.
[0186] Example 2:
[0187] See Figure 3 As shown, an application software development agent scheduling system is provided for executing the aforementioned application software development agent scheduling method. The system includes:
[0188] The task generation module 101, when the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition, the cloud scheduling node periodically generates a common task snapshot. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a set of task events based on the common task snapshot and record the development product version.
[0189] The result determination module 102, when the communication changes from triggering the disconnection condition to not triggering the disconnection condition, generates candidate fork event pairs for the task event set, and performs result determination on the task events and candidate fork event pairs to obtain the event result;
[0190] The effective impact module 103 generates an effectiveness marker for the development product version based on the event result, and determines the affected task closure based on the effectiveness marker;
[0191] The execution module 104 forms a unified task graph based on the common task snapshot, performs local task rescheduling on the tasks within the affected task closure, generates a local task execution sequence, and distributes it to the corresponding development agent.
[0192] Task update module 105, when the cloud scheduling node and the edge scheduling node confirm the unified task Figure 1 Upon completion, a new snapshot of the shared task is generated.
[0193] The embodiments of this application have been described above, but these embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments based on the guidance of these embodiments, and all of them are within the protection scope of these embodiments.
Claims
1. A method for scheduling intelligent agents in application software development, characterized in that, Applied to a collaborative software development environment that includes cloud scheduling nodes, edge scheduling nodes, and multiple development agents, the following steps are included: When the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition, the cloud scheduling node periodically generates a common task snapshot. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a set of task events based on the common task snapshot and record the development artifact version. When the communication changes from triggering the disconnection condition to not triggering the disconnection condition, candidate fork event pairs are generated for the task event set, and the results of the task events and candidate fork event pairs are judged to obtain the event results; Generate a validity marker for the development artifact version based on the event results, and determine the affected task closure based on the validity marker; A unified task graph is formed based on the common task snapshot. Local task rescheduling is performed on the tasks within the affected task closure to generate a local task execution sequence and send it to the corresponding development agent. When the cloud scheduling node and the edge scheduling node confirm that the unified task graph is consistent, a new common task snapshot is generated.
2. The application software development intelligent agent scheduling method according to claim 1, characterized in that, Methods for generating task event sets include: Using the last confirmed common task snapshot between the cloud scheduling node and the edge scheduling node before the communication disconnection condition is triggered as the branch starting point, each task event during the disconnection period is formed into a task event record. All task events generated by the cloud scheduling node during the disconnection period are combined into a cloud task event set; all task events generated by the edge scheduling node during the same disconnection period are combined into an edge task event set. The task event set includes the cloud task event set and the edge task event set.
3. The application software development intelligent agent scheduling method according to claim 2, characterized in that, Methods for generating candidate fork event pairs include: Select a task event from both the cloud task event set and the edge task event set, and compare the task identifier and the task operation object recorded in the task event. When two task events have the same task identifier, involve the same task operation object, or involve task operation objects with a relationship, they are formed into candidate fork event pairs in the order of cloud branch task event first and edge branch task event second. Based on the set of input development product versions and the set of task operation objects in the task event log, the overlap of input development product versions and the overlap of task operation objects are calculated. Based on the overlap of input development artifact versions and the overlap of task operation objects, retention rules are constructed, and candidate fork event pairs that trigger the retention rules are retained.
4. The application software development intelligent agent scheduling method according to claim 3, characterized in that, Methods for obtaining event results include: Generate input condition fingerprints and normalized output product description sequences based on task event records; Event results include duplicate results, expired results, mergeable results, and conflicting results; When two task events of a candidate fork event pair have the same task identifier, the same input condition fingerprint, and the same normalized output product description sequence, they are judged as duplicate results. For task events that are not determined to be duplicate results, if the input of the task event is determined to be invalid based on the set of input development artifact versions, the event result is an expired result; For task events that are not judged as duplicate or expired results, if the candidate fork event has no prerequisite dependencies and structural conflicts and the three-party merging and verification are passed, it is judged as a mergeable result; if there are structural conflicts or the three-party merging and verification are not passed, it is judged as a conflicting result.
5. The application software development intelligent agent scheduling method according to claim 4, characterized in that, Methods for determining expired results include: Determine the necessary set of input development artifact versions from the set of input development artifact versions actually read from the task event; For each development product version in the set of necessary input development product versions, find a reference development product version that has the same product identifier and is confirmed to be valid, and determine the compatibility between the development product version and the reference development product version. The task event input is considered valid when all necessary input development artifact versions are compatible with the corresponding reference development artifact version; the task event input is considered invalid when at least one necessary input development artifact version is incompatible with the corresponding reference development artifact version. Task events with invalid inputs and their output development artifact versions are deemed outdated.
6. The application software development intelligent agent scheduling method according to claim 4, characterized in that, Methods for generating validity markers include: Based on the event results, development product versions that are determined to be duplicates are marked as duplicates, those that are determined to be expired are marked as expired, those that are determined to be conflicting are marked as conflict pending, those whose compatibility cannot be confirmed are marked as pending verification, and those that are determined to be mergeable are marked as valid. When the validity of a code submission version is marked as expired, conflict pending, or pending verification, the test report version and document artifact version that depend on the code submission version will be marked as associated and pending confirmation. Validity markers include valid, duplicate, expired, conflict pending, pending verification, and association pending confirmation.
7. The application software development intelligent agent scheduling method according to claim 6, characterized in that, Methods for identifying the affected task closures include: The development product versions marked as expired and conflict pending are grouped into an invalid development product version set, and the development product versions marked as pending verification and associated pending confirmation are grouped into an uncertain development product version set. The invalid development product version set and the uncertain development product version set are merged and deduplicated to form the impact source development product version set. On the bipartite graph composed of task events and development product versions, the influence is propagated layer by layer along the development product dependency edges actually read by the task events, starting from the set of development product versions of the influencing source, until no more task events are added, thus obtaining the closure of the affected task events. Map the task events in the affected task event closure according to the task identifier, merge and remove duplicates to obtain the affected task closure.
8. The application software development intelligent agent scheduling method according to claim 7, characterized in that, Methods for generating local task execution sequences include: Extract the tasks within the affected task closure from the unified task graph, as well as the conflict resolution tasks determined in the conflict result judgment, to form a set of recovery candidate tasks. Calculate the marginal avoidable late fees and repeated execution costs based on the expected completion time and execution cost of the task, and calculate the unblocking benefits based on the repeated execution costs. Obtain the preset task value weight, marginal avoidable overdue loss, unblockable benefit, and repeated execution cost for each recovery candidate task, and normalize them respectively; The normalized preset task value weight, marginal avoidable overdue loss, unblocking benefit, and repeated execution cost are multiplied by the corresponding preset adjustment coefficients to calculate the task recovery scheduling benefit. The local task execution sequence is generated in descending order of the task recovery scheduling benefit values.
9. The application software development intelligent agent scheduling method according to claim 1, characterized in that, Methods for generating new snapshots of common tasks include: When the cloud scheduling node and the edge scheduling node confirm that the restored unified task graph is consistent, a new common task snapshot is generated based on the restored unified task graph, all valid development artifact versions and the new synchronization epoch identifier. The new shared task snapshot serves as the starting point for a new branch of disconnection.
10. An application software development intelligent agent scheduling system, characterized in that, A system for executing an application software development intelligent agent scheduling method as described in any one of claims 1-9; the system includes: The task generation module generates a shared task snapshot periodically when the communication between the cloud scheduling node and the edge scheduling node does not trigger the disconnection condition. When the communication triggers the disconnection condition, the cloud scheduling node and the edge scheduling node generate a set of task events based on the shared task snapshot and record the development product version. The result determination module generates candidate fork event pairs for the task event set after the communication changes from triggering the disconnection condition to not triggering the disconnection condition, and performs result determination on the task event and the candidate fork event pairs to obtain the event result. The effective impact module generates a validity marker for the development artifact version based on the event result, and determines the affected task closure based on the validity marker; The execution module forms a unified task graph based on the common task snapshot, performs local task rescheduling on the tasks within the affected task closure, generates a local task execution sequence, and distributes it to the corresponding development agent. The task update module generates a new common task snapshot when the cloud scheduling node and the edge scheduling node confirm that the unified task graph is consistent.
