Processing method and apparatus for computer algorithms

By constructing a retrieval database and a large model to provide a unified expression and interface mapping for algorithm descriptions, the fragmentation and inconsistent interface issues in algorithm deployment are resolved, achieving efficient and stable algorithm adaptation and deployment, and reducing reliance on manual intervention.

CN121478390BActive Publication Date: 2026-04-07启元实验室
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the standardized deployment and operation of algorithms face problems such as fragmented algorithm descriptions, inconsistent interfaces, low deployment efficiency, and high dependence on manual intervention, resulting in difficulties in algorithm integration and high migration costs.

Method used

By constructing a retrieval database and utilizing large models for retrieval enhancement generation, a unified expression of algorithm descriptions, interface mapping, and adaptation program generation are achieved. Combined with automated testing and intelligent correction technologies, efficient adaptation code generation from multi-source raw data to the target cloud platform is realized.

Benefits of technology

It significantly reduces the complexity and cost of algorithm integration, deployment, and operation and maintenance, improves the migration efficiency and stability of algorithms in different environments, and reduces reliance on manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478390B_ABST
    Figure CN121478390B_ABST
Patent Text Reader

Abstract

The application provides a computer algorithm processing method and device, and relates to the technical field of computers. The application utilizes the powerful semantic understanding and generation capability of a large model, combines retrieval enhancement generation, code generation, test configuration generation, cloud computing, automated testing and intelligent correction technology, and through a large model related to retrieval enhancement generation, unified expression, intelligent interface mapping and adaptive program generation, standardized test configuration generation, intelligent test feedback and correction, realizes an end-to-end automated process from algorithm original description materials including multi-source original data and algorithm text description documents to adaptive codes running efficiently and stably on a target cloud platform, significantly reduces the complexity, error rate and time cost of algorithm integration, deployment and operation, and has low dependence on manpower.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a computer algorithm processing method and device. BACKGROUND

[0002] At present, with the development of algorithm development and deployment ecology, the standardized deployment and operation of algorithms face many challenges:

[0003] First, the algorithm description is fragmented, and the function description, interface definition, and dependency declaration of the algorithm are scattered in natural language documents, code comments, and configuration files (such as OpenAPI and requirements.txt). The formats of algorithm descriptions from different sources are different and cannot be uniformly expressed, which leads to difficulties in algorithm integration and requires a large amount of manual cost.

[0004] Second, the algorithm adaptation is highly complex. The industry commonly uses RESTful / gRPC communication interfaces, academic research mostly uses Socket / MPI communication interfaces, and cloud platforms require specific dedicated interfaces (such as AWS Lambda / Azure Function). The interfaces of various simulation platforms are seriously inconsistent (such as MuJoCo, AirSim, Genesis, AFSim, and VBS). The interfaces between algorithms and simulation platforms and services are not uniform, and a large amount of manual adaptation work is required, which leads to repeated development and adaptation of logic for cross-platform calls.

[0005] Third, the deployment efficiency is low and the portability is poor. Algorithm deployment methods such as container image construction (Dockerfile), cloud resource configuration (Terraform), and service orchestration (Kubernetes YAML) rely on manual configuration and require manual writing of platform-specific description files. There is a lack of automated and standardized processes, and the algorithm implementation is strongly coupled. Algorithms are difficult to migrate between different environments, there is a lack of unified containerization standards, and the migration cost is high.

[0006] In summary, the prior art has a high degree of dependence on manual work. SUMMARY

[0007] Therefore, the present application provides a computer algorithm processing method and device, which realizes the development and deployment of computer algorithms with low dependence on manual work.

[0008] According to an aspect of the present application, a computer algorithm processing method is provided, comprising: S1: constructing a retrieval database according to multi-source original data of an algorithm to be processed, and constructing a retrieval enhancement generation large model based on the retrieval database; S2: generating first input data based on the retrieval enhancement generation large model according to an algorithm text description document of the algorithm to be processed, and inputting the first input data into a pre-constructed unified expression large model to obtain target algorithm description data; S3: generating second input data based on the retrieval enhancement generation large model according to the target algorithm description data, and inputting the second input data into a pre-constructed interface mapping large model to obtain target mapping rules; S4: generating third input data based on the retrieval enhancement generation large model according to the target mapping rules and original algorithm codes in the algorithm text description document, and inputting the third input data into a pre-constructed adaptation program generation large model to obtain target platform adaptation codes; S5: generating fourth input data based on the retrieval enhancement generation large model according to the target algorithm description data and the target platform adaptation codes, and inputting the fourth input data into a pre-constructed test configuration generation large model to obtain a test configuration file; S6: performing running test on the target platform adaptation codes based on the test configuration file to obtain a test log; S7: extracting key information in the test log, in the case that the key information includes error information and / or abnormal information, inputting the key information and the test log into a pre-constructed correction large model to obtain a correction scheme, feeding back the correction scheme to corresponding large models of the retrieval enhancement generation large model, the unified expression large model, the interface mapping large model, the adaptation program generation large model and the test configuration generation large model and correcting, and recording the number of corrections; and S8: in the case that the key information does not include error information and abnormal information, deploying and running the target platform adaptation codes.

[0009] According to some embodiments, step S1 comprises: performing block processing on the multi-source original data, and converting the result of the block processing into an embedding vector; defining knowledge entities, relationships and attributes of the multi-source original data to obtain a triple data group; constructing a retrieval database according to the embedding vector and the triple data group; and constructing a retrieval enhancement generation large model based on the retrieval database.

[0010] According to some embodiments, constructing a retrieval database according to the embedding vector and the triple data group comprises: constructing an index on the embedding vector, and constructing a vector database according to the embedding vector and the index thereof; constructing a graph model according to the triple data group, and constructing a graph database according to the graph model; and constructing the retrieval database according to the vector database and the graph database.

[0011] According to some embodiments, step S2 comprises: preprocessing the algorithm text description document of the to-be-processed algorithm, and performing semantic segmentation on the basis of the preprocessing result, wherein the preprocessing comprises segmentation and / or information pre-tagging; searching based on the retrieval enhancement generation large model according to the semantic segmentation result to obtain knowledge enhancement information; constructing prompt words according to the knowledge enhancement information and the algorithm text description document to obtain unified expression generation prompt words, and generating first input data according to the unified expression generation prompt words; inputting the first input data into the unified expression large model to obtain target algorithm description data conforming to the algorithm unified description specification of the unified expression large model.

[0012] According to some embodiments, step S2 comprises: verifying the target algorithm description data by using a preset verification rule.

[0013] According to some embodiments, step S3 comprises: searching based on the retrieval enhancement generation large model according to the target algorithm description data to obtain relevant knowledge retrieval results; generating interface adaptation generation prompt words according to the target platform requirement description, the relevant knowledge retrieval results and the target algorithm description data, and generating second input data according to the interface adaptation generation prompt words; inputting the second input data into the interface mapping large model to obtain a target mapping rule.

[0014] According to some embodiments, step S4 comprises: generating a query condition according to the target mapping rule and the original algorithm code in the algorithm text description document; performing enhanced retrieval by using the query condition based on the retrieval enhancement generation large model to obtain relevant code retrieval results; generating code generation prompt words according to the relevant code retrieval results, the target mapping rule and the original algorithm code, and generating third input data according to the code generation prompt words; inputting the third input data into the adaptation program generation large model to obtain target platform adaptation code.

