World model based structured sop reasoning and transfer learning adaptation method and system

CN123014198APending Publication Date: 2026-10-30BEIJING CORE HIGHLAND BIOTECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611282529.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

缺乏动态推理能力导致迁移策略在遇到未预见的异常时容易失败,返工成本极高,无法在迁移过程中自适应地调整步骤顺序或选取可替代的等效实现方式

Benefits of technology

[0047]软件迁移世界模型通过将人工迁移经验与标准作业程序转化为结构化知识表示,构建覆盖源平台与目标国产平台的环境映射关系,使迁移过程的知识显式化、可计算,显著提升迁移策略的透明度和可解释性。多层次结构化描述信息确保对软件系统各层面特性的全面捕捉,避免遗漏关键迁移因素,从而降低因知识缺失导致的迁移失败风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014198A_ABST
    Figure CN123014198A_ABST
Patent Text Reader

Abstract

The application discloses a structured SOP reasoning and migration learning adaptation method based on a world model, acquires multi-level structured description information of a software system to be migrated, constructs a software migration world model, and converts artificial migration experience and standard operating procedures into structured knowledge representation; the software migration world model is decomposed into a hierarchical process structure of step granularity, task granularity and target granularity, symbolic coding is carried out to obtain tensor representation; a neural-symbol hybrid reasoning engine is used to reason about a migration path, a symbol logic constraint and adaptive ability of deep learning are combined, an adaptation strategy sequence is dynamically selected according to target domestic platform characteristics to generate a decision branch, reconstruction and adaptation operations are executed, state feedback information is collected to adaptively adjust the software migration world model and a reasoning strategy, and a software system domestication migration problem is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of reasoning learning technology, and in particular to a structured SOP reasoning and transfer learning adaptation method and system based on a world model. Background Technology

[0002] In the current technical field of cross-platform software system migration, conventional practices mainly rely on manual refactoring driven by human experience or semi-automated script-assisted migration. Technical personnel typically break down the migration task into steps such as code modification, configuration adjustment, and interface replacement based on their familiarity with both the source and target platforms, and execute these steps sequentially according to migration checklists or standard operating procedure documents accumulated from past projects. This human-centric approach is adequate for scenarios with small-scale migrations and minor platform differences, but as the requirements for domestic substitution become increasingly stringent and software systems become more complex, the limitations of traditional practices become increasingly apparent.

[0003] A significant drawback of conventional practices is the lack of systematic and structured modeling of transferable knowledge. Manual transfer experience often exists in the form of scattered documents or individual skills, making it difficult to reuse and share. While standard operating procedures for transfer across different projects may be similar in form, the lack of formal representation means that similar analysis and decision-making processes must be repeated when transferring the same type of functional modules. This loss of tacit knowledge leads to low transfer efficiency, and existing experience is easily lost during project handover or personnel changes, making the overall transfer quality highly dependent on the individual skill level of the executor.

[0004] Another key drawback is that existing methods cannot effectively address the heterogeneous characteristics of target domestic platforms and the ever-changing business compliance requirements. Traditional migrations typically assume that the target environment is functionally equivalent to the source environment, employing a rigid "replace-by-item" logic that ignores the need to explore adaptations to platform differences. In reality, domestic platforms have unique constraints in their underlying architecture, system calls, and security policies, while business scenarios also have specific compliance clauses. The lack of dynamic reasoning capabilities makes migration strategies prone to failure when encountering unforeseen anomalies, resulting in extremely high rework costs and an inability to adaptively adjust the order of steps or select alternative equivalent implementations during the migration process. Summary of the Invention

[0005] The embodiments of the present invention provide a structured SOP reasoning and transfer learning adaptation method and system based on a world model, which can solve the problems in the prior art.

[0006] A first aspect of this invention provides a structured SOP reasoning and transfer learning adaptation method based on a world model, comprising:

[0007] Obtain multi-level structured description information of the software system to be migrated, and construct a software migration world model based on the multi-level structured description information. The software migration world model transforms manual migration experience and standard operating procedures into structured knowledge representations to form an environmental mapping relationship covering the source platform and the target domestic platform.

[0008] The software migration world model is decomposed into a hierarchical process structure with step granularity, task granularity, and target granularity, and the control structure of each granularity is symbolically encoded to obtain a computable tensor representation.

[0009] Based on the tensor representation, a neural symbolic hybrid reasoning engine is used to reason about the migration path. During the reasoning process, the neural symbolic hybrid reasoning engine combines symbolic logic constraints with the adaptive capabilities of deep learning, and dynamically selects decision branches based on the system characteristics and compliance requirements of the target domestic platform and business scenarios to generate an adaptation strategy sequence.

[0010] Based on the adaptation strategy sequence, the software system to be migrated is reconstructed and adapted, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the reasoning strategy of the neural symbolic hybrid reasoning engine is adaptively adjusted.

[0011] Based on the multi-level structured description information, a software migration world model is constructed. This model transforms manual migration experience and standard operating procedures into structured knowledge representations, forming an environmental mapping relationship covering the source platform and the target domestic platform, including:

[0012] Extract cross-level call dependencies and resource binding relationships from multi-level structured description information, and identify state variables and their constraints that affect the success or failure of migration.

[0013] Semantic parsing is performed on manual transfer experience to transform the experience description into structured transfer knowledge units containing preconditions, operation sequences and expected states, and the execution logic and branch decision rules of the operation steps are extracted from the standard operating procedure.

[0014] Based on the structured transfer knowledge unit and the execution logic, a state space mapping model between the source platform and the target domestic platform is constructed. The state space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between the source platform and the state components of the target domestic platform.

[0015] Using the state space mapping model, the operation sequence is transformed into an action trajectory in the state space. By learning the causal relationship between action trajectories and migration results in historical migration cases, a software migration world model is generated.

[0016] The constraints of the state variables and the branch decision rules are embedded in the software migration world model to form an environment mapping relationship that can be used for reasoning and prediction.

[0017] Based on the structured transfer knowledge unit and the execution logic, a state-space mapping model between the source platform and the target domestic platform is constructed. This state-space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between these components and the state components of the target domestic platform, including:

[0018] Extract the set of state variables from the source platform and the dependencies between state variables from the structured knowledge units; extract the observability annotations of state variables from the execution logic.

[0019] Based on the observability annotation, the set of state variables of the source platform is decomposed into observable state components and potential dependency components. The observable state components that each potential dependency component depends on are traced along the dependency relationship, and a dependency mapping table from potential dependency components to observable state components is constructed.

[0020] Extract the set of state variables of the target domestic platform, perform semantic matching between the observable state components of the source platform and the state variables of the target domestic platform, and establish a direct mapping relationship from the observable state components to the state variables of the target platform.

[0021] For each potential dependency component, the observable state component it depends on is queried from the dependency mapping table. The observable state component is converted into a target platform state variable through the direct mapping relationship. The dependency relationship is used to reconstruct the dependency expression between the converted target platform state variables, forming an indirect mapping relationship from the potential dependency component to the target platform state variable. The direct mapping relationship and the indirect mapping relationship are integrated to form a state space mapping model, establishing the correspondence between the source platform and the target domestic platform state components.

[0022] The software migration world model is decomposed into a hierarchical process structure with step granularity, task granularity, and target granularity. The control structure at each granularity is then symbolically encoded to obtain a computable tensor representation, including:

[0023] Extract indivisible atomic operations from the state transition function of the software migration world model as step granularity units, identify the functional dependencies between the step granularity units, aggregate the step granularity units with functional cohesion into task granularity units, identify the business collaboration relationships between the task granularity units, and combine the task granularity units with business integrity into target granularity units.

[0024] Based on the functional dependencies and business collaboration relationships, the control structure of each granular unit is semantically decomposed, transforming conditional branches into logical constraint expressions based on state variables, transforming loop iterations into recursive relationships of state variables, and transforming exception handling into backtracking mappings of state variables.

[0025] A symbolic control operator is constructed for each granularity unit. Based on the symbolic control operator, the logical constraint expression is mapped to a precondition dimension tensor, the recursive relationship is mapped to an execution action dimension tensor, and the backtracking mapping is mapped to a poststate dimension tensor. The three are integrated to form a multidimensional tensor structure. The tensor combination operation rules between granularities are defined according to the functional dependency relationship and the business collaboration relationship.

