An AI-based application code vulnerability detection and repair method in a low-code platform

By employing a multimodal context-aware intent capture mechanism and optimizing the ternary utility function, this approach addresses the issue of code vulnerability detection and remediation methods in low-code platforms failing to understand user development intent. It achieves efficient and interpretable security remediation, ensuring that remediation recommendations align with business needs and reducing the risk of unintended behavior.

CN122451902APending Publication Date: 2026-07-24GUANGZHOU ZHUORUI DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU ZHUORUI DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-04-02
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing low-code platform vulnerability detection and remediation methods fail to fully understand the original development intent of user-embedded scripts, ignore the triple relationship between business semantics, component interaction, and security constraints, resulting in a disconnect between remediation suggestions and actual business needs. It is difficult to achieve a dynamic trade-off between security and business implementation, lacks an information integration mechanism based on business context and user operation history, and the remediation process lacks interpretability and dynamic adjustment capabilities.

Method used

A multimodal context-aware intent capture mechanism is adopted. An intent anchor vector is generated through a lightweight intent encoder. By combining cross-modal attention computation and differentiable logic gates, an intent constraint repair space is constructed. Multi-objective optimization is performed using a ternary utility function to generate repair suggestion code that meets security compliance and business continuity requirements.

Benefits of technology

It achieves accurate modeling of users' true development intentions, ensuring that the repair path is highly aligned with the original design goals at the semantic level, significantly enhancing the flexibility and interpretability of the repair system, and reducing the risk of unexpected behavior caused by automatic modifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451902A_ABST
    Figure CN122451902A_ABST
Patent Text Reader

Abstract

The application relates to an AI-based application code vulnerability detection and repair method in a low-code platform, and the application comprises the following steps: collecting and aligning multi-modal context signals, generating a business intention anchor vector by using a lightweight intention encoder, fusing vulnerability features through cross-modal attention, searching a dynamic template library, and constructing an intention constraint repair space; a three-element utility function is used to realize multi-objective trade-off of safety, continuity and business intention; finally, a repair suggestion code and an explanation text consistent with the business constraint are output, and the intention understanding capability is optimized through user feedback loop. The application can significantly improve the script security and business continuity of the low-code platform, automatically generate vulnerability repair suggestions consistent with the business intention of the developer, promote the dynamic improvement of the self-adaptation capability of the platform, and significantly reduce the risk of unintended behavior caused by automatic modification while ensuring the effective elimination of high-risk vulnerabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of low-code platform security and AI-driven code repair technology, and in particular to a method for detecting and repairing vulnerabilities in AI-based application code in a low-code platform. Background Technology

[0002] With the widespread adoption of low-code platforms in enterprise application development, more and more business developers are using visual operations and embedded custom scripts to quickly implement complex data processing, access control, and user interaction logic. Low-code platforms not only lower the development threshold but also greatly improve application deployment efficiency. However, with the extensive use of unstructured custom scripts (such as JavaScript snippets, Python logic blocks, and expression rules) in low-code business processes, security vulnerabilities such as cross-site scripting (XSS) attacks, SQL injection, and privilege escalation are becoming increasingly prominent due to users' lack of security awareness and the lack of professional development standards for the scripts themselves.

[0003] Existing technologies primarily revolve around code structure analysis, knowledge base matching, and template-based remediation. Mainstream code vulnerability detection and remediation methods often rely on Abstract Syntax Tree (AST) pattern matching, historical risk case knowledge graph retrieval, sensitive word transformation, or static indexing of template databases. For example, some low-code platforms offer automated detection mechanisms that identify potential vulnerabilities by scanning embedded script structures and generating remediation suggestions for users using fixed templates. These solutions offer a degree of automation and can mitigate security risks to some extent, but their effectiveness in remediating unstructured business logic scenarios is significantly limited: on the one hand, existing systems often only focus on the technical structure of the script, failing to deeply understand the user's development intent and scenario constraints within a specific business flow, leading to a mismatch between remediation suggestions and actual needs; on the other hand, because business data flows, component interaction relationships, and statement function comments are not structured representations, existing solutions struggle to capture business continuity, interaction semantics, and original design goals, easily causing security remediation actions to impair normal business operations, data processing logic anomalies, or functional loss.