[0015] According to some embodiments, step S4 further comprises: checking the target platform adaptation code by using a preset checking rule; collecting first feedback of the interface mapping large model and the adaptation program generation large model in the inference process and second feedback of the checking; determining feedback problems according to the first feedback and the second feedback, and performing corresponding adjustment according to the feedback problems, wherein the feedback problems comprise at least one of a missing retrieval database, a retrieval database error, an interface mapping large model deviation and an adaptation program generation large model deviation, and the adjustment comprises at least one of updating the retrieval database, fine-tuning the interface mapping large model, fine-tuning the adaptation program generation large model, adjusting the interface adaptation generation prompt words and adjusting the code generation prompt words.

[0016] According to some embodiments, step S5 includes: searching based on the target algorithm description data and the large model generated by retrieval enhancement to obtain relevant configuration retrieval results; generating algorithm test execution prompts based on the relevant configuration retrieval results, the target algorithm description data, and the target platform adaptation code, and generating fourth input data based on the algorithm test execution prompts; and inputting the fourth input data into the large model generated by test configuration to obtain the test configuration file.

[0017] According to some embodiments, step S6 includes: obtaining a standard container image by using the container build file of the target platform in the test configuration file based on the target platform adaptation code; and running tests on the standard container image using the deployment orchestration configuration file in the test configuration file to obtain test logs.

[0018] According to some embodiments, step S7 includes: extracting key information from the test log; if the key information includes error information and / or exception information, inputting the key information and test log into the large correction model to obtain a correction solution; if the correction solution includes a code correction solution, feeding the code correction solution back to the adapter program to generate the large model, and jumping to step S4 for correction, and recording the number of corrections; if the correction solution includes a test correction solution, feeding the test correction solution back to the test configuration to generate the large model, and jumping to step S5 for correction, and recording the number of corrections.

[0019] According to some embodiments, step S7 includes: if the number of corrections exceeds a preset correction threshold, reverting the target platform adaptation code and / or test configuration file to the previous available version and generating an alarm notification message.

[0020] According to one aspect of this application, a computer algorithm processing apparatus includes: a retrieval enhancement unit, configured to construct a retrieval database based on multi-source raw data of the algorithm to be processed, and to construct a retrieval enhancement generation model based on the retrieval database; a unified expression unit, configured to generate first input data based on the algorithm text description document of the algorithm to be processed and the retrieval enhancement generation model, and input the first input data into the pre-constructed unified expression model to obtain target algorithm description data; an interface mapping unit, configured to generate second input data based on the target algorithm description data and the retrieval enhancement generation model, and input the second input data into the pre-constructed interface mapping model to obtain target mapping rules; and an adaptation program unit, configured to generate third input data based on the target mapping rules and the original algorithm code in the algorithm text description document and the retrieval enhancement generation model, and input the third input data into the pre-constructed adaptation program generation model to obtain target platform adaptation. The system comprises the following components: a code unit; a test configuration unit, which generates a fourth input data based on the target algorithm description data and the target platform adaptation code, using the retrieval enhancement generation model; a test configuration unit, which runs the test test based on the test configuration and performs tests on the target platform adaptation code, generating test logs; a correction feedback unit, which extracts key information from the test logs, and if the key information includes error and / or exception information, inputs the key information and test logs into a pre-built correction model to obtain a correction solution, and feeds the correction solution back to the corresponding large models in the retrieval enhancement generation model, unified expression model, interface mapping model, adaptation program generation model, and test configuration generation model for correction, recording the number of corrections; and a deployment and execution unit, which deploys and runs the target platform adaptation code if the key information does not include error or exception information.

[0021] According to one aspect of this application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method as described above.

[0022] According to one aspect of this application, a computer-readable medium is provided that stores a computer program or instructions thereon, which, when executed by a processor, implement the method as described above.

[0023] Through the embodiments provided in this application, the powerful semantic understanding and generation capabilities of large models are utilized, combined with retrieval enhancement generation, code generation, test configuration generation, cloud computing, automated testing, and intelligent correction technologies. Through retrieval enhancement generation, unified expression, intelligent interface mapping and adapter program generation, standardized test configuration generation, and intelligent test feedback and correction related large models, an end-to-end automated process is achieved from the original algorithm description materials, including multi-source raw data and algorithm text description documents, to the adapter code that runs efficiently and stably on the target cloud platform. This significantly reduces the complexity, error rate, and time cost of algorithm integration, deployment, and operation and maintenance, and has a low degree of dependence on manual labor. Attached Figure Description

[0024] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application.

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings, without exceeding the scope of protection claimed by this application.

[0026] Figure 1 A flowchart illustrating the processing method of the computer algorithm provided in the embodiments of this application;

[0027] Figure 2 A flowchart of step S1 of the computer algorithm processing method provided in the embodiments of this application;

[0028] Figure 3 A flowchart of step S2 of the computer algorithm processing method provided in the embodiments of this application;

[0029] Figure 4 A flowchart of step S3 of the computer algorithm processing method provided in the embodiments of this application;

[0030] Figure 5 A flowchart of step S4 of the computer algorithm processing method provided in the embodiments of this application;

[0031] Figure 6 A flowchart of step S5 of the computer algorithm processing method provided in the embodiments of this application;

[0032] Figure 7 A flowchart of step S6 of the computer algorithm processing method provided in the embodiments of this application;

[0033] Figure 8A flowchart of step S8 of the computer algorithm processing method provided in the embodiments of this application;

[0034] Figure 9 A block diagram of a computer algorithm processing apparatus provided in the embodiments of this application;

[0035] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0037] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0040] It should be understood that although the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the term "and / or" includes all combinations of any one and more of the associated listed items.

[0041] For specific implementation details, please refer to the following examples.

[0042] Figure 1 A flowchart illustrating the processing method of the computer algorithm provided in this application embodiment. Figure 1 As shown, the method includes steps S1-S8.

[0043] In step S1, a retrieval database is constructed based on the multi-source raw data of the algorithm to be processed, and a large retrieval enhancement generation model is constructed based on the retrieval database.

[0044] The first step is to construct the retrieval database. Specifically, this involves integrating the multi-source raw data from the algorithms to be processed to build the retrieval database, which serves as the foundation for Retrieval Enhancement Generation (RAG).

[0045] The multi-source raw data for the algorithm to be processed includes domain knowledge that can assist large models in completing the "unified expression and interactive operation of intelligent algorithms." This data can be in various formats, such as papers, books, source code, design documents, and interface documents; this application does not impose any restrictions on these formats.

[0046] According to the example embodiment, the multi-source raw data of the algorithm to be processed includes the algorithm description specification document of the algorithm to be processed, the target platform API (Application Programming Interface) document, SDK (Software Development Kit) information, sample code, historical cases and glossary, etc.

[0047] Based on the retrieval database, and combined with a large model, a retrieval enhancement generation model is constructed to achieve semantic retrieval capabilities for knowledge fragments. A continuous update mechanism maintains the freshness and accuracy of the knowledge, thereby providing stronger information retrieval functions. This application does not restrict the specific model type of the large model; it can be selected according to the actual situation.

[0048] In step S2, based on the algorithm text description document of the algorithm to be processed, a large model based on retrieval enhancement is generated to generate the first input data, and the first input data is input into the pre-constructed unified expression large model to obtain the target algorithm description data.

[0049] It is understandable that the algorithm's textual description document can be included within the multi-source raw data of the algorithm. The algorithm's textual description document is used to provide a textual description of the algorithm.

[0050] According to the example implementation, the algorithm text description document of the algorithm to be processed includes the requirements document, interface document, dependency document, algorithm running source code (including comments), and other algorithm text descriptions.