[0026] By applying the tensor combination operation rules, the multidimensional tensor structure of the step-level unit is aggregated into a task-level composite tensor along the functional dependency relationship, and the task-level composite tensor is aggregated into a computable tensor representation along the business collaboration relationship.

[0027] Based on the tensor representation, a neural symbolic hybrid inference engine is used to reason about the migration path. During the inference process, the neural symbolic hybrid inference engine combines symbolic logic constraints with the adaptive capabilities of deep learning, dynamically selecting decision branches based on the system characteristics and compliance requirements of the target domestic platform and the business scenario, generating an adaptation strategy sequence including:

[0028] Extract the precondition dimension tensor and the execution action dimension tensor of each granularity unit from the tensor representation, and decode the precondition dimension tensor into a set of symbolic logic constraints of state variables;

[0029] A neural symbolic hybrid reasoning engine is constructed, comprising a symbolic reasoning layer and a neural reasoning layer. The symbolic reasoning layer establishes the reachable domain boundary of the state space and the legal domain boundary of the action space based on the symbolic logic constraint set. The neural reasoning layer constructs a path evaluation function by learning the correlation pattern between the action dimension tensor and the transfer result in historical transfer cases.

[0030] Obtain the system characteristics and compliance requirements of the target domestic platform's business scenarios, transform the system characteristics into platform constraint predicates, transform the compliance requirements into compliance constraint predicates, and embed the platform constraint predicates and the compliance constraint predicates into the reachable domain boundary and the legal domain boundary;

[0031] During the inference process, the symbolic inference layer uses the reachable domain boundary and legal domain boundary after embedding the constraint predicate to perform logical pruning on the candidate migration path, generating a path subspace that satisfies the constraints. The neural inference layer evaluates the execution action dimension tensor of each path in the path subspace, calculates the fitness score of each path according to the path evaluation function, and dynamically selects the decision branch with the best fitness score.

[0032] The execution action dimension tensor of the decision branch is expanded into an operation instruction sequence according to a hierarchical process structure to form an adaptation strategy sequence.

[0033] The symbolic reasoning layer uses the reachability domain boundary and legal domain boundary after embedding constraint predicates to logically prune candidate migration paths, generating a path subspace that satisfies the constraints, including:

[0034] Extract the state transition relationships of each granularity unit from the tensor representation, construct the migration path search space, and transform the platform constraint predicate and compliance constraint predicate into logical constraint expressions of state variables;

[0035] Based on the logical constraint expression, constraint propagation is performed on the reachable domain boundary. The set of state nodes reachable from the initial state is calculated through forward reasoning. Constraint propagation is performed on the legal domain boundary. The set of state nodes that can reach the target state is calculated through backward reasoning. The intersection of the set of state nodes reachable from the initial state and the set of state nodes that can reach the target state is solved to obtain the bidirectional reachable state node set.

[0036] The symbolic reasoning layer is used to perform logical pruning on the migration path search space, deleting state nodes that are not in the set of bidirectional reachable state nodes, verifying the legality of action edges between the retained state nodes, substituting the preceding and following states of each action edge into the logical constraint expression to solve for satisfiability, deleting action edges that do not satisfy the logical constraint expression, and retaining the state nodes and action edges that satisfy the constraints to form the pruned path search space.

[0037] The pruned path search space is enumerated to extract the complete set of paths from the initial state to the target state, generating a path subspace that satisfies the constraints.

[0038] Based on the adaptation strategy sequence, the software system to be migrated is restructured and adapted, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the inference strategy of the neural symbolic hybrid inference engine is adaptively adjusted, including:

[0039] The adaptation strategy sequence is parsed to obtain the operation instruction sequence. The reconstruction and adaptation operations are performed on the software system to be migrated according to the operation instruction sequence. Status feedback information is collected during the execution process.

[0040] The changes in the values ​​of state variables are extracted from the state feedback information to construct actual state transition samples. The actual state transition samples are compared with the predicted state transitions in the software migration world model to identify state transition paths and state transition conditions not covered by the model. The state transition paths are added to the state space of the software migration world model, and the state transition conditions are added to the transition function of the software migration world model to form an extended software migration world model.

[0041] The constraints triggered during the operation execution are extracted from the state feedback information. The coverage relationship between the constraints and the constraint predicate set of the symbolic reasoning layer in the neural symbolic hybrid reasoning engine is analyzed. The uncovered constraints are formalized into new constraint predicates and added to the symbolic reasoning layer. The deviation metric is extracted from the state feedback information. The deviation metric is used as a training signal to optimize the parameters of the path evaluation function of the neural reasoning layer in the neural symbolic hybrid reasoning engine, thus forming an adjusted reasoning strategy.

[0042] A second aspect of the present invention provides an electronic device, comprising:

[0043] processor;

[0044] Memory used to store processor-executable instructions;

[0045] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0046] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0047] The software migration world model transforms manual migration experience and standard operating procedures into structured knowledge representations, constructing an environmental mapping relationship covering the source platform and the target domestic platform. This makes the knowledge in the migration process explicit and computable, significantly improving the transparency and interpretability of migration strategies. Multi-level structured descriptions ensure a comprehensive capture of the characteristics of each level of the software system, avoiding the omission of key migration factors and thus reducing the risk of migration failure due to knowledge gaps.

[0048] The hierarchical process structure, with its step, task, and goal granular decomposition combined with symbolic encoding, transforms the complex migration process into a computable tensor representation, greatly simplifying the search space for migration paths. During execution, the neural symbolic hybrid inference engine combines symbolic logic constraints with deep learning adaptive capabilities, dynamically selecting decision branches based on the target platform system characteristics and business scenario compliance requirements. This accurately generates adaptation strategy sequences, effectively improving the targeting and success rate of migration actions and reducing manual trial-and-error and debugging costs.

[0049] After performing reconstruction and adaptation operations based on the adaptation strategy, real-time state feedback information is collected and used to update the software migration world model. At the same time, the inference strategy of the neural symbolic hybrid inference engine is adaptively adjusted. This closed-loop feedback mechanism enables the entire migration system to have continuous learning and self-optimization capabilities. When dealing with changes in different domestic platforms or business scenarios, it can quickly converge to the optimal solution, significantly enhancing the robustness and long-term stability of the migration process. Attached Figure Description

[0050] Figure 1 This is a flowchart illustrating the structured SOP reasoning and transfer learning adaptation method based on the world model according to an embodiment of the present invention.

[0051] Figure 2 This is a flowchart of software migration reasoning and adaptation based on a world model, as described in an embodiment of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.

[0053] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0054] Figure 1 This is a flowchart illustrating the structured SOP reasoning and transfer learning adaptation method based on the world model, as described in an embodiment of the present invention.

[0055] Structured SOP reasoning and transfer learning adaptation methods based on world models include:

[0056] Obtain multi-level structured description information of the software system to be migrated, and construct a software migration world model based on the multi-level structured description information. The software migration world model transforms manual migration experience and standard operating procedures into structured knowledge representations to form an environmental mapping relationship covering the source platform and the target domestic platform.

[0057] The software migration world model is decomposed into a hierarchical process structure with step granularity, task granularity, and target granularity, and the control structure of each granularity is symbolically encoded to obtain a computable tensor representation.

[0058] Based on the tensor representation, a neural symbolic hybrid reasoning engine is used to reason about the migration path. During the reasoning process, the neural symbolic hybrid reasoning engine combines symbolic logic constraints with the adaptive capabilities of deep learning, and dynamically selects decision branches based on the system characteristics and compliance requirements of the target domestic platform and business scenarios to generate an adaptation strategy sequence.

[0059] Based on the adaptation strategy sequence, the software system to be migrated is reconstructed and adapted, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the reasoning strategy of the neural symbolic hybrid reasoning engine is adaptively adjusted.

[0060] In one optional implementation, a software migration world model is constructed based on the multi-level structured description information. This model transforms manual migration experience and standard operating procedures into structured knowledge representations, forming an environmental mapping relationship covering the source platform and the target domestic platform, including:

[0061] Extract cross-level call dependencies and resource binding relationships from multi-level structured description information, and identify state variables and their constraints that affect the success or failure of migration.

[0062] Semantic parsing is performed on manual transfer experience to transform the experience description into structured transfer knowledge units containing preconditions, operation sequences and expected states, and the execution logic and branch decision rules of the operation steps are extracted from the standard operating procedure.