[0004] In the field of low-code security risk handling, representative technologies are often applicable to well-structured and functionally standardized code snippets, primarily relying on standard code patterns or manually pre-set risk libraries. For example, existing security vulnerability remediation tools use static code analysis and knowledge base template recommendations to replace or block detected dangerous operations, but this cannot guarantee that the remediated code still meets the user's business scenario requirements. For more unstructured scripts embedded by business developers, the automated remediation capabilities of various platforms are limited, often requiring developers to manually verify, make secondary adjustments, or add comments, increasing the maintenance burden and potential secondary risks.

[0005] Current technologies suffer from the following prominent issues: The generated remediation suggestions fail to fully understand the original development intent of user-embedded scripts, neglecting the triple relationship between business semantics, component interaction, and security constraints, leading to a disconnect between remediation suggestions and actual business needs; remediation models based on matching technical structures are prone to business continuity impairment or functional failure, making it difficult to achieve a dynamic trade-off between security and business implementation; there is a lack of information integration mechanisms based on business context and user operation history, failing to automatically couple multimodal behavioral signals with security remediation strategies; and the remediation process lacks interpretability and dynamic adjustment capabilities, making it difficult for users to understand the impact of security remediation on their business and to improve the system's adaptability through feedback mechanisms. Summary of the Invention

[0006] This invention provides a method for detecting and repairing vulnerabilities in AI-based application code in a low-code platform, aiming to solve the problems of the existing technology mentioned in the background section.

[0007] The technical solution of this invention is: a method for detecting and remediating vulnerabilities in AI-based application code in a low-code platform, specifically including the following steps: S1: Collect multimodal context signals when users edit custom scripts in a low-code platform to construct a multimodal context dataset; S2: Based on a multimodal context dataset, a lightweight intent encoder is used to perform joint embedding processing on heterogeneous signals to generate intent anchor vectors that represent business semantic roles; S3: Perform cross-modal attention calculation on the vulnerability location AST node and intent anchor vector output by the vulnerability detection module to generate an intent-aware vulnerability feature vector of the coding business context; S4: Retrieve Top-K templates from the dynamically indexed intent category template library based on the intent-aware vulnerability feature vector, and apply intent through differentiable logic gates. Figure 1 Consistency score constraints are used to construct an intention constraint repair space; S5: Calculate the ternary utility function value based on the intent constraint repair space, where the security utility is evaluated by the vulnerability reduction rate, the continuity utility is measured by the UI state tree Diff, and the intent utility is determined by the semantic similarity between the repair code and the intent anchor vector. S6: Generate a multi-objective remediation strategy based on the ternary utility function value, and output intent-aligned remediation suggestion code that meets the requirements of security compliance and business continuity; S7: Perform structured hint engineering on the intent alignment repair suggestion code, generate intent alignment description text that includes business constraint retention instructions, and update intent encoder parameters based on user adoption feedback.

[0008] Furthermore, step S3 includes: performing node embedding mapping processing on the sequence of nodes in the abstract syntax tree of the vulnerability location, and using a pre-trained code representation model to convert the discrete syntax structure into a continuous high-dimensional code semantic vector sequence to obtain the code semantic vector sequence; The scaling dot product attention mechanism is used to calculate the relevance score between each element in the code semantic vector sequence and the intent anchor vector, and the cross-modal attention weight matrix is ​​obtained by processing it through a normalization function. The code semantic vector sequence is weighted and aggregated using a cross-modal attention weight matrix to generate an initial intent-aware feature vector. Nonlinear feature activation and dimension projection are then performed, and nonlinear transformation capability is introduced through a multilayer perceptron network to adjust the feature dimension to a preset space, outputting an intent-aware vulnerability feature vector.

[0009] Furthermore, in step S5, a static code analysis engine is used to perform taint tracking and vulnerability pattern matching on each candidate fragment in the intent constraint repair space, and the residual risk probability of the original vulnerability feature vector after repair is calculated to generate a security utility parameter. Based on the current UI component state tree snapshot and the simulated execution results after applying candidate repair code snippets, a deep difference comparison algorithm is used to extract the structured differences in node attributes, event binding relationships and data flow between the two versions of the state tree, and generate continuous utility parameters. Based on the intent anchor vector and the semantic representation of candidate repair code fragments, a pre-trained semantic similarity calculation model is used to perform cosine distance metric operation in a high-dimensional vector space to evaluate the degree of deviation between the semantics of the repaired code and the original development intent, and generate intent utility parameters.

[0010] Furthermore, in step S6, the repair suggestion code calls context-aware encoding through the code big language model generation engine, integrates policy instruction vectors and intent category dynamic index templates, reconstructs the syntax tree, and completes the data flow alignment of syntax correctness and variable binding.

[0011] The beneficial technical effects of this invention are as follows: 1) This invention constructs a multimodal context-aware intent capture mechanism, which jointly encodes the binding relationship of visual components, operation sequence trajectory and natural language annotation into a unique intent anchor vector, thereby achieving accurate modeling of the user's real development intent; 2) This invention introduces an intent-constrained dynamic indexing mechanism for repair templates, which performs semantic routing of repair resources based on user intent categories, and applies intent constraints to candidate templates using differentiable logic gates. Figure 1 Consistency scoring ensures that the selected repair path is highly aligned with the original design goals at the semantic level; 3) This invention introduces considerations of safety, functional continuity, and intent. Figure 1 The ternary utility function based on consistency is used for multi-objective optimization, which greatly enhances the flexibility and interpretability of the repair system. While ensuring the effective elimination of high-risk vulnerabilities, it significantly reduces the risk of unexpected behavior caused by automatic modification. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating the method of an embodiment of the present invention; Figure 2 A schematic diagram illustrating the process of generating intent-aware vulnerability feature vectors in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the process of constructing the intention-constrained repair space in an embodiment of the present invention. Detailed Implementation

[0013] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0014] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0015] like Figure 1 As shown, this embodiment provides a method for detecting and remediating vulnerabilities in AI-based application code on a low-code platform, specifically including the following steps: S1: Collect multimodal context signals when users edit custom scripts in the low-code platform, including visual component binding relationships, low-code canvas operation sequences and natural language annotation data, and generate a multimodal context dataset; S2: Based on the multimodal context dataset, a lightweight intent encoder is used to perform joint embedding processing on heterogeneous signals to generate intent anchor vectors representing business semantic roles; S3: Perform cross-modal attention calculation on the vulnerability location AST node output by the vulnerability detection module and the intent anchor vector to generate an intent-aware vulnerability feature vector of the encoded business context; S4: Based on the intent-aware vulnerability feature vector, retrieve Top-K templates from the dynamically indexed intent category template library, and apply intent through differentiable logic gates. Figure 1Consistency score constraints are used to construct an intention constraint repair space; S5: Calculate the ternary utility function value based on the intent constraint repair space, where the security utility term is evaluated by the vulnerability reduction rate, the continuity utility term is measured by the UI state tree Diff, and the intent utility term is determined by the semantic similarity between the repair code and the intent anchor vector. S6: Generate a multi-objective remediation strategy based on the ternary utility function value, and output intent-aligned remediation suggestion code that meets the requirements of security compliance and business continuity; S7: Perform structured prompting engineering on the intent alignment repair suggestion code to generate intent alignment description text containing business constraint retention instructions, and update the intent encoder parameters based on user adoption feedback.

[0016] In this embodiment, step S1 involves collecting multimodal context signals when a user edits a custom script on a low-code platform, including visual component binding relationships, low-code canvas operation sequences, and natural language annotation data, to generate a multimodal context dataset. This process specifically includes the following steps: S1.1: Based on the low-code platform runtime event listening mechanism, the sequence of component dragging, property configuration and script mounting operations performed by the user in the canvas is captured in real time, and event stream data containing timestamps, component unique identifiers and operation types is extracted to generate a set of original operation behavior sequences. S1.2: Using the unique identifiers of components in the original set of operation behavior sequences, traverse the component dependency graph within the platform, retrieve and extract the mapping relationship data of the form fields, data source interfaces and trigger event types bound to the current custom script, and generate a visual component binding relationship matrix; S1.3: For the text content in the custom script editing area, apply a natural language processing word segmentation algorithm to identify semantic keywords in code comment blocks and commit logs, filter out non-business-related noise characters, and generate a list of structured natural language comment feature vectors. S1.4: Based on the visualization component binding relationship matrix, the original operation behavior sequence set, and the structured natural language annotation feature vector list, perform spatiotemporal alignment processing of multi-source heterogeneous data, uniformly map signals with different sampling frequencies to the same business transaction context window, and generate multimodal context-aligned data tuples; S1.5: Perform serialization and format standardization processing on the multimodal context aligned data tuples, add data integrity check codes and version index tags, and finally generate a multimodal context dataset that can be used for input of a lightweight intent encoder.

