CN118012403A - Low code development method, system and storage medium based on natural language processing - Google Patents

Low code development method, system and storage medium based on natural language processing Download PDF

Info

Publication number
CN118012403A
CN118012403A CN202410411300.2A CN202410411300A CN118012403A CN 118012403 A CN118012403 A CN 118012403A CN 202410411300 A CN202410411300 A CN 202410411300A CN 118012403 A CN118012403 A CN 118012403A
Authority
CN
China
Prior art keywords
component
text
vector
code
low
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410411300.2A
Other languages
Chinese (zh)
Other versions
CN118012403B (en
Inventor
宋蕾
陈天乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Forestry University
Original Assignee
Southwest Forestry University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Forestry University filed Critical Southwest Forestry University
Priority to CN202410411300.2A priority Critical patent/CN118012403B/en
Publication of CN118012403A publication Critical patent/CN118012403A/en
Application granted granted Critical
Publication of CN118012403B publication Critical patent/CN118012403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Machine Translation (AREA)

Abstract

The present invention relates to the field of computer technologies, and in particular, to a low-code development method, system, and storage medium based on natural language processing. The method comprises the following steps: acquiring a text instruction in a text input box, wherein the text instruction carries out text description according to low-code development logic; determining semantic analysis data of the text instruction after semantic analysis based on the enhanced language model; determining target components in a preset component library and/or adjusting packaging codes in target components selected from the preset component library according to the semantic analysis data; the call target component responds to the text instruction. The user only needs to input text instructions conforming to the code development logic, and the system invokes the matched and/or modified components by matching the text input with predefined component operations and attributes or modifying the components according to the content of the text input. The method aims at solving the problem of how to reduce the component call selection time of the low-code platform.

Description

Low code development method, system and storage medium based on natural language processing
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a low-code development method, system, and storage medium based on natural language processing.
Background
Low code development has become a new trend in program development in recent years, and low code is a visual software development method, which automates various aspects of the development process through a graphical user interface and drag-and-drop functions, eliminating the dependency on the conventional computer programming method. For business users who have no experience in coding, the low code platform makes application development more autonomous.
One of the cores of low code development is to use pre-packaged components to simplify the application development process, each representing a particular function or interactive element, such as a button, form field, list view, etc. These components are composed of pre-written and packaged code, containing code logic that enables specific functions by which developers can quickly build user interfaces and functions for applications through simple drag-and-drop, configuration, and setup properties.
However, when low code development involves steps such as form design and user interface construction, the developer needs to select appropriate components, layout and style from a large number of pre-packaged components, and this process still takes much time, requires the developer to be familiar with the relevant tools of the low code, and has a certain threshold for some new users of low code development, so that the component call selection time of the low code platform needs to be reduced.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a low-code development method based on natural language processing, which aims to solve the problem of how to reduce the component call selection time of a low-code platform.
In order to achieve the above object, the present invention provides a low-code development method based on natural language processing, the method comprising:
Acquiring a text instruction in a text input box, wherein the text instruction carries out text description according to low-code development logic;
Determining semantic analysis data of the text instruction after semantic analysis based on an enhanced language model;
Determining a component to be called corresponding to the text instruction according to the semantic analysis data, traversing and inquiring a target component matched with the component to be called in a preset component library; and/or the number of the groups of groups,
Selecting a target component from the preset component library according to the semantic analysis data, and generating a code function meeting the target component;
and calling the target component to respond to the text instruction.
Optionally, the step of determining a target component in a preset component library and/or adjusting the package code in the target component according to the semantic analysis data comprises:
Determining a component to be called corresponding to the text instruction according to the semantic analysis data;
traversing and inquiring a target component matched with the component to be called in a preset component library;
When the target component is matched, generating a code function meeting editing conditions of the target component according to the semantic analysis data;
updating the original packaging code in the target component based on the code function.
Optionally, after the step of traversing the target component matched with the component to be invoked in the preset component library, the method further includes:
If no target component matched with the component to be called exists, selecting a secondary target component with highest similarity with the component to be called;
generating a code function meeting the editing condition of the secondary selection target component according to the semantic analysis data;
updating the encapsulation code in the target component based on the code function.
Optionally, before the step of obtaining the text instruction in the text input box, the method further includes:
constructing an enhanced language model of a transducer architecture comprising a self-attention mechanism and a feedforward neural network, so that the enhanced language model encodes words in the text instruction based on the self-attention mechanism and captures context relations among the words, and carries out nonlinear transformation on vectors of each position based on the feedforward neural network, wherein the enhanced language model is a model obtained by adding a multi-mode learning module between at least two hidden layers of the pre-training language model, and the multi-mode learning module comprises N layers of self-encoders, wherein N is a positive integer;
learning statistical rules and semantic representations of a language by unsupervised pre-training of the enhanced language model on a large-scale text dataset comprising a plurality of text data textually described in accordance with low-code development logic, to learn relevance and semantic representations between words according to captured contextual relationships between the words;
and adjusting model parameters in the pre-trained enhanced language model to guide the enhanced language model to learn semantic understanding conforming to low-code development logic in the text instruction for text description.
Optionally, the step of adjusting model parameters in the pre-trained enhanced language model includes:
performing fine tuning training on the enhanced language model based on large-scale text training data to obtain a prediction model;
And updating parameters of the enhanced language model and the multi-mode learning module in the process of fine tuning training to obtain the enhanced language model which minimizes the difference between the output result of the prediction model and the expected value.
Optionally, the step of determining the semantic analysis data after the text instruction is semantically parsed based on the language model includes:
preprocessing the text instruction;
Each word in the input text instruction is converted into an embedded vector with a fixed dimension through word embedding, and a fixed dimension embedded vector set is obtained;
Position coding is carried out on the embedded vectors in the fixed-dimension embedded vector set by adopting the coded vectors with the same dimension as the word embedding, so that each embedded vector in the fixed-dimension embedded vector set contains position information to obtain a position sequence;
calculating the attention weight between any two embedded vectors in the position sequence, and calculating the context expression vector of the word associated with each embedded vector according to the attention weight of each embedded vector in the position sequence;
after the context expression vector is subjected to anti-overfitting processing, inputting the context expression vector into a feedforward neural network;
And acquiring the data processed by the feedforward neural network to obtain the semantic analysis data.
Optionally, the step of calculating the attention weight between any two embedded vectors in the position sequence, and calculating the context representation vector of the word associated with each of the embedded vectors according to the attention weight of each of the embedded vectors in the position sequence includes:
Selecting any one embedded vector as a target embedded vector;
Embedding the target into a vector, and linearly changing the target into a query vector, a key vector and a value vector;
Calculating dot product values of the query vector and the key vector, and calculating the attention weight according to the dot product values;
carrying out weighted average on the attention weight based on the value vector to obtain a context representation vector corresponding to the target embedded vector;
And returning to the step of selecting any one embedded vector as a target embedded vector until the context expression vector of the word associated with each embedded vector is calculated.
In addition, in order to achieve the above object, the present invention also provides a low-code development system based on natural language processing, the low-code development system based on natural language processing comprising: a memory, a processor, and a natural language processing based low code development program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the natural language processing based low code development method as defined in any one of the above.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a natural language processing-based low-code development program which, when executed by a processor, implements the steps of the natural language processing-based low-code development method as set forth in any one of the above.
The invention provides a low-code development method, a device and a computer readable storage medium based on natural language processing, wherein a user only needs to input a text instruction conforming to code development logic, and the system modifies a component by matching text input with operation and attribute of a predefined component or according to content of the text input so as to call the matched and/or modified component, thereby reducing component call selection time of a low-code platform and further reducing a threshold required by low-code development.
Drawings
FIG. 1 is a schematic architecture diagram of a hardware operating environment of a natural language processing based low-code development system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of a natural language processing based low code development method of the present invention;
FIG. 3 is a flow chart of a second embodiment of a natural language processing based low code development method of the present invention;
FIG. 4 is a flow chart of a third embodiment of a natural language processing based low code development method of the present invention;
FIG. 5 is a graph showing response time variation of an enhanced language model to text instructions according to an embodiment of the present invention;
fig. 6 is a schematic diagram showing the change of the completion degree according to the iteration number according to the embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As an implementation scheme, fig. 1 is a schematic architecture diagram of a hardware running environment of a low-code development system based on natural language processing according to an embodiment of the present invention.
As shown in fig. 1, the natural language processing based low code development system may include: a processor 1001, such as a CPU, memory 1005, user interface 1003, network interface 1004, communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the natural language processing based low code development system architecture shown in fig. 1 does not constitute a limitation of the natural language processing based low code development system, and may include more or fewer components than illustrated, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a low-code development program based on natural language processing may be included in the memory 1005 as one storage medium. Wherein the operating system is a program that manages and controls hardware and software resources of a low-code development system based on natural language processing, the low-code development program based on natural language processing, and the execution of other software or programs.
In the low-code development system based on natural language processing shown in fig. 1, the user interface 1003 is mainly used for connecting a terminal, and performing data communication with the terminal; the network interface 1004 is mainly used for a background server and is in data communication with the background server; the processor 1001 may be used to invoke a low code development program based on natural language processing stored in the memory 1005.
In the present embodiment, a low-code development system based on natural language processing includes: memory 1005, processor 1001, and a natural language processing based low code development program stored on the memory and executable on the processor, wherein:
when the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
Acquiring a text instruction in a text input box, wherein the text instruction carries out text description according to low-code development logic;
Determining semantic analysis data of the text instruction after semantic analysis based on an enhanced language model;
Determining a component to be called corresponding to the text instruction according to the semantic analysis data, traversing and inquiring a target component matched with the component to be called in a preset component library; and/or the number of the groups of groups,
Selecting a target component from the preset component library according to the semantic analysis data, and generating a code function meeting the target component;
and calling the target component to respond to the text instruction.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
Determining a component to be called corresponding to the text instruction according to the semantic analysis data;
traversing and inquiring a target component matched with the component to be called in a preset component library;
When the target component is matched, generating a code function meeting editing conditions of the target component according to the semantic analysis data;
updating the original packaging code in the target component based on the code function.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
If no target component matched with the component to be called exists, selecting a secondary target component with highest similarity with the component to be called;
generating a code function meeting the editing condition of the secondary selection target component according to the semantic analysis data;
updating the original packaging code in the target component based on the code function.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
constructing an enhanced language model of a transducer architecture comprising a self-attention mechanism and a feedforward neural network, so that the enhanced language model encodes words in the text instruction based on the self-attention mechanism and captures context relations among the words, and carries out nonlinear transformation on vectors of each position based on the feedforward neural network, wherein the enhanced language model is a model obtained by adding a multi-mode learning module between at least two hidden layers of the pre-training language model, and the multi-mode learning module comprises N layers of self-encoders, wherein N is a positive integer;
learning statistical rules and semantic representations of a language by unsupervised pre-training of the enhanced language model on a large-scale text dataset comprising a plurality of text data textually described in accordance with low-code development logic, to learn relevance and semantic representations between words according to captured contextual relationships between the words;
and adjusting model parameters in the pre-trained enhanced language model to guide the enhanced language model to learn semantic understanding conforming to low-code development logic in the text instruction for text description.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
performing fine tuning training on the enhanced language model based on large-scale text training data to obtain a prediction model;
And updating parameters of the enhanced language model and the multi-mode learning module in the process of fine tuning training to obtain the enhanced language model which minimizes the difference between the output result of the prediction model and the expected value.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
preprocessing the text instruction;
Each word in the input text instruction is converted into an embedded vector with a fixed dimension through word embedding, and a fixed dimension embedded vector set is obtained;
Position coding is carried out on the embedded vectors in the fixed-dimension embedded vector set by adopting the coded vectors with the same dimension as the word embedding, so that each embedded vector in the fixed-dimension embedded vector set contains position information to obtain a position sequence;
calculating the attention weight between any two embedded vectors in the position sequence, and calculating the context expression vector of the word associated with each embedded vector according to the attention weight of each embedded vector in the position sequence;
after the context expression vector is subjected to anti-overfitting processing, inputting the context expression vector into a feedforward neural network;
And acquiring the data processed by the feedforward neural network to obtain the semantic analysis data.
When the processor 1001 calls a low-code development program based on natural language processing stored in the memory 1005, the following operations are performed:
Selecting any one embedded vector as a target embedded vector;
Embedding the target into a vector, and linearly changing the target into a query vector, a key vector and a value vector;
Calculating dot product values of the query vector and the key vector, and calculating the attention weight according to the dot product values;
carrying out weighted average on the attention weight based on the value vector to obtain a context representation vector corresponding to the target embedded vector;
And returning to the step of selecting any one embedded vector as a target embedded vector until the context expression vector of the word associated with each embedded vector is calculated.
The embodiment of the invention provides a low-code development method based on natural language processing based on a hardware architecture of a low-code development system based on natural language processing based on the computer technology.
First embodiment
Referring to fig. 2, in a first embodiment, the low-code development method based on natural language processing includes the steps of:
Step S10, a text instruction in a text input box is obtained, wherein the text instruction is subjected to text description according to low code development logic;
In this embodiment, a Text instruction in a Text input box is acquired, the Text input box is a Text input box set in a low-code development system (hereinafter referred to as a system) based on natural language processing, and when a user inputs the Text instruction to the Text input box according to a Text Description (Text Description) of low-code development logic, the system can perform semantic recognition on the Text instruction in the Text input box.
It should be noted that, in order to ensure code generation accuracy of the language model in the system, the enhanced language model of the system is trained in advance according to the text description of the low code development logic, so that when the user inputs the text instruction, it is required to ensure that the text instruction conforms to the low code development logic.
Specifically and optionally, the system can be built by adopting front-end frameworks such as act, vue or Angular, and is connected with a third-party Low-Code Development (Low-Code Development) platform through an API interface, and an event processing mechanism of the selected front-end framework is used for monitoring input events of a text input box so as to trigger corresponding processes when a user inputs text in the input box.
It should be noted that the low code development platform allows a developer to quickly build an application with minimal manual programming through graphical interfaces, pre-built modules, and model driven logic, and the developer can define business logic by filling in forms, selecting options, and configuration parameters, without having to write a large amount of code. Text instructions are typically used to describe business processes, data transformations, interface layouts, business rules, etc., as part of a low code platform.
The following is an example of text description text instructions in terms of low code development logic:
1. data operation instruction:
retrieving from the database all orders with sales exceeding 1000 in the last week. "
- "Store data in a database and generate a unique ID as record identification. "
2. Interface layout instructions:
"create a form page containing text boxes, drop down lists and buttons. "
"Create a form and add a chart in the box of the form. "
3. Business process instructions:
"trigger an approval process, send the request to the relevant department for approval. "
4. Data conversion instruction:
- "convert date format from YYYY-MM-DD to DD/MM/YYYY. "
- "Converts the text entered by the user into capital letters. "
5. Report generation instructions:
"create a dynamic dashboard and present real-time data and trend analysis in the dynamic dashboard. "
Step S20, determining semantic analysis data of the text instruction after semantic analysis based on an enhanced language model;
In this embodiment, after the text instruction is parsed by the enhanced language model preset in the system, semantic analysis data to be expressed by the text instruction is obtained.
Optionally, for how to obtain the semantic analysis data, the system first pre-processes the input text, including but not limited to removing irrelevant characters, punctuation marks, stop words, etc. in the text instruction, and performs word segmentation, part-of-speech tagging, etc.
And secondly, converting each word in the input text instruction into an embedded vector with a fixed dimension through word embedding to obtain an embedded vector set with the fixed dimension. Specifically, a GloVe word embedding model is selected, a vocabulary is constructed according to the preprocessed text instructions, and for each word in the vocabulary, the selected word embedding model is used for searching the corresponding embedding vector. If the word is not in the vocabulary of the model, it is chosen to be mapped to a particular "unknown word" vector, or an embedding vector is generated using some strategy (e.g., average vector, random initialization, etc.), and finally the embedding vectors of all words are combined together to form a fixed-dimensional embedding vector set.
And thirdly, carrying out position coding on the embedded vectors in the fixed-dimension embedded vector set by adopting the coded vectors with the same dimension as the word embedding, so that each embedded vector in the fixed-dimension embedded vector set contains position information, and obtaining a position sequence. Specifically, assuming that the dimension of word embedding is d, for each position i (starting from 0) in the sequence, a cosine function is selected to generate a position vector p_i of the same dimension as the word embedding, and the position vector p_i is added to the word embedding to add position information at each position of the input sequence to obtain a new embedded vector containing the position information.
And a fourth step of calculating the attention weight between any two embedded vectors in the position sequence, and calculating the context expression vector of the word associated with each embedded vector according to the attention weight of each embedded vector in the position sequence.
Specifically and optionally, the calculation of the attention weight may be as follows: embedding the selected target into a vector, and linearly changing the vector into a query vector, a key vector and a value vector; calculating dot product values of the query vector and the key vector, and calculating the attention weight according to the dot product values; and carrying out weighted average on the attention weight based on the value vector to obtain a context representation vector corresponding to the target embedded vector.
And fifthly, after the context expression vector is subjected to anti-overfitting processing, inputting the context expression vector into a feedforward neural network, and acquiring data processed by the feedforward neural network to obtain the semantic analysis data. Alternatively, regularization may be employed to prevent overfitting of the context representation vectors.
Step S30, determining a component to be called corresponding to the text instruction according to the semantic analysis data, traversing a target component matched with the component to be called in a preset component library, and inquiring; and/or selecting a target component from the preset component library according to the semantic analysis data, and generating a code function meeting the target component;
and step S40, calling the target component to respond to the text instruction.
In this embodiment, according to the obtained semantic analysis data, a target component in a preset component library of the low-code development platform is called, and/or an encapsulation code in the target component is adjusted.
Specifically, the actions performed by the system based on the semantic analysis data include three types: invoking a component in the low code development platform, adjusting the encapsulated code in the component in the low code development platform, and invoking multiple components in the low code development platform and adjusting the encapsulated code in one or more of the components. The whole process delivery system generates codes based on semantic analysis data.
Optionally, in some embodiments, to ensure the accuracy of the generated code. Determining a component to be called corresponding to a text instruction according to semantic analysis data, traversing a target component matched with the component to be called in a preset component library, or selecting the target component from the preset component library according to the semantic analysis data, and generating a code function meeting the target component.
Specifically, the system determines or generates a component to be called with the highest probability of meeting the semantic information according to the semantic information in the semantic analysis data, wherein the component to be called is the semantic information which accords with the semantic analysis model and is obtained by analyzing based on a text instruction, but the component is not necessarily preset in a preset component library of the low-code development platform. Therefore, the system needs to do a matching action, traverse and inquire the target component matched with the component to be called in the preset component library, directly call if the target component is matched with the corresponding target component, call a sub-selected target component with highest similarity with the component to be called if the target component is not matched with the corresponding target component, and then generate a code function meeting the sub-selected target component.
For example, assuming that the input text instruction is an interface layout type instruction, such as "create a form page including text box, drop-down list, and button", the system identifies that the required components are a form page blank component, a text box component, a drop-down list component, and a button component, respectively, and assuming that the components set in the low code development platform include the foregoing components in the set, the system will directly call these components and layout them in the form page based on a certain rule.
In this example, if the layout in the form page is not satisfactory, for example, the user needs to narrow down the text box component that is originally at the top of the form interface and occupies half of the position to a preset format, for example, 200×200 pixels, the user may further input a text instruction described in "adjust the size of the text box to 200×200 pixels" or the like, and the system immediately generates a code function capable of adjusting the size of the text box after recognition, and sets the size to 200×200 pixels desired by the user, and then the size of the text box component is adjusted to 200×200 pixels.
Optionally, in other embodiments, determining a component to be invoked corresponding to the text instruction according to the semantic analysis data, then traversing a target component matched with the component to be invoked in a preset component library, if the target component is matched, generating a code function meeting the editing condition of the target component according to the semantic analysis data, and updating the original packaging code in the target component based on the code function.
For example, assuming that the input instruction is an instruction of a data operation type, such as "retrieve all orders from the database with sales exceeding 1000 in recent week", a preset component in the low-code development platform is a query component, and the query component may be used to query sales of a commodity in the database, where the system identifies a query condition as follows: sales are greater than 1000 within a week; then based on this condition, a query code is generated in the query component that satisfies the aforementioned query condition.
In the technical scheme provided by the embodiment, the user only needs to input a text instruction conforming to the code development logic, and the system modifies the component by matching the text input with the operation and the attribute of the component defined in advance or according to the content of the text input, so that the matched and/or modified component is called, the component calling selection time of the low-code platform is reduced, and the threshold required by low-code development is further reduced.
Second embodiment
Referring to fig. 3, in this embodiment, after the step of traversing the preset component library to query the target component matched with the component to be invoked, the method further includes:
Step S40, if no target component matched with the component to be called exists, selecting a secondary target component with highest similarity with the component to be called;
step S50, generating a code function meeting the editing condition of the secondary selection target component according to the semantic analysis data;
Step S60, updating the encapsulation code in the target component based on the code function.
In this embodiment, if the target component matching the component to be invoked is not matched, the sub-selected target component having the highest similarity with the component to be invoked is selected.
Alternatively, since the components mostly contain their own visualization structures, a structural similarity matching algorithm may be used for how to calculate the similarity between the component to be invoked and each component.
Optionally, firstly, the structure or behavior mode of the component is converted into the form of a graph, classes in the structure can be represented as nodes of the graph, and relationships (such as inheritance, aggregation and the like) among the classes are represented as edges of the graph; then extracting the number of nodes, the number of edges, the degree distribution of the nodes, the diameter of the graph and the clustering coefficient from the constructed graph; searching data in each component in the component dataset based on the obtained number of nodes, the number of edges, the degree distribution of the nodes, the diameter of the graph and the clustering coefficient, and changing the data into the minimum editing operand required by the quantized data as the graph editing distance; and finally, determining the component with the shortest editing distance of the graph as the sub-selected target component with the highest similarity.
In this embodiment, after determining the sub-selection target component, a code function that satisfies the editing condition of the sub-selection target component is generated according to the semantic analysis data, and the package code in the target component is updated based on the code function.
In the technical scheme provided by the embodiment, if the target component matched with the component to be called is not matched, the structural similarity between each component in the data set and the component to be called is calculated by adopting a structural similarity matching algorithm, the secondary target component with the highest similarity with the component to be called is selected, a code function meeting the editing condition of the secondary target component is generated according to the semantic analysis data, and the packaging code in the target component is updated based on the code function, so that the calling selection time of the packaging component of a developer is shortened, and the threshold required by low code development is further reduced.
Third embodiment
Referring to fig. 4, in this embodiment, before step S10, based on the first or second embodiment, the method further includes:
Step S70, constructing an enhanced language model of a transducer architecture comprising a self-attention mechanism and a feedforward neural network, so that the enhanced language model encodes words in the text instruction based on the self-attention mechanism and captures context relations among the words, and carries out nonlinear transformation on vectors of each position based on the feedforward neural network, wherein the enhanced language model is a model obtained by adding a multi-modal learning module between at least two hidden layers of the pre-trained language model, the multi-modal learning module comprises N layers of self-encoders, and N is a positive integer;
Step S80, performing unsupervised pre-training on the enhanced language model on a large-scale text data set to learn statistical rules and semantic representations of languages so as to learn relevance and semantic representations among words according to the captured context relations among the words, wherein the large-scale text data set comprises a plurality of text data which are subjected to text description according to low-code development logic;
And step S90, adjusting model parameters in the pre-trained enhanced language model to guide the enhanced language model to learn semantic understanding conforming to low-code development logic in the text instruction for text description.
As an optional embodiment, in this embodiment, in order to ensure that the built-in enhanced language model of the system can accurately identify the semantic information in the text instruction, a certain requirement needs to be made on the architecture and pre-training of the enhanced language model, and fine adjustment needs to be made to a certain extent.
Specifically, the enhanced language model adopts a transducer architecture comprising a self-attention mechanism and a feedforward neural network, in the transducer architecture, words in the text instruction are encoded through the self-attention mechanism, the context relation among the words is captured, and a vector of each position is subjected to nonlinear transformation through the feedforward neural network.
It should be noted that one of the characteristics of the self-Attention mechanism is to allow the model to take all other elements into account when processing each input element, capture the dependency relationships inside the input sequence by calculating the degree of association of the representation of each position in the input sequence with the representation of all other positions, in each self-Attention layer, different Attention heads (Attention heads) can be used to capture different types of dependency relationships, and then the outputs of these Attention heads are spliced or averaged to obtain the final output of that layer.
The feedforward neural network is arranged behind the self-attention layer of the transducer architecture and consists of two linear transformations (fully connected layers) and one nonlinear activation function. These three parts are performed in sequence with an activation function interposed between the two linear transformations. The feedforward neural network can perform full-connection transformation on the vectors after position encoding or decoding, and the representation of the position information and the extraction of the characteristics are enhanced.
In addition, the enhanced language model adds a model behind a multi-modal learning module between at least two hidden layers of the pre-trained language model, the multi-modal learning module including N levels of self-encoders. It should be noted that the multi-modal learning module can process and understand data of multiple modalities, such as text, image, audio, etc., at the same time, so that the language model can process more meta-information types, and the multi-modal learning helps the model to remain stable in the face of data missing or noise, for example, when part of text data is disturbed by noise, and other text data can still provide useful information to assist the model in prediction. In addition, the multi-mode learning module is also provided with N positive integer level self-encoders, and the multi-level can enable the model to learn more abstract and complex features from text data. Alternatively, N may take a value of 4.
Further, in this embodiment, the model is pre-trained unsupervised using a large-scale text dataset. Specifically and optionally, a masking language model (Masked Language Model, MLM) may be used, i.e., to randomly mask a portion of words in the text, and then let the model predict those masked words, and determine whether the model can correctly learn the relevance and semantic representation between the words based on whether the prediction approaches the masked portion.
Further, in this embodiment, after the pre-training is finished, model parameters in the pre-trained enhanced language model need to be adjusted to instruct the enhanced language model to learn the semantic understanding conforming to the low-code development logic for text description in the text instruction.
Alternatively, the specific adjustment steps may be: performing fine tuning training on the enhanced language model based on the text training data to obtain a prediction model; and updating parameters of the enhanced language model and the multi-mode learning module in the process of fine tuning training to obtain the enhanced language model which minimizes the difference between the output result of the prediction model and the expected value.
As an example, a GPT model is selected as a pre-training language model, a cross entropy loss function is selected as a loss function, a training loop is created, a batch of data is taken out of a training set in each iteration, the batch of data is input into the model, the prediction output of the model is obtained, the loss between the prediction output and a true value is calculated, and the parameters of the model are updated by using a back propagation algorithm, so that the difference between the output result and the expected value of the prediction model is minimized.
Optionally, the updatable parameters of the model include, but are not limited to, any one or more of weights, biases, learning rates, regularization parameters, and activation function parameters.
Illustratively, in some embodiments, the following experimental environments are selected to test the enhanced language model constructed as described above.
Environment (environment) Configuration of
Operating system Windows10 x64
CPU Intel Core i7-7700K
GPU GTX1080Ti
Python 3.6.5
Anaconda 4.5.4
Memory 11GB
In this experiment, the designed simple actions are used for summarizing actions involved in code development, such as dragging a form, and component to which specific location. Meanwhile, the language model generates an execution code for simple action understanding, the execution code and the execution code are compared, whether the semantic understanding can be converted into a action instruction or not is judged, then an action target is completed through the instruction, a response Time change schematic diagram of the enhanced language model to the text instruction is recorded and obtained, wherein a Stability Range (Stability Range) of the model response is marked by a virtual horizontal line in the diagram, a feedback Time (Reaction Time) of the model to the text instruction is marked by a vertical line, and a sliding Average line (Moving Average) is marked by a real horizontal line passing through the middle of the vertical line.
It can be seen that under the environment configuration of the experiment, the response time of the enhanced language model to the text instruction is stably concentrated between 580 and 1280ms, that is, the language model can complete understanding of the semantics and then give a response in about 1s, which means that the response time cost of the language model is lower.
In addition, to verify the accuracy of the enhanced language model, in some embodiments, the target completion ratio is taken as the completion m, the iteration number of the code is n, a schematic diagram of the change of the completion of the language model with the iteration number (Variation of completion with the number of iterations) is recorded, as shown in fig. 6, the abscissa in the diagram is the iteration number (Number of iterations), the ordinate is the completion degree of the text instruction by the model (Degree of completion), the lower line represents unprocessed data (Unfitered data), and the upper line represents processed data (FILTERED DATA).
As can be seen from the graph, when the number of code iterations is close to 50, the proportion of the completion degree tends to be stable, and under the same condition, the proportion of the data which is not screened can reach the target completion degree in the initial stage is smaller, and after the iteration is close to 35 times, the completion degree tends to be stable, and is about 60%; the completion degree of the screened data in the initial stage can be close to 60%, and the completion degree can be finally more than 80% after optimization iteration.
In the technical scheme provided by the embodiment, in order to ensure that the built-in enhancement language model of the system can accurately identify semantic information in a text instruction, a transducer architecture comprising a self-attention mechanism and a feedforward neural network is adopted to encode words in the text instruction, capture context relations among the words and carry out nonlinear transformation on vectors of each position, and a model behind a multi-mode learning module comprising N layers of self-encoders is added between at least two hidden layers in the enhancement language model, so that the enhancement language model can rapidly and accurately respond to the text instruction.
Furthermore, it will be appreciated by those of ordinary skill in the art that implementing all or part of the processes in the methods of the above embodiments may be accomplished by computer programs to instruct related hardware. The computer program comprises program instructions, and the computer program may be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in a natural language processing based low code development system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a computer-readable storage medium storing a natural language processing-based low-code development program which, when executed by a processor, implements the steps of the natural language processing-based low-code development method described in the above embodiments.
The computer readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, etc. which may store the program code.
It should be noted that, because the storage medium provided in the embodiments of the present application is a storage medium used for implementing the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the storage medium, and therefore, the description thereof is omitted herein. All storage media adopted by the method of the embodiment of the application belong to the scope of protection of the application.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A low-code development method based on natural language processing, characterized in that the low-code development method based on natural language processing comprises the following steps:
Acquiring a text instruction in a text input box, wherein the text instruction carries out text description according to low-code development logic;
Determining semantic analysis data of the text instruction after semantic analysis based on an enhanced language model;
Determining a component to be called corresponding to the text instruction according to the semantic analysis data, traversing and inquiring a target component matched with the component to be called in a preset component library; and/or the number of the groups of groups,
Selecting a target component from the preset component library according to the semantic analysis data, and generating a code function meeting the target component;
and calling the target component to respond to the text instruction.
2. The method for developing low-code based on natural language processing according to claim 1, wherein the step of determining a component to be invoked corresponding to the text instruction according to the semantic analysis data, and traversing a preset component library to query a target component matched with the component to be invoked comprises:
Determining a component to be called corresponding to the text instruction according to the semantic analysis data;
traversing and inquiring a target component matched with the component to be called in a preset component library;
When the target component is matched, generating a code function meeting editing conditions of the target component according to the semantic analysis data;
updating the original packaging code in the target component based on the code function.
3. The method for developing low-code based on natural language processing according to claim 2, further comprising, after the step of traversing a target component in a preset component library, which is matched with the component to be invoked:
If no target component matched with the component to be called exists, selecting a secondary target component with highest similarity with the component to be called;
generating a code function meeting the editing condition of the secondary selection target component according to the semantic analysis data;
updating the encapsulation code in the target component based on the code function.
4. The natural language processing based low code development method of claim 1, wherein before the step of obtaining the text instruction in the text input box, further comprising:
constructing an enhanced language model of a transducer architecture comprising a self-attention mechanism and a feedforward neural network, so that the enhanced language model encodes words in the text instruction based on the self-attention mechanism and captures context relations among the words, and carries out nonlinear transformation on vectors of each position based on the feedforward neural network, wherein the enhanced language model is a model obtained by adding a multi-mode learning module between at least two hidden layers of the pre-training language model, and the multi-mode learning module comprises N layers of self-encoders, wherein N is a positive integer;
learning statistical rules and semantic representations of a language by unsupervised pre-training of the enhanced language model on a large-scale text dataset comprising a plurality of text data textually described in accordance with low-code development logic, to learn relevance and semantic representations between words according to captured contextual relationships between the words;
and adjusting model parameters in the pre-trained enhanced language model to guide the enhanced language model to learn semantic understanding conforming to low-code development logic in the text instruction for text description.
5. The natural language processing based low code development method of claim 4, wherein the step of adjusting model parameters in the pre-trained enhanced language model comprises:
performing fine tuning training on the enhanced language model based on large-scale text training data to obtain a prediction model;
And updating parameters of the enhanced language model and the multi-mode learning module in the process of fine tuning training to obtain the enhanced language model which minimizes the difference between the output result of the prediction model and the expected value.
6. The natural language processing based low code development method of claim 1, wherein the step of determining the text instruction based on the language model semantically parsed semantic analysis data comprises:
preprocessing the text instruction;
Each word in the input text instruction is converted into an embedded vector with a fixed dimension through word embedding, and a fixed dimension embedded vector set is obtained;
Position coding is carried out on the embedded vectors in the fixed-dimension embedded vector set by adopting the coded vectors with the same dimension as the word embedding, so that each embedded vector in the fixed-dimension embedded vector set contains position information to obtain a position sequence;
calculating the attention weight between any two embedded vectors in the position sequence, and calculating the context expression vector of the word associated with each embedded vector according to the attention weight of each embedded vector in the position sequence;
after the context expression vector is subjected to anti-overfitting processing, inputting the context expression vector into a feedforward neural network;
And acquiring the data processed by the feedforward neural network to obtain the semantic analysis data.
7. The natural language processing based low code development method of claim 6, wherein said step of calculating an attention weight between any two embedded vectors in said sequence of positions and calculating a context representation vector for each word associated with said embedded vector based on said attention weights for each of said embedded vectors in said sequence of positions comprises:
Selecting any one embedded vector as a target embedded vector;
Embedding the target into a vector, and linearly changing the target into a query vector, a key vector and a value vector;
Calculating dot product values of the query vector and the key vector, and calculating the attention weight according to the dot product values;
carrying out weighted average on the attention weight based on the value vector to obtain a context representation vector corresponding to the target embedded vector;
And returning to the step of selecting any one embedded vector as a target embedded vector until the context expression vector of the word associated with each embedded vector is calculated.
8. A natural language processing based low code development system, the natural language processing based low code development system comprising: a memory, a processor, and a natural language processing based low code development program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the natural language processing based low code development method of any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a natural language processing-based low-code development program which, when executed by a processor, implements the steps of the natural language processing-based low-code development method according to any one of claims 1 to 7.
CN202410411300.2A 2024-04-08 2024-04-08 Low code development method, system and storage medium based on natural language processing Active CN118012403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410411300.2A CN118012403B (en) 2024-04-08 2024-04-08 Low code development method, system and storage medium based on natural language processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410411300.2A CN118012403B (en) 2024-04-08 2024-04-08 Low code development method, system and storage medium based on natural language processing

Publications (2)

Publication Number Publication Date
CN118012403A true CN118012403A (en) 2024-05-10
CN118012403B CN118012403B (en) 2024-06-11

Family

ID=90954803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410411300.2A Active CN118012403B (en) 2024-04-08 2024-04-08 Low code development method, system and storage medium based on natural language processing

Country Status (1)

Country Link
CN (1) CN118012403B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118227132A (en) * 2024-05-23 2024-06-21 广东汉佳信息技术有限公司 Automatic generation method and system of processing interface based on flow customization

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115145551A (en) * 2022-08-02 2022-10-04 北京航空航天大学 Intelligent auxiliary system for machine learning application low-code development
CN115510362A (en) * 2022-10-20 2022-12-23 上海豹云网络信息服务有限公司 System for automatically generating web front-end codes according to natural language description documents
WO2023050408A1 (en) * 2021-09-30 2023-04-06 西门子股份公司 Ot domain low-code development method and platform, and computer-readable medium
CN116661766A (en) * 2023-07-04 2023-08-29 北京道亨软件股份有限公司 Software low-code development method based on artificial intelligence
CN117193738A (en) * 2023-08-14 2023-12-08 科大讯飞股份有限公司 Application building method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023050408A1 (en) * 2021-09-30 2023-04-06 西门子股份公司 Ot domain low-code development method and platform, and computer-readable medium
CN115145551A (en) * 2022-08-02 2022-10-04 北京航空航天大学 Intelligent auxiliary system for machine learning application low-code development
CN115510362A (en) * 2022-10-20 2022-12-23 上海豹云网络信息服务有限公司 System for automatically generating web front-end codes according to natural language description documents
CN116661766A (en) * 2023-07-04 2023-08-29 北京道亨软件股份有限公司 Software low-code development method based on artificial intelligence
CN117193738A (en) * 2023-08-14 2023-12-08 科大讯飞股份有限公司 Application building method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王明圣: "室内移动机器人控制器低代码开发平台", 《CNKI优秀硕士学位论文全文库 信息科技辑》, no. 06, 15 June 2023 (2023-06-15), pages 140 - 42 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118227132A (en) * 2024-05-23 2024-06-21 广东汉佳信息技术有限公司 Automatic generation method and system of processing interface based on flow customization

Also Published As

Publication number Publication date
CN118012403B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
CN110348462B (en) Image feature determination and visual question and answer method, device, equipment and medium
CN109492113B (en) Entity and relation combined extraction method for software defect knowledge
CN118012403B (en) Low code development method, system and storage medium based on natural language processing
CN114020936B (en) Construction method and system of multi-modal affair map and readable storage medium
CN110222194B (en) Data chart generation method based on natural language processing and related device
CN116579339B (en) Task execution method and optimization task execution method
CN111651573B (en) Intelligent customer service dialogue reply generation method and device and electronic equipment
JP2021106016A (en) Dialog generation method, device, electronic equipment, and medium
Sarang Artificial neural networks with TensorFlow 2
CN110795913A (en) Text encoding method and device, storage medium and terminal
CN113239169A (en) Artificial intelligence-based answer generation method, device, equipment and storage medium
CN116720004A (en) Recommendation reason generation method, device, equipment and storage medium
CN116304748A (en) Text similarity calculation method, system, equipment and medium
Liu et al. Convolutional neural networks-based locating relevant buggy code files for bug reports affected by data imbalance
CN117807482B (en) Method, device, equipment and storage medium for classifying customs clearance notes
US20240212796A1 (en) Reactant molecule prediction using molecule completion model
CN117591663B (en) Knowledge graph-based large model promt generation method
CN116341564A (en) Problem reasoning method and device based on semantic understanding
CN116361511A (en) Video retrieval method, device and equipment of composite semantics and storage medium
KR102610431B1 (en) Apparatus and method for generating summary of program source code based on ai analysis
CN112364666B (en) Text characterization method and device and computer equipment
CN115186085A (en) Reply content processing method and interaction method of media content interaction content
CN114201957A (en) Text emotion analysis method and device and computer readable storage medium
CN114492391A (en) Intention reasoning method and device
CN113486180A (en) Remote supervision relation extraction method and system based on relation hierarchy interaction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant