Multi-modal context-aware intelligent code completion system

By using a multimodal context-aware intelligent code completion system, multi-dimensional information is collected and comprehensively evaluated in real time, solving the problem of the disconnect between completion results and development scenarios in existing technologies. This enables efficient personalized code completion, improving completion quality and user experience.

CN121050697APending Publication Date: 2025-12-02XINJIANG BEICHEN DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511296006.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Existing code completion technologies rely on a single text modality and cannot integrate multi-dimensional contextual data, resulting in completion results that are out of touch with actual development scenarios. Furthermore, they lack dynamic adaptive capabilities and personalized feedback mechanisms, which affect completion quality and user adaptability.

Method used

A multimodal context-aware intelligent code completion system is adopted, which collects text, syntax, visual and environmental information in real time, generates completion suggestions through a multimodal encoder, and optimizes the weights through dynamic weighted sorting and adaptive feedback learning modules to build a comprehensive evaluation system and achieve personalized adaptation.

Benefits of technology

It significantly improves the accuracy and scenario adaptability of code completion suggestions, reduces the cost of subsequent iterations and team collaboration, and improves the efficiency and user adaptability of code completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121050697A_ABST
    Figure CN121050697A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-modal context-aware intelligent code completion system, which particularly relates to the technical field of code generation, and comprises three modules: a context analysis module acquires text, grammar, vision and environment multi-modal information in real time, fuses features through a multi-modal encoder, generates completion suggestions through a code generation model, and sends the completion suggestions to the context analysis module; calculating grammar correctness, context matching degree and code complexity; the dynamic weighted sorting module calculates scores in combination with dynamically adjusted weights, and sorts the suggestions in a descending order; the self-adaptive feedback learning module records user behaviors, and a user exclusive weight is generated through a Q-learning optimization weight strategy. According to the method, the complementation accuracy, the suggestion quality and the user suitability are improved, and the complex development requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of code generation technology, and more specifically, to a multimodal context-aware intelligent code completion system. Background Technology

[0002] Current code completion technologies mostly rely on a single text modality, capturing only text information such as code snippets before the cursor. They cannot integrate multi-dimensional contextual data such as syntax, visual information (such as design diagrams), and environmental information (such as runtime logs), resulting in completion results that are out of touch with the actual development scenario requirements and making it difficult to meet the accurate completion needs of complex tasks.

[0003] Existing systems have a one-sided approach to evaluating the quality of completion suggestions. Most systems only use syntactic correctness and context matching as core indicators, while neglecting code readability, maintainability, and reliability. Although some systems have introduced code complexity evaluation, they are limited to superficial dimensions such as code length and have not built a multi-dimensional comprehensive evaluation system. This often results in the problem of "syntactically correct but difficult to maintain," which increases the cost of subsequent iterations.

[0004] In addition, the existing system lacks dynamic adaptive capabilities and personalized feedback mechanisms: the weight parameters are mostly statically preset, and the evaluation priority cannot be adjusted according to scenarios such as debugging and performance optimization; it is also difficult to learn user development habits and cannot optimize and complete strategies based on historical behavior, which reduces the efficiency and user adaptability. Summary of the Invention

[0005] To overcome the above-mentioned deficiencies of the prior art, embodiments of the present invention provide a multimodal context-aware intelligent code completion system.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A multimodal context-aware intelligent code completion system includes the following modules: The context analysis module is used to collect multimodal context information of text, syntax, vision, and environment from the code editor in real time. It extracts text, vision, and environment features through a multimodal encoder, generates a set of completion suggestions by the code generation model, and finally calculates the grammatical correctness, context matching degree, and code complexity feature parameters for each suggestion. The dynamic weighted sorting module is used to define a sorting score function that combines syntax correctness, context matching degree, code complexity and corresponding weights. Then, it dynamically adjusts the weights according to the debugging and performance optimization status. Finally, it sorts the completion suggestion set in descending order based on the comprehensive score and outputs the sorting result. The adaptive feedback learning module records the user's behavior and feature parameters when selecting completion suggestions. It adjusts the weights based on the difference between the expected ranking and the actual ranking of the suggestions, optimizes the weight adjustment strategy through Q-learning, and generates exclusive weights for syntax correctness, context matching, and code complexity based on the user's historical behavior data.