[0017] In this embodiment, step S2 involves using a lightweight intent encoder to perform joint embedding processing on heterogeneous signals based on the multimodal context dataset to generate intent anchor vectors representing business semantic roles. This specifically includes the following steps: S2.1: Perform modal alignment and standardization preprocessing on the visualization component binding relationships, low-code canvas operation sequences and natural language annotation data in the multimodal context dataset to eliminate the distribution differences of heterogeneous data in timestamp granularity and semantic space, and generate a unified temporally aligned multimodal feature tensor. S2.2: Based on the unified temporal alignment multimodal feature tensor, a pre-trained domain-adaptive text encoder is used to extract deep semantic embedding vectors of natural language annotations. At the same time, a graph neural network encoder is used to extract topological embedding vectors of the binding relationships of visual components, so as to obtain a set of local feature representations containing independent modal semantic information. S2.3: Perform cross-modal attention fusion mechanism calculation on the local feature representation set. By constructing a query-key-value mapping matrix, the time-dependent features of the low-code canvas operation sequence are used as query vectors. The key information of the text semantic embedding vector and the topological structure embedding vector are dynamically aggregated to generate a hybrid semantic intermediate representation that integrates multi-source contextual clues. S2.4: Based on the hybrid semantic intermediate representation, a lightweight projection network is used to perform dimensionality reduction mapping and nonlinear transformation processing to compress high-dimensional hybrid features into a low-dimensional latent semantic space and filter out noise interference, so as to output an intent anchor vector with unique identification and characterizing the current script's role in data transformation or permission verification in the business flow.

[0018] In this embodiment, in step S3, the vulnerability location AST node output by the vulnerability detection module and the intent anchor vector are subjected to cross-modal attention calculation to generate an intent-aware vulnerability feature vector of the encoded business context, such as... Figure 2 As shown, the specific steps include the following: S3.1: Obtain the vulnerability location abstract syntax tree node sequence output by the vulnerability detection module and the intent anchor vector generated in the previous steps, perform node embedding mapping processing on the vulnerability location abstract syntax tree node sequence, and use a pre-trained code representation model to convert the discrete syntax structure into a continuous high-dimensional code semantic vector sequence to obtain a code semantic vector sequence with mathematical computability. S3.2: Based on the code semantic vector sequence and the intent anchor vector, perform a cross-modal attention weight matrix construction operation, use the scaling dot product attention mechanism to calculate the correlation score between each element in the code semantic vector sequence and the intent anchor vector, and process it through a normalization function to obtain a standardized cross-modal attention weight matrix to quantify the correlation strength between the local structure of the code and the global business intent. S3.3: The cross-modal attention weight matrix is ​​used to perform a weighted aggregation transformation on the code semantic vector sequence. The attention weights are used as coefficients to linearly combine each vector in the code semantic vector sequence to generate an initial intent-aware feature vector that integrates the business intent context, so as to realize the dynamic enhancement of code structure features by business semantics. S3.4: Perform nonlinear feature activation and dimension projection processing on the initial intent-aware feature vector, introduce nonlinear transformation capability through a multilayer perceptron network and adjust the feature dimension to a preset space, and output the intent-aware vulnerability feature vector of the encoded business context. This vector explicitly represents the risk form of a specific vulnerability under the user's original development intent, providing accurate feature basis for the generation of subsequent remediation strategies. In this embodiment, step S4 involves retrieving Top-K templates from a dynamically indexed intent category template library based on the intent-aware vulnerability feature vector, and then applying the intent through a differentiable logic gate. Figure 1 Consistency score constraints are used to construct an intention constraint repair space, such as... Figure 3 As shown, the specific steps include the following: S4.1: Obtain the intent-aware vulnerability feature vector as input data, and perform high-dimensional similarity calculation processing on the dynamically indexed intent category template library based on the vector space mapping algorithm to generate a candidate template set containing multiple candidate repair templates and their initial matching degree scores; For example, in a security detection scenario on a low-code platform, the dimension of the input intent-aware vulnerability feature vector is set to 256, the mapping space basis function is an orthogonal polynomial basis function, the distance metric threshold is 0.75, and when using the Gaussian radial basis kernel similarity calculation method, the kernel width is... Set the similarity to 1.2, with a normalization coefficient of 0.8. The formula is: in, The intent-aware vulnerability feature vector input in the mapping space With template vector Euclidean distance, The kernel width parameter is used; the weight vector is set to the importance coefficient {0.5, 0.3, 0.2} for the visualization component modality using the normalized Euclidean distance method. After calculating and generating the similarity index vector of the candidate templates, the Top-K retrieval algorithm is used with K=10, finally outputting 10 candidate repair templates, each template with its initial matching score in the range of 0.78~0.94. This output set is for subsequent... Figure 1 The consistency score calculation provides highly relevant inputs, significantly improving the fit between candidate templates and vulnerability contexts, thereby optimizing the quality of the remediation space construction.