[0051] Based on the algorithm text description document of the algorithm to be processed, a large model is generated by retrieval enhancement, and combined with RAG enhanced retrieval, the output is used as the first input data.

[0052] Based on the generated first input data and the pre-built unified expression model, combined with the knowledge-enhanced prompt words, the algorithm text description document is transformed or extracted into target algorithm description data that conforms to the unified algorithm description specification (such as JSON, XML, etc.), thus completing the structured extraction process of algorithm description text based on the unified expression model.

[0053] Among them, the unified expression large model is a pre-built large model that can generate a structured and standardized description based on the input. It can use an existing model or use an existing model as a base and obtain it through pre-training or fine-tuning with corresponding data. This application does not restrict this.

[0054] In step S3, based on the target algorithm description data, a large model is generated based on retrieval enhancement to generate second input data, and the second input data is input into the pre-built interface mapping large model to obtain the target mapping rules.

[0055] Based on the target algorithm's description of the data, a large model is generated using retrieval enhancement, combined with RAG-enhanced retrieval, and the output is used as the second input data.

[0056] Based on the generated second input data and the pre-built interface mapping model, combined with the knowledge-enhanced prompt words, the target algorithm description data is transformed into a reliable mapping scheme that satisfies standardized mapping rules (e.g., {original interface → target interface, mapping rules, confidence level}), which serves as the target mapping rule.

[0057] Among them, the interface mapping large model is a pre-built large model that can generate mappings that satisfy standardized mapping rules based on inputs. It can use existing models or use existing models as a base and obtain them through pre-training or fine-tuning with corresponding data. This application does not restrict this.

[0058] In step S4, based on the target mapping rules and the original algorithm code in the algorithm text description document, a large model is generated based on retrieval enhancement, third input data is generated, and the third input data is input into the pre-built adaptation program to generate the large model, thus obtaining the target platform adaptation code.

[0059] Based on the target mapping rules and the original algorithm code, a large model is generated by retrieval enhancement, and the output is used as the third input data in combination with RAG enhanced retrieval.

[0060] Based on the generated third input data and the pre-built adaptation program, a large model is generated. Combined with knowledge-enhanced prompt words, the target mapping rules are transformed into adaptation code that conforms to the target platform specifications, including interface replacement logic, parameter conversion code, and error handling mechanism, which serves as the target platform adaptation code.

[0061] Among them, the large model generated by the adapter program is a pre-built large model that can generate adapter code according to the input interface mapping rules. It can use an existing model or use an existing model as a base and obtain it through pre-training or fine-tuning with corresponding data. This application does not restrict this.

[0062] In step S5, based on the target algorithm description data and the target platform adaptation code, a large model is generated based on retrieval enhancement, a fourth input data is generated, and the fourth input data is input into the pre-built test configuration to generate a large model, thus obtaining the test configuration file.

[0063] Based on the target algorithm description data, a large model is generated using retrieval enhancement. Combined with RAG-enhanced retrieval, the output is combined with the target platform adaptation code and the target algorithm description data as the fourth input data.

[0064] Based on the generated fourth input data and the pre-built test configuration, a large model is generated. Combined with knowledge-enhanced prompt words, the target platform adaptation code is used to generate the target platform's test configuration file.

[0065] Among them, the test configuration generation large model is a pre-built large model that can generate test configuration files based on the input. It can use an existing model or use an existing model as a base and obtain it through pre-training or fine-tuning with the corresponding data. This application does not restrict this.

[0066] In step S6, the target platform adaptation code is run and tested based on the test configuration file to obtain test logs.

[0067] Based on the test configuration file, deploy the target platform adaptation code and program image in the cloud platform for preliminary running tests, and collect the generated log information as test logs.

[0068] In step S7, key information is extracted from the test log. If the key information includes error information and / or exception information, the key information and test log are input into the pre-built correction model to obtain a correction scheme. The correction scheme is then fed back to the corresponding large model in the retrieval enhancement generation model, unified expression model, interface mapping model, adapter program generation model, and test configuration generation model for correction, and the number of corrections is recorded.

[0069] Extract key information from the test logs. If the key information includes error messages and / or anomaly messages, input the key information into the correction model. Utilize the correction model's understanding capabilities to analyze the root causes of errors and generate targeted correction paths and solutions as the correction plan.

[0070] Among them, the modified large model is a pre-built large model that can generate targeted modification paths and solutions based on the input. It can use an existing model or use an existing model as a base and obtain it through pre-training or fine-tuning with corresponding data. This application does not restrict this.

[0071] The revised solution is fed back to the corresponding large model for correction, and the subsequent steps are continued. For each correction, the correction count is incremented by one.

[0072] Among them, the corresponding large model for feedback is one or more of the following: retrieval enhancement generation large model, unified expression large model, interface mapping large model, adapter program generation large model, and test configuration generation large model.

[0073] In step S8, if the critical information does not include error information and exception information, the target platform adaptation code is deployed and run.

[0074] If the critical information does not include error or exception information, the test passes, and the verified target platform adaptation code is officially deployed in the cloud platform, establishing a continuous monitoring and maintenance mechanism.

[0075] This application leverages the powerful semantic understanding and generation capabilities of large-scale models, combined with retrieval-enhanced generation, code generation, test configuration generation, cloud computing, automated testing, and intelligent correction technologies. Through retrieval-enhanced generation, unified expression, intelligent interface mapping and adapter program generation, standardized test configuration generation, and intelligent test feedback and correction related large-scale models, it achieves an end-to-end automated process from original algorithm description materials, including multi-source raw data and algorithm text description documents, to the adapter code that runs efficiently and stably on the target cloud platform. This significantly reduces the complexity, error rate, and time cost of algorithm integration, deployment, and operation and maintenance, with a low degree of reliance on manual intervention.

[0076] According to some embodiments, refer to Figure 2 In step S1, a retrieval database is constructed based on the multi-source raw data of the algorithm to be processed, and a large retrieval enhancement generation model is constructed based on the retrieval database. This can be specifically achieved through steps S210-S240.

[0077] In step S210, the multi-source raw data is divided into blocks, and the result of the block division is converted into an embedding vector.

[0078] The original data documents from multiple sources are segmented into blocks, and the results of the segmentation are vectorized and converted into numerical representations as embedded vectors to establish a two-way association between text and vectors.

[0079] According to the example embodiment, the result of the block processing is vectorized using a pre-selected embedding model to obtain an embedding vector.

[0080] In some embodiments, step S210 may be preceded by cleaning the multi-source raw data.

[0081] In step S220, knowledge entities, relationships, and attributes of the multi-source raw data are defined to obtain a three-dimensional data set.

[0082] Define a data model for the multi-source raw data, determine the knowledge entities, relationships, and attributes, that is, complete the ontology modeling and obtain the three-dimensional data set.

[0083] In step S230, a retrieval database is constructed based on the embedding vector and the three-element data set.

[0084] The embedding vectors and three-dimensional data sets are processed to construct a retrieval database.

[0085] In step S240, a large model for retrieval enhancement is constructed based on the retrieval database.

[0086] Based on the retrieval database, a hybrid retrieval system is deployed as a large model to enhance retrieval, realize multimodal query routing, and combine vector similarity with graph semantic relationship ranking.

[0087] Furthermore, step S240 also includes: designing an automated pipeline to capture new platform documents, version iteration content, and user correction feedback in real time, and updating the retrieval database.

[0088] According to some embodiments, in step S230, a retrieval database is constructed based on the embedding vector and the three-element data set, which can be specifically implemented through steps S231-S233.