[0007] Specifically, the execution process of the context analysis module is as follows: Real-time acquisition of multimodal context information from the code editor, including: Text context: Code snippet before the cursor ; Syntactic context: Abstract Syntax Tree (AST); Visual context: The documents or design drafts that the developer is interested in. ; Environment context: runtime log Output ; Process the input using a multimodal fusion model: ; MME stands for Multimodal Encoder, which outputs text features. Visual features and environmental characteristics ; Generate a set of completion suggestions: ; in: To complete the suggestion set; This is the i-th completion suggestion, where i is the suggestion number; G stands for code generation model; N represents the number of completion suggestions; Calculate feature parameters for each suggestion: Grammatical correctness: ; in for The probability of grammatical correctness. For normalization function, A multilayer perceptron for grammar judgment; Context matching degree:

[0008] for The probability of matching with the text context. The sigmoid activation function is used, and Embed (・) is the vector embedding function. Code complexity: ; in for The complexity score is given by len (・), which is a function to count the code length. This is a function for calculating the loop complexity. , , For preset weighting coefficients, It is a multi-dimensional indicator.

[0009] Specifically, the aforementioned The analysis process for multiple indicators is as follows: The multivariate index calculates base scores across three dimensions, including: Readability score: Based on code surface feature analysis, the formula is as follows:

[0010] in: Score for naming consistency; Score the annotation density; Score for style consistency; , , Weights for the readability sub-dimension; Maintainability score: Evaluated based on code structure characteristics, using the following formula:

[0011] in: Scoring for high coupling degree; Modular scoring; Scoring for deeply nested structures; , , Weights for maintainable sub-dimensions; Reliability scoring: This assesses the risk of a code snippet introducing defects based on historical or pattern data, using the following formula:

[0012] in: Error pattern matching degree; For test coverage estimation; , Weights for the reliability sub-dimension; The scores from the three dimensions are combined into a multivariate index, as shown in the following formula:

[0013] in , and These are global weights for readability, maintainability, and reliability, respectively. This is the Sigmoid function, used to compress the sum of scores to the range of 0-1.

[0014] Specifically, the execution process of the dynamic weighted sorting module is as follows: Define a ranking score function that combines syntactic correctness, context matching, code complexity, and corresponding weights to calculate the ranking score for each completion suggestion, as shown in the following formula:

[0015] in: for The overall ranking score; Weights for grammatical correctness; Weights for context matching degree; As a weight for code complexity; Real-time weight adjustment algorithm:

[0016] ; ; in: , , These are the initial weights; This is a function to indicate the debugging status. This is a performance optimization status indicator function; , and Weighting adjustment coefficient; Calculate the final ranking: Sort the completion suggestion set S in descending order based on the comprehensive score, and output the ranking result, as shown in the following formula:

[0017] in: To complete the final sorting result of the suggestion set S; This is a descending sorting function.

[0018] Specifically, the execution process of the adaptive feedback learning module is as follows: Record user selection behavior: ,in: Here are user behavior data samples at time t; Provide the completion suggestions based on the user's actual selection; for The actual ranking in this sorting; for The set of feature parameters; Weight Update: Based on the difference between the user's suggested expected ranking and the actual ranking, the weight parameters are adjusted using the following formula:

[0019] in: This refers to the weight update amount; η is the learning rate; Expected ranking; This is the actual ranking; for The gradient with respect to the weight vector, The gradient symbol is denoted by w, which indicates the derivative with respect to w. Using Q-learning to update the strategy: This involves optimizing the weight adjustment strategy through reinforcement learning (Q-learning) to improve long-term fitness, as shown in the following formula:

[0020] in: Let w be the state-action value function; w is the current weight state, and a is the weight adjustment action. The learning rate for Q-learning; Rewards for user satisfaction; Discount factor; For the next state All adjustment actions The maximum Q value; A unique weight is generated based on the user's historical behavior data, using the following formula:

[0021] in: A personalized weight set for users; These are user-specific weights for syntax correctness, context matching, and code complexity. f(・) is the historical data learning function; This is a dataset of users' historical behavior.

[0022] Specifically, the user satisfaction reward The analysis process is as follows: The calculation logic is as follows:

[0023] in, For users' subsequent actions after accepting completion suggestions; The determination process for the composite reward function is as follows: Receive rewards instantly If the suggestion to complete the task is selected by the user, the basic positive reward will be increased by 1. Delayed continuous rewards Set a 5-minute delay observation window. If the user does not edit / delete the completed code segment during the observation period, an additional reward of 0.5 will be given. Negative correction reward If the user deletes the completed code within 30 seconds, a negative reward of -1 is applied. Finally, calculate the household satisfaction reward. .

[0024] The technical effects and advantages of this invention are as follows: This invention utilizes multimodal context awareness capabilities to collect multi-dimensional contextual information from text, syntax, vision, and environment in real time. After fusion processing by a multimodal encoder, it generates completion suggestions, solving the problem that existing technologies rely solely on a single text modality, leading to a disconnect between completion results and actual development scenarios. This significantly improves the accuracy and scenario adaptability of completion suggestions, meeting the needs of complex development tasks. A comprehensive evaluation system covering syntactic correctness, context matching degree, and code complexity has been built. It can dynamically adjust the weight priority according to debugging, performance optimization and other scenarios, effectively avoiding the problem of syntactic correctness but difficult maintenance, reducing the cost of subsequent code iteration and team collaboration, and improving the overall quality of completion suggestions. With the help of the adaptive feedback learning module, user selection behavior can be recorded and weight strategy can be optimized through Q-learning. It can also generate user-specific weights based on historical data, so as to achieve long-term adaptation to personalized development habits, reduce the operation of users manually adjusting the completion results, and greatly improve the efficiency and user adaptability of the code completion function. Attached Figure Description

[0025] Figure 1 This is a system module diagram of the present invention. Detailed Implementation

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

[0027] like Figure 1 As shown, a multimodal context-aware intelligent code completion system module is as follows: The context analysis module collects multimodal context information of text, syntax, vision, and environment from the code editor in real time. It extracts text, vision, and environment features through a multimodal encoder (MME), and then generates a set of completion suggestions by the code generation model (G). Finally, it calculates feature parameters such as syntax correctness, context matching degree, and code complexity for each suggestion. Real-time acquisition of multimodal context information from the code editor, including: Text context: Code snippet before the cursor Syntactic context: Abstract Syntax Tree (AST); Visual context: Documents or design diagrams that developers are interested in. Environment context: runtime log Output ; Process the input using a multimodal fusion model: MME stands for Multimodal Encoder, which outputs text features. Visual features and environmental characteristics ; Generate a set of completion suggestions: ;in: To complete the suggestion set; Let i be the i-th completion suggestion, where i is the suggestion number; G is the code generation model; and N is the number of completion suggestions. Calculate feature parameters for each suggestion: Grammatical correctness: ;in for The probability of grammatical correctness, with a value ranging from 0 to 1. For normalization function, A multilayer perceptron for grammar judgment; Context matching degree: , for The probability of matching with the text context (value range [0,1]). The sigmoid activation function is used, and Embed (・) is the vector embedding function. Code complexity: ,in for The complexity score is given by len (・), which is a function to count the code length. This is a function for calculating the loop complexity. , , For preset weighting coefficients, As a multi-dimensional indicator, the specific analysis process is as follows: The multivariate index calculates base scores across three dimensions, including: Readability score: Based on the surface features of the code, it assesses whether it is easy for humans to read and understand, using the following formula:

[0028] in: A naming consistency score is assigned (value range 0-1). This checks whether variable and function names conform to standard naming conventions (such as camelCase), which can be achieved through a predefined rule set or a lightweight syntax parser. Annotation density is scored (value range 0-1). The ratio of annotation lines to total lines is calculated and standardized using a sigmoid function (such as Sigmoid) to avoid obtaining unreasonable scores from extreme annotation ratios. Score the style consistency (value range 0-1). Check if indentation, spaces, parenthesis positions, etc., are consistent with project guidelines (such as Python's PEP 8); , , For the readability sub-dimension weights, satisfying + =1; Maintainability score: Based on code structure characteristics, assesses whether it is easy to modify and extend, using the following formula: ; in: A score is given for high coupling (value range [0,1]). This assesses the degree to which a code snippet depends on external modules or internal class details; the fewer the dependencies and the more abstract the code, the lower the score. Modularity scoring (value range [0,1]). This assesses whether the code is reasonably broken down into functions / methods (e.g., excessively long code blocks receive lower scores). Scoring is applied to deep nesting (value range [0,1]). The depth of nested conditional statements and loops is detected; the deeper the nesting, the higher the score (but the more difficult it is to maintain). , , Weights for maintainable sub-dimensions; Reliability scoring: Based on historical or pattern data, assesses the risk of a code snippet introducing defects, using the following formula: ; in: Error pattern matching score (value range [0,1]). The code snippet is matched against a library of known error-prone patterns (such as null pointer exceptions, unreleased resources, concurrency issues, etc.). A higher matching score results in a lower reliability score. For test coverage estimation (value range [0,1]). Estimate the test coverage difficulty of the completion suggestions (e.g., pure computational functions are easier to test and score higher than network I / O functions); , Weights for the reliability sub-dimension; The scores from the three dimensions are combined into a multivariate index, and the specific formula is as follows: ; in , and These are global weights for readability, maintainability, and reliability, respectively. This is the Sigmoid function, used to compress the sum of scores to the range of 0-1, thus smoothing the data.

[0029] The dynamic weighted sorting module first defines a sorting score function that integrates syntax correctness, context matching degree, code complexity and corresponding weights, then dynamically adjusts the weights according to the debugging and performance optimization status, and finally sorts the completion suggestion set in descending order based on the comprehensive score and outputs the sorting result. Define a ranking score function that combines syntactic correctness, context matching, code complexity, and corresponding weights to calculate the ranking score for each completion suggestion, as shown in the following formula: ;in: for The overall ranking score; Weights for grammatical correctness; Weights for context matching degree; As a weight for code complexity; Real-time weight adjustment algorithm: ; ; ;

[0030] in: , , These are the initial weights; This is a function to indicate the debugging status. This is a performance optimization status indicator function; , and Weighting adjustment coefficient (a non-negative value, controlling the magnitude of weight adjustment, calibrated by experimental data). Calculate the final ranking: Sort the completion suggestion set S in descending order based on the comprehensive score, and output the ranking result, as shown in the following formula: ;in: To complete the final sorting result of the suggestion set S; This is a descending sorting function.

[0031] The adaptive feedback learning module records the user's behavior and feature parameters when selecting completion suggestions. It adjusts the weights based on the difference between the expected ranking and the actual ranking of the suggestions. It optimizes the weight adjustment strategy through Q-learning and can also generate exclusive weights for syntax correctness, context matching degree, and code complexity based on the user's historical behavior data. Record user selection behavior: ;in: Here are user behavior data samples at time t; Provide the completion suggestions based on the user's actual selection; for The actual ranking in this sorting; for The feature parameter set (containing , (Three parameters: C) Weight Update: Based on the difference between the user's suggested expected ranking and the actual ranking, the weight parameters are adjusted using the following formula: ;in: η is the weight update amount; η is the learning rate; Expected ranking; This is the actual ranking; for The gradient with respect to the weight vector, is the gradient symbol, and w represents the derivative with respect to w.

[0032] Using Q-learning to update the strategy: This involves optimizing the weight adjustment strategy through reinforcement learning (Q-learning) to improve long-term fitness, as shown in the following formula: ;in: Let w be the state-action value function; w is the current weight state, and a is the weight adjustment action. The learning rate for Q-learning; Rewards for user satisfaction; Discount factor; For the next state All possible adjustment actions The maximum Q value; The calculation process for r is as follows:

[0033] For users' subsequent actions after accepting completion suggestions; The composite reward function is determined as follows: Rewards are received immediately. If the suggestion to complete the task is selected by the user, the basic positive reward will be increased by 1; the delayed reward will continue. : Implement a delayed observation window (e.g., 5 minutes). If the user does not edit / delete the completed code segment during the observation period, an additional reward of 0.5 will be given; negative corrections will be made to the reward. If a user deletes the completed code within a short period (e.g., within 30 seconds), a negative reward of -1 is applied (indicating that the suggestion was not truly adopted and may have a problem). .

[0034] A unique weight is generated based on the user's historical behavior data, using the following formula:

[0035] in: A personalized weight set for users; These are user-specific weights for syntax correctness, context matching, and code complexity; f(・) is the historical data learning function. This is a dataset of users' historical behavior.

[0036] The above formulas are all dimensionless calculations. Dimensionless calculations can be performed using various methods such as standardization, which will not be elaborated here. The formulas are derived from software simulations based on a large amount of collected data, and the preset parameters in the formulas can be set by those skilled in the art according to the actual situation.

[0037] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, ATA hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state ATA hard disk.

[0038] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0039] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0040] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0041] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0042] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0043] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable ATA hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0044] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A multimodal context-aware intelligent code completion system, characterized in that, Includes the following modules: The context analysis module is used to collect multimodal context information of text, syntax, vision, and environment from the code editor in real time. It extracts text, vision, and environment features through a multimodal encoder, generates a set of completion suggestions by the code generation model, and finally calculates the grammatical correctness, context matching degree, and code complexity feature parameters for each suggestion. The dynamic weighted sorting module is used to define a sorting score function that combines syntax correctness, context matching degree, code complexity and corresponding weights. Then, it dynamically adjusts the weights according to the debugging and performance optimization status. Finally, it sorts the completion suggestion set in descending order based on the comprehensive score and outputs the sorting result. The adaptive feedback learning module records the user's behavior and feature parameters when selecting completion suggestions. It adjusts the weights based on the difference between the expected ranking and the actual ranking of the suggestions, optimizes the weight adjustment strategy through Q-learning, and generates exclusive weights for syntax correctness, context matching, and code complexity based on the user's historical behavior data.