[0019] S4.2: Receive the candidate template set as the processing object, and perform nonlinear activation and weight allocation operations on each candidate repair template using a pre-trained differentiable logic gate network to output an indication of the compatibility degree between each template and the current business context. Figure 1 Consistency score sequence; The system receives a set of candidate templates as input and uses a pre-trained differentiable logic gate network to perform feature normalization on the feature tensors of each template to ensure the consistency of the amplitude distribution of the input signal. Furthermore, a modality-specific activation response is applied to the normalized template features through a multi-channel nonlinear activation mechanism of differentiable logic gates to achieve selective amplification or suppression of different business context features and obtain a multidimensional activation output matrix. Furthermore, the weight allocation submodule is used to apply dynamic weight coefficient adjustments to each activation output matrix, generating a context-adapted weighted template feature sequence, calculated as follows: in, For the purpose of detecting vulnerability feature vectors, For template feature vectors, To assign weights.

[0020] Furthermore, through the gating coefficient update mechanism in the differentiable logic gate network, the above-mentioned weighted template feature sequence is input into the gating unit to calculate a numerical index of the compatibility between the template and the current business context.

[0021] Furthermore, by combining the output compatibility index with the preset business semantic constraint set execution index normalization and range mapping processing, the compatibility score is mapped to the [0,1] interval, forming a meaning index representing the compatibility degree of each template with the current business context. Figure 1 Consistency score sequence.

[0022] By employing nonlinear activation and weight allocation techniques using differentiable logic gate networks, the candidate template set from the previous step is transformed into a quantifiable and comparable system template. Figure 1 Consistency score sequences enable precise template filtering based on business context.

[0023] For example, in a low-code platform scenario, the candidate template set has 50 dimensions, and each template feature vector has a dimension of 128. After performing cosine similarity calculation between the intent-aware vulnerability feature vector (128-dimensional) and the template feature vector, a similarity matrix of size 50×128 is obtained. Softmax normalization is applied, and the output weight vector ranges from 0.02 to 0.15. ReLU and Sigmoid hybrid activation are performed on the weight vector, resulting in an activation output matrix ranging from 0 to 0.85. The activation output matrix is ​​element-wise multiplied with the weight vector to form a weighted template feature sequence. After inputting into a differentiable logic gate network, the compatibility index is adjusted through gating coefficients to range from 0.35 to 0.92. Normalization and range mapping are used to map the compatibility score to the [0,1] interval, ultimately forming the intent-aware vulnerability feature vector corresponding to each of the 50 templates. Figure 1 The consistency score sequence prioritizes templates that score high and allows them to be retained in subsequent steps and enter the intent constraint repair space construction stage. The actual execution effect is that the accuracy of repair strategy generation is significantly improved and the ability to maintain business continuity is greatly enhanced.

[0024] S4.3: Extract the meaning Figure 1 The consistency score sequence and the corresponding candidate repair templates are used to perform pruning on low-compatibility templates and priority rearrangement on high-compatibility templates based on threshold filtering mechanism and sorting algorithm to generate an optimized candidate template list after preliminary screening. S4.4: Import the optimized candidate template list and the intent-aware vulnerability feature vector, and use a multi-objective constraint fusion algorithm to dynamically adjust the code structure parameters in the template and apply boundary constraints to construct an intent constraint repair space that meets both security compliance and business continuity requirements. S4.5: Read the structured data of the intention constraint repair space, and perform connectivity verification and reachability evaluation on the solution paths in the repair space based on spatial topology analysis technology, so as to output the finally determined effective repair scheme domain that can be used for multi-objective strategy synthesis.