[0089] In step S231, an index is constructed for the embedded vectors, and a vector database is constructed based on the embedded vectors and their indexes.

[0090] Store the embedded vectors and build an index to construct a vector database.

[0091] In step S232, a graph model is constructed based on the three-dimensional data set, and a graph database is constructed based on the graph model.

[0092] Based on the knowledge entities, relationships, and attributes in the three-dimensional data set, construct a graph model of points, edges, and attributes.

[0093] The graph model is processed to construct a graph database.

[0094] According to the example implementation, the graph model is processed by ETL and then stored in the database to construct a graph database.

[0095] It should be noted that ETL refers to the three crucial core steps in data warehouse construction: Extract, Transform, and Load.

[0096] In step S233, a retrieval database is constructed based on the vector database and the graph database.

[0097] Vector databases and graph databases constitute the retrieval database.

[0098] This application constructs a vector database to achieve semantic-based retrieval using vector similarity search, and constructs a graph database to facilitate association analysis and path exploration using graph query language, thereby realizing multimodal queries.

[0099] According to some embodiments, refer to Figure 3 In step S2, based on the algorithm text description document of the algorithm to be processed, a large model for retrieval enhancement is generated to generate the first input data, and the first input data is input into the pre-constructed unified expression large model to obtain the target algorithm description data. This can be achieved through steps S310-S340.

[0100] In step S310, the algorithm text description document of the algorithm to be processed is preprocessed, and semantic segmentation is performed based on the preprocessing result. The preprocessing includes segmentation and / or information pre-tag.

[0101] Preprocessing the algorithm text description document (requirement document, interface document, source code, etc.) of the algorithm text description document includes document segmentation and / or pre-marking of key information to improve the quality of subsequent processing and provide a structured, context-rich input basis for subsequent semantic segmentation, thereby effectively avoiding various problems that may occur in semantic segmentation.

[0102] The key information requiring pre-labeling can be determined based on the actual situation, such as the algorithm name and core entities, inputs, outputs and parameters, core steps and pseudocode, performance metrics, etc. The labeling method can also be determined based on the actual situation, such as structured annotations, visual highlighting, metadata tags, etc.

[0103] Then, semantic segmentation is performed on the preprocessed results to improve the input quality of the retrieval enhancement generation model.

[0104] In step S320, based on the results of semantic segmentation, a search is performed using a large model generated by retrieval enhancement to obtain knowledge enhancement information.

[0105] Based on the large model of retrieval enhancement, knowledge fragments related to the results of semantic segmentation of retrieval are enhanced by RAG, and knowledge fragments in natural language form are output as knowledge enhancement information.

[0106] In step S330, prompt words are constructed based on knowledge enhancement information and algorithm text description document to obtain unified expression generation prompt words, and the first input data is generated based on the unified expression generation prompt words.

[0107] Based on knowledge-enhanced information, prompt words are constructed by combining the requirement description, algorithm description, reference knowledge, and generation requirements from the knowledge-enhanced information into large model prompt words, which serve as a unified expression for generating prompt words.

[0108] The unified expression is used to generate prompt words, which are then used as the first input data.

[0109] In step S340, the first input data is input into the unified expression model to obtain target algorithm description data that conforms to the unified algorithm description specification of the unified expression model.

[0110] Based on the unified expression big model, the input data (including the main description of the algorithm text description and the retrieved knowledge fragments) is used to output the target algorithm description data that conforms to the complete structured algorithm unified description specification (such as JSON) related to the unified expression big model.

[0111] In this embodiment, a unified expression generation process driven by a large model is used to transform unstructured text into structured and standardized descriptions. By combining natural language preprocessing, RAG-enhanced retrieval, and knowledge-enhanced prompt word construction, a large model is used to complete the structured output.

[0112] According to some embodiments, in step S2, based on the algorithm text description document of the algorithm to be processed, a first input data is generated based on the retrieval enhancement generation large model, and the first input data is input into the pre-constructed unified expression large model to obtain the target algorithm description data. Specifically, this can be achieved through step S350.

[0113] In step S350, the target algorithm description data is verified using preset verification rules.

[0114] Automated rule validation is performed using preset validation rules to ensure the completeness and correctness of the generated unified description specification.

[0115] According to the example implementation, the algorithm is uniformly described in JSON, and the automated rule verification is the verification that conforms to the JSONSchema description.

[0116] According to some embodiments, refer to Figure 4 In step S3, based on the target algorithm description data, a large model is generated based on retrieval enhancement to generate second input data, and the second input data is input into the pre-built interface mapping large model to obtain the target mapping rules. Specifically, this can be achieved through steps S410-S430.

[0117] In step S410, based on the target algorithm description data, a search is performed using a large model generated by retrieval enhancement to obtain relevant knowledge retrieval results.

[0118] Based on the interface information (including function name, parameter name, parameter type, return value type, function description, etc.) in the target algorithm description data, prompt words for retrieval and matching are constructed. Based on the retrieval enhancement generation model, RAG retrieval is performed to obtain multiple knowledge fragments most relevant to the semantics of the current interface, which are used as relevant knowledge retrieval results.

[0119] According to the example implementation, the relevant knowledge retrieval results include: target platform interface descriptions with similar functions, equivalent descriptions of target platform data types, examples of target platform calling methods, historical mapping rules, etc.

[0120] In step S420, based on the target platform requirement description, relevant knowledge retrieval results, and target algorithm description data, interface adaptation prompt words are generated, and second input data is generated based on the interface adaptation prompt words.

[0121] Based on the current interface features in the target algorithm description data, the target interface features in the target platform requirement description, constraint information, and relevant knowledge retrieval results, prompt words based on prompt engineering design are used as prompt words for interface adaptation generation. The interface mapping big model is required to comprehensively input information to clarify the functional correspondence mapping results and confidence levels between the current algorithm interface and the target platform interface.

[0122] Furthermore, according to the example implementation, the interface adaptation generation prompt words can also clarify the mapping rules for parameter types and quantities (which may require type conversion), handle naming differences or semantic nuances, and consider the target platform's calling conventions (such as parameter order, whether it is asynchronous, and error handling methods).

[0123] The target platform requirements description can be included in multi-source raw data, thus being directly extracted from the retrieval database, or it can be entered separately by the user.

[0124] The interface is adapted to generate prompt words, which are then used as the second input data.

[0125] In step S430, the second input data is input into the interface mapping large model to obtain the target mapping rule.

[0126] The second input data is fed into the interface mapping big model. Based on the interface mapping big model and the relevant knowledge fragments retrieved from the second input data, the algorithm can gain a deeper understanding of the current unified description specification, accurately understand the semantics and constraints of the target platform interface, and generate target mapping rules that meet the standardized mapping rules.

[0127] During the generation process, the interface mapping big model generates interface mapping rules based on semantic alignment, uses the big model parsing algorithm to describe the semantic relationship with the target platform interface, and combines historical mapping rules and type conversion knowledge to complete the generation process.

[0128] According to the example implementation, the target mapping rule is, for example, {original interface element → target platform interface element, mapping rule, transformation logic, confidence level}.

[0129] This application's embodiments are based on target algorithm description data that conforms to the unified algorithm description specification. By enhancing retrieval and large model generation capabilities through RAG knowledge, the original algorithm is accurately converted into target mapping rules that satisfy standardized mapping rules.

[0130] According to some embodiments, refer to Figure 5 In step S4, based on the target mapping rules and the original algorithm code in the algorithm text description document, a large model is generated based on retrieval enhancement, and third input data is generated. The third input data is then input into a pre-built adaptation program to generate a large model, thereby obtaining the target platform adaptation code. This can be achieved through steps S510-S540.