[0063] Based on the structured transfer knowledge unit and the execution logic, a state space mapping model between the source platform and the target domestic platform is constructed. The state space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between the source platform and the state components of the target domestic platform.

[0064] Using the state space mapping model, the operation sequence is transformed into an action trajectory in the state space. By learning the causal relationship between action trajectories and migration results in historical migration cases, a software migration world model is generated.

[0065] The constraints of the state variables and the branch decision rules are embedded in the software migration world model to form an environment mapping relationship that can be used for reasoning and prediction.

[0066] Extracting cross-level call dependencies and resource bindings from multi-level structured description information requires joint analysis of the software system's interface call graph, module dependency tree, and underlying resource usage list. Specifically, call dependencies encompass call chains at three granularities: function level, service level, and component level. Resource bindings include memory allocation strategies, file system path mappings, network port bindings, and hardware driver interface dependencies. During extraction, a combination of static code analysis and runtime tracing is used to identify call points that implicitly depend on specific system behaviors on the source platform. These call points are often the locations most prone to compatibility issues during migration. For state variables affecting migration success, their constraints need further identification, such as the value range of a configuration parameter, the concurrent access limit of a shared resource, and the sequential dependencies of a service startup order. These state variables and constraints together form the foundational input for the subsequent world model, ensuring that the model accurately describes the dynamic behavioral boundaries of the software system during migration.

[0067] When performing semantic parsing on manual migration experiences, the original experiences typically exist in the form of natural language descriptions, operation logs, or unstructured documents. Information extraction techniques are needed to transform them into a machine-processable structured form. Each migration experience is parsed into a structured migration knowledge unit containing three core elements: preconditions describing the system environment state in which the migration operation can be executed, operation sequence describing the specific migration actions and their execution order, and expected state describing the target state the system should achieve after the operation. For example, a migration experience regarding database driver replacement might have preconditions including the original driver version number and connection pool configuration parameters, an operation sequence including uninstalling the original driver, installing a domestically adapted driver, modifying the connection string, and verifying connection availability, and an expected state including the connection pool being established normally and query response time meeting baseline requirements. Simultaneously, the execution logic and branch decision rules of the operation steps are extracted from standard operating procedures, focusing on the decision criteria at conditional branches, such as the replacement process triggered when an incompatible dependency library version is detected, and the rollback strategy executed when a service health check fails.

[0068] Based on structured transfer knowledge units and execution logic, a state-space mapping model between the source platform and the target domestic platform is constructed. The core idea of ​​this model is to decompose the system state of the source platform into two types of components: observable state components, including directly collectable information such as process state, port listening status, configuration file content, and log output; and latent dependency components, including implicit system call behavior, kernel version feature dependencies, compiler ABI compatibility, and other implicit factors that are difficult to observe directly but will affect the migration results. When establishing the correspondence between the source and target domestic platform state components, specific adaptations are needed for the characteristics of the domestic platform. For example, differences between domestic operating systems and mainstream commercial platforms in areas such as file system mount point naming conventions, dynamic link library search paths, and system call interfaces need to be explicitly reflected in the mapping relationship. The state-space mapping model defines a mapping function between the source and target state component sets, enabling the observation of the source platform's state to be transformed into an estimate of the expected state of the target platform, providing a spatial basis for planning subsequent action trajectories.

[0069] Using a state-space mapping model, the operation sequences in structured transfer knowledge units are transformed into action trajectories in the state space. Each action trajectory consists of a series of state transition triples, recording the complete path from the initial state, through a series of operations, to the final target state. When learning the causal relationship between action trajectories and transfer results in historical transfer cases, the focus is on analyzing which trajectory features are positively correlated with transfer success rates and which operation combinations are prone to failure under specific platform conditions. The learning of causal relationship patterns employs a counterfactual inference method, extracting transfer rules with generalizability by comparing the differences in results caused by different operation choices in similar transfer scenarios. For example, when migrating Java applications on a domestic ARM architecture platform, the causal relationship between the JVM parameter tuning action trajectory and the final performance indicators can be summarized from a large number of historical cases, revealing statistically significant patterns that guide parameter configuration decisions in new transfer tasks. Through trajectory learning from a large number of historical transfer cases, the generated software transfer world model can make reasonable state transition predictions for unseen transfer scenarios and has a certain extrapolation and generalization ability.

[0070] When embedding constraints and branch decision rules for state variables into the software migration world model, constraints are attached to the corresponding state nodes in the form of logical predicates, ensuring that the model does not generate illegal states that violate physical or business constraints when predicting state transitions. Branch decision rules are embedded in the model's state transition function in the form of conditional action pairs, enabling the model to automatically select the appropriate operation branch when facing different system states. For example, when the kernel version of the target domestic platform is detected to be below a certain threshold, the model will activate the compatibility patch installation branch instead of directly executing the standard installation process. After embedding constraints and branch decision rules, the software migration world model can not only describe the state evolution under normal migration paths but also model the handling logic under abnormal situations, thus forming an environmental mapping relationship covering the entire scenario of the source platform and the target domestic platform. This environmental mapping relationship will serve as a constraint background in the subsequent neural symbolic hybrid inference stage, ensuring that the adaptation strategy sequence generated by the inference engine is logically self-consistent and practically executable in engineering. Through the complete construction process described above, the software migration world model ultimately exists in a hybrid form that includes both explicit symbolic rules and data-driven inductive knowledge, providing a solid knowledge foundation for subsequent migration path reasoning and adaptive adjustment.

[0071] Based on the structured transfer knowledge unit and the execution logic, a state-space mapping model between the source platform and the target domestic platform is constructed. This state-space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between these components and the state components of the target domestic platform, including:

[0072] Extract the set of state variables from the source platform and the dependencies between state variables from the structured knowledge units; extract the observability annotations of state variables from the execution logic.

[0073] Based on the observability annotation, the set of state variables of the source platform is decomposed into observable state components and potential dependency components. The observable state components that each potential dependency component depends on are traced along the dependency relationship, and a dependency mapping table from potential dependency components to observable state components is constructed.

[0074] Extract the set of state variables of the target domestic platform, perform semantic matching between the observable state components of the source platform and the state variables of the target domestic platform, and establish a direct mapping relationship from the observable state components to the state variables of the target platform.

[0075] For each potential dependency component, the observable state component it depends on is queried from the dependency mapping table. The observable state component is converted into a target platform state variable through the direct mapping relationship. The dependency relationship is used to reconstruct the dependency expression between the converted target platform state variables, forming an indirect mapping relationship from the potential dependency component to the target platform state variable. The direct mapping relationship and the indirect mapping relationship are integrated to form a state space mapping model, establishing the correspondence between the source platform and the target domestic platform state components.

[0076] The starting point for constructing a state-space mapping model lies in systematically extracting the set of state variables and their interdependencies from the source platform from structured transfer knowledge units. The structured transfer knowledge units record the operational state descriptions, interface parameter definitions, data flow, and inter-module call relationships of each functional module of the source platform. This information, after structured encoding, forms a set of nodes and directed dependency edges for state variables. Simultaneously, observability labels for state variables are extracted from the execution logic. These labels describe whether each state variable can be directly collected or monitored in the actual operating environment. Some state variables correspond to directly quantifiable metrics such as system logs, interface return values, and resource utilization, and are labeled as observable state components; others correspond to internal cache states, implicit dependency configurations, and implicit coupling relationships across modules, which cannot be directly observed on the target platform and are labeled as potential dependency components. This classification process is a crucial prerequisite for establishing accurate mapping relationships later.

[0077] After classification based on observability annotations, each potential dependency component is traced upstream along the dependency graph. Specifically, starting from a potential dependency component, the system traverses upstream along directed dependency edges until it reaches a node labeled as an observable state component, recording all intermediate nodes and edge types along the traversal path. If multiple paths exist during the traversal, each path is recorded separately to preserve the complete dependency topology. After traversal, the correspondence between each potential dependency component and its dependent set of observable state components is stored as a dependency mapping table. Each record in the dependency mapping table contains the identifier of the potential dependency component, a list of identifiers of the observable state components it depends on, and the dependency expression type connecting them. This step makes the state coupling relationships that were originally implicit within the source platform explicit, providing a structured basis for subsequently reconstructing equivalent dependency logic on the target platform.