2. The multimodal context-aware intelligent code completion system according to claim 1, characterized in that, The execution process of the context analysis module is as follows: Real-time acquisition of multimodal context information from the code editor, including: Text context: Code snippet before the cursor ; Syntactic context: Abstract Syntax Tree (AST); Visual context: The documents or design drafts that the developer is interested in. ; Environment context: runtime log Output ; Process the input using a multimodal fusion model: ; MME stands for Multimodal Encoder, which outputs text features. Visual features and environmental characteristics ; Generate a set of completion suggestions: ; in: To complete the suggestion set; This is the i-th completion suggestion, where i is the suggestion number; G stands for code generation model; N represents the number of completion suggestions; Calculate feature parameters for each suggestion: Grammatical correctness: ; in for The probability of grammatical correctness. For normalization function, A multilayer perceptron for grammar judgment; Context matching degree: for The probability of matching with the text context. The sigmoid activation function is used, and Embed (・) is the vector embedding function. Code complexity: ; in for The complexity score is given by len (・), which is a function to count the code length. This is a function for calculating the loop complexity. , , For preset weighting coefficients, It is a multi-dimensional indicator.

3. The multimodal context-aware intelligent code completion system according to claim 2, characterized in that, The The analysis process for multiple indicators is as follows: The multivariate index calculates base scores across three dimensions, including: Readability score: Based on code surface feature analysis, the formula is as follows: in: Score for naming consistency; Score the annotation density; Score for style consistency; , , Weights for the readability sub-dimension; Maintainability score: Evaluated based on code structure characteristics, using the following formula: in: Scoring for high coupling degree; Modular scoring; Scoring for deeply nested structures; , , Weights for maintainable sub-dimensions; Reliability scoring: This assesses the risk of a code snippet introducing defects based on historical or pattern data, using the following formula: in: Error pattern matching degree; For test coverage estimation; , Weights for the reliability sub-dimension; The scores from the three dimensions are combined into a multivariate index, as shown in the following formula: in , and These are global weights for readability, maintainability, and reliability, respectively. This is the Sigmoid function, used to compress the sum of scores to the range of 0-1.