[0131] In step S510, query conditions are generated based on the target mapping rules and the original algorithm code in the algorithm text description document.

[0132] Based on the original algorithm code (or its representation) in the algorithm text description document and the target mapping rules generated in step S3, construct the query conditions.

[0133] In step S520, a large model is generated based on the enhanced retrieval, and enhanced retrieval is performed using the query conditions to obtain relevant code retrieval results.

[0134] Using query criteria, a large-scale model is generated based on search enhancement to retrieve relevant code-level knowledge fragments as relevant code retrieval results.

[0135] According to the example implementation, the relevant code retrieval results include best practice code snippets for similar functions on the target platform, example code for specific mapping rules (such as type conversion and error handling conversion), call examples of specific APIs on the target platform, and snippets of syntax specifications and language feature descriptions for the target platform.

[0136] In step S530, based on the relevant code retrieval results, target mapping rules and original algorithm code, code generation prompts are generated, and third input data is generated based on the code generation prompts.

[0137] The input for this step is the original algorithm code, the target mapping rules, and the retrieved relevant code search results. Through the prompting engineering, code-generated prompt words are designed.

[0138] Code generation prompts guide the adapter program to generate a large model that precisely replaces the original interface calls with the target platform's interface calls (using target mapping rules), generates necessary parameter conversion logic (using type conversion examples from relevant code search results), follows the target platform's coding style and conventions (using language specifications from relevant code search results), integrates the target platform's error handling mechanism (using error handling examples from relevant code search results), and applies best practices found (such as memory management and performance optimization techniques) to generate the adapter code.

[0139] The code generates prompts, which are then used as the third input data.

[0140] In step S540, the third input data is input into the adaptation program to generate a large model, thereby obtaining the target platform adaptation code.

[0141] The third input data is fed into the adapter program to generate a large model. Based on the large model generated by the adapter program, and following the guidance in the code generation prompts, the adapter code adapted to the target platform is generated and used as the target platform adapter code.

[0142] This application's embodiments, based on the target mapping rules and the original algorithm code in the algorithm text description document, enhance retrieval and large model generation capabilities through RAG knowledge, accurately converting the original algorithm code into adaptation code that is compatible with the target platform.

[0143] According to some embodiments, in step S4, based on the target mapping rules and the original algorithm code in the algorithm text description document, a large model is generated based on retrieval enhancement, third input data is generated, and the third input data is input into a pre-built adaptation program to generate a large model, thereby obtaining the target platform adaptation code. This can be specifically implemented through steps S550-S570.

[0144] In step S550, the target platform adaptation code is checked using preset inspection rules.

[0145] Static analysis checks are performed on the generated target platform adaptation code using preset check rules.

[0146] According to the example implementation, static analysis checks include syntax checks, preliminary type safety checks (using language rules), potential error pattern checks (such as null pointers and resource leaks), and basic compliance checks on API calls to the target platform (such as whether the number and type of parameters match the API signature knowledge base rules).

[0147] Furthermore, for critical or complex adaptations in the target platform adaptation code, manual code review can be introduced when necessary.

[0148] In step S560, the first feedback of the interface mapping large model and the adapter generating large model during the inference process, as well as the second feedback of the check, are collected.

[0149] The feedback collected during the interface mapping and adaptation code generation process in steps S3-S4 is used as the first feedback, and the feedback collected during the vehicle inspection process is used as the second feedback.

[0150] According to the example implementation, the first feedback includes problems existing in the reasoning process, and the second feedback includes mapping problems, defects in generated code, and opinions from manual reviewers.

[0151] In step S570, feedback problems are determined based on the first feedback and the second feedback, and corresponding adjustments are made based on the feedback problems. The feedback problems include at least one of the following: missing retrieval database, retrieval database error, large model deviation in interface mapping, and large model deviation in adapter program generation. The adjustments include at least one of the following: updating the retrieval database, fine-tuning the large model in interface mapping, fine-tuning the large model in adapter program generation, adjusting the prompt words generated by interface adapter generation, and adjusting the prompt words generated by code generation.

[0152] Analyze the first and second feedback responses to identify database gaps, errors, or model biases as feedback issues. Make corresponding adjustments based on the identified feedback issues.

[0153] The corresponding adjustments include periodically or trigger-based updates to the retrieval database, incorporating new documents and / or new APIs into the retrieval database, and using feedback to fine-tune the interface mapping between the large model and the adapter's hint strategy or the model itself.

[0154] The embodiments of this application improve the reliability of the generated code by static analysis and make adjustments to problematic parts.

[0155] According to some embodiments, refer to Figure 6 In step S5, based on the target algorithm description data and the target platform adaptation code, a large model is generated based on retrieval enhancement, a fourth input data is generated, and the fourth input data is input into the pre-built test configuration to generate a large model, thus obtaining a test configuration file. This can be achieved through steps S610-S630.

[0156] In step S610, based on the target algorithm description data, a search is performed using a large model generated by retrieval enhancement to obtain relevant configuration retrieval results.

[0157] Using target algorithm description data (such as dependency information, runtime environment, etc.) based on a unified algorithm description specification, and performing RAG retrieval based on a large model generated by retrieval enhancement, we search for knowledge fragments related to dependency information and runtime environment to obtain relevant configuration retrieval results.

[0158] In step S620, based on the relevant configuration retrieval results, target algorithm description data, and target platform adaptation code, algorithm test execution prompt words are generated, and fourth input data is generated based on the algorithm test execution prompt words.

[0159] Based on the target algorithm description data, the retrieved relevant configuration search results, and the target platform-adapted algorithm cluster (i.e., target platform-adapted code), appropriate prompt words are constructed as algorithm test execution prompt words to guide the test configuration generation model to generate the target platform container construction configuration based on the input algorithm dependency information.

[0160] The algorithm test execution prompt word is used as the fourth input data.

[0161] In step S630, the fourth input data is input into the test configuration to generate a large model, thus obtaining the test configuration file.

[0162] The second input data is fed into the test configuration to generate a large model. Based on the large model generated by the test configuration, test configuration files for the target platform are generated for the target platform adaptation code.

[0163] According to the example embodiment, the test configuration file includes container build configuration and container orchestration configuration documents.

[0164] This application embodiment is based on target algorithm description data and target platform adaptation code. It enhances retrieval and large model generation capabilities through RAG knowledge, generates test configuration files for the target platform adaptation code, and performs subsequent test runs to verify the functional integrity and performance of the generated target platform adaptation code.

[0165] According to some embodiments, refer to Figure 7 In step S6, the target platform adaptation code is run and tested based on the test configuration file to obtain test logs, which can be achieved through steps S710-S720.

[0166] In step S710, a standard container image is obtained by using the container build file of the target platform in the test configuration file, based on the target platform adaptation code.

[0167] Run the test configuration file. The target platform container build file in the test configuration file will build the target platform adaptation code into a standard container image, realizing the standard containerized encapsulation of the algorithm to support the deployment requirements of the container orchestration platform.

[0168] Containerization can be packaged to generate various formats, such as standard Docker images, lightweight images like distroless, or function packages for serverless deployment, and the deployment platform can support Kubernetes, etc. This application does not impose any restrictions on these.

[0169] You can choose according to the actual situation to adapt to different target deployment environments.

[0170] In step S720, the standard container image is run and tested using the deployment orchestration configuration file in the test configuration file, and test logs are obtained.