[0078] After extracting the set of state variables from the target domestic platform, semantic matching is performed between the observable state components of the source platform and the state variables of the target platform. The semantic matching process comprehensively considers the functional semantics, data type, value range, and module context of the variables. For variable pairs with highly consistent functional semantics, a one-to-one direct mapping relationship is established. For variable pairs with similar functional semantics but different data formats, type conversion rules are added while establishing the mapping relationship, such as encoding format conversion, unit conversion, or precision alignment. If there are no semantically equivalent variables for the observable state components of the source platform on the target platform, these are marked as needing to be supplemented with mapping, and subsequently approximated by introducing combined state variables or intermediate calculated variables from the target platform. The establishment of direct mapping relationships ensures that the directly observable system states in the source platform can find corresponding anchor points on the target domestic platform, providing a foundation for the construction of indirect mappings.

[0079] For the construction of indirect mapping relationships for potential dependency components, the set of observable state components that each potential dependency component depends on is queried from the dependency mapping table. These observable state components are then converted into target platform state variables through the established direct mapping relationships, resulting in the corresponding variable set on the target platform side. Based on this, equivalent dependency expressions are reconstructed among the converted target platform state variables according to the dependency expression types recorded in the dependency mapping table. If the original dependency expression is a linear combination relationship, let the potential dependency components in the source platform be... Its observable state components Between ,in These are the weighting coefficients for each component. If it is a bias term, then on the target platform side... Replace with the corresponding target platform state variables Then, the dependency expression is rebuilt as follows: ,in This provides an equivalent representation of the potential dependency components on the target platform. If the original dependency expression contains conditional branching logic, the branch structure is preserved on the target platform side. Only the state variables in the branch conditions are replaced with the corresponding variables on the target platform, and the branch thresholds are adjusted appropriately according to the system characteristics of the target platform. This reconstruction process ensures that the behavioral semantics of the potential dependency components on the target platform remain consistent with those on the source platform, avoiding the break in implicit state coupling caused by platform differences.

[0080] After the direct and indirect mapping relationships are constructed, they are integrated to form a complete state-space mapping model. During integration, consistency checks are performed on the mapping relationships to check for conflicts where target platform state variables are repeatedly mapped by multiple source platform components, and for coverage gaps where source platform state variables fail to find any corresponding variables on the target platform. Mapping conflicts are resolved by introducing priority rules or weighted fusion strategies; coverage gaps are filled by introducing virtual state variables or approximate substitution expressions on the target platform side, and the confidence level of the approximate substitution is recorded in the mapping model using annotations. The final state-space mapping model is stored as a directed graph structure, where nodes correspond to source platform state components and target platform state variables, respectively. Directed edges carry mapping type labels, transformation rules, and dependency expressions, supporting on-demand querying and invocation by the neural symbolic hybrid inference engine during subsequent transfer reasoning.

[0081] The completeness of the state space mapping model directly determines the accuracy of the migration adaptation strategy. By decomposing the source platform state into two levels, observable state components and potential dependency components, and establishing direct and indirect mappings respectively, it is possible to achieve accurate docking with the target domestic platform state system while preserving the complete state semantics of the source platform, providing a reliable basis for subsequent reconstruction and adaptation operations.

[0082] In one optional implementation, the software migration world model is decomposed into a hierarchical process structure of step granularity, task granularity, and target granularity, and the control structure of each granularity is symbolically encoded to obtain a computable tensor representation including:

[0083] Extract indivisible atomic operations from the state transition function of the software migration world model as step granularity units, identify the functional dependencies between the step granularity units, aggregate the step granularity units with functional cohesion into task granularity units, identify the business collaboration relationships between the task granularity units, and combine the task granularity units with business integrity into target granularity units.

[0084] Based on the functional dependencies and business collaboration relationships, the control structure of each granular unit is semantically decomposed, transforming conditional branches into logical constraint expressions based on state variables, transforming loop iterations into recursive relationships of state variables, and transforming exception handling into backtracking mappings of state variables.

[0085] A symbolic control operator is constructed for each granularity unit. Based on the symbolic control operator, the logical constraint expression is mapped to a precondition dimension tensor, the recursive relationship is mapped to an execution action dimension tensor, and the backtracking mapping is mapped to a poststate dimension tensor. The three are integrated to form a multidimensional tensor structure. The tensor combination operation rules between granularities are defined according to the functional dependency relationship and the business collaboration relationship.

[0086] By applying the tensor combination operation rules, the multidimensional tensor structure of the step-level unit is aggregated into a task-level composite tensor along the functional dependency relationship, and the task-level composite tensor is aggregated into a computable tensor representation along the business collaboration relationship.

[0087] After obtaining the software migration world model, it needs to be decomposed into a hierarchical process representation and ultimately transformed into a tensor form that can be processed by the inference engine. The decomposition process begins with the state transition function, extracting indivisible atomic operations as step-level units. An atomic operation is the smallest unit of execution that cannot be further subdivided in the migration process, such as replacing a single API call, modifying a single configuration item, or remapping a single file path. The basis for identifying atomic operations is the smallest triggering action corresponding to each state change in the state transition function. If an action is interrupted during execution, leading to state inconsistency, it is considered an indivisible step-level unit.

[0088] After determining the step-level units, the functional dependencies between these units are analyzed. Functional dependencies describe the execution sequence constraints and data flow relationships between step-level units; for example, the output state of one step is a prerequisite for the input of another step. Step-level units with functional cohesion are aggregated into task-level units. The criterion for functional cohesion is: if a group of step-level units jointly completes a clearly defined functional goal, and the dependency density between these units is significantly higher than the dependency density with external units, then this group of units is considered to have functional cohesion and can be aggregated into a single task-level unit. Furthermore, the business collaboration relationships between task-level units are identified, describing the cooperation and dependencies of different tasks at the business logic level. For example, there is a business collaboration relationship between the database migration task and the interface adaptation task, because the correctness of the interface adaptation depends on the completion status of the database migration. Task-level units with business integrity are combined into target-level units. Business integrity refers to a group of task-level units jointly supporting the delivery of a complete business capability; for example, the localization adaptation of the entire authentication module can be considered as a target-level unit.

[0089] After hierarchical decomposition, the control structure of each granularity unit is semantically decomposed. The control structure mainly includes three categories: conditional branches, loop iterations, and exception handling. For conditional branches, they are transformed into logical constraint expressions based on state variables. That is, the semantic "if the current system state meets a certain condition, then execute a certain path" is expressed as a logical relationship between state variables and thresholds or enumerated values. For example, "if the kernel version of the target platform meets the minimum compatibility requirements" is transformed into an inequality constraint between state variables and version number ranges. For loop iterations, they are transformed into recursive relationships of state variables, describing how state variables evolve from their current value to the next value in each iteration. For example, the incrementing relationship of the processed file count after each iteration in batch file conversion. For exception handling, they are transformed into backtracking mappings of state variables, that is, the mapping relationship where state variables fall back from an abnormal state to a safe state when a step fails, ensuring that the migration process can recover to a known stable state when encountering errors.

[0090] Based on the semantic decomposition results above, a symbolic control operator is constructed for each granularity unit. This symbolic control operator is a formal description of the complete control logic of the granularity unit, containing a three-dimensional tensor mapping. The logical constraint expression is mapped to a precondition dimension tensor, where each component corresponds to a constraint condition of a state variable, recording the state requirements that must be met before the granularity unit is executed. The recursive relation is mapped to an execution action dimension tensor, which describes the trajectory of state variable changes during the execution of the granularity unit, with each component corresponding to a state variable update operation. The backtracking mapping is mapped to a poststate dimension tensor, which records the target value or backtracking value that the state variable should reach after execution. These three dimensions of tensors are merged to form a multidimensional tensor structure, fully expressing the control semantics of the granularity unit. Let the precondition dimension tensor of a certain step granularity unit be... The action dimension tensor is The post-state dimension tensor is Then the multidimensional tensor structure of the granularity unit in this step is represented as: .

[0091] When defining the rules for tensor combination operations between granularities, two types of aggregation operations are defined based on functional dependencies and business collaboration relationships. For aggregations driven by functional dependencies, when the step granularity unit... and When functional dependencies exist, aggregation operations need to... The post-state dimension tensor and The precondition dimension tensors are aligned and merged to ensure that dependencies are correctly transmitted at the tensor level. For aggregations driven by business collaboration relationships, the composite tensors between task granular units are weighted and fused through a collaboration relationship matrix. The elements of the collaboration relationship matrix reflect the coupling strength between the two task granular units in terms of business logic.