4. The multimodal context-aware intelligent code completion system according to claim 1, characterized in that, The execution process of the dynamic weighted sorting module is as follows: Define a ranking score function that combines syntactic correctness, context matching, code complexity, and corresponding weights to calculate the ranking score for each completion suggestion, as shown in the following formula: in: for The overall ranking score; Weights for grammatical correctness; Weights for context matching degree; As a weight for code complexity; Real-time weight adjustment algorithm: in: , , These are the initial weights; This is a function to indicate the debugging status. This is a performance optimization status indicator function; , and Weighting adjustment coefficient; Calculate the final ranking: Sort the completion suggestion set S in descending order based on the comprehensive score, and output the ranking result, as shown in the following formula: in: To complete the final sorting result of the suggestion set S; This is a descending sorting function.

5. The multimodal context-aware intelligent code completion system according to claim 1, characterized in that, The execution process of the adaptive feedback learning module is as follows: Record user selection behavior: ,in: Here are user behavior data samples at time t; Provide the completion suggestions based on the user's actual selection; for The actual ranking in this sorting; for The set of feature parameters; Weight Update: Based on the difference between the user's suggested expected ranking and the actual ranking, the weight parameters are adjusted using the following formula: in: This refers to the weight update amount; η is the learning rate; Expected ranking; This is the actual ranking; for The gradient with respect to the weight vector, The gradient symbol is denoted by w, which indicates the derivative with respect to w. Using Q-learning to update the strategy: This involves optimizing the weight adjustment strategy through reinforcement learning (Q-learning) to improve long-term fitness, as shown in the following formula: in: Let w be the state-action value function; w is the current weight state, and a is the weight adjustment action. The learning rate for Q-learning; Rewards for user satisfaction; Discount factor; For the next state All adjustment actions The maximum Q value; A unique weight is generated based on the user's historical behavior data, using the following formula: in: A personalized weight set for users; These are user-specific weights for syntax correctness, context matching, and code complexity. f(・) is the historical data learning function; This is a dataset of users' historical behavior.

6. The multimodal context-aware intelligent code completion system according to claim 5, characterized in that, User satisfaction reward The analysis process is as follows: The calculation logic is as follows: in, For users' subsequent actions after accepting completion suggestions; The determination process for the composite reward function is as follows: Receive rewards instantly If the suggestion to complete the task is selected by the user, the basic positive reward will be increased by 1. Delayed continuous rewards Set a 5-minute delay observation window. If the user does not edit / delete the completed code segment during the observation period, an additional reward of 0.5 will be given. Negative correction reward If the user deletes the completed code within 30 seconds, a negative reward of -1 is applied. Finally, calculate the household satisfaction reward. .