[0025] For example, in the intent constraint repair space of a low-code platform, the node set contains 50 template nodes, and the edge set contains 120 template-to-template conversion paths. The template edge weight matrix consists of security scores and business continuity scores, with a security threshold set to 0.7 and a business continuity threshold set to 0.6. After reading the structured data, a breadth-first search traversal sequence is executed to generate a path connectivity matrix (50×50). A matrix element value of 1 indicates the existence of a reachable path, and a value of 0 indicates that the path is unreachable. Path reachability is calculated using the following formula. determination: in, For path weights, For node meaning Figure 1 Consistency score, This is the path length. If... If the value is ≥0.5, it is considered a reachable path. In the normalization process, the path utility value range is set to [0.5, 0.9], and the normalization interval is set to [0, 1].

[0026] In this embodiment, in step S5, a ternary utility function value is calculated based on the intent constraint repair space. The security utility term is evaluated by the vulnerability reduction rate, the continuity utility term is measured by the UI state tree Diff, and the intent utility term is determined by the semantic similarity between the repair code and the intent anchor vector. Specifically, this includes the following steps: S5.1: Obtain the set of candidate repair code fragments in the intent-constrained repair space as input objects, use the static code analysis engine to perform taint tracking and vulnerability pattern matching on each candidate fragment, calculate the residual risk probability of the original vulnerability feature vector after repair, and thus generate a security utility parameter that characterizes the degree of vulnerability reduction. S5.2: Receive the current UI component state tree snapshot of the low-code platform and the simulated execution results after applying candidate repair code snippets as input data. Use the deep difference comparison algorithm to extract the structured differences in node attributes, event binding relationships and data flow between the two versions of the state tree, thereby generating a continuity utility parameter that quantifies the risk of business logic interruption. Furthermore, a structured difference extraction method is used to generate a difference matrix of node attributes, event binding relationships, and data flow, resulting in a structured difference matrix data object. Furthermore, the risk classification of the structured difference matrix is ​​performed using a difference risk mapping algorithm, mapping node attribute changes, event binding breaks, and data flow reversals to different risk levels, generating business logic interruption risk classification results.

[0027] S5.3: Retrieve the intent anchor vector generated in the previous steps and the semantic representation of the candidate repair code fragment after encoding as input sources. Use the pre-trained semantic similarity calculation model to perform cosine distance metric operation in high-dimensional vector space to evaluate the degree of deviation between the repaired code semantics and the original development intent, thereby generating an intent utility parameter that represents the degree of retention of business intent. S5.4: Integrate the aforementioned security utility parameters, continuity utility parameters, and intention utility parameters as multi-dimensional input indicators. Dynamically determine the weight coefficients of each dimension based on the security level configuration strategy preset by the low-code platform, and perform weighted linear aggregation operations to construct a comprehensive evaluation index, thereby generating a multi-objective ternary utility function value to guide the final strategy selection.

[0028] In this embodiment, step S6 involves generating a multi-objective remediation strategy based on the ternary utility function value and outputting intent-aligned remediation suggestion code that meets security compliance and business continuity requirements. This specifically includes the following steps: S6.1: Obtain the set of ternary utility function values ​​generated by the previous steps, and use the Pareto front search algorithm to perform multi-dimensional space mapping processing on the safety utility term, the continuity utility term, and the intention utility term in order to screen out the non-dominated solution set as the candidate repair strategy pool, thereby establishing the range of the optimization solution space that takes into account multiple constraints. S6.2: Extract high-scoring strategy vectors from the candidate repair strategy pool, combine them with pre-set low-code platform security level configuration weight parameters, and perform adaptive weighted aggregation operations to generate single-objective optimal repair strategy instructions with clear priority order, thereby quantifying and determining the execution order and intensity of each repair action; Furthermore, a multi-dimensional weighted mapping algorithm is used to achieve a weighted combination of the three-dimensional utility components of the policy vector, and a comprehensive score value is obtained for each policy vector, wherein the comprehensive score... The calculation formula is: in, For the normalized value of the safety utility term, This is the normalized value of the continuous utility term. For the normalized value of the intention utility term, , , Configure weighting coefficients for the platform's security level.