[0092] Applying the tensor combination operation rules described above, the multidimensional tensor structures of the step-level granularity units are progressively aggregated along functional dependencies. Suppose a task-level granularity unit contains... Each step-level granularity unit has a multidimensional tensor structure as follows: Tensor aggregation operations are performed sequentially according to the topological order of functional dependencies to obtain a composite tensor at the task granularity. Composite tensors retain the control semantics of the step-level hierarchy while introducing functional cohesion constraints at the task-level hierarchy. This ensures that the tensor representation of a task-level unit can fully describe the execution logic and state evolution of the task. Furthermore, the composite tensors at the task level are aggregated along business collaboration relationships into computable tensor representations at the target level. Let a target granularity unit contain... Each task-level unit has a composite tensor as follows: Through the business collaboration relationship matrix Regarding this We perform weighted aggregation of composite tensors to obtain a computable tensor representation at the target granularity. ,in The Line 1 Column elements Indicates the first The task granularity unit and the first Business collaboration strength coefficient between task granularity units.

[0093] The final computable tensor representation It possesses complete hierarchical semantics, covering all control logic from atomic operations to business objectives, and can be directly used as input to a neural symbolic hybrid inference engine to support subsequent migration path reasoning and adaptation strategy generation. The advantage of this multi-level tensor representation is that it retains the interpretability of symbolic logic while possessing the efficiency of tensor computation, enabling parallel reasoning and fast policy retrieval in large-scale software migration scenarios.

[0094] In one optional implementation, based on the tensor representation, a neural symbolic hybrid inference engine is used to infer the migration path. During the inference process, the neural symbolic hybrid inference engine combines symbolic logic constraints with the adaptive capabilities of deep learning, dynamically selecting decision branches based on the system characteristics and compliance requirements of the target domestic platform and the business scenario, generating an adaptation strategy sequence including:

[0095] Extract the precondition dimension tensor and the execution action dimension tensor of each granularity unit from the tensor representation, and decode the precondition dimension tensor into a set of symbolic logic constraints of state variables;

[0096] A neural symbolic hybrid reasoning engine is constructed, comprising a symbolic reasoning layer and a neural reasoning layer. The symbolic reasoning layer establishes the reachable domain boundary of the state space and the legal domain boundary of the action space based on the symbolic logic constraint set. The neural reasoning layer constructs a path evaluation function by learning the correlation pattern between the action dimension tensor and the transfer result in historical transfer cases.

[0097] Obtain the system characteristics and compliance requirements of the target domestic platform's business scenarios, transform the system characteristics into platform constraint predicates, transform the compliance requirements into compliance constraint predicates, and embed the platform constraint predicates and the compliance constraint predicates into the reachable domain boundary and the legal domain boundary;

[0098] During the inference process, the symbolic inference layer uses the reachable domain boundary and legal domain boundary after embedding the constraint predicate to perform logical pruning on the candidate migration path, generating a path subspace that satisfies the constraints. The neural inference layer evaluates the execution action dimension tensor of each path in the path subspace, calculates the fitness score of each path according to the path evaluation function, and dynamically selects the decision branch with the best fitness score.

[0099] The execution action dimension tensor of the decision branch is expanded into an operation instruction sequence according to a hierarchical process structure to form an adaptation strategy sequence.

[0100] When extracting the precondition dimension tensors and execution action dimension tensors for each granularity unit from the tensor representation, decoding operations need to be performed separately for the step granularity, task granularity, and target granularity. The precondition dimension tensor encodes the prerequisite state requirements for the migration operation to be executed, including the runtime environment state of the source platform, version constraints of dependent components, and compatibility requirements of interface protocols. When decoding this encoded information into a set of symbolic logical constraints for state variables, predicate logic expressions are used to formally describe the value range, existence conditions, and logical dependencies between variables for each state variable. For example, the preconditions for a certain step granularity unit can be decoded into a conjunction of symbolic predicates such as "the target platform has completed the basic runtime environment deployment" and "there is a mapping relationship between the source platform interface call protocol and the target platform protocol," thus forming a set of constraints that can be used for logical reasoning. This decoding process ensures that the subsequent inference engine can process migration preconditions in a formal and verifiable manner, avoiding the limitations of pure numerical calculations in capturing semantic constraints.

[0101] The neural-symbolic hybrid reasoning engine consists of two collaborative substructures: a symbolic reasoning layer and a neural reasoning layer. The symbolic reasoning layer, based on the decoded set of symbolic logic constraints, establishes reachability domain boundaries in the state space—the set of legal states satisfying all precondition predicates—and simultaneously establishes legal domain boundaries in the action space—the set of operations allowed to be executed in the current state. The construction of reachability domain boundaries employs a constraint propagation mechanism, progressively tightening the feasible domain of state variables by forward derivation of precondition predicates at each granularity unit, eliminating logically unreachable state nodes. The establishment of legal domain boundaries is achieved by imposing type and range constraints on the action types and action parameters in the action dimension tensor, ensuring that semantically illegal operation sequences are not generated during reasoning. The neural reasoning layer, through learning from historical migration case data, establishes a correlation pattern between the action dimension tensor and the migration results, constructing a path evaluation function. This function takes the action dimension tensor of each step in the candidate path as input and outputs the path's adaptability score on the target domestic platform. ,in It comprehensively reflects multi-dimensional evaluation indicators such as the probability of successful path execution, estimated resource consumption, and the degree of business continuity assurance. The historical migration cases include migration execution records under different combinations of source platforms and target platforms. By learning patterns from these cases, the neural inference layer enables the path evaluation function to have cross-scenario generalization capabilities.

[0102] When acquiring the system characteristics of a target domestic platform, it is necessary to collect technical parameters such as the target platform's processor instruction set architecture, operating system kernel version, system call interface specifications, memory management mechanism, and file system structure. The process of converting these system characteristics into platform constraint predicates is the process of mapping unstructured platform technical documents into formal logical expressions. For example, the system characteristic that the target platform uses a specific domestic processor architecture can be converted into the platform constraint predicate "the compiled target instruction set must be the instruction set corresponding to this architecture." Compliance requirements in business scenarios typically originate from industry regulatory standards, data security regulations, and business continuity agreements. Transforming these compliance requirements into compliance constraint predicates requires semantic parsing of the compliance clauses to extract constraints related to data processing methods, interface access permissions, log auditing requirements, etc., forming a set of compliance constraint predicates. By embedding platform constraint predicates and compliance constraint predicates into reachability and legality boundaries, the inference engine automatically excludes paths that violate platform characteristics or compliance requirements when generating candidate migration paths, fundamentally ensuring the compliance and executability of the final adaptation strategy sequence.

[0103] During the inference process, the symbolic inference layer first performs logical pruning on the candidate transition path space. The core mechanism of logical pruning is constraint satisfaction checking. For each state transition step in a candidate path, it checks whether its predecessor state is within the reachable domain boundary after embedding the constraint predicate, and whether the corresponding execution action is within the legal domain boundary. If a candidate path violates the constraints of the reachable domain boundary or the legal domain boundary at any step, the path is pruned and excluded from the subsequent neural evaluation stage. After logical pruning, the candidate transition path space is compressed into a path subspace that satisfies all symbolic logical constraints. The paths in this subspace are all legal and reachable at the logical semantic level. The neural inference layer then evaluates the fitness of each path in the path subspace. The execution action dimension tensor sequence of each path is input into the path evaluation function to calculate the fitness score of each path. When calculating the fit score, the path evaluation function comprehensively considers the similarity between the action sequence and historical successful migration cases, the degree to which the action sequence meets the resource constraints of the target platform, and the degree of integrity assurance of business functions after the action sequence is executed. The decision branch corresponding to the candidate path with the best fit score is dynamically selected as the output result of the current inference step. This collaborative mechanism between the symbolic reasoning layer and the neural reasoning layer enables the inference engine to ensure logical correctness through symbolic constraints and to achieve adaptive decision-making in complex migration scenarios through neural evaluation, overcoming the vulnerability of pure symbolic reasoning in handling uncertainty and the shortcomings of pure neural reasoning in ensuring compliance.

