A method, system, and storage medium for method structure completion and candidate method generation based on runtime capability gaps.
By establishing a multi-dimensional inspection mechanism in the intelligent system to identify capability gaps and automatically generate candidate method structures, the problem of insufficient method space coverage in existing technologies is solved, enabling autonomous expansion and effective candidate method generation, thereby improving the system's autonomy and efficiency.
Patent Information
- Application Number
- CN202611519087.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-17
AI Technical Summary
When faced with insufficient method space coverage in runtime, existing intelligent systems lack systematic detection capabilities, cannot autonomously generate and complete candidate method structures, and have mixed generation and verification promotion mechanisms, resulting in unverified method structures entering the formal method space prematurely.
By establishing a multi-dimensional checking mechanism for method space satisfaction in the intelligent system, capability gaps can be identified, candidate method structures can be automatically generated, and the generation process can be decoupled from subsequent external processes to ensure that candidate methods do not participate in invocation or execution before obtaining formal qualification.
It achieves systematic detection of insufficient method space coverage, supports multiple candidate completion generation paths, avoids the misuse of unverified candidate structures for business execution, and improves the autonomous expansion capability and method generation efficiency of intelligent systems.
Smart Images

Figure CN123114458A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent system control and governance technology, and more specifically to a method, system and storage medium for completing the method structure and generating candidate methods based on operational capability gaps. During the operation of an intelligent system, when the existing method space cannot cover the current state or requirements, the system automatically identifies capability gaps and generates complete candidate method structures based on the existing structure of the method space. Background Technology
[0002] During operation, intelligent systems frequently encounter new states or requirements that cannot be covered by the existing method space. When a "method shortage" scenario occurs, some existing solutions fall into the following categories: The first is manual expansion, where developers write new methods and deploy them; this method heavily relies on manual intervention and has a slow response time. The second is external tool invocation, where tasks are completed by calling external APIs or third-party tools; this solution relies on external resources, and the system itself does not create new methods. The third is parameter adjustment, modifying the parameters of existing methods without changing the method type itself. The fourth is error reporting, where the system directly returns an error message stating "no available methods," lacking the ability to autonomously handle such scenarios. The fifth is experience retrieval, searching for similar solutions from a historical case library; this only reuses existing experience and cannot generate entirely new method structures. Currently, existing technologies lack a complete technical implementation that combines runtime method space coverage / reachability detection, generation of candidate method structures based on unmet capability constraints, and isolation and management of candidates before they gain formal usage eligibility.
[0003] The above-mentioned processing methods generally suffer from the following technical defects: (1) Lack of systematic detection capability for “insufficient method space coverage”: When a method call fails, some existing systems only return error messages such as “no available method” or “method execution failed”, and cannot distinguish between “inappropriate method parameters” and “the method space itself is insufficient to cover the state”. The system lacks an evaluation mechanism for the overall coverage of the method space and cannot proactively discover capability gaps.
[0004] (2) Lack of ability to generate new method structures from existing structures in the method space: Although some existing systems can combine multiple methods to form workflows, the combination relationships are usually predefined or manually arranged. The system lacks the ability to automatically retrieve reusable elements from existing structures in the method space based on the current capability gap and generate complete method structures based on combination constraints.
[0005] (3) Confusion between the generation, verification, and promotion mechanisms of new method structures: Some existing systems confuse "generating new methods" with "verifying new methods" and "promoting method assets," lacking a clear division of stages. This makes it difficult for the system to operate independently during the generation stage and can easily lead to unverified method structures entering the formal method space prematurely.
[0006] In response to the aforementioned technical pain points, several solutions have emerged in the industry, but none of them have completely resolved all the technical issues. The specific situation is as follows: (1) The workflow-based method combination system allows users or the system to arrange multiple existing methods into a workflow, but the combination relationship is usually predefined or manually specified. The system itself does not have the autonomous ability to "discover capability gaps → automatically retrieve reusable structural elements → generate complete structures".
[0007] (2) The template-based method generation system provides predefined method templates and generates specific methods by filling the templates with the current parameters. However, since the templates are predefined, the system does not have the ability to dynamically determine reusable elements based on capability gaps; the generated method structure is limited to the preset range of the template.
[0008] (3) Automatic program synthesis system can generate program code according to specifications. Such systems generally use the overall requirements of the high-level requirements as input for program derivation. They usually lack the link to conduct interface compatibility and reachability detection on the existing method space to locate local unmet capabilities, and will not generate limited candidate structures only for the identified local capability gaps.
[0009] Therefore, how to proactively identify capability gaps in intelligent systems during operation, automatically generate and complete candidate method structures based on existing method spaces, and decouple the candidate method generation stage from the verification and promotion stage are technical problems that urgently need to be solved by those skilled in the art. Summary of the Invention
[0010] In view of this, the present invention provides a method, system, and storage medium for method structure completion and candidate method generation based on runtime capability gaps. It is applicable to intelligent system scenarios such as AI agent systems, multi-agent collaborative systems, method asset management platforms, automated decision-making systems, and industrial control systems, where the boundaries of method capabilities need to be autonomously expanded during operation. The present invention aims to overcome the following problems existing in the prior art: (1) How to respond to the target method requirements by systematically detecting insufficient coverage of the method space and identifying capability gaps, rather than passively waiting for method call failures; (2) How to determine reusable structural elements from the existing structure of the method space based on the identified capability gaps, and generate complete candidate method structures based on the combination constraints; (3) How to cover the scenario of "no ready-made parts to assemble" - when there are no directly reusable elements in the method space, the structural specifications of the missing function are deduced from the gap, and the definition of the missing structure is generated; (4) How to decouple the candidate method structure generation process from the subsequent external verification and promotion mechanism, and independently complete the generation of candidate structures to be verified; This solution only restricts the candidate method structure from participating in the call or execution as a formally available method structure before obtaining formal qualification, and does not limit the candidate's verification logic, promotion decision-making body, entry timing, or formal method asset lifecycle management; The above-mentioned verification, promotion and formal entry related processing belong to the external subsequent process and are not within the scope of this method.
[0011] To achieve the above objectives, the present invention provides the following technical solution: A method for method structure completion and candidate method generation based on runtime capability gaps includes the following steps: S1. Obtain the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description; S2. Based on the target function description and constraint description, determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method; S3. When it is determined that the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure, identify and determine the unmet capability requirements. S4. Based on the unmet capability requirements, candidate method structures are formed by utilizing one or more existing structural parts obtained from the existing method space, supplementary structural parts formed to address the unmet capability requirements, or a combination of both. S5. The generated candidate method structure will not participate in the invocation or execution as a formally available method structure before it is formally qualified.
[0012] Optionally, the constraint description includes one or more of the following: input / output type, preconditions, target effect, post-effect, resource conditions, risk conditions, and scope of application; the determination of the covered and uncovered parts of the existing structure is based on one or more of the following: method existence check, method chain integrity check, interface compatibility check, reachability check, constraint condition check, input / output matching check, precondition check, target effect check, or post-effect check.
[0013] Optionally, in S3, unmet capability requirements are considered capability gaps. Capability gaps include one or more of the following: no applicable method, insufficient method capability, broken method chain, incompatible input and output, target method output, target effect or its corresponding constraint is unreachable or cannot be satisfied in the method space, missing key method atoms, non-existent combinatorial path, and existing methods are subject to prohibitive conditions.
[0014] Optionally, in S4, a candidate method structure is formed, specifically as follows: Determine whether there are reusable structural elements in the existing structure of the method space that can fill the capability gap; wherein, reusable structural elements include one or more of the following: method atoms, method subchains, method relationships, interface descriptions, functional templates, composite templates, adaptation structures, and constraint structures; When reusable structural elements exist, the functional specifications of the target structure are determined according to the gap type of the capability gap. Reusable structural elements that can meet some of the functional specifications are selected and connected according to the interface compatibility relationship or the compatibility relationship after adaptation, conversion, binding or intermediate structure processing. If the connected structure can completely fill all capability gaps under the combination constraints, then the output is a candidate method structure composed of reusable structural elements. If the connected structure can only fill part of the capability gap under the combination constraints, then a corresponding supplementary structure part is formed for the remaining unfilled capability gap, and the selected reusable structural elements are combined with the supplementary structure part to form a candidate method structure. When no reusable structural elements exist, the complete structural part used to fill the capability gap is directly formed as a candidate method structure.
[0015] Optionally, the combination closure between any adjacent connected existing structural parts or supplementary structural parts in the candidate method structure is constituted by two necessary conditions: the input-output interfaces of adjacent existing structural parts or supplementary structural parts are compatible, or are compatible after adaptation, transformation, binding or intermediate structural processing; and the post-effect of the preceding structural part satisfies the pre-condition of the subsequent structural part, or satisfies it after condition transformation; the candidate method structure needs to satisfy other combination constraints on the basis of achieving combination closure; among which, combination constraints include one or more of the following: input-output interface constraints, pre-condition constraints, post-effect constraints, resource constraints, risk constraints and call order constraints.
[0016] Optionally, in S4, the complete structure part can be a missing structure definition, function definition, interface definition, method atom, adaptation structure, transformation structure, wrapper structure, execution node, code structure, call structure, parameter binding structure or a combination thereof. The missing structure definition must include at least one of the following: input type, output type, function description, constraint condition, precondition, post-effect, scope of application or failure boundary of the missing function.
[0017] Optionally, in S4, the candidate method structure includes at least a structure identifier, a list of constituent elements, the connection relationships between elements, input / output interface definitions, applicable capability gap types, generation type, generation time, status, and the correspondence between the candidate method structure and the unmet capability requirements it fills.
[0018] Optionally, in S5, candidate method structures that are not in a formally qualified state do not have the qualifications for formal retrieval, formal selection, formal invocation or formal execution. Candidate method structures can be internally searched, compared, evaluated or tested. Candidate method structures are placed in candidate extension regions, which can be logical regions, candidate object sets, isolated namespaces, independent storage regions, or object sets with candidate status tags. When candidate extension regions share the same repository as formal methods, differentiation and management are achieved through candidate status tags, access control, or route filtering.
[0019] A system for method structure completion and candidate method generation based on runtime capability gaps, comprising executing any of the above-described methods for method structure completion and candidate method generation based on runtime capability gaps, including: The method requirement acquisition module is used to acquire the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description; The method space checking module is used to determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method, based on the target function description and constraint description. The capability gap identification module is used to identify and determine unmet capability requirements when the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure. The candidate method structure generation module is used to form a candidate method structure based on unmet capability requirements, using one or more existing structure parts obtained from the existing method space, supplementary structure parts formed for unmet capability requirements, or a combination of both. The generated candidate method structure does not participate in invocation or execution as a formally available method structure before it obtains formal qualification.
[0020] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0021] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method, system, and storage medium for method structure completion and candidate method generation based on runtime capability gaps, which has the following beneficial effects: (1) Insufficient coverage of the systematic detection method space: This invention establishes a multi-dimensional checking mechanism for the satisfaction of the method space (method existence, method chain integrity, interface compatibility, reachability, and constraints). It can carry out missing identification in response to the target method requirements without waiting for the method call to fail before throwing an exception, which is different from the existing system's passive return of the "no available method" error.
[0022] (2) Supports three types of candidate completion generation paths: This invention supports the generation of candidate method structures by combining all existing structural elements, provided that there are scattered reusable structural elements in the existing method space but no complete combination structure that can meet the target requirements has been formed; it also supports a hybrid completion method that partially reuses existing structural elements and combines them with missing structural definitions; and it can also deduce the structural specifications of missing functions and generate pure missing structural definitions based on the gaps when there are no reusable elements at all, thus breaking through the limitation that it can only simply splice existing methods together.
[0023] (3) Decoupling candidate generation from external subsequent processes and implementing identity control: This invention imposes identity constraints on the generated candidate method structures. Before obtaining formal qualification, the candidate structure does not participate in formal invocation or formal execution as a formal method, thus preventing candidate structures that have not undergone complete constraint verification from being mistakenly used as formal methods for business execution. The candidate method structure can still support internal search, comparison, evaluation, or testing operations. Among them, verification, promotion, and formal entry into the database are external subsequent processing processes and are not part of the processing links of this method. The candidate generation stage can operate independently. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0025] Figure 1 The overall flowchart of the method structure completion and candidate method generation method based on runtime capability gap provided by the present invention; Figure 2This is a schematic diagram showing the correspondence between the spatial diagram model of the method provided by the present invention and the types of capacity gaps. Figure 3 The diagram shows three possible paths for generating the candidate method structure provided by this invention. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] To address the problems identified in the background section, this invention proposes a method, system, and storage medium for method structure completion and candidate method generation based on runtime capability gaps. The core of this invention lies in: when the system detects that the existing method space cannot meet the method requirements corresponding to the current state, determining the capability gap type; identifying reusable structural elements from the existing structures in the method space, and generating candidate method structures using these reusable structural elements based on combination constraints; and when no directly reusable structural elements exist, deducing the structural specifications of the missing functions based on the capability gap, and generating the missing structure definition as a candidate method structure.
[0028] In this invention, the method space is used to organize various existing structures that can be invoked by intelligent systems, and may include one or more of the following: method library, skill library, tool library, capability graph, execution plan space, operator space, or workflow space; the methods may include methods, skills, tools, operators, plans, workflows, action graphs, or processes, etc. The above examples are merely illustrative. In one embodiment, the method space is further abstracted into the following structured graph model, used to support the systematic detection and completion of capability gaps. This structured graph model and its associated objects possess the minimum data representation that can be parsed by a computer, specifically: - Node: Method atom, method subchain, method template; the minimum data representation of each node includes: unique node identifier, node type, interface object reference, and constraint set reference; -Edge: Call relationship, dependency relationship, composition relationship, transformation relationship; the minimum data representation of each edge includes: source node ID, target node ID, edge type identifier, and edge adaptation and transformation rule; -Constraint: Preconditions, Post-conditions, Resource constraints, Risk constraints, Call order constraints; The minimum data representation of each constraint includes the constraint type, constraint condition expression, and constraint threshold. -Path: The complete call chain from the initial method to the target method; the path is composed of an ordered sequence of nodes and corresponding edge sequences. - Interface: The input type, output type, and parameter specifications of a method; the minimum data representation of an interface includes the set of input types, the set of output types, and parameter metadata; - Target method requirements: The minimum data representation includes requirement identifier, referenced input and output types, set of preconditions, set of target / post-effects, and set of constraints.
[0029] Based on this graph model, machine-computable decision logic is executed: 1) Reachability determination: The graph traversal algorithm starts from the starting node and traverses all legal edges; if a path that satisfies the output and effect requirements of the target method can be found, it is determined to be reachable; otherwise, it is determined to be unreachable. 2) Combination Closure / Non-closure Determination: For two adjacent nodes, verify two conditions: ① The set of output interface types of the source node is compatible with the set of input interface types of the successor node or there is an edge adaptation conversion rule; ② The set of post-effects of the source node can cover all the pre-conditions of the successor node; if both conditions are met, the combination is determined to be closed; if either condition is not met, the combination is determined to be non-closed, forming a source of capability gap.
[0030] Based on the above-described structured graph model abstraction of the method space, the capability gaps that occur during operation can be classified into the following types, with different gap types corresponding to different abnormal elements or abnormal states in the graph model: - Missing Node: There is no applicable method node that can handle the current state; - Broken Path: A link in the method chain is missing; -Incompatible Edge: The input and output types of adjacent methods do not match; - Unreachable Target: The target node cannot be reached from the current node via existing edges; - Missing Node / Edge: The basic element or relationship required for composition does not exist; - Missing Path: Existing nodes and edges cannot form a usable path; - Forbidden Path: The only available path is blocked by a forbidden condition.
[0031] The above-mentioned abstract operations enable the present invention to provide a processing mechanism that differs from predefined workflow orchestration through runtime coverage detection, interface / reachability determination, unmet capability identification, and restricted candidate formation.
[0032] Specifically, this embodiment discloses a method for structural completion and candidate method generation based on runtime capability gaps, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description.
[0033] In one optional embodiment of the present invention, the constraint description includes one or more of the following: input / output type, preconditions, target effect, post-effect, resource conditions, risk conditions, and scope of application.
[0034] S2. Based on the target function description and constraint description, determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method.
[0035] In one optional embodiment of the present invention, the determination of the covered and uncovered portions of the existing structure includes one or more of the following: -Method Existence Check: Checks whether there is at least one method node that can handle the current state type; -Method chain integrity check: Checks whether the method chain required to get from the current state to the target state is complete; - Interface compatibility check: Check whether the input and output types of adjacent nodes in the method chain are compatible; - Reachability check: Checks whether there is a valid reachable path starting from the current state; -Constraint check: Checks whether an existing method is unavailable in the current state due to prohibition conditions; In addition, it can also perform input / output matching checks, precondition checks, target effect checks, and post-effect checks.
[0036] S3. When it is determined that the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure, identify and determine the unmet capability requirements.
[0037] In an optional embodiment of the present invention, unmet capability requirements are considered capability gaps. Capability gaps include one or more of the following: no applicable method, insufficient method capability, broken method chain, incompatible input and output, target method output, target effect or its corresponding constraint is unreachable or unsatisfactory in the method space, missing key method atoms, non-existent combinatorial paths, and existing methods being subject to prohibitive constraints. Figure 2 As shown.
[0038] S4. Based on the unmet capability requirements, candidate method structures are formed by utilizing one or more existing structural parts obtained from the existing method space, supplementary structural parts formed to address the unmet capability requirements, or a combination of both.
[0039] In this embodiment, as Figure 3 As shown, the candidate method structure is formed as follows: Determine whether there are reusable structural elements in the existing structure of the method space that can fill the capability gap; When reusable structural elements exist, the functional specifications of the target structure are determined according to the gap type of the capability gap. Reusable structural elements that can meet some of the functional specifications are selected and connected according to the interface compatibility relationship or the compatibility relationship after adaptation, conversion, binding or intermediate structure processing. If the connected structure can completely fill all capability gaps under the combination constraints, then the output is a candidate method structure composed of reusable structural elements. If the connected structure can only fill part of the capability gap under the combination constraints, then a corresponding supplementary structure part is formed for the remaining unfilled capability gap, and the selected reusable structural elements are combined with the supplementary structure part to form a candidate method structure. When no reusable structural elements exist, the complete structural part used to fill the capability gap is directly formed as a candidate method structure.
[0040] Specifically, reusable structural elements refer to existing structural units in the method space that can be used to construct candidate method structures. In an optional embodiment of the present invention, reusable structural elements include, but are not limited to, one or more of the following: -Method atom: A method that cannot be further divided or serves as a basic unit in this governance level; -Method subchain: A method fragment composed of multiple method atoms and their interconnections; - Method relationships: Invocation relationships, dependency relationships, and composition relationships between methods; - Interface description: Definition of the input and output types and parameter specifications of the method; - Functional templates: Predefined, parameterizable method structure skeletons; - Composite template: A reusable connection pattern between existing methods; - Adaptor structure: A structure used for type conversion or interface adaptation; - Constraint structure: Reusable preconditions, post-effects, or risk constraint patterns.
[0041] The combination closure between any adjacent connected existing structural parts or supplementary structural parts in the candidate method structure is constituted by two necessary conditions: the input and output interfaces of adjacent existing structural parts or supplementary structural parts are compatible, or are compatible after adaptation, transformation, binding or intermediate structural processing; and the post-effect of the preceding structural part satisfies the pre-condition of the subsequent structural part, or is satisfied after condition transformation; the candidate method structure needs to satisfy the remaining combination constraints on the basis of achieving combination closure.
[0042] In one optional embodiment of the present invention, the combined constraints include one or more of the following: - Input / output interface constraints: The output type of a preceding element must match or be convertible with the input type of a subsequent element; - Precondition constraints: The preconditions of subsequent elements must be satisfied by the execution result of the preceding elements; -Post-effect constraint: The combined structure must produce the expected effect; -Resource constraints: The total resource consumption of the combined structure must be within the allowable range; - Risk constraint: The risk level of the combined structure must not exceed a predetermined threshold; - Call order constraint: The order in which elements are called must satisfy the temporal dependency.
[0043] In this embodiment, the complete structure part is the missing structure definition, function definition, interface definition, method atom, adaptation structure, transformation structure, wrapper structure, execution node, code structure, call structure, parameter binding structure, or a combination thereof.
[0044] Specifically, S4 discloses the missing structure generation path for candidate method structures. The specific steps are as follows: when there are no directly reusable or combinable structural elements in the method space (for example, when it is detected that there is a lack of necessary conversion links between two existing methods), the structural specifications of the missing functions are deduced based on the capability gap, and the missing structure definition is generated.
[0045] For example, a missing structure definition may include at least one of the following: input type, output type, function description, constraints, preconditions, post-effects, scope of application, or failure boundary. This missing structure definition serves as the output of the candidate method structure, and its specific implementation is completed by a separate subsequent processing flow.
[0046] In an optional embodiment of the present invention, the candidate method structure includes at least a structure identifier, a list of constituent elements (such as method atoms, method subchains, method relationships, adaptation structures, etc.), connection relationships between elements, input / output interface definitions, applicable capability gap types, generation type (combined generation / missing structure generation), generation time, status (to be verified), and the correspondence between the candidate method structure and the unmet capability requirements it fills.
[0047] S5. The generated candidate method structure will not participate in the invocation or execution as a formally available method structure before it is formally qualified.
[0048] Specifically, candidate method structures that are not yet formally qualified do not have the qualifications for formal retrieval, selection, invocation, or execution. Candidate method structures can be internally searched, compared, evaluated, or tested.
[0049] Candidate method structures are placed in the candidate extension region, which is a storage area logically isolated from the formal region of the method space. This region stores candidate method structures in a pending verification state, which do not participate in retrieval and invocation within the formal method space. Optionally, the candidate extension region can be a logical region, a collection of candidate objects, an isolated namespace, an independent storage area, or a collection of objects with candidate status markers. When the candidate extension region shares the same repository as the formal methods, differentiation and management can be achieved through candidate status markers, access control, or route filtering; alternatively, it can be stored independently of the formal method space.
[0050] and Figure 1 Corresponding to the method described above, this embodiment of the invention also provides a method structure completion and candidate method generation system based on runtime capability gaps, used for... Figure 1 The specific implementation of the method, the method structure completion and candidate method generation system based on runtime capability gaps provided in this embodiment of the invention, can be applied to computer terminals or various mobile devices, specifically including: The method requirement acquisition module is used to acquire the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description; The method space checking module is used to determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method, based on the target function description and constraint description. The capability gap identification module is used to identify and determine unmet capability requirements when the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure. The candidate method structure generation module is used to form a candidate method structure based on unmet capability requirements, using one or more existing structure parts obtained from the existing method space, supplementary structure parts formed for unmet capability requirements, or a combination of both. The generated candidate method structure does not participate in invocation or execution as a formally available method structure before it obtains formal qualification.
[0051] This embodiment also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.
[0052] The invention will now be further described in detail below with reference to four specific examples, demonstrating the complete implementation process of the method for structural completion and candidate method generation based on runtime capability gaps. It should be understood that the specific examples described herein are merely illustrative and are not intended to limit the scope of protection of the invention.
[0053] I. Combinatorial generation based on method chain breakage (interpolation of existing elements)
[0054] For example, in this embodiment, the existing method space includes: -scan_code(): Scans code files and outputs the code structure tree; -test_code(): Test code, requires executable code as input.
[0055] The current system state is: {state_type:"code_quality_check",target:"module_a"}.
[0056] (1) Method Requirements Analysis
[0057] The system analyzes the method requirements corresponding to the current state: a complete processing chain from code scanning to testing is required.
[0058] (2) Method space satisfaction check
[0059] For example, the system checks the existing method space: -scan_code(): Exists; -test_code(): Exists; - Method chain integrity check: The output code structure tree of scan_code() is incompatible with the input executable code of test_code(), and necessary links are missing in the middle.
[0060] The system detected a capability gap: Broken Path. The unmet capability is the ability to convert the code structure tree into executable code.
[0061] (3) Determine reusable structural elements
[0062] Based on the capability gap type (method chain break), the system retrieves available intermediate elements in the method space: For example, the retrieved build_executable() (method atom) compiles the code structure tree into executable code, with the output type matching the input type of test_code().
[0063] (4) Combinatorial constraint checking and generation
[0064] After the system checks and confirms that the combined constraints pass, it generates a candidate method structure: Candidate:scan_code()→build_executable()→test_code() This candidate combination structure is specifically designed to fill the unmet conversion capability of the aforementioned "code structure tree - executable code". This candidate is currently in a state of pending verification and only supports internal evaluation and testing operations. It cannot be used as a formal method to directly execute business tasks. It can only participate in formal invocation and execution after obtaining formal qualification.
[0065] II. Generation based on incompatible input / output combinations (using adapters)
[0066] For example, in this embodiment, the existing method space includes: -log_analyzer(): Analyzes log files and outputs a log analysis report (text format); -anomaly_detector(): Detects anomalies and requires structured data as input.
[0067] The system detected a capability gap: Incompatible Edge.
[0068] The system retrieves reusable structuring elements in the method space: For example, the retrieved text_to_struct_converter() (structure adapter) converts text-formatted log reports into structured data, with the output type matching the input type of anomaly_detector().
[0069] After the combination constraint check passes, the system generates the candidate method structure: Candidate:log_analyzer()→text_to_struct_converter()→anomaly_detector() III. Generation of Missing Structures – Structural Elements That Cannot Be Directly Reused For example, in this embodiment, the existing method space includes: -Method_A: Output format is TEXT; -Method_B: Input format is STRUCTURED_DATA.
[0070] Capability gap detected: Incompatible edge, and no available conversion methods, adapter structures or interface converters exist in the method space.
[0071] (1) Gap Analysis
[0072] The system confirmed that there is no reusable struct element in the method space to fill this gap.
[0073] (2) Generation of missing structure definitions
[0074] The system deduces the structural specifications of the missing functions based on the capability gaps and generates the missing structure definitions: Missing Capability Specification: ├──capability_type:format_conversion ├──input_type:TEXT ├──output_type:STRUCTURED_DATA ├──function: Converts text-formatted data into structured data ├──constraints: │ ├── Input format must conform to predefined specifications │ └── The output structure must contain the key fields of the original data. └──usage_context:Method_A→[this adapter]→Method_B (3) Candidate method structure output The system outputs the above missing structure definition as a candidate method structure, marks it as "missing structure generation" type, writes it into the candidate expansion area, and sets its status to "pending verification".
[0075] Optionally, the specific transformation logic of the candidate method structure can be implemented by a method generator. The method generator can employ one or more implementation methods, such as template filling, rule engines, or code generation based on large language models. These implementation methods are optional tools in this embodiment and are not intended to limit the present invention. The present invention does not rely on large model training or model parameter updates; the formation of the candidate structure is limited by unmet capabilities, interfaces, and constraints, and this core control relationship will not change depending on the type of method generator used. The generation of specific transformation logic is an external subsequent processing flow and is not a necessary step in this method.
[0076] IV. Generation of combinations with missing key nodes (interpolation atoms)
[0077] For example, in this embodiment, the system detects that a new error type "dependency_conflict" needs to be handled, but there is no method atom in the method space that can detect this type of error.
[0078] The system detected a capability gap: a missing node in a critical method.
[0079] The system retrieves reusable structuring elements in the method space: - Retrieved dependency_analyzer(): Analyzes dependencies and outputs a dependency graph; - Found conflict_checker(): checks for conflicts in the dependency graph and outputs the conflict type; - The combinatorial template analyze_then_check already defines the combinatorial pattern for these two atoms.
[0080] After the combination constraint check passes, the system generates the candidate method structure: Candidate:dependency_analyzer()→conflict_checker() The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0081] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for structural completion and candidate method generation based on runtime capability gaps, characterized in that, Includes the following steps: S1. Obtain the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description; S2. Based on the target function description and constraint description, determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method; S3. When it is determined that the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure, identify and determine the unmet capability requirements. S4. Based on the unmet capability requirements, candidate method structures are formed by utilizing one or more existing structural parts obtained from the existing method space, supplementary structural parts formed to address the unmet capability requirements, or a combination of both. S5. The generated candidate method structure will not participate in the invocation or execution as a formally available method structure before it is formally qualified.
2. The method for structural completion and candidate method generation based on operational capability gaps according to claim 1, characterized in that, The constraint description includes one or more of the following: input / output type, preconditions, target effect, post-effect, resource conditions, risk conditions, and scope of application; the determination of the covered and uncovered parts of the existing structure is based on one or more of the following: method existence check, method chain integrity check, interface compatibility check, reachability check, constraint condition check, input / output matching check, precondition check, target effect check, or post-effect check.
3. The method for structural completion and candidate method generation based on operational capability gaps according to claim 1, characterized in that, In S3, unmet capability requirements are considered capability gaps. Capability gaps include one or more of the following: no applicable method, insufficient method capability, broken method chain, incompatible input and output, target method output, target effect or its corresponding constraint is unreachable or cannot be satisfied in the method space, missing key method atoms, non-existent combinatorial path, and existing methods are subject to prohibitive conditions.
4. The method for structural completion and candidate method generation based on operational capability gaps according to claim 3, characterized in that, In S4, the candidate method structure is formed as follows: Determine whether there are reusable structural elements in the existing structure of the method space that can fill the capability gap; wherein, reusable structural elements include one or more of the following: method atoms, method subchains, method relationships, interface descriptions, functional templates, composite templates, adaptation structures, and constraint structures; When reusable structural elements exist, the functional specifications of the target structure are determined according to the gap type of the capability gap. Reusable structural elements that can meet some of the functional specifications are selected and connected according to the interface compatibility relationship or the compatibility relationship after adaptation, conversion, binding or intermediate structure processing. If the connected structure can completely fill all capability gaps under the combination constraints, then the output is a candidate method structure composed of reusable structural elements. If the connected structure can only fill part of the capability gap under the combination constraints, then a corresponding supplementary structure part is formed for the remaining unfilled capability gap, and the selected reusable structural elements are combined with the supplementary structure part to form a candidate method structure. When no reusable structural elements exist, the complete structural part used to fill the capability gap is directly formed as a candidate method structure.
5. The method for structural completion and candidate method generation based on operational capability gaps according to claim 4, characterized in that, The combination closure between any adjacent connected existing structural parts or supplementary structural parts in the candidate method structure is constituted by two necessary conditions: the input and output interfaces between adjacent existing structural parts or supplementary structural parts are compatible, or are compatible after adaptation, transformation, binding or intermediate structural processing; and the post-effect of the preceding structural part satisfies the pre-condition of the subsequent structural part, or is satisfied after condition transformation. The candidate method structure needs to achieve combinatorial closure while satisfying other combinatorial constraints; among them, combinatorial constraints include one or more of the following: input / output interface constraints, precondition constraints, post-effect constraints, resource constraints, risk constraints, and call order constraints.
6. The method for structural completion and candidate method generation based on operational capability gaps according to claim 1, characterized in that, In S4, the complete structure part includes missing structure definition, function definition, interface definition, method atom, adaptation structure, transformation structure, wrapper structure, execution node, code structure, call structure, parameter binding structure or a combination thereof; the missing structure definition shall include at least one of the following: input type, output type, function description, constraint condition, precondition, post-effect, scope of application or failure boundary of the missing function.
7. The method for structural completion and candidate method generation based on operational capability gaps according to claim 1, characterized in that, In S4, the candidate method structure includes at least a structure identifier, a list of constituent elements, the connection relationship between elements, the input and output interface definition, the applicable capability gap type, the generation type, the generation time, the status, and the correspondence between the candidate method structure and the unmet capability requirements it fills.
8. The method for structural completion and candidate method generation based on operational capability gaps according to claim 1, characterized in that, In S5, candidate method structures that are not in a formally qualified state do not have the qualifications for formal retrieval, formal selection, formal invocation or formal execution. Candidate method structures can be searched, compared, evaluated or tested internally. Candidate method structures are placed in candidate extension regions, which can be logical regions, candidate object sets, isolated namespaces, independent storage regions, or object sets with candidate status tags. When candidate extension regions share the same repository as formal methods, differentiation and management are achieved through candidate status tags, access control, or route filtering.
9. A method structure completion and candidate method generation system based on runtime capability gaps, characterized in that, Performing the method structure completion and candidate method generation method based on runtime capability gaps as described in any one of claims 1-8 includes: The method requirement acquisition module is used to acquire the target method requirements corresponding to the current task or target execution process of the intelligent system in the current running state; wherein, the target method requirements include at least one or more of the target function description and the constraint description related to the target function description; The method space checking module is used to determine the covered and uncovered parts of the existing structure in the existing method space that can be used to meet the requirements of the target method, based on the target function description and constraint description. The capability gap identification module is used to identify and determine unmet capability requirements when the existing method space cannot meet the requirements of the target method based on the covered and uncovered parts of the existing structure. The candidate method structure generation module is used to form a candidate method structure based on unmet capability requirements, using one or more existing structure parts obtained from the existing method space, supplementary structure parts formed for unmet capability requirements, or a combination of both. The generated candidate method structure does not participate in invocation or execution as a formally usable method structure before it obtains formal qualification.
10. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-8.