[0029] S6.3: Receive the optimal repair strategy instruction and the corresponding dynamic index template of intent category, call the code big language model generation engine to perform context-aware code fragment reconstruction processing, so as to transform the abstract strategy instruction into specific grammatically correct source code text, thereby producing a preliminary intent-aligned repair suggestion code draft; S6.4: Load the initial intent alignment remediation suggestion code draft and the business logic context of the original custom script, perform static semantic consistency verification and dynamic sandbox simulation test to verify whether the remediated code maintains the original UI state tree structure and data flow logic while eliminating the vulnerability, and output the final intent alignment remediation suggestion code that has passed compliance verification.

[0030] In this embodiment, step S7 involves performing structured prompting engineering on the intent alignment repair suggestion code to generate intent alignment description text containing business constraint retention instructions, and updating the intent encoder parameters based on user adoption feedback. Specifically, this includes the following steps: S7.1: Obtain the business logic context of the final intent alignment repair suggestion code and the original custom script that has been verified for compliance, perform semantic slot filling on the code difference fragments using a template-based structured prompting engineering framework, extract the removed risk operators and the retained business function blocks, and generate a structured change description data object containing specific change details; S7.2: Receive the structured change description data object and the predefined business constraint retention statement template, call the controllable text generation model to perform conditional natural language synthesis processing, map the technical code changes into a business continuity statement that the user can understand, and output intent-aligned description text containing the business constraint retention statement; S7.3: Monitor user interaction with the intent alignment description text and corresponding repair suggestion code in the low-code platform visual development environment, capture user acceptance confirmation instructions or rejection modification operations in real time, and generate a binary feedback reward signal sequence representing the user intent matching degree by combining the context status identifier of the current session. S7.4: Based on the binary feedback reward signal sequence and the intent anchor vector generated in the preceding steps, construct a policy gradient loss function for the lightweight intent encoder, execute the backpropagation algorithm to calculate the gradient update amount of the internal weight parameters of the encoder, and generate a parameter adjustment increment matrix for correcting semantic embedding bias. S7.5: Apply the parameters to adjust the incremental matrix to perform online iterative update processing on the neural network weights of the lightweight intent encoder, recalibrate the mapping relationship between multimodal context signals and latent semantic space, and output an updated intent encoder model instance with dynamic adaptive capabilities to complete the closed-loop optimization from single repair feedback to global intent understanding capability improvement.

[0031] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.

[0032] Unless otherwise defined, the technical or scientific terms used herein should be understood in their ordinary sense by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” involved in the embodiments of this invention refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0033] The above description is merely an exemplary embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting and remediating vulnerabilities in AI-based application code on a low-code platform, characterized in that, Includes the following steps: S1: Collect multimodal context signals when users edit custom scripts in a low-code platform to construct a multimodal context dataset; S2: Based on a multimodal context dataset, a lightweight intent encoder is used to perform joint embedding processing on heterogeneous signals to generate intent anchor vectors that represent business semantic roles; S3: Perform cross-modal attention calculation on the vulnerability location AST node and intent anchor vector output by the vulnerability detection module to generate an intent-aware vulnerability feature vector of the coding business context; S4: Based on the intent-aware vulnerability feature vector, retrieve the Top-K templates from the dynamically indexed intent category template library, and apply intent consistency score constraints through differentiable logic gates to construct the intent constraint repair space; S5: Calculate the ternary utility function value based on the intent constraint repair space, where the security utility is evaluated by the vulnerability reduction rate, the continuity utility is measured by the UI state tree Diff, and the intent utility is determined by the semantic similarity between the repair code and the intent anchor vector. S6: Generate a multi-objective remediation strategy based on the ternary utility function value, and output intent-aligned remediation suggestion code that meets the requirements of security compliance and business continuity; S7: Perform structured hint engineering on the intent alignment repair suggestion code, generate intent alignment description text that includes business constraint retention instructions, and update intent encoder parameters based on user adoption feedback.

2. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, In step S1, based on the low-code platform runtime event listening mechanism, the sequence of component dragging, property configuration and script mounting operations performed by the user in the canvas is captured in real time, and event stream data containing timestamps, component unique identifiers and operation types is extracted to generate a set of original operation behavior sequences.

3. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 2, characterized in that, In step S1, using the unique identifiers of components in the original set of operation behavior sequences, the platform's internal component dependency graph is traversed to retrieve and extract the mapping relationship data of the form fields, data source interfaces, and trigger event types bound to the current custom script, and a visual component binding relationship matrix is ​​generated. For the text content within the custom script editing area, a natural language processing word segmentation algorithm is applied to identify semantic keywords in code comment blocks and commit logs, generating a list of structured natural language comment feature vectors; Spatiotemporal alignment processing is performed on the visualization component binding relationship matrix, the original set of operation behavior sequences, and the structured natural language annotation feature vector list to generate multimodal context-aligned data tuples; data integrity check codes and index labels are added to generate multimodal context datasets.

4. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, In step S2, a pre-trained domain-adaptive text encoder is used to extract deep semantic embedding vectors of natural language annotations, while a graph neural network encoder is used to extract topological embedding vectors of the binding relationships of visual components to obtain a set of local feature representations.

5. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, In step S2, cross-modal attention fusion mechanism calculation is performed on the local feature representation set. By constructing a query-key-value mapping matrix, the time-dependent features of the low-code canvas operation sequence are used as query vectors. Key information of text semantic embedding vectors and topological structure embedding vectors are dynamically aggregated to generate a hybrid semantic intermediate representation. Furthermore, a lightweight projection network is used to perform dimensionality reduction mapping and nonlinear transformation processing, compressing high-dimensional mixed features into a low-dimensional latent semantic space and filtering out noise interference to output the intent anchor vector.

6. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, Step S3 includes: performing node embedding mapping processing on the sequence of nodes in the abstract syntax tree of the vulnerability location, and using a pre-trained code representation model to convert the discrete syntax structure into a continuous high-dimensional code semantic vector sequence to obtain the code semantic vector sequence; The scaling dot product attention mechanism is used to calculate the relevance score between each element in the code semantic vector sequence and the intent anchor vector, and the cross-modal attention weight matrix is ​​obtained by processing it through a normalization function. The code semantic vector sequence is weighted and aggregated using a cross-modal attention weight matrix to generate an initial intent-aware feature vector. Nonlinear feature activation and dimension projection are then performed, and nonlinear transformation capability is introduced through a multilayer perceptron network to adjust the feature dimension to a preset space, outputting an intent-aware vulnerability feature vector.

7. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, In step S4, a high-dimensional similarity calculation is performed on the intent category template library of the dynamic index based on the vector space mapping algorithm to generate a candidate template set containing multiple candidate repair templates and their initial matching scores.

8. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 7, characterized in that, In step S4, a pre-trained differentiable logic gate network is used to perform nonlinear activation and weight assignment operations on each candidate repair template to obtain an intent consistency score sequence. Extract the intent consistency score sequence and the corresponding candidate repair template, and perform pruning and priority rearrangement based on the threshold filtering mechanism and sorting algorithm to generate an optimized candidate template list; Import the list of candidate templates for optimization and the feature vector of intent-aware vulnerabilities. Use a multi-objective constraint fusion algorithm to dynamically adjust the code structure parameters in the templates and apply boundary constraints to constrain the repair space.

9. The method for detecting and remediating application code vulnerabilities based on AI in a low-code platform according to claim 1, characterized in that, In step S5, the static code analysis engine is used to perform taint tracking and vulnerability pattern matching on each candidate fragment in the intent constraint repair space, and the residual risk probability of the original vulnerability feature vector after repair is calculated to generate security utility parameters. Based on the current UI component state tree snapshot and the simulated execution results after applying candidate repair code snippets, a deep difference comparison algorithm is used to extract the structured differences in node attributes, event binding relationships and data flow between the two versions of the state tree, and generate continuous utility parameters. Based on the intent anchor vector and the semantic representation of candidate repair code fragments, a pre-trained semantic similarity calculation model is used to perform cosine distance metric operation in a high-dimensional vector space to evaluate the degree of deviation between the semantics of the repaired code and the original development intent, and generate intent utility parameters.

10. The method for detecting and remediating AI-based application code vulnerabilities in a low-code platform according to claim 1, characterized in that, The suggested fix involves using the code big language model generation engine to invoke context-aware encoding, fusing policy instruction vectors and dynamic index templates for intent categories, reconstructing the syntax tree, and aligning the data flow for syntax correctness and variable binding.