[0104] When the execution action dimension tensor of the selected decision branch is expanded into a sequence of operation instructions according to the hierarchical process structure, it is expanded layer by layer from top to bottom based on the hierarchical relationship between step granularity, task granularity, and target granularity. The decision branch at the target granularity is first decomposed into several sub-operation sequences at the task granularity, and each sub-operation sequence at the task granularity is further expanded into atomic operation instructions at the step granularity. The atomic operation instructions at the step granularity are the smallest operation units that can be directly executed for the target domestic platform, including instructions for configuring compilation parameters of code files, instructions for replacing and linking dependent libraries, instructions for modifying path mappings of configuration files, and instructions for generating code for the interface adaptation layer. During the expansion process, the control dependencies and data dependencies between each layer are preserved in the execution order constraints of the operation instruction sequence, ensuring that the operation instruction sequence can correctly reflect the execution logic specified by the hierarchical process structure when executed. The final adaptation strategy sequence is an ordered set of operation instructions. This sequence has complete precondition annotations and poststate expectation annotations, enabling subsequent execution and state feedback collection to be carried out in a structured manner, providing a high-quality data foundation for the continuous updating of the software migration world model.

[0105] In one optional implementation, the symbolic reasoning layer uses the reachability domain boundary and the legal domain boundary after embedding the constraint predicate to logically prune the candidate migration paths, generating a path subspace that satisfies the constraints, including:

[0106] Extract the state transition relationships of each granularity unit from the tensor representation, construct the migration path search space, and transform the platform constraint predicate and compliance constraint predicate into logical constraint expressions of state variables;

[0107] Based on the logical constraint expression, constraint propagation is performed on the reachable domain boundary. The set of state nodes reachable from the initial state is calculated through forward reasoning. Constraint propagation is performed on the legal domain boundary. The set of state nodes that can reach the target state is calculated through backward reasoning. The intersection of the set of state nodes reachable from the initial state and the set of state nodes that can reach the target state is solved to obtain the bidirectional reachable state node set.

[0108] The symbolic reasoning layer is used to perform logical pruning on the migration path search space, deleting state nodes that are not in the set of bidirectional reachable state nodes, verifying the legality of action edges between the retained state nodes, substituting the preceding and following states of each action edge into the logical constraint expression to solve for satisfiability, deleting action edges that do not satisfy the logical constraint expression, and retaining the state nodes and action edges that satisfy the constraints to form the pruned path search space.

[0109] The pruned path search space is enumerated to extract the complete set of paths from the initial state to the target state, generating a path subspace that satisfies the constraints.

[0110] like Figure 2 As shown, the method includes:

[0111] Before the neural symbolic hybrid inference engine executes inference, the state transition relationships carried by the tensor representation need to be explicitly extracted to construct a complete migration path search space. Specifically, from the tensor structures at the step, task, and target granularities, the preconditions, execution actions, and poststate fields of each granularity unit are read, and these fields are mapped to nodes and directed edges in a directed graph: each state node corresponds to a specific system state snapshot, and each directed action edge corresponds to an executable migration operation. Based on this, the processor instruction set architecture constraint predicates and business compliance constraint predicates of the target domestic platform are transformed into logical constraint expressions acting on state variables. Platform constraint predicates focus on describing the feasible domain restrictions of the target platform in terms of instruction set, memory model, and system call interface, while compliance constraint predicates focus on describing the restrictions on the range of state variable values ​​imposed by compliance requirements such as data security, access control, and auditing in the business scenario. These two types of constraint expressions together form the logical basis for subsequent constraint propagation and pruning operations.

[0112] After constructing the search space, forward constraint propagation is performed on the reachable domain boundaries. Forward reasoning starts from the initial state node and expands layer by layer along the action edges. At each step of expansion, the value of the current state variable is substituted into the logical constraint expression for satisfiability checking. Only if the check passes is the subsequent state node included in the forward reachable set. Let the set of forward reachable state nodes be denoted as . ,but Each node in the algorithm satisfies the following conditions: starting from the initial state, there exists at least one path connected by a legal action edge that leads to that node, and each intermediate state on the path satisfies platform constraints and compliance constraints. Simultaneously, backward constraint propagation is performed on the boundaries of the legal domain. Backward reasoning starts from the target state node and backtracks layer by layer along the reverse direction of the action edges. Similarly, at each backtracking step, the satisfiability of the logical constraints on the state variable values ​​is checked, and only if the check passes is the predecessor state node included in the backward reachable set. Let the set of backward reachable state nodes be denoted as . ,but Each node in the system satisfies the following condition: starting from this node, there exists at least one path connected by a valid action edge that can reach the target state, and each intermediate state on the path satisfies the constraint condition.

[0113] After the bidirectional constraint propagation is completed, the solution is obtained. and The intersection of these points yields the set of bidirectional reachable state nodes. . Each node in the algorithm possesses both the properties of being "reachable from the initial state" and "capable of reaching the target state," therefore only... Only nodes in

[0114] It appears on any complete and valid path from the initial state to the target state. It does not belong to... State nodes, regardless of whether they satisfy constraints, cannot participate in forming a complete migration path and can be safely deleted in subsequent pruning stages. This bidirectional reachability analysis, compared to unidirectional forward search, can significantly reduce the number of nodes requiring further verification when the search space is large, thereby improving overall reasoning efficiency.

[0115] Symbolic reasoning layer in obtaining Then, logical pruning is performed on the original migration path search space. Pruning is divided into two stages: the node pruning stage deletes all nodes that do not belong to the node search space. The process involves pruning state nodes and deleting all action edges connected to them. During the action edge pruning phase, for each action edge between the remaining nodes, the values ​​of its preceding and following state variables are substituted into the logical constraint expression, and the satisfiability solver is called to determine the satisfiability of the constraint expression. If the preceding or following state of an action edge does not satisfy the logical constraint expression, the action edge is marked as illegal and deleted. The specific process of satisfiability solving includes: transforming platform constraint predicates into propositional logic or first-order logic formulas concerning variables such as processor instruction set compatibility and system call mapping legality; transforming compliance constraint predicates into constraint formulas concerning variables such as data flow and permission status; combining these two types of formulas to form a complete constraint formula, which is then used by the solver to determine whether there are variable assignments that satisfy the formula. After the node pruning and action edge pruning phases, the remaining state nodes and action edges together constitute the pruned path search space, where all elements satisfy both platform constraints and compliance constraints.

[0116] Path enumeration is performed on the pruned path search space to extract the complete set of paths from the initial state to the target state. Path enumeration uses a depth-first traversal strategy, starting from the initial state node and extending forward along the preserved legal action edges. When the target state node is reached, the current complete path is recorded, and the search continues backtracking. To avoid infinite loops due to cycles in the search space, the set of visited nodes for the current path is maintained during traversal. If a node to be visited already exists in the current path, it is skipped, and the search continues to other branches. After enumeration, all recorded complete paths together constitute a path subspace that satisfies the constraints. Each path in the path subspace satisfies the following property: each state node on the path belongs to... Each action edge on the path has passed the satisfiability verification, and the path starts from the initial state and terminates at the target state. This path subspace will serve as the input to the subsequent deep learning adaptive scoring module, where the neural network will further evaluate and rank the fitness of each candidate path, ultimately outputting the optimal adaptation strategy sequence.

[0117] In real-world migration scenarios, such as migrating middleware software running on an x86-based server operating system to an operating system platform based on domestic Loongson or Phytium processors, platform constraint predicates mark state nodes involving x86-specific instructions as unreachable, and compliance constraint predicates mark data access paths that violate information security compliance requirements as illegal. After the aforementioned bidirectional constraint propagation and two-stage logical pruning, the path search space retains only migration paths that are both technically feasible and compliant on the target domestic platform. This ensures that the adaptation strategy sequence output by the subsequent inference engine has direct executableness and compliance, effectively reducing the risk of compatibility failures caused by improper path selection during the migration process.

[0118] In one optional implementation, the refactoring and adaptation operations are performed on the software system to be migrated based on the adaptation strategy sequence, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the inference strategy of the neural symbolic hybrid inference engine is adaptively adjusted, including:

[0119] The adaptation strategy sequence is parsed to obtain the operation instruction sequence. The reconstruction and adaptation operations are performed on the software system to be migrated according to the operation instruction sequence. Status feedback information is collected during the execution process.