[0171] After obtaining the standard container image, deploy the standard container image on the cloud platform based on the deployment orchestration configuration document in the test configuration file to conduct preliminary operation tests, collect operation logs, performance indicators and error information as test logs to verify the correctness and functional integrity of the algorithm interface.

[0172] This application utilizes the generated test configuration file to containerize and run the target platform adaptation code, verifying functional integrity and performance.

[0173] According to some embodiments, refer to Figure 8 In step S7, key information is extracted from the test log. If the key information includes error information and / or exception information, the key information and test log are input into the pre-built correction model to obtain a correction scheme. The correction scheme is then fed back to the corresponding large model in the retrieval enhancement generation model, unified expression model, interface mapping model, adapter program generation model, and test configuration generation model for correction. The number of corrections is recorded. This can be implemented through steps S810-S840.

[0174] In step S810, key information is extracted from the test log.

[0175] Based on the log information generated during the test run, identify runtime errors, performance bottlenecks, and interface mismatch errors, and extract key information that can identify the above problems.

[0176] In step S820, if the key information includes error information and / or abnormal information, the key information and test logs are input into the correction model to obtain the correction scheme.

[0177] To address issues exposed during the testing phase, an intelligent correction loop is established. When critical information includes error messages and / or anomaly information, test logs and / or error messages are input into a large-scale code correction model. This model's understanding capabilities are then used to analyze the root causes of errors and generate targeted correction paths and solutions as the corrective measures.

[0178] In step S830, if the correction scheme includes a code correction scheme, the code correction scheme is fed back to the adapter program to generate a large model, and the process jumps to step S4 to make corrections and records the number of corrections.

[0179] The corrected path is fed back to the large model of the corresponding step. If it is a code problem, the correction plan includes a code correction plan. The code correction plan is then fed back to the adapter program to generate the large model, and the process jumps to step S4 to automatically modify the algorithm adapter program and handle problems such as interface mismatch and data type conversion errors. The algorithm is modified to generate a new version of the adapter program, and the subsequent steps continue. For each correction, the correction count is incremented by one.

[0180] Furthermore, the code correction plan can also be fed back to the interface mapping big model and the adapter program to generate the big model at the same time, and then jump to step S3.

[0181] In step S840, if the correction scheme includes a test correction scheme, the test correction scheme is fed back to the test configuration to generate a large model, and the process jumps to step S5 to make corrections and records the number of corrections.

[0182] The corrected path is fed back to the large model of the corresponding step. If it is a test run issue, the correction plan includes a test correction plan. The test correction plan is then fed back to the test configuration to generate the large model, and the process jumps to step S5. The image build and deployment orchestration files are automatically modified to handle issues such as dependencies, environment operation, and missing dependencies: The container build and deployment orchestration configuration files are modified to generate a new version of the configuration files; the version-keeping or corrected algorithm adaptation program is repackaged into a container image, the container configuration and dependencies are updated, and a new version of the image tag is generated; the corrected container image is deployed to the cloud platform, and complete functional and performance tests are performed to verify the correction effect and system stability. Subsequent steps are then continued, with the correction count incremented by one for each correction.

[0183] For each corrected step, the process will run back to step S7 for anomaly detection. If the critical information includes error and / or anomaly information, the anomaly detection fails, a corresponding correction plan is generated, feedback is given to the corresponding model, and the process jumps to the corresponding step. If the critical information does not include error or anomaly information, the anomaly detection passes, and step S8 is executed.

[0184] According to some embodiments, in step S7, key information is extracted from the test log. If the key information includes error information and / or abnormal information, the key information and test log are input into the pre-built correction model to obtain a correction scheme. The correction scheme is then fed back to the corresponding large model in the retrieval enhancement generation model, unified expression model, interface mapping model, adapter program generation model, and test configuration generation model for correction. The number of corrections is recorded. This can also be implemented through step S850.

[0185] In step S850, if the number of corrections exceeds a preset correction threshold, the target platform adaptation code and / or test configuration file are rolled back to the previous available version, and an alarm notification is generated.

[0186] Specifically, if the number of corrections exceeds the preset correction threshold, meaning that the verification still fails after correcting the correction threshold times consecutively, the system will automatically revert to the previous available version and generate an alarm notification.

[0187] According to the example implementation, the number of fixes for code issues and test execution issues can be recorded separately. If the number of fixes for code issues exceeds a preset fix threshold, the code files for the target platform adaptation code will be rolled back to the previous available version. If the number of fixes for test execution issues exceeds a preset fix threshold, the test configuration file will be rolled back to the previous available version.

[0188] Furthermore, in some embodiments, constructing a large model agent based on the various large models in steps S1-S8 specifically includes:

[0189] The knowledge base management agent includes a large model for retrieval enhancement generation, used to execute step S1. Running on a server or cloud with storage capabilities, it manages the retrieval database based on RAG (Retrieval Enhancement Generation), responsible for building, storing, indexing, and updating the multi-source retrieval database. It utilizes vector or graph databases within the retrieval database to store knowledge derived from various document fragments (e.g., API documentation, historical mapping cases, SDKs, best practices, etc.) or metadata, and possesses management and automatic update mechanisms.

[0190] Unified Description Generation Agent: Used to generate a unified description specification for the algorithm to be processed, i.e., executing step S2, including a unified expression large model. It runs on computing nodes with AI inference capabilities. It receives algorithm text description documents (e.g., requirement documents, interface documents, source code, etc.) uploaded by users, performs RAG retrieval in conjunction with the knowledge base management agent, constructs prompt words, and guides the large language model to extract key information from the source materials of the algorithm text description documents, ultimately generating target algorithm description data that conforms to the structured unified algorithm description specification.

[0191] The interface adaptation and code generation agent is used to generate standardized mapping rules between the interface of the algorithm to be processed and the interface of the target platform, as well as to generate the adaptation program from the algorithm to the target platform, i.e., to execute steps S3-S4, including the interface mapping large model and the adaptation program generation large model. It runs on computing nodes with AI inference capabilities. The input is target algorithm description data conforming to the structured algorithm unified description specification. First, it performs RAG retrieval in conjunction with the knowledge base management agent. Based on the retrieved knowledge information, it uses the interface mapping large model to generate target mapping rules that conform to standardized interface mapping (e.g., semantic matching and rule generation). Then, it performs knowledge base retrieval in conjunction with the knowledge base management agent, uses the adaptation program generation large model, modifies the original algorithm source code or generates new adaptation layer code according to the target mapping rules, and outputs the adapted executable code for the target platform as the target platform adaptation code. The interface adaptation and code generation agent can also perform static code verification.

[0192] The test execution agent is used to generate test configuration files for the target platform using the target platform-adapted code and a large model generated from the test configuration, and then executes steps S5-S6. This includes generating the large model from the test configuration. It runs on nodes with AI inference and container building capabilities. Based on the dependency and runtime environment information in the target platform-adapted code, it performs RAG retrieval in conjunction with the knowledge base management agent, and uses the large model generated from the test configuration to generate the correct test configuration file, including container build files and deployment orchestration configurations. It executes container build commands to package the adapted algorithm code and its runtime environment into a standard container image. It supports generating multiple packaging formats (e.g., standard images, lightweight images, function packages). It is responsible for deploying the container image to the cloud platform's runtime test environment, hosting the deployed algorithm containers, and executing actual test execution tasks. It automatically collects runtime logs, performance metrics, error messages, and other data generated during algorithm runtime testing as test logs and provides a query interface.

