Technology development system and method based on artificial intelligence technology
Through the neural network model based on deep learning, the natural language description of computer function modules is automatically converted into program code, which solves the time-consuming, labor-intensive and error-prone problems of traditional development methods, and achieves efficient and accurate technology development.
Patent Information
- Application Number
- CN202311364807.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-10-20
AI Technical Summary
Traditional computer program development methods require professional programming knowledge, are time-consuming and labor-intensive, are prone to errors and loopholes, and lack efficient and convenient development methods.
Using a neural network model based on deep learning, the semantic understanding features described by natural language are automatically converted into computer program code to improve development efficiency and accuracy.
It achieves accurate understanding of semantic information of computer function modules and automatic code generation, improves the efficiency and accuracy of technology development, and reduces development complexity and error rates.
Smart Images

Figure CN117348877B
Abstract
Description
Technical Field
[0001] The present application relates to the field of technology development, and more specifically, to a technology development system and method based on artificial intelligence technology. Background Art
[0002] With the advancement of science and technology and the rapid development of informatization, computers have become an important part of modern society. People cannot do without computers in production, life and entertainment. Therefore, how to develop computer programs efficiently and conveniently has always been a concern and pursuit of computer scientists.
[0003] The traditional way of developing computer programs requires developers to have professional programming knowledge and spend a lot of time and energy to write complex codes. This process is not only time-consuming and labor-intensive, but also prone to errors and vulnerabilities.
[0004] Therefore, an optimized technology development system based on artificial intelligence technology is desired. Summary of the invention
[0005] In order to solve the above technical problems, this application is proposed. The embodiments of this application provide a technology development system and method based on artificial intelligence technology, which uses a neural network model based on deep learning to mine the semantic understanding features of the natural language description of computer function modules, so as to accurately understand the semantic information of computer function modules, and then automatically convert the semantic information of computer function modules into computer program codes based on artificial intelligence technology to improve the efficiency and accuracy of technology development.
[0006] According to one aspect of the present application, a technology development method based on artificial intelligence technology is provided, which includes:
[0007] Obtaining a natural language description of a computer function module to be implemented;
[0008] Performing word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words;
[0009] Passing the sequence of function module description words through a word embedding layer to obtain a sequence of function module description word embedding vectors;
[0010] Passing the sequence of the functional module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors;
[0011] Arranging the plurality of functional module description word feature vectors into a two-dimensional feature matrix and then optimizing it to obtain an optimized two-dimensional feature matrix;
[0012] Passing the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a functional module semantic understanding feature vector; and
[0013] The semantic understanding feature vector of the functional module is passed through a code generator based on a natural language processing model to generate computer code.
[0014] In the above-mentioned technical development method based on artificial intelligence technology, the sequence of functional module description words is passed through a word embedding layer to obtain a sequence of functional module description word embedding vectors, including: using the word embedding layer to map each functional module description word in the sequence of functional module description words into a word vector to obtain a sequence of functional module description word embedding vectors.
[0015] In the above-mentioned technology development method based on artificial intelligence technology, the sequence of the functional module description word embedding vectors is passed through a first semantic encoder based on a Transformer module to obtain multiple functional module description word feature vectors, including: one-dimensionally arranging the sequence of the functional module description word embedding vectors to obtain a global functional module description word feature vector; calculating the product between the global functional module description word feature vector and the transposed vector of each functional module description word embedding vector in the sequence of the functional module description word embedding vector to obtain multiple self-attention association matrices; respectively standardizing each self-attention association matrix in the multiple self-attention association matrices to obtain multiple standardized self-attention association matrices; passing each standardized self-attention association matrix in the multiple standardized self-attention association matrices through a Softmax classification function to obtain multiple probability values; respectively weighting each functional module description word embedding vector in the sequence of the functional module description word embedding vector using each probability value in the multiple probability values as a weight to obtain the multiple contextual semantic functional module description word feature vectors; and, cascading the multiple contextual semantic functional module description word feature vectors to obtain the multiple functional module description word feature vectors.
[0016] In the above-mentioned technology development method based on artificial intelligence technology, the feature vectors of the multiple functional module description words are arranged into a two-dimensional feature matrix and then optimized to obtain an optimized two-dimensional feature matrix, including:
[0017] Calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight;
[0018] The plurality of function module description word feature vectors are weighted with the sequence of the first optimization weights, and the two-dimensional feature matrix composed of the optimized function module description word feature vectors is weighted with the second optimization weights to obtain an optimized two-dimensional feature matrix.
[0019] In the above-mentioned technology development method based on artificial intelligence technology, the optimization weight of each function module description word feature vector in the multiple function module description word feature vectors is calculated to obtain a sequence of first optimization weights, and the optimization weight of the two-dimensional feature matrix is calculated to obtain a second optimization weight, including: calculating the optimization weight of each function module description word feature vector in the multiple function module description word feature vectors according to the following weight calculation formula to obtain a sequence of the first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain the second optimization weight;
[0020] Wherein, the weight calculation formula is:
[0021] , ,in, is the first of the multiple functional module description word feature vectors Functional modules describe word feature vectors, is the eigenvector Length, is the eigenvector No. eigenvalues, Represents the feature vector The square of the second norm of is the scale of the feature matrix, is the two-dimensional feature matrix, is the two-dimensional feature matrix The eigenvalues of the locations, and represents the square of the Frobenius norm of the characteristic matrix, is the first sequence of optimized weights The first optimization weight, is the second optimization weight.
[0022] In the above-mentioned technical development method based on artificial intelligence technology, the optimized two-dimensional feature matrix is passed through a second semantic encoder based on a convolutional neural network model to obtain a functional module semantic understanding feature vector, including: using each layer of the second semantic encoder based on the convolutional neural network model to perform the following on the input data in the forward pass of the layer: convolution processing on the input data to obtain a convolution feature map; pooling the convolution feature map based on a feature matrix to obtain a pooled feature map; and nonlinear activation on the pooled feature map to obtain an activation feature map; wherein the output of the last layer of the second semantic encoder based on the convolutional neural network model is the functional module semantic understanding feature vector, and the input of the first layer of the second semantic encoder based on the convolutional neural network model is the optimized two-dimensional feature matrix.
[0023] According to another aspect of the present application, there is provided a technology development system based on artificial intelligence technology, which includes:
[0024] An information acquisition module, used to obtain a natural language description of a computer function module to be implemented;
[0025] A word segmentation module, used for performing word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words;
[0026] A word embedding module, used for passing the sequence of function module description words through a word embedding layer to obtain a sequence of function module description word embedding vectors;
[0027] A first semantic encoding module, used for passing the sequence of the functional module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors;
[0028] An optimization module, used for arranging the feature vectors of the multiple functional module description words into a two-dimensional feature matrix and then optimizing it to obtain an optimized two-dimensional feature matrix;
[0029] A second semantic encoding module, configured to pass the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a semantic understanding feature vector of a functional module; and
[0030] The code generation module is used to generate computer code by passing the semantic understanding feature vector of the functional module through a code generator based on a natural language processing model.
[0031] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the technology development method based on artificial intelligence technology as described above.
[0032] According to another aspect of the present application, a computer-readable medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the technology development method based on artificial intelligence technology as described above.
[0033] Compared with the prior art, the present application provides a technology development system and method based on artificial intelligence technology, which uses a deep learning-based neural network model to mine the semantic understanding features of the natural language description of computer function modules, so as to accurately understand the semantic information of the computer function modules, and then automatically convert the semantic information of the computer function modules into computer program code based on artificial intelligence technology, so as to improve the efficiency and accuracy of technology development. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0035] Figure 1 A flowchart of a technology development method based on artificial intelligence technology according to an embodiment of the present application;
[0036] Figure 2 A system architecture diagram of a technology development method based on artificial intelligence technology according to an embodiment of the present application;
[0037] Figure 3 A flowchart of a first semantic coding in a technology development method based on artificial intelligence technology according to an embodiment of the present application;
[0038] Figure 4 A flowchart of a second semantic coding in a technology development method based on artificial intelligence technology according to an embodiment of the present application;
[0039] Figure 5 A block diagram of a technology development system based on artificial intelligence technology according to an embodiment of the present application;
[0040] Figure 6 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0042] Application Overview
[0043] As mentioned above, the traditional computer program development method requires developers to have professional programming knowledge and spend a lot of time and energy to write complex codes. This process is not only time-consuming and labor-intensive, but also prone to errors and loopholes. Therefore, an optimized technology development system based on artificial intelligence technology is expected.
[0044] Accordingly, considering that in the actual process of computer technology development, in order to improve the efficiency and accuracy of development, it is expected to analyze the natural language description of the computer function module by using artificial intelligence technology, so as to extract the semantic features of the computer function module, and generate computer program code based on the natural language processing model. In this process, the difficulty and key point lies in how to fully express the semantic understanding features of the natural language description of the computer function module, so as to accurately understand the semantic information of the computer function module, and then automatically convert the semantic information of the computer function module into computer program code based on artificial intelligence technology to improve the efficiency and accuracy of technology development.
[0045] In recent years, deep learning and neural networks have been widely used in computer vision, natural language processing, text signal processing and other fields. The development of deep learning and neural networks provides new solutions and solutions for mining the semantic understanding feature information of natural language descriptions of computer function modules.
[0046] Figure 1 The present invention is a flowchart of a technology development method based on artificial intelligence technology according to an embodiment of the present application. Figure 2 1 is a system architecture diagram of a technology development method based on artificial intelligence technology according to an embodiment of the present application. Figure 1 and Figure 2As shown, according to the technology development method based on artificial intelligence technology in the embodiment of the present application, the steps include: S110, obtaining a natural language description of a computer function module to be implemented; S120, performing word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words; S130, passing the sequence of function module description words through a word embedding layer to obtain a sequence of function module description word embedding vectors; S140, passing the sequence of function module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain a plurality of function module description word feature vectors; S150, arranging the plurality of function module description word feature vectors into a two-dimensional feature matrix and then optimizing them to obtain an optimized two-dimensional feature matrix; S160, passing the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a function module semantic understanding feature vector; and, S170, passing the function module semantic understanding feature vector through a code generator based on a natural language processing model to generate a computer code.
[0047] More specifically, in step S110, a natural language description of the computer function module to be implemented is obtained. It should be understood that in the actual process of computer technology development, in order to improve the efficiency and accuracy of development, in the technical solution of the present application, artificial intelligence technology can be used to analyze the natural language description of the computer function module, thereby extracting the semantic features of the computer function module, and generating computer program code based on the natural language processing model. In one example, first, a natural language description of the computer function module to be implemented is obtained.
[0048] More specifically, in step S120, the natural language description of the computer function module to be implemented is segmented to obtain a sequence of function module description words. Considering that the natural language description of the computer function module to be implemented contains a large amount of semantic information, and the natural language description is composed of multiple words, these words are of great significance for the semantic understanding of the computer function module. Therefore, in order to fully and accurately extract the contextual semantic association features between the words in the natural language description, in the technical solution of the present application, the natural language description is first segmented to avoid confusion in word order during subsequent semantic understanding, which may cause errors or deviations in the semantic understanding of the computer function module, thereby obtaining a sequence of function module description words.
[0049] More specifically, in step S130, the sequence of function module description words is passed through a word embedding layer to obtain a sequence of function module description word embedding vectors. Considering that the semantic information of the computer function module is all computer professional terms, in order to improve the accuracy of the subsequent semantic understanding of the computer function module, in the technical solution of the present application, the sequence of function module description words is further passed through a word embedding layer, so as to use the word embedding layer to map the sequence of function module description words to an embedding vector, so as to obtain a sequence of function module description word embedding vectors. In particular, here, the word embedding layer can be constructed using a knowledge graph of the semantic features of professional terms related to computer language so that the prior information of the semantic features of professional terms in computer language is introduced in the process of converting the sequence of function module description words into an embedding vector, which is conducive to improving the accuracy of the subsequent semantic understanding of computer function modules.
[0050] More specifically, in step S140, the sequence of the functional module description word embedding vectors is passed through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors. It should be understood that since the words in the natural language description have context-based semantic association feature information, in order to capture the semantic association features between the words in the computer function module to accurately generate computer code, in the technical solution of the present application, after obtaining the sequence of the functional module description word embedding vectors, it is further passed through a first semantic encoder to extract the global context-based semantic association feature information about the computer function module in the natural language description. It should be understood that the Transformer module is a neural network model based on a self-attention mechanism, which can effectively process long-distance dependencies in natural language, thereby improving the effect of natural language processing.
[0051] Figure 3 FIG. 1 is a flowchart of the first semantic coding in the technology development method based on artificial intelligence technology according to an embodiment of the present application. Figure 3As shown, in the process of the first semantic encoding, it includes: S210, arranging the sequence of the functional module description word embedding vectors in one dimension to obtain a global functional module description word feature vector; S220, calculating the product between the global functional module description word feature vector and the transposed vector of each functional module description word embedding vector in the sequence of the functional module description word embedding vector to obtain multiple self-attention association matrices; S230, respectively standardizing each self-attention association matrix in the multiple self-attention association matrices to obtain multiple standardized self-attention association matrices; S240, passing each standardized self-attention association matrix in the multiple standardized self-attention association matrices through the Softmax classification function to obtain multiple probability values; S250, respectively weighting each functional module description word embedding vector in the sequence of the functional module description word embedding vector using each probability value in the multiple probability values as a weight to obtain the multiple contextual semantic functional module description word feature vectors; and, S260, cascading the multiple contextual semantic functional module description word feature vectors to obtain the multiple functional module description word feature vectors.
[0052] More specifically, in step S150, the plurality of function module description word feature vectors are arranged into a two-dimensional feature matrix and then optimized to obtain an optimized two-dimensional feature matrix. In the technical solution of the present application, after the sequence of the function module description word embedding vectors passes through the first semantic encoder based on the converter module, the plurality of function module description word feature vectors obtained express the contextual global associated text semantics of the function module description word, therefore, when the plurality of function module description word feature vectors are arranged into a two-dimensional feature matrix, the two-dimensional feature matrix is equivalent to a combined feature set of the local feature set corresponding to each function module description word feature vector.
[0053] However, although the feature distributions of the multiple function module description word feature vectors have the contextual relevance of the feature semantics encoded by the first semantic encoder based on the converter module, there are still explicit distribution differences between them, which leads to the two-dimensional feature matrix as a whole. The text semantic feature expression for each local feature set may be unbalanced, and the applicant of the present application further found that this imbalance is largely related to the feature expression scale, that is, the text semantic feature expression scale on the local feature dimension of the feature vector, and the text semantic feature context association scale under the global feature dimension of the feature matrix between each feature vector. For example, it can be understood that the more unbalanced the scale distribution of the context association is relative to the expression scale of the local feature set, the more unbalanced the overall expression of the two-dimensional feature matrix is. Therefore, preferably, for each function module description word feature vector in the multiple function module description word feature vectors, for example, denoted as And the two-dimensional feature matrix, for example, is recorded as Make optimizations.
[0054] In one embodiment of the present application, the multiple function module description word feature vectors are arranged into a two-dimensional feature matrix and then optimized to obtain an optimized two-dimensional feature matrix, including: calculating the optimization weight of each function module description word feature vector in the multiple function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight; weighting the multiple function module description word feature vectors with the sequence of the first optimization weights, and weighting the two-dimensional feature matrix composed of the optimized function module description word feature vectors with the second optimization weights to obtain an optimized two-dimensional feature matrix.
[0055] Specifically, calculating the optimization weight of each function module description word feature vector in the multiple function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight, including: calculating the optimization weight of each function module description word feature vector in the multiple function module description word feature vectors according to the following weight calculation formula to obtain a sequence of the first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain the second optimization weight; wherein the weight calculation formula is:
[0056] ,
[0057] in, is the first of the multiple functional module description word feature vectors Functional modules describe word feature vectors, is the eigenvector Length, is the eigenvector No. eigenvalues, Represents the feature vector The square of the second norm of is the scale of the feature matrix, is the two-dimensional feature matrix, is the two-dimensional feature matrix The eigenvalues of the locations, and represents the square of the Frobenius norm of the characteristic matrix, is the first sequence of optimized weights The first optimization weight, is the second optimization weight.
[0058] Here, the tail distribution reinforcement mechanism similar to the standard Cauchy distribution is used to constrain the correlation of the multi-level distribution structure of the feature probability density distribution in the high-dimensional feature space based on the feature scale, so that the probability density distribution of high-dimensional features with different scales can be evenly expanded in the overall probability density space, thereby compensating for the heterogeneity of probability density convergence caused by feature scale deviation. In this way, at each iteration in the training process, the weights are used. The functional module description word feature vector is weighted and the weight By weighting the two-dimensional feature matrix composed of the optimized functional module description word feature vectors, the expression convergence of the optimized two-dimensional feature matrix in the probability density domain can be improved, thereby improving the convergence of the feature probability density distribution of the functional module semantic understanding feature vector obtained by the second semantic encoder based on the convolutional neural network model, and thus improving the code quality of the generated computer code obtained by the functional module semantic understanding feature vector through a code generator based on the natural language processing model.
[0059] More specifically, in step S160, the optimized two-dimensional feature matrix is passed through a second semantic encoder based on a convolutional neural network model to obtain a semantic understanding feature vector of a functional module. That is, by passing the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model, the information expression effect of the obtained semantic understanding feature vector of the functional module can be further improved, thereby improving the code quality of the generated computer code obtained by a code generator based on a natural language processing model. In this way, the semantic information of the computer functional module can be accurately understood, and then the semantic information of the computer functional module can be automatically converted into computer program code based on artificial intelligence technology to improve the efficiency and quality of technical development.
[0060] Figure 4 FIG. 1 is a flowchart of the second semantic coding in the technology development method based on artificial intelligence technology according to an embodiment of the present application. Figure 4 As shown, in the second semantic encoding process, it includes: using each layer of the second semantic encoder based on the convolutional neural network model to perform the following on the input data in the forward pass of the layer: S310, convolution processing on the input data to obtain a convolution feature map; S320, pooling the convolution feature map based on a feature matrix to obtain a pooled feature map; and, S330, nonlinear activation on the pooled feature map to obtain an activated feature map; wherein the output of the last layer of the second semantic encoder based on the convolutional neural network model is the functional module semantic understanding feature vector, and the input of the first layer of the second semantic encoder based on the convolutional neural network model is the optimized two-dimensional feature matrix.
[0061] More specifically, in step S170, the function module semantic understanding feature vector is passed through a code generator based on a natural language processing model to generate a computer code. That is, after obtaining the semantic understanding feature information of the computer function module, the semantic information of the computer function module is automatically converted into a computer program code based on artificial intelligence technology to improve the efficiency and quality of technology development.
[0062] In summary, according to the embodiment of the present application, the technology development method based on artificial intelligence technology is explained, which uses a deep learning-based neural network model to mine the semantic understanding features of the natural language description of the computer function module, so as to accurately understand the semantic information of the computer function module, and then automatically convert the semantic information of the computer function module into computer program code based on artificial intelligence technology, so as to improve the efficiency and accuracy of technology development.
[0063] Figure 5 FIG. 1 is a block diagram of a technology development system based on artificial intelligence technology according to an embodiment of the present application. Figure 5 As shown, according to the embodiment of the present application, the technology development system 300 based on artificial intelligence technology includes: an information acquisition module 310; a word segmentation module 320; a word embedding module 330; a first semantic encoding module 340; an optimization module 350; a second semantic encoding module 360; and a code generation module 370.
[0064] Among them, the information acquisition module 310 is used to obtain the natural language description of the computer function module to be implemented; the word segmentation module 320 is used to perform word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words; the word embedding module 330 is used to pass the sequence of function module description words through the word embedding layer to obtain a sequence of function module description word embedding vectors; the first semantic encoding module 340 is used to pass the sequence of function module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain multiple function module description word feature vectors; the optimization module 350 is used to arrange the multiple function module description word feature vectors into a two-dimensional feature matrix and then optimize them to obtain an optimized two-dimensional feature matrix; the second semantic encoding module 360 is used to pass the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a function module semantic understanding feature vector; and the code generation module 370 is used to pass the function module semantic understanding feature vector through a code generator based on a natural language processing model to generate computer code.
[0065] In summary, according to the embodiment of the present application, a technology development system 300 based on artificial intelligence technology is explained, which uses a deep learning-based neural network model to mine the semantic understanding features of the natural language description of the computer function module, so as to accurately understand the semantic information of the computer function module, and then automatically convert the semantic information of the computer function module into computer program code based on artificial intelligence technology to improve the efficiency and accuracy of technology development.
[0066] As described above, the technology development system based on artificial intelligence technology according to the embodiment of the present application can be implemented in various terminal devices. In one example, the technology development system 300 based on artificial intelligence technology according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the technology development system 300 based on artificial intelligence technology can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the technology development system 300 based on artificial intelligence technology can also be one of the many hardware modules of the terminal device.
[0067] Alternatively, in another example, the technology development system 300 based on artificial intelligence technology and the terminal device may also be separate devices, and the technology development system 300 based on artificial intelligence technology may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0068] Below, reference Figure 6 To describe an electronic device according to an embodiment of the present application.
[0069] Figure 6 A block diagram of an electronic device according to an embodiment of the present application is illustrated.
[0070] like Figure 6 As shown, the electronic device 10 includes one or more processors 11 and a memory 12 .
[0071] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0072] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the functions of the technology development method based on artificial intelligence technology in each embodiment of the present application described above and / or other desired functions. Various contents such as semantic understanding feature vectors of functional modules may also be stored in the computer-readable storage medium.
[0073] In one example, the electronic device 10 may further include: an input device 13 and an output device 14 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0074] The input device 13 may include, for example, a keyboard, a mouse, etc.
[0075] The output device 14 can output various information to the outside, including computer codes, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0076] Of course, to simplify, Figure 6 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
[0077] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to perform the steps in the functions of the technology development method based on artificial intelligence technology according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0078] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0079] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps in the functions of the technology development method based on artificial intelligence technology according to various embodiments of the present application described in the above “Exemplary Method” section of this specification.
[0080] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0081] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0082] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0083] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0084] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0085] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A technology development method based on artificial intelligence technology, characterized in that: include: Obtaining a natural language description of a computer function module to be implemented; Performing word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words; Passing the sequence of function module description words through a word embedding layer to obtain a sequence of function module description word embedding vectors; Passing the sequence of the functional module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors; Arranging the plurality of functional module description word feature vectors into a two-dimensional feature matrix and then optimizing it to obtain an optimized two-dimensional feature matrix; Passing the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a semantic understanding feature vector of a functional module; as well as The semantic understanding feature vector of the functional module is passed through a code generator based on a natural language processing model to generate a computer code; The step of arranging the feature vectors of the multiple functional module description words into a two-dimensional feature matrix and then optimizing the matrix to obtain an optimized two-dimensional feature matrix includes: Calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight; The plurality of function module description word feature vectors are weighted by the sequence of the first optimization weights, and the two-dimensional feature matrix composed of the optimized function module description word feature vectors is weighted by the second optimization weights to obtain an optimized two-dimensional feature matrix; Wherein, calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight, comprises: calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors according to the following weight calculation formula to obtain a sequence of the first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain the second optimization weight; Wherein, the weight calculation formula is: Among them, V i is the i-th functional module description word feature vector among the plurality of functional module description word feature vectors, L is the feature vector V i The length, v ij is the eigenvector V i The jth eigenvalue of Denotes the feature vector V i The square of the second norm, S is the scale of the feature matrix, M is the two-dimensional feature matrix, m i,j is the eigenvalue of the (i, j) position in the two-dimensional feature matrix, and represents the square of the Frobenius norm of the characteristic matrix, w 1i is the i-th first optimization weight in the sequence of the first optimization weights, and w2 is the second optimization weight.
2. The technology development method based on artificial intelligence technology according to claim 1, characterized in that: The sequence of function module description words is passed through a word embedding layer to obtain a sequence of function module description word embedding vectors, including: using the word embedding layer to map each function module description word in the sequence of function module description words into a word vector to obtain a sequence of function module description word embedding vectors.
3. The technology development method based on artificial intelligence technology according to claim 2 is characterized in that: The sequence of the functional module description word embedding vectors is passed through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors, including: Arrange the sequence of the functional module description word embedding vectors in one dimension to obtain a global functional module description word feature vector; Calculate the product between the global function module description word feature vector and the transposed vector of each function module description word embedding vector in the sequence of function module description word embedding vectors to obtain multiple self-attention association matrices; Normalizing each of the plurality of self-attention association matrices to obtain a plurality of standardized self-attention association matrices; Passing each of the plurality of standardized self-attention association matrices through a Softmax classification function to obtain a plurality of probability values; Using each probability value in the plurality of probability values as a weight, weighting each function module description word embedding vector in the sequence of function module description word embedding vectors to obtain a plurality of contextual semantic function module description word feature vectors; and The multiple context semantic function module description word feature vectors are cascaded to obtain the multiple function module description word feature vectors.
4. The technology development method based on artificial intelligence technology according to claim 3 is characterized in that: The optimized two-dimensional feature matrix is passed through a second semantic encoder based on a convolutional neural network model to obtain a semantic understanding feature vector of a functional module, including: using each layer of the second semantic encoder based on the convolutional neural network model to perform the following on the input data in the forward pass of the layer: Perform convolution on the input data to obtain a convolution feature map; Performing pooling on the convolutional feature map based on a feature matrix to obtain a pooled feature map; and Performing nonlinear activation on the pooled feature map to obtain an activated feature map; Among them, the output of the last layer of the second semantic encoder based on the convolutional neural network model is the semantic understanding feature vector of the functional module, and the input of the first layer of the second semantic encoder based on the convolutional neural network model is the optimized two-dimensional feature matrix.
5. A technology development system based on artificial intelligence technology, characterized in that: include: An information acquisition module, used to obtain a natural language description of a computer function module to be implemented; A word segmentation module, used for performing word segmentation processing on the natural language description of the computer function module to be implemented to obtain a sequence of function module description words; A word embedding module, used for passing the sequence of function module description words through a word embedding layer to obtain a sequence of function module description word embedding vectors; A first semantic encoding module, used for passing the sequence of the functional module description word embedding vectors through a first semantic encoder based on a Transformer module to obtain a plurality of functional module description word feature vectors; An optimization module, used for arranging the feature vectors of the multiple functional module description words into a two-dimensional feature matrix and then optimizing it to obtain an optimized two-dimensional feature matrix; A second semantic encoding module, used for passing the optimized two-dimensional feature matrix through a second semantic encoder based on a convolutional neural network model to obtain a semantic understanding feature vector of a functional module; as well as A code generation module, used for generating computer code by passing the semantic understanding feature vector of the functional module through a code generator based on a natural language processing model; Wherein, the optimization module includes: Calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight; The plurality of function module description word feature vectors are weighted by the sequence of the first optimization weights, and the two-dimensional feature matrix composed of the optimized function module description word feature vectors is weighted by the second optimization weights to obtain an optimized two-dimensional feature matrix; Wherein, calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors to obtain a sequence of first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain a second optimization weight, comprises: calculating the optimization weight of each function module description word feature vector in the plurality of function module description word feature vectors according to the following weight calculation formula to obtain a sequence of the first optimization weights, and calculating the optimization weight of the two-dimensional feature matrix to obtain the second optimization weight; Wherein, the weight calculation formula is: Among them, V i is the i-th functional module description word feature vector among the plurality of functional module description word feature vectors, L is the feature vector V i The length, v ij is the eigenvector V i The jth eigenvalue of Denotes the feature vector V i The square of the second norm, S is the scale of the feature matrix, M is the two-dimensional feature matrix, m i,j is the eigenvalue of the (i, j) position in the two-dimensional feature matrix, and represents the square of the Frobenius norm of the characteristic matrix, w 1i is the i-th first optimization weight in the sequence of the first optimization weights, and w2 is the second optimization weight.
6. The technology development system based on artificial intelligence technology according to claim 5, characterized in that: The word embedding module is used to: use the word embedding layer to map each function module description word in the sequence of function module description words into a word vector to obtain a sequence of function module description word embedding vectors.
7. The technology development system based on artificial intelligence technology according to claim 6, characterized in that: The first semantic encoding module is used to: Arrange the sequence of the functional module description word embedding vectors in one dimension to obtain a global functional module description word feature vector; Calculate the product between the global function module description word feature vector and the transposed vector of each function module description word embedding vector in the sequence of function module description word embedding vectors to obtain multiple self-attention association matrices; Normalizing each of the plurality of self-attention association matrices to obtain a plurality of standardized self-attention association matrices; Passing each of the plurality of standardized self-attention association matrices through a Softmax classification function to obtain a plurality of probability values; Using each probability value in the multiple probability values as a weight, weighting each function module description word embedding vector in the sequence of function module description word embedding vectors to obtain multiple contextual semantic function module description word feature vectors; as well as The multiple context semantic function module description word feature vectors are cascaded to obtain the multiple function module description word feature vectors.
8. The technology development system based on artificial intelligence technology according to claim 7, characterized in that: The second semantic encoding module is used to: use each layer of the second semantic encoder based on the convolutional neural network model to respectively perform the following on the input data in the forward pass of the layer: Perform convolution on the input data to obtain a convolution feature map; Performing pooling on the convolutional feature map based on a feature matrix to obtain a pooled feature map; as well as Performing nonlinear activation on the pooled feature map to obtain an activated feature map; Among them, the output of the last layer of the second semantic encoder based on the convolutional neural network model is the semantic understanding feature vector of the functional module, and the input of the first layer of the second semantic encoder based on the convolutional neural network model is the optimized two-dimensional feature matrix.