[0120] The changes in the values ​​of state variables are extracted from the state feedback information to construct actual state transition samples. The actual state transition samples are compared with the predicted state transitions in the software migration world model to identify state transition paths and state transition conditions not covered by the model. The state transition paths are added to the state space of the software migration world model, and the state transition conditions are added to the transition function of the software migration world model to form an extended software migration world model.

[0121] The constraints triggered during the operation execution are extracted from the state feedback information. The coverage relationship between the constraints and the constraint predicate set of the symbolic reasoning layer in the neural symbolic hybrid reasoning engine is analyzed. The uncovered constraints are formalized into new constraint predicates and added to the symbolic reasoning layer. The deviation metric is extracted from the state feedback information. The deviation metric is used as a training signal to optimize the parameters of the path evaluation function of the neural reasoning layer in the neural symbolic hybrid reasoning engine, thus forming an adjusted reasoning strategy.

[0122] When parsing the adaptation strategy sequence, each adaptation strategy entry is structurally decomposed according to the target operation type, operation object identifier, and operation parameter triple, forming an atomic sequence of operation instructions. Each operation instruction corresponds to a specific refactoring or adaptation action, such as interface replacement, dependency library switching, configuration parameter rewriting, and compilation option adjustment. The operation instructions are executed sequentially according to the topological order of the sequence. During execution, the trigger time, execution result, execution time, and post-execution system state snapshot of each instruction are collected in real time, forming a complete state feedback information flow. The granularity of state feedback information collection covers three levels: file level, process level, and service level, ensuring that no state changes during execution are missed.

[0123] When extracting changes in state variable values ​​from state feedback information, differential calculations are performed on system state snapshots before and after the execution of each operation instruction to identify the changed state variables and their value sequences, forming a set of actual state transition samples with a triple structure of "state before execution - operation instruction - state after execution". Let the first... The actual state transition sample corresponding to each operation instruction is ,in For the pre-execution state vector, Encode the operation instructions. This is the post-execution state vector. The actual state transition samples are compared item by item with the predicted state transitions stored in the software migration world model. The comparison dimensions include three aspects: the coverage of state variables, the range of state variable values, and the transition triggering conditions.

[0124] When a state node or transition path appears in the actual state transition sample that is not covered by the predicted state transition in the software migration world model, the state node and its corresponding transition path are added to the state space of the software migration world model. Specifically, for a new state node, its state variable dimensions and value range are extracted, encoded into a state vector format compatible with the existing state space, and then inserted into the state node set; for a new transition path, its starting state node, ending state node, and the type of operation instruction that triggered the transition are recorded. When a state transition condition appears in the actual state transition sample that is not recorded by the model, the condition is extracted from the state feedback information, formally expressed, and added to the transition function of the software migration world model, so that the transition function can cover more conditional branches in actual execution scenarios. After the above supplementary operations, an expanded software migration world model is formed, whose state space and transition function coverage are enhanced, and can more accurately predict the execution results of subsequent migration operations.

[0125] When extracting constraints triggered during operation execution from status feedback information, the focus is on the constraint information associated with three types of events: execution failure, execution exception, and deviation of execution results from expectations. The sources of constraints include error codes and descriptions returned by the target domestic platform, violation reports output by the business compliance check module, and conflict prompts generated by dependency verification tools. The extracted constraints are compared with the existing constraint predicate set in the symbolic reasoning layer of the neural symbolic hybrid reasoning engine to determine whether each extracted constraint has been expressed by existing constraint predicates. For constraints not covered by existing constraint predicates, they are formalized into new constraint predicates. The formalization process follows the syntax of first-order logic predicates, clarifying the parameter types, applicable scope, and logical semantics of the predicates. These new constraint predicates are then added to the constraint predicate set of the symbolic reasoning layer, enabling the symbolic reasoning layer to recognize and process such constraints in subsequent reasoning processes.

[0126] When extracting deviation metrics from state feedback information, the difference between the actual execution results and the prediction results of the software migration world model is used as the quantitative basis. Let the... The predicted state vector corresponding to each operation instruction is The actual post-state vector is The state prediction deviation corresponding to this instruction is... Defined as ,in Represents the Euclidean distance norm. Measures the deviation corresponding to all operational commands. The collected data form a training signal sequence, which is used to optimize the parameters of the path evaluation function in the neural inference layer of the neural symbolic hybrid inference engine. The parameter optimization of the path evaluation function employs a gradient-based iterative update method, using the accumulated value of the bias metric as the core component of the loss function. The gradient is calculated through backpropagation to update the network weights of the path evaluation function, making the estimation of the actual execution cost more accurate in subsequent inference.

[0127] During parameter optimization, to prevent overfitting of single-execution feedback from reducing the generalization ability of the inference strategy, an experience replay mechanism is used to perform mixed sampling of historical state transition samples. The actual state transition samples of the current round are mixed with historical samples in a certain proportion before being used in training, ensuring that the parameter update direction of the path evaluation function takes into account both historical experience and current feedback. Simultaneously, the consistency between the newly added constraint predicates and the updated path evaluation function parameters is verified to ensure that the newly added constraint predicates in the symbolic inference layer and the updated path evaluation function in the neural inference layer maintain logical coordination at the decision boundary, avoiding contradictions between symbolic constraints and neural evaluation results. Through the collaborative processing of these two stages—constraint predicate expansion and path evaluation function parameter optimization—an adjusted inference strategy is formed, enabling the neural-symbolic hybrid inference engine to have stronger adaptability and higher decision accuracy when facing similar transfer scenarios.

[0128] The expanded software migration world model and the adjusted inference strategy work together to plan and execute the next round of migration tasks, forming a closed-loop continuous optimization mechanism. As migration tasks accumulate, the state space coverage of the software migration world model continuously expands, the conditional expressive power of the transfer function continuously improves, the path evaluation accuracy of the neural symbolic hybrid inference engine continuously increases, and the success rate and adaptation quality of the overall migration scheme gradually improves accordingly.

[0129] A second aspect of the present invention provides an electronic device, comprising:

[0130] processor;

[0131] Memory used to store processor-executable instructions;

[0132] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0133] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0134] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A structured SOP reasoning and transfer learning adaptation method based on a world model, characterized in that, include: Obtain multi-level structured description information of the software system to be migrated, and construct a software migration world model based on the multi-level structured description information. The software migration world model transforms manual migration experience and standard operating procedures into structured knowledge representations to form an environmental mapping relationship covering the source platform and the target domestic platform. The software migration world model is decomposed into a hierarchical process structure with step granularity, task granularity, and target granularity, and the control structure of each granularity is symbolically encoded to obtain a computable tensor representation. Based on the tensor representation, a neural symbolic hybrid reasoning engine is used to reason about the migration path. During the reasoning process, the neural symbolic hybrid reasoning engine combines symbolic logic constraints with the adaptive capabilities of deep learning, and dynamically selects decision branches based on the system characteristics and compliance requirements of the target domestic platform and business scenarios to generate an adaptation strategy sequence. Based on the adaptation strategy sequence, the software system to be migrated is reconstructed and adapted, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the reasoning strategy of the neural symbolic hybrid reasoning engine is adaptively adjusted.

2. The method according to claim 1, characterized in that, Based on the multi-level structured description information, a software migration world model is constructed. This model transforms manual migration experience and standard operating procedures into structured knowledge representations, forming an environmental mapping relationship covering the source platform and the target domestic platform, including: Extract cross-level call dependencies and resource binding relationships from multi-level structured description information, and identify state variables and their constraints that affect the success or failure of migration. Semantic parsing is performed on manual transfer experience to transform the experience description into structured transfer knowledge units containing preconditions, operation sequences and expected states, and the execution logic and branch decision rules of the operation steps are extracted from the standard operating procedure. Based on the structured transfer knowledge unit and the execution logic, a state space mapping model between the source platform and the target domestic platform is constructed. The state space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between the source platform and the state components of the target domestic platform. Using the state space mapping model, the operation sequence is transformed into an action trajectory in the state space. By learning the causal relationship between action trajectories and migration results in historical migration cases, a software migration world model is generated. The constraints of the state variables and the branch decision rules are embedded in the software migration world model to form an environment mapping relationship that can be used for reasoning and prediction.

3. The method according to claim 2, characterized in that, Based on the structured transfer knowledge unit and the execution logic, a state-space mapping model between the source platform and the target domestic platform is constructed. This state-space mapping model decomposes the system state of the source platform into observable state components and potential dependency components, and establishes a correspondence between these components and the state components of the target domestic platform, including: Extract the set of state variables from the source platform and the dependencies between state variables from the structured knowledge units; extract the observability annotations of state variables from the execution logic. Based on the observability annotation, the set of state variables of the source platform is decomposed into observable state components and potential dependency components. The observable state components that each potential dependency component depends on are traced along the dependency relationship, and a dependency mapping table from potential dependency components to observable state components is constructed. Extract the set of state variables of the target domestic platform, perform semantic matching between the observable state components of the source platform and the state variables of the target domestic platform, and establish a direct mapping relationship from the observable state components to the state variables of the target platform. For each potential dependency component, the observable state component it depends on is queried from the dependency mapping table. The observable state component is converted into a target platform state variable through the direct mapping relationship. The dependency relationship is used to reconstruct the dependency expression between the converted target platform state variables, forming an indirect mapping relationship from the potential dependency component to the target platform state variable. The direct mapping relationship and the indirect mapping relationship are integrated to form a state space mapping model, establishing the correspondence between the source platform and the target domestic platform state components.

4. The method according to claim 1, characterized in that, The software migration world model is decomposed into a hierarchical process structure with step granularity, task granularity, and target granularity. The control structure at each granularity is then symbolically encoded to obtain a computable tensor representation, including: Extract indivisible atomic operations from the state transition function of the software migration world model as step granularity units, identify the functional dependencies between the step granularity units, aggregate the step granularity units with functional cohesion into task granularity units, identify the business collaboration relationships between the task granularity units, and combine the task granularity units with business integrity into target granularity units. Based on the functional dependencies and business collaboration relationships, the control structure of each granular unit is semantically decomposed, transforming conditional branches into logical constraint expressions based on state variables, transforming loop iterations into recursive relationships of state variables, and transforming exception handling into backtracking mappings of state variables. A symbolic control operator is constructed for each granularity unit. Based on the symbolic control operator, the logical constraint expression is mapped to a precondition dimension tensor, the recursive relationship is mapped to an execution action dimension tensor, and the backtracking mapping is mapped to a poststate dimension tensor. The three are integrated to form a multidimensional tensor structure. The tensor combination operation rules between granularities are defined according to the functional dependency relationship and the business collaboration relationship. By applying the tensor combination operation rules, the multidimensional tensor structure of the step-level unit is aggregated into a task-level composite tensor along the functional dependency relationship, and the task-level composite tensor is aggregated into a computable tensor representation along the business collaboration relationship.

5. The method according to claim 1, characterized in that, Based on the tensor representation, a neural symbolic hybrid inference engine is used to reason about the migration path. During the inference process, the neural symbolic hybrid inference engine combines symbolic logic constraints with the adaptive capabilities of deep learning, dynamically selecting decision branches based on the system characteristics and compliance requirements of the target domestic platform and the business scenario, generating an adaptation strategy sequence including: Extract the precondition dimension tensor and the execution action dimension tensor of each granularity unit from the tensor representation, and decode the precondition dimension tensor into a set of symbolic logic constraints of state variables; A neural symbolic hybrid reasoning engine is constructed, comprising a symbolic reasoning layer and a neural reasoning layer. The symbolic reasoning layer establishes the reachable domain boundary of the state space and the legal domain boundary of the action space based on the symbolic logic constraint set. The neural reasoning layer constructs a path evaluation function by learning the correlation pattern between the action dimension tensor and the transfer result in historical transfer cases. Obtain the system characteristics and compliance requirements of the target domestic platform's business scenarios, transform the system characteristics into platform constraint predicates, transform the compliance requirements into compliance constraint predicates, and embed the platform constraint predicates and the compliance constraint predicates into the reachable domain boundary and the legal domain boundary; During the inference process, the symbolic inference layer uses the reachable domain boundary and legal domain boundary after embedding the constraint predicate to perform logical pruning on the candidate migration path, generating a path subspace that satisfies the constraints. The neural inference layer evaluates the execution action dimension tensor of each path in the path subspace, calculates the fitness score of each path according to the path evaluation function, and dynamically selects the decision branch with the best fitness score. The execution action dimension tensor of the decision branch is expanded into an operation instruction sequence according to a hierarchical process structure to form an adaptation strategy sequence.

6. The method according to claim 5, characterized in that, The symbolic reasoning layer uses the reachability domain boundary and legal domain boundary after embedding constraint predicates to logically prune candidate migration paths, generating a path subspace that satisfies the constraints, including: Extract the state transition relationships of each granularity unit from the tensor representation, construct the migration path search space, and transform the platform constraint predicate and compliance constraint predicate into logical constraint expressions of state variables; Based on the logical constraint expression, constraint propagation is performed on the reachable domain boundary. The set of state nodes reachable from the initial state is calculated through forward reasoning. Constraint propagation is performed on the legal domain boundary. The set of state nodes that can reach the target state is calculated through backward reasoning. The intersection of the set of state nodes reachable from the initial state and the set of state nodes that can reach the target state is solved to obtain the bidirectional reachable state node set. The symbolic reasoning layer is used to perform logical pruning on the migration path search space, deleting state nodes that are not in the set of bidirectional reachable state nodes, verifying the legality of action edges between the retained state nodes, substituting the preceding and following states of each action edge into the logical constraint expression to solve for satisfiability, deleting action edges that do not satisfy the logical constraint expression, and retaining the state nodes and action edges that satisfy the constraints to form the pruned path search space. The pruned path search space is enumerated to extract the complete set of paths from the initial state to the target state, generating a path subspace that satisfies the constraints.

7. The method according to claim 1, characterized in that, Based on the adaptation strategy sequence, the software system to be migrated is restructured and adapted, and state feedback information is collected during the execution process. The state feedback information is used to update the software migration world model, and the inference strategy of the neural symbolic hybrid inference engine is adaptively adjusted, including: The adaptation strategy sequence is parsed to obtain the operation instruction sequence. The reconstruction and adaptation operations are performed on the software system to be migrated according to the operation instruction sequence. Status feedback information is collected during the execution process. The changes in the values ​​of state variables are extracted from the state feedback information to construct actual state transition samples. The actual state transition samples are compared with the predicted state transitions in the software migration world model to identify state transition paths and state transition conditions not covered by the model. The state transition paths are added to the state space of the software migration world model, and the state transition conditions are added to the transition function of the software migration world model to form an extended software migration world model. The constraints triggered during the operation execution are extracted from the state feedback information. The coverage relationship between the constraints and the constraint predicate set of the symbolic reasoning layer in the neural symbolic hybrid reasoning engine is analyzed. The uncovered constraints are formalized into new constraint predicates and added to the symbolic reasoning layer. The deviation metric is extracted from the state feedback information. The deviation metric is used as a training signal to optimize the parameters of the path evaluation function of the neural reasoning layer in the neural symbolic hybrid reasoning engine, thus forming an adjusted reasoning strategy.

8. A structured SOP reasoning and transfer learning adaptation system based on a world model, used to implement the method as described in any one of claims 1-7, characterized in that, include: The world model unit is used to acquire multi-level structured description information of the software system to be migrated, and to construct a software migration world model based on the multi-level structured description information. The software migration world model transforms manual migration experience and standard operating procedures into structured knowledge representations to form an environmental mapping relationship covering the source platform and the target domestic platform. Tensor encoding unit is used to decompose the software migration world model into a hierarchical process structure of step granularity, task granularity and target granularity, and to symbolically encode the control structure of each granularity to obtain a computable tensor representation. The hybrid reasoning unit is used to reason about the migration path based on the tensor representation using a neural symbolic hybrid reasoning engine. During the reasoning process, the neural symbolic hybrid reasoning engine combines symbolic logic constraints with the adaptive capabilities of deep learning, dynamically selects decision branches based on the system characteristics of the target domestic platform and the compliance requirements of the business scenario, and generates an adaptation strategy sequence. The feedback update unit is used to perform reconstruction and adaptation operations on the software system to be migrated based on the adaptation strategy sequence, collect state feedback information during the execution process, update the software migration world model using the state feedback information, and adaptively adjust the inference strategy of the neural symbolic hybrid inference engine.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.