[0193] The correction feedback agent is used to generate and resolve correction paths and solutions for problems encountered during the adaptation program's test execution, i.e., executing steps S7-S8. This includes correcting the large model. It runs on computing nodes with AI inference capabilities. The core function is to analyze and collect test logs and error information based on the correction model, diagnose root causes (e.g., runtime errors, performance bottlenecks, interface mismatches), and generate specific correction solutions (e.g., code correction instructions, dependency updates, container configuration modifications). Based on the correction solutions, it guides relevant agents (especially code generation agents and encapsulation orchestration configuration generation agents) to perform automatic corrections (e.g., modifying code, updating container builds or orchestration configurations) or execute rollback operations. It controls the iteration process (e.g., generating the adaptation program, generating encapsulation orchestration configuration files, test execution, correction feedback), and determines whether the test results have converged (i.e., the test results meet the expected requirements, and key information does not include error or exception information).

[0194] Understandably, large model agents enable the extraction of standardized descriptions of algorithms from natural language algorithm descriptions, algorithm documentation, algorithm comments, and even the algorithm code itself. The algorithm's input / output interfaces and the service interfaces it depends on can be converted into the expected platform-specific interface format through the large model agent's recognition, understanding, and code generation capabilities, thus solving the algorithm's interface adaptation problem. Containerization provides algorithms with an isolated, portable, and scalable runtime environment. Through the large model agent's generation capabilities, image build files and deployment configuration files are automatically generated. Using containerization technology, container images of algorithms are automatically generated, and services are orchestrated and deployed in a unified manner.

[0195] The core advantage of this application's embodiments lies in its innovative integration of large language models and / or intelligent agents, semantic understanding, and interface adaptation technologies. This systematically addresses three major pain points in the industrialization of algorithms: inconsistent description standards, low efficiency of manual adaptation, and fragmented deployment processes. Leveraging the powerful understanding and generation capabilities of large language models and / or intelligent agents, it achieves, for the first time, the automated extraction and standardized conversion of unstructured algorithm descriptions, fundamentally eliminating subjective errors and formatting issues inherent in manual interpretation, laying a unified foundation for subsequent processing. Furthermore, based on standardized descriptions, it intelligently parses algorithm functional requirements using semantic analysis technology, driving the interface adaptation model to automatically generate matching solutions for target platforms, significantly reducing the complexity and time-consuming nature of traditional manual interface configuration. Simultaneously, it innovatively designs containerized encapsulation and automated cloud deployment processes. By packaging the algorithm and its runtime environment into standard containers, it achieves seamless integration across the entire "description, adaptation, and deployment" chain, overcoming the shortcomings of traditional multi-stage fragmentation that leads to high maintenance costs and poor portability. This fundamentally improves the efficiency of algorithm transformation from R&D to service, provides research institutions with a rapid industrialization channel, helps enterprises achieve standardized delivery of algorithm services, supports cloud service providers in building agile algorithm-as-a-service platforms, and empowers system integrators to uniformly integrate and manage heterogeneous algorithm resources. The intelligent agent workflow design of the entire solution ensures its high adaptability to diverse algorithm types and deployment environments, as well as its technical scalability for future expansion to new protocols and platforms.

[0196] Furthermore, in some embodiments, the aforementioned intelligent agents can also be degenerated to a certain extent into equivalent software modules. Each module implements the same logic and large model application, completes the corresponding steps, and achieves the final goal, namely, the adaptation of the current platform algorithm to the target platform.

[0197] Furthermore, in some embodiments, the retrieval enhancement generation large model, the unified expression large model, the interface mapping large model, the adapter program generation large model, the test configuration generation large model, and the correction large model can be multiple independent large models with different functions, or they can be a large model with a collection of multiple functions. This application does not limit this.

[0198] The following describes an apparatus embodiment of this application, which can be used to perform the method embodiment of this application. For details not disclosed in the apparatus embodiment of this application, please refer to the method embodiment of this application.

[0199] Figure 9 A block diagram of a processing apparatus for a computer algorithm according to an exemplary embodiment is shown.

[0200] Figure 9 The apparatus shown can execute the processing method of the computer algorithm according to the embodiments of this application.

[0201] like Figure 9As shown, the processing device for a computer algorithm may include:

[0202] See Figure 9 Referring to the preceding description, the retrieval enhancement unit 910 is used to construct a retrieval database based on the multi-source raw data of the algorithm to be processed, and to construct a large retrieval enhancement generation model based on the retrieval database.

[0203] The unified expression unit 920 is used to generate first input data based on the algorithm text description document of the algorithm to be processed, and to generate a large model based on retrieval enhancement. The first input data is then input into the pre-constructed unified expression large model to obtain the target algorithm description data.

[0204] The interface mapping unit 930 is used to generate a second input data based on the target algorithm description data, the large model generated by retrieval enhancement, and input the second input data into the pre-built interface mapping large model to obtain the target mapping rules.

[0205] The adapter unit 940 is used to generate a large model based on retrieval enhancement according to the target mapping rules and the original algorithm code in the algorithm text description document, generate third input data, and input the third input data into the pre-built adapter to generate a large model, thereby obtaining the target platform adaptation code.

[0206] The test configuration unit 950 is used to generate a large model based on retrieval enhancement according to the target algorithm description data and the target platform adaptation code, generate a fourth input data, and input the fourth input data into the pre-built test configuration to generate a large model, thus obtaining the test configuration file.

[0207] Test unit 960 is used to run tests on the target platform adaptation code based on the test configuration file and obtain test logs.

[0208] The correction feedback unit 970 is used to extract key information from the test log. When the key information includes error information and / or exception information, the key information and test log are input into the pre-built correction model to obtain a correction solution. The correction solution is then fed back to the corresponding large model in the retrieval enhancement generation model, unified expression model, interface mapping model, adapter program generation model, and test configuration generation model for correction, and the number of corrections is recorded.

[0209] The deployment and execution unit 980 is used to deploy and run target platform adaptation code when critical information does not include error or exception information.

[0210] The device performs functions similar to those described above; other functions are described in the preceding descriptions and will not be repeated here.

[0211] This application discloses an electronic device, including: a processor; and a memory storing a computer program, which, when executed by the processor, causes the processor to execute the above-described instruction generation method.

[0212] For example, refer to Figure 10 , Figure 10 The illustrated electronic device 1000 includes a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, for example, via a bus 1002. Optionally, the electronic device 1000 may further include a transceiver 1004. It should be noted that in practical applications, the transceiver 1004 is not limited to one type, and the structure of this electronic device 1000 does not constitute a limitation on the embodiments of the present invention.

[0213] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in this disclosure. Processor 1001 may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0214] Bus 1002 may include a pathway for transmitting information between the aforementioned components. Bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0215] The memory 1003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other storage medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0216] The memory 1003 is used to store application code that executes the present invention, and its execution is controlled by the processor 1001. The processor 1001 is used to execute the application code stored in the memory 1003 to implement the content shown in the foregoing method embodiments.

[0217] Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0218] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, causes the processor to execute an instruction generation method.

[0219] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0220] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for processing computer algorithms, characterized in that, include: S1: Based on the multi-source raw data of the algorithm to be processed, construct a retrieval database, and construct a large retrieval enhancement generation model based on the retrieval database; S2: Based on the algorithm text description document of the algorithm to be processed, generate the first input data based on the retrieval enhancement generation model, and input the first input data into the pre-constructed unified expression model to obtain the target algorithm description data; S3: Based on the target algorithm description data, generate a large model based on the retrieval enhancement, generate second input data, and input the second input data into the pre-built interface mapping large model to obtain the target mapping rules; S4: Based on the target mapping rules and the original algorithm code in the algorithm text description document, generate a large model based on the retrieval enhancement, generate third input data, and input the third input data into the pre-built adaptation program to generate a large model, thereby obtaining the target platform adaptation code; S5: Based on the target algorithm description data and the target platform adaptation code, generate a large model based on the retrieval enhancement, generate the fourth input data, and input the fourth input data into the pre-built test configuration to generate the large model, thereby obtaining the test configuration file; S6: Based on the test configuration file, run the target platform adaptation code for testing and obtain test logs; S7: Extract key information from the test log. If the key information includes error information and / or abnormal information, input the key information and the test log into the pre-built correction model to obtain a correction scheme. Feed back the correction scheme to the corresponding large models in the retrieval enhancement generation model, the unified expression model, the interface mapping model, the adapter program generation model, and the test configuration generation model for correction, and record the number of corrections. S8: If the critical information does not include error information and exception information, deploy the target platform adaptation code and run it.

2. The method according to claim 1, characterized in that, Step S1 includes: The multi-source raw data is divided into blocks, and the result of the block division is converted into an embedding vector. Define the knowledge entities, relationships, and attributes of the multi-source raw data to obtain the three-dimensional data set; The retrieval database is constructed based on the embedding vector and the three-data set; A large-scale model for enhanced retrieval is constructed based on the aforementioned retrieval database.

3. The method according to claim 2, characterized in that, The retrieval database is constructed based on the embedding vector and the three-data set, including: An index is constructed for the embedded vectors, and a vector database is constructed based on the embedded vectors and their indexes; A graph model is constructed based on the three data sets, and a graph database is constructed based on the graph model. The retrieval database is constructed based on the vector database and the graph database.

4. The method according to claim 1, characterized in that, Step S2 includes: The algorithm text description document of the algorithm to be processed is preprocessed, and semantic segmentation is performed based on the preprocessing result, wherein the preprocessing includes segmentation and / or information pre-tag; Based on the semantic segmentation results, a search is performed using the aforementioned enhanced retrieval model to obtain knowledge-enhanced information. Based on the knowledge enhancement information and the algorithm text description document, prompt words are constructed to obtain a unified expression to generate prompt words, and the first input data is generated based on the unified expression to generate prompt words; The first input data is input into the unified expression model to obtain target algorithm description data that conforms to the unified algorithm description specification of the unified expression model.

5. The method according to claim 1 or 4, characterized in that, Step S2 includes: The target algorithm description data is verified using preset verification rules.

6. The method according to claim 1, characterized in that, Step S3 includes: Based on the target algorithm description data, a search is performed using the retrieval enhancement generation model to obtain relevant knowledge retrieval results; Based on the target platform requirements description, the relevant knowledge retrieval results, and the target algorithm description data, generate interface adaptation prompt words, and generate the second input data based on the interface adaptation prompt words; The second input data is input into the interface mapping model to obtain the target mapping rule.

7. The method according to claim 6, characterized in that, Step S4 includes: Based on the target mapping rules and the original algorithm code in the algorithm text description document, generate query conditions; Based on the aforementioned retrieval enhancement model, enhanced retrieval is performed using the aforementioned query conditions to obtain relevant code retrieval results; Based on the relevant code retrieval results, the target mapping rules, and the original algorithm code, code generation prompts are generated, and based on the code generation prompts, the third input data is generated; The third input data is input into the adaptation program to generate a large model, thereby obtaining the target platform adaptation code.

8. The method according to claim 7, characterized in that, Step S4 also includes: The target platform adaptation code is checked using preset inspection rules; Collect the first feedback of the interface mapping large model and the adapter program generating large model during the inference process, as well as the second feedback of the inspection; The feedback problem is determined based on the first feedback and the second feedback, and corresponding adjustments are made based on the feedback problem. The feedback problem includes at least one of the following: missing retrieval database, retrieval database error, large deviation of interface mapping model, and large deviation of adapter program generated model. The adjustment includes at least one of the following: updating the retrieval database, fine-tuning the interface mapping model, fine-tuning the adapter program generated model, adjusting the interface adapter generated prompt words, and adjusting the code generated prompt words.

9. The method according to claim 1, characterized in that, Step S5 includes: Based on the target algorithm description data, a search is performed using the retrieval enhancement generation model to obtain relevant configuration retrieval results; Based on the relevant configuration retrieval results, the target algorithm description data, and the target platform adaptation code, an algorithm test execution prompt word is generated, and based on the algorithm test execution prompt word, the fourth input data is generated; The fourth input data is input into the test configuration to generate a large model, thus obtaining the test configuration file.

10. The method according to claim 1, characterized in that, Step S6 includes: Based on the target platform adaptation code, a standard container image is obtained using the container build file of the target platform in the test configuration file; The standard container image is run and tested using the deployment orchestration configuration file in the test configuration file, and the test logs are obtained.

11. The method according to claim 1, characterized in that, Step S7 includes: Extract key information from the test logs; If the key information includes error information and / or abnormal information, the key information and the test log are input into the correction model to obtain the correction scheme; If the correction scheme includes a code correction scheme, then the code correction scheme is fed back to the adapter program to generate a large model, and the process jumps to step S4 to perform the correction, and the number of corrections is recorded. If the correction scheme includes a test correction scheme, then the test correction scheme is fed back to the test configuration to generate a large model, and the process jumps to step S5 to perform the correction, and the number of corrections is recorded.

12. The method according to claim 1 or 11, characterized in that, Step S7 includes: If the number of corrections exceeds a preset correction threshold, the target platform adaptation code and / or the test configuration file will be rolled back to the previous available version, and an alarm notification will be generated.

13. A computer algorithm processing device, characterized in that, include: The retrieval enhancement unit is used to construct a retrieval database based on the multi-source raw data of the algorithm to be processed, and to construct a large retrieval enhancement generation model based on the retrieval database. A unified expression unit is used to generate first input data based on the algorithm text description document of the algorithm to be processed, and on the retrieval enhancement generation large model, and input the first input data into the pre-constructed unified expression large model to obtain target algorithm description data; The interface mapping unit is used to generate second input data based on the target algorithm description data and the retrieval enhancement generation large model, and input the second input data into the pre-built interface mapping large model to obtain the target mapping rules; The adaptation program unit is used to generate a third input data based on the target mapping rules and the original algorithm code in the algorithm text description document, and input the third input data into the pre-built adaptation program to generate the large model, thereby obtaining the target platform adaptation code; The test configuration unit is used to generate a fourth input data based on the target algorithm description data and the target platform adaptation code, based on the retrieval enhancement generation large model, and input the fourth input data into the pre-built test configuration generation large model to obtain the test configuration file; The test unit is used to run tests on the target platform adaptation code based on the test configuration file and obtain test logs. The correction feedback unit is used to extract key information from the test log. If the key information includes error information and / or abnormal information, the key information and the test log are input into the pre-built correction model to obtain a correction scheme. The correction scheme is then fed back to the corresponding large model in the retrieval enhancement generation model, the unified expression model, the interface mapping model, the adapter program generation model, and the test configuration generation model for correction, and the number of corrections is recorded. The deployment and execution unit is used to deploy and run the target platform adaptation code when the critical information does not include error information and exception information.

14. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-12.

15. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the method as described in any one of claims 1-12.

Citation Information

Patent Citations

  • Large language model dynamic adaptation method and system based on Java

    CN121012756A

  • Full-process automatic unit testing method and device for AI chip operator and medium

    CN121166548A