Method and device for determining code generation quality and efficiency evaluation value based on multiple indicators
Through multi-index evaluation methods and convolutional neural network technology, a multi-dimensional syntax tree is constructed, which solves the problem of low credibility of evaluation results under the influence of code changes in the existing technology, and enables dynamic evaluation and comparison of code generation quality and efficiency.
Patent Information
- Application Number
- CN202111333853.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-11-11
AI Technical Summary
Existing automatic code generation evaluation methods mainly evaluate static code results and ignore the impact of code changes on evaluation results, resulting in low credibility of evaluation results and inconsistent evaluation indicators, making it difficult to effectively compare different code generation models and methods.
Using a multi-index-based method, we construct a multi-dimensional syntax tree by obtaining target code and interactive data sets, use convolutional neural networks for feature learning, and output quality and efficiency evaluation values, including effectiveness, usability, reliability, maintainability, etc. Dimensional assessment.
It improves the credibility and efficiency of automatic code generation evaluation, can dynamically reflect changes in quality and efficiency during the code generation process, provides unified evaluation standards, and facilitates comparison of different code generation models and methods.
Smart Images

Figure CN114064046B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic code generation, and in particular to a method and device for determining code generation quality and efficiency evaluation values based on multiple indicators. Background Art
[0002] In related technologies, Hindle A et al. applied the traditional N-Gram model to the study of automatic code generation, used the language model N-Gram for code prediction, and evaluated the quality of automatic code generation through MRR in the experiment. Sun ZY et al. used a grammar-based structural convolutional neural network GBCNN (A Grammar-Base Structural Convolutional Neural Networks) to generate programs by predicting the grammatical rules of programming languages. In order to improve the generation effect, the hierarchical structure of the nodes in the abstract syntax tree AST was fully grasped during the convolution process. The experiment used Precision and BELU (Bilingual Evaluation Unit) indicators to evaluate the accuracy of model-generated code. Raychev V et al. combined the N-gram model with a recurrent neural network to complete the code at the Java API call level. The study evaluated the effect of the model by analyzing the Precision and Recall of the Top-K recommended code. Marc B et al. used bidirectional RNN (Recurrent Neural Networks) to learn features based on the code's abstract syntax tree AST, used gated graph neural network GGNN (Gate Graph Neural Networks) for probabilistic prediction, recommended the most appropriate code token, and used the Precision of the Top-K recommended codes to evaluate the model effect. Raychev V et al. used the serialization results of the program code's abstract syntax tree as a training data set based on a recurrent neural network, and divided the network output results into predictions of terminal symbols and predictions of non-terminal symbols. This study used the Precision and Recall indicators of the Top-K recommended codes to evaluate the quality of model-generated code. Karampatsis R et al. solved the OoV (Out Of Vocabulary) problem in code automatic generation by using a more granular division of existing tokens to form Subwor Units, used the heuristic graph search algorithm Beam Search to improve search efficiency, and evaluated the quality of model-generated code through MRR and F1-Measure. Allamanis M et al. proposed a neural probabilistic language model specifically designed for method naming problems and evaluated the quality of the model using F1-Measure.
[0003] In the research process of automatic code generation based on machine learning, the quality and efficiency of automatic code generation are currently evaluated mainly through indicators such as Precision, Recall, MRR (Mean Reciprocal Rank), F1-Measure, and BELU. Precision, also known as the precision rate, refers to the ratio of the number of codes correctly recommended by the automatic code generation tool to the total number of codes recommended by the automatic code generation tool. Recall, also known as the recall rate, is defined as the ratio between the number of codes correctly recommended by the automatic code generation tool and the total number of recommended codes actually needed by the programmer. MRR mainly reflects the quality of the recommended code results of the automatic code generation tool. The front results are better and the higher the score. If the first recommended code is successfully recommended, the score is 1; the second recommended code is successfully recommended, the score is 0.5; the nth recommendation success score is 1 / n; if there is no recommendation success score, the score is 0. F1-Measure is the weighted harmonic average of Precision and Recall. If the automatic code generation tool recommends K results after sorting, the Precision, Recall, MRR, and F-Measure of Top-K can be used to evaluate the automatic code generation performance. BELU was originally used to evaluate the quality of machine translation. It now evaluates the quality of automatically generated code by calculating how close the automatically generated code is to the real code written by humans.
[0004] Existing studies use Precision, Recall, MRR, F1-Measure, etc. as indicators for evaluating automatic code generation, which are limited to the number of automatic code generation and the correctness of the generated code for calculation, and evaluate the results of automatic code generation. This type of method mainly evaluates static automatic code generation results, ignoring the impact of the dynamic interaction between the automatic code generation tool and the programmer on the quality and efficiency of automatic code generation as the code context changes during the programming process. In addition, since the evaluation indicators of current research are not unified, it is difficult to directly convert the indicators to each other, and it is impossible to effectively compare various automatic code generation models and methods. Therefore, the quality and efficiency evaluation of automatic code generation is an urgent problem to be solved.
[0005] The evaluation method in the related art is used to evaluate the static code automatic generation results, ignoring the impact of code changes on the evaluation results, resulting in a technical problem of low credibility of the evaluation results. No effective solution has been proposed yet. Summary of the invention
[0006] The main purpose of the present invention is to provide a method and device for determining the quality and efficiency evaluation value of code generation based on multiple indicators, so as to solve the technical problem that the evaluation method in the related art evaluates the static code automatic generation results, ignores the impact of code changes on the evaluation results, and leads to low credibility of the evaluation results.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present invention, a method for determining the quality and efficiency evaluation value of code generation based on multiple indicators is provided. The invention includes: obtaining a target code, the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; obtaining an interaction data set, wherein the interaction data set includes behavioral interaction data between the target object and the code generation tool; determining a multidimensional evaluation index and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation index, wherein each characteristic value corresponds to an evaluation index of each dimension one by one, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code; determining a plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set; constructing a multidimensional syntax tree according to the target code and the characteristic data set; performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; inputting the feature parameters into an evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, wherein the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code
[0008] Furthermore, obtaining the interaction data set includes: obtaining first behavior data of the target object within a preset time period, the first behavior data at least including the number of key presses by the target object within the preset time period, the time for selecting to generate a code, the length of the input code, the deleted code, and the determined recommended code; obtaining second behavior data of the code generation tool within the preset time period, the second behavior data at least including the time when the code generation tool pops up a recommended code, the number of pop-up recommended codes, the content contained in the generated code, and the index position of the generated code; merging the first behavior data and the second behavior data into an interaction data set.
[0009] Furthermore, determining the multidimensional evaluation index and extracting multiple characteristic values corresponding to each data in the interactive data set based on the multidimensional evaluation index includes: initializing a multidimensional information list corresponding to the multidimensional evaluation index, the multidimensional information list including multiple information lists for characterizing the evaluation index of each dimension; traversing each data in the interactive data set, and extracting the characteristic value corresponding to each dimensional evaluation index in each data to obtain multiple characteristic values; storing the multiple characteristic values corresponding to each data in the information list corresponding to the characteristic value.
[0010] Furthermore, traversing each piece of data in the interactive data set and extracting the characteristic value corresponding to each dimensional evaluation indicator in each piece of data to obtain multiple characteristic values includes: extracting multiple parts of content in the target data separately, wherein the target data is any piece of data in the interactive data set; according to the target evaluation indicator, determining the symbol mark corresponding to each part of the content and obtaining multiple symbol marks, the target evaluation indicator is the indicator corresponding to any one dimension in the multi-dimensional evaluation indicators; merging the multiple symbol marks into the characteristic value corresponding to the target evaluation indicator.
[0011] Furthermore, determining the multiple characteristic values corresponding to each piece of data in the interactive data set as the characteristic data set includes: reading the multiple characteristic values stored in the multi-dimensional information list; and merging the multiple characteristic values into the characteristic data set.
[0012] Furthermore, before constructing a multidimensional syntax tree based on the target code and the characteristic data set, the method includes: determining whether the target code complies with preset syntax rules; and abstracting the target code into a single-dimensional syntax tree when the target code complies with the preset syntax rules.
[0013] Furthermore, based on the target code and the characteristic data set, constructing a multidimensional syntax tree includes: reading the characteristic data set and a preset coding value table; encoding the characteristic data set according to the preset coding value table to obtain multiple coding values; reading multiple characteristic tag vectors corresponding to the multiple coding values according to the multiple coding values and a first preset vector value table, wherein the coding values are obtained through data in a large number of characteristic data sets, and the coding values are input into a CBOW neural network model, and the vector values corresponding to the coding values are output through the CBOW neural network model, and a first preset vector value table is formed according to the vector values; obtaining multiple symbol nodes on a single-dimensional syntax tree, and reading multiple symbol node vector values corresponding to the symbol nodes according to the multiple symbol nodes and a second preset vector value table, wherein the symbol values are encoded through a large number of symbol node values to obtain coding values, and the coding values are input into the CBOW neural network model to output the vector values corresponding to the coding values, and a second preset vector value table is formed according to the vector values, and each symbol value corresponds to a vector value; combining multiple characteristic tag vectors and multiple symbol node vector values to construct a multidimensional syntax tree.
[0014] Furthermore, feature learning of the multidimensional syntax tree through a convolutional neural network to obtain feature parameters includes: respectively initializing multiple vector dimension feature detectors corresponding to evaluation indicators of multiple dimensions; controlling each vector dimension feature detector to slide on the multidimensional syntax tree and outputting multiple feature parameters, wherein the vector dimension feature detectors correspond to the feature parameters one-to-one.
[0015] Further, inputting characteristic parameters into the evaluation parameter model and controlling the evaluation parameter model to output the evaluation value includes: controlling the evaluation parameter model to output a first indicator value matrix corresponding to the quality of generating the second code, wherein the first indicator value matrix is a matrix composed of indicator values corresponding to the quality of generating the second code corresponding to multiple codes generated by the code automation generation tool, and the first indicator value matrix is a matrix with G rows and H columns; normalizing the first indicator value matrix and obtaining the generation quality indicator value corresponding to the second code column, the second code column being any code column in the generation quality indicator value matrix; calculating the proportion of the first generation quality indicator value corresponding to the second code based on the indicator value corresponding to the quality of generating the second code; calculating the first entropy value corresponding to the generation quality indicator of the second code based on the proportion of the first generation quality indicator value; calculating the first difference coefficient corresponding to the generation quality indicator of the second code based on the first entropy value; calculating the first weight corresponding to the generation quality indicator of the second code based on the first difference coefficient; and calculating the first evaluation value based on the first weight.
[0016] Further, the characteristic parameters are input into the evaluation parameter model, and the evaluation parameter model is controlled to output an evaluation value, including: controlling the evaluation parameter model to output a second indicator value matrix corresponding to the efficiency of generating the second code, wherein the second indicator value matrix is a matrix of G rows and H columns; normalizing the second indicator value matrix and obtaining a generation efficiency indicator value corresponding to the second code column, the second code column being any code column in the generation efficiency indicator value matrix; calculating a proportion of a second generation efficiency indicator value corresponding to the second code based on the efficiency indicator value of generating the second code; calculating a second entropy value corresponding to the generation efficiency index of the second code based on the proportion of the second generation efficiency indicator value; calculating a second difference coefficient corresponding to the generation efficiency index of the second code based on the second entropy value; calculating a second weight corresponding to the generation efficiency index of the second code based on the second difference coefficient; and calculating a second evaluation value based on the second weight.
[0017] Furthermore, the first evaluation value includes multiple first sub-evaluation values, which are respectively used to evaluate multiple first dimensions corresponding to the quality of code generated by the code generation tool, and the multiple first dimensions include at least the following dimensions: effectiveness dimension, usability dimension, reliability dimension, maintainability dimension and standardization dimension; the second evaluation value includes multiple second sub-evaluation values, which are respectively used to evaluate multiple second dimensions corresponding to the efficiency of code generated by the code generation tool, and the multiple second dimensions include at least the following dimensions: spatial dimension, temporal dimension and assistance dimension.
[0018] In order to achieve the above objective, according to another aspect of the present invention, a device for determining a code generation quality and efficiency evaluation value based on multiple indicators is provided. The device comprises: a first acquisition unit, used for acquiring a target code, the target code comprises a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; a second acquisition unit, used for acquiring an interaction data set, wherein the interaction data set comprises behavioral interaction data between the target object and the code generation tool; a first determination unit, used for determining a multidimensional evaluation index and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation index, wherein each characteristic value corresponds to an evaluation index of each dimension one by one, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code; a second determination unit, used for determining the plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set; a construction unit, used for constructing a multidimensional syntax tree according to the target code and the characteristic data set; a learning unit, used for performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; a first control unit, used for inputting a feature parameter value into an evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value, wherein the evaluation value comprises a first evaluation value and a second evaluation value, wherein the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code.
[0019] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer-readable storage medium is provided, and the computer-readable storage medium includes a stored program, which controls the device where the computer-readable storage medium is located when the program is running. The above-mentioned method for determining the code generation quality and efficiency evaluation value based on multiple indicators.
[0020] In order to achieve the above object, according to another aspect of the present invention, a processor is provided, the processor is used to run a program, and when the program is running, the method for determining the code generation quality and efficiency evaluation value based on multiple indicators is executed.
[0021] The present invention adopts the following steps: obtaining a target code, the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; obtaining an interaction data set, wherein the interaction data set includes behavioral interaction data between the target object and the code generation tool; determining a multidimensional evaluation index and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation index, wherein each characteristic value corresponds to an evaluation index of each dimension one by one, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code; determining a plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set; constructing a multidimensional syntax tree according to the target code and the characteristic data set; performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; inputting feature parameters into an evaluation parameter model, and controlling the evaluation parameter model to output evaluation values, wherein the evaluation values include a first evaluation value and a second evaluation value, wherein the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code, thereby solving the technical problem that the evaluation method in the related art evaluates the static code automatic generation result, ignores the influence of the code change on the evaluation result, and leads to low credibility of the evaluation result, thereby improving the generation efficiency of the automatic generation code. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0023] Figure 1 is a flowchart of a method for determining code generation quality and efficiency evaluation values based on multiple indicators provided according to an embodiment of the present invention; and
[0024] Figure 2 is a schematic diagram of the structure of a multidimensional syntax tree provided according to an embodiment of the present invention;
[0025] Figure 3 It is a schematic diagram of a device for determining code generation quality and efficiency evaluation values based on multiple indicators according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present invention described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] For the convenience of description, some nouns or terms involved in the embodiments of the present invention are explained below:
[0030] Continuous Bag-Of-Words Model: CBOW neural network model;
[0031] ProgramerBehavior: programmer behavior;
[0032] ToolBehavior: Code automatic generation tool behavior;
[0033] PeriodShow: The code generation tool pops up recommended code time;
[0034] ToolGenNums: the number of recommended codes that pop up;
[0035] ToolGenCodes: The generated code contains the content;
[0036] ToolGenIndex: the index position of the generated code;
[0037] CodeInput: Input code before triggering the automatic code generation action;
[0038] CodeSelection: Selected generated code;
[0039] SelectionTimes: Select the number of keystrokes used to generate the code;
[0040] CodeSource: Select the source of generated code;
[0041] TimeTaken: Select the time taken to generate the code;
[0042] CodeDeleted: Deleted code after the code is generated;
[0043] ToolGenCodes: Generated code;
[0044] ToolGenNums: the number of generated codes;
[0045] ToolGenCodes: Generate code;
[0046] ToolGenIndex: the index position in the recommended list where the generated code is located;
[0047] PeriodShow: The time interval from when the programmer types the code to when the code suggestion list is displayed;
[0048] InfoValidity: validity information list;
[0049] InfoUsability: A list of usability information;
[0050] InfoReliability: reliability information list;
[0051] InforNormality: List of normative information;
[0052] InfoMaintainability: maintainability information list;
[0053] InfoSpace: space efficiency information list;
[0054] InfoEfficiency: time efficiency information list;
[0055] InfoAssistant: list of assistive information;
[0056] Validity: validity;
[0057] InfoValidity: Validity dimension;
[0058] InfoUsability: usability dimension;
[0059] InfoReliability: reliability dimension;
[0060] InfoNormality: normative dimension;
[0061] InfoMaintainability: Maintainability dimension;
[0062] InfoSpace: spatial efficiency dimension;
[0063] InfoEfficiency: time efficiency dimension;
[0064] InfoAssistant: Assistance;
[0065] FeatureVec: feature label vector;
[0066] NodeVec: code symbol node vector;
[0067] EmbValidity: validity dimension vector value;
[0068] EmbUsability: Availability dimension vector value:
[0069] EmbReliability: reliability dimension vector value;
[0070] EmbNormality: normative dimension vector value;
[0071] EmbMainability: maintainability dimension vector value;
[0072] EmbSpace: spatial dimension vector value;
[0073] EmbEfficiency: temporal dimension vector value;
[0074] EmbAssistant: assistive dimension vector value;
[0075] NodeList: code symbol node type list;
[0076] NodeCurrentTree: node type list;
[0077] AST: Syntax tree.
[0078] According to an embodiment of the present invention, a method for determining a code generation quality and efficiency evaluation value based on multiple indicators is provided.
[0079] Figure 1 1 is a flowchart of a method for determining code generation quality and efficiency evaluation values based on multiple indicators according to an embodiment of the present invention. Figure 1 As shown, the invention comprises the following steps:
[0080] Step S101, obtaining a target code, where the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object;
[0081] Step S102, obtaining an interaction data set, wherein the interaction data set includes behavior interaction data between the target object and the code generation tool;
[0082] Step S103, determining a multidimensional evaluation index and extracting a plurality of characteristic values corresponding to each piece of data in the interactive data set according to the multidimensional evaluation index, wherein each characteristic value corresponds one-to-one to an evaluation index of each dimension, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code;
[0083] Step S104, determining a plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set;
[0084] Step S105, constructing a multidimensional syntax tree according to the target code and the characteristic data set;
[0085] Step S106, performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters;
[0086] Step S107, input the characteristic parameter into the evaluation parameter model, and control the evaluation parameter model to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code.
[0087] The present application proposes a method for determining the quality and efficiency evaluation value of code generation based on multiple indicators. The method collects the interaction information between the programmer and the automatic code generation tool during the programming process, extracts the programmer behavior information data and the automatic code generation tool behavior data, and analyzes the quality and efficiency characteristics of the interaction between the programmer and the automatic code generation tool reflected in the data.
[0088] In this method, multiple indicators of code automatic generation quality and efficiency are defined, and a multi-dimensional abstract syntax tree is established based on the characteristics of multiple indicators and combined with the code context. A convolutional neural network based on a tree structure is used to perform feature learning on the multi-dimensional abstract syntax tree, and the trained parameter model is used to evaluate the quality and efficiency of code automatic generation. In summary, the present invention can effectively analyze the interaction between programmers and code automatic generation tools during the programming process, and effectively evaluate the quality and efficiency of code automatic generation from multiple indicator dimensions.
[0089] Optionally, obtaining the interaction data set includes: obtaining first behavior data of the target object within a preset time period, the first behavior data at least including the number of key presses by the target object within the preset time period, the time for selecting to generate a code, the length of the input code, the deleted code, and the determined recommended code; obtaining second behavior data of the code generation tool within the preset time period, the second behavior data at least including the time when the code generation tool pops up a recommended code, the number of pop-up recommended codes, the content contained in the generated code, and the index position of the generated code; and merging the first behavior data and the second behavior data into an interaction data set.
[0090] Specifically, the formation of the data set includes the following steps:
[0091] Step 1.1, set i equal to 1, execute Step 1.2; Step 1.2, determine whether the programmer enters the Enter key, if yes, execute Step 1.3, otherwise execute Step 1.7; Step 1.3, convert the programmer behavior information, including: CodeInput, CodeSelection, SelectionTimes, CodeSource, TimeTaken, CodeDeleted and the code automatic generation tool behavior information, the code automatic generation tool behavior information includes: ToolGenCodes, ToolGenNums, ToolGenCodes, ToolGenIndex, PeriodShow and code text content Codes into data record Di, execute Step 1.4; S tep1.4, determine whether the programming is completed, if yes, execute Step1.5, otherwise execute Step1.6; Step1.5, merge all data records into data set D, and enter Step2; Step1.6, i=i+1, execute Step1.2; Step1.7, collect the input code before triggering the automatic code generation action, the selected generated code, the number of key presses used to select the generated code source, the time used to select the generated code, and the deletion code after the generated code in the programmer's behavior information, and execute Step1.8; Step1.8, collect the generated code, the number of generated codes, the generated code, the index position of the generated code in the recommended list, and the time interval from the programmer typing the code to the display of the code recommendation list in the code automatic generation tool behavior information, and execute Step1.2.
[0092] Optionally, determining a multidimensional evaluation indicator and extracting multiple characteristic values corresponding to each data in the interactive data set based on the multidimensional evaluation indicator includes: initializing a multidimensional information list corresponding to the multidimensional evaluation indicator, the multidimensional information list including multiple information lists for characterizing the evaluation indicators of each dimension; traversing each data in the interactive data set, and extracting the characteristic value corresponding to each dimensional evaluation indicator in each data to obtain multiple characteristic values; storing the multiple characteristic values corresponding to each data in the information list corresponding to the characteristic value.
[0093] Specifically, determining a plurality of characteristic values comprises the following steps:
[0094] Step 2.1: Initialize the validity information list, usability information list, reliability information list, standardization information list, maintainability information list, space efficiency information list, time efficiency information list, and assistance information list.
[0095] Step 2.2: Input the interactive data set D, set i to 1, point to the i-th record Di, and execute Step 2.3;
[0096] Step 2.3, determine whether i is less than or equal to the total number of entries in D, if yes, execute Step 2.4, otherwise execute Step 2.34;
[0097] Step2.4, extract the characteristic value according to CodeSource in Di, store it in InfoValidity, and execute Step2.5;
[0098] Step 2.5, determine whether the CodeSource content comes from the code automatic generation recommendation list, if yes, execute Step 2.6, otherwise execute Step 2.7;
[0099] Step 2.6, mark the Validity index value as high. If the Validity index value is between 0.75 and 1.0, it is considered a high index value. Execute Step 2.8;
[0100] Step 2.7, mark the Validity index value as low. If the Validity index value is between 0 and 0.2, it is considered a low index value. Execute Step 2.8;
[0101] Step 2.8, extract the Usability characteristic value from CodeInput, SelectionTimes, ToolGenIndex, ToolGenNums, and TimeTaken in Di and store it in InfoUsability, mark the Usability indicator value, and execute Step 2.9;
[0102] Step 2.9, Generate the Reliability attribute value according to the value of the maximum nested number MaxNestNum of Codes in Di, store it in InfoReliability, and execute Step 2.10;
[0103] Step 2.10, determine whether the value of MaxNestNum is less than 2, if so, execute Step 2.11, otherwise execute 2.12;
[0104] Step 2.11, mark the reliability index value as high. The reliability index value between 0.75 and 1.0 is considered high, and execute Step 2.13;
[0105] Step 2.12, mark the reliability index value as low. The reliability index value between 0 and 0.2 is considered low, and execute Step 2.13;
[0106] Step 2.13, perform AST analysis according to the Codes in Di, extract the Normality feature value, store it in InforNormality, and execute Step 2.14;
[0107] Step 2.14, determine whether Codes can successfully build an abstract syntax tree, if yes, execute Step 2.15, otherwise execute Step 2.16;
[0108] Step 2.15, mark the Normality index value as high. The Normality index value is between 0.75 and 1.0, which is considered high. Execute Step 2.17;
[0109] Step 2.16, mark the Normality index value as low. The Normality index value between 0 and 0.2 is considered low. Execute Step 2.17;
[0110] Step 2.17, extract the Maintainability attribute value according to CodeDeleted in Di, store it in InfoMaintainability, and execute Step 2.18;
[0111] Step 2.18, determine whether the length of the CodeDeleted string is less than 4, if yes, execute Step 2.19, otherwise execute Step 2.20;
[0112] Step 2.19, mark the value of Maintainability as high. The value of the Maintainability index is between 0.75 and 1.0, which is a high index value. Execute Step 2.21;
[0113] Step 2.20, mark the value of Maintainablity as low. The value of the Maintainability index is between 0 and 0.2, which is a low index value. Execute Step 2.21;
[0114] Step 2.21, extract the Space feature value according to the Token value in CodeSelection in Di, store it in InfoSpace, and execute Step 2.22;
[0115] Step 2.22, determine whether the Token in CodeSelection is less than 2, if yes, execute Step 2.23, otherwise execute Step 2.24;
[0116] Step 2.23, mark the Space index value as high. If the Space index value is between 0.75 and 1.0, it is considered high. Execute Step 2.25;
[0117] Step 2.24, mark the Space index value as low. If the Space index value is between 0 and 0.2, it is considered a low index value. Execute Step 2.25;
[0118] Step 2.25, extract the Efficiency characteristic value according to TimeTaken in Di, store it in InfoEfficiency, and execute Step 2.26;
[0119] Step 2.26, determine whether the TimeTaken time is less than 1000ms (milliseconds), if yes, execute Step 2.27; otherwise, execute Step 2.28;
[0120] Step 2.27, mark the Efficiency index value as high. If the value of the Efficiency index is between 0.75 and 1.0, the index value is high. Execute Step 2.29;
[0121] Step 2.28, mark the Efficiency index value as low. The value of the Efficiency index between 0 and 0.2 is considered low, and execute Step 2.29;
[0122] Step 2.29, extract the Assistant feature value according to the code length of CodeSelection in Di, store it in InfoAssistant, and execute Step 2.30;
[0123] Step 2.30, determine whether the character of CodeSelection is less than 5, if yes, execute Step 2.31, otherwise execute Step 2.32;
[0124] Step 2.31, mark the Assistant index value as high. The Assistant index value between 0.75 and 1.0 is considered high. Execute Step 2.33;
[0125] Step 2.32, mark the Assistant index value as low. If the Assistant index value is between 0 and 0.2, it is considered a low index value. Execute Step 2.33;
[0126] Step 2.33, i = i + 1, execute Step 2.3;
[0127] Step 2.34. Combine the effectiveness dimension, usability dimension, reliability dimension, InfoNormality dimension, maintainability dimension, space efficiency dimension, time efficiency dimension, and assistivity to form the characteristic data set P.
[0128] Optionally, traversing each piece of data in the interactive data set and extracting the characteristic value corresponding to each dimensional evaluation indicator in each piece of data to obtain multiple characteristic values includes: extracting multiple parts of content in the target data separately, wherein the target data is any piece of data in the interactive data set; determining the symbol mark corresponding to each part of the content based on the target evaluation indicator and obtaining multiple symbol marks, wherein the target evaluation indicator is the indicator corresponding to any one dimension in the multi-dimensional evaluation indicators; and merging the multiple symbol marks into the characteristic value corresponding to the target evaluation indicator.
[0129] Specifically, taking D1 as an example, the content of CodeInput1 in D1 is the character "pr", the first part of the characteristic value of Usability is extracted and marked as the symbol "a"; the content of SelectionTimes1 is "1", the second part of the characteristic value of Usability is extracted and marked as the symbol "c"; the content of ToolGenIndex1 is [0,1,2,3,4,5,6,7,8], the third part of the characteristic value of Usability is extracted and marked as the symbol "f"; the content of ToolGenNums1 is "8", the fourth part of the characteristic value of Usability is extracted and marked as the symbol "e"; the content of TimeTaken1 is "875", the fifth part of the characteristic value of Usability is extracted and marked as the symbol "b"; and the symbol "acfeb" is stored in InfoUsability1, and the characteristic values "acfeb" extracted by CodeInput1, SelectionTimes1, ToolGenIndex1, ToolGenNums1, and TimeTaken1 are merged to form the characteristic value "acfeb".
[0130] At the same time, taking D2 as an example, the content of CodeInput2 in D2 is the character "i", the first part of the characteristic value of Usability is extracted and marked as the symbol "b"; the content of SelectionTimes2 is "2", the second part of the characteristic value of Usability is extracted and marked as the symbol "d"; the content of ToolGenIndex2 is [0,1,2], the third part of the characteristic value of Usability is extracted and marked as the symbol "e"; the content of ToolGenNums2 is "3", the fourth part of the characteristic value of Usability is extracted and marked as the symbol "b"; the content of TimeTaken2 is "1006", the fifth part of the characteristic value of Usability is extracted and marked as the symbol "c"; and the symbol "bdebc" is stored in InfoUsability, merging the characteristic values "bdebc" extracted by CodeInput2, SelectionTimes2, ToolGenIndex2, ToolGenNums2, and TimeTaken2.
[0131] Optionally, determining the multiple characteristic values corresponding to each piece of data in the interaction data set as the characteristic data set includes: reading the multiple characteristic values stored in the multi-dimensional information list; and merging the multiple characteristic values into the characteristic data set.
[0132] The characteristic values stored in the multi-dimensional information list are merged, that is, the characteristic values stored in InfoValidity, InfoUsability, InfoReliability, InfoNOrmality, InfoMaintainability, InfoSpace, InfoEfficiency, and InfoAssisitant are merged to form a characteristic data set P, wherein the characteristic data set P is shown in Table 1 below:
[0133]
[0134]
[0135] Optionally, before constructing a multidimensional syntax tree based on the target code and the characteristic data set, the method includes: determining whether the target code complies with preset syntax rules; and abstracting the target code into a single-dimensional syntax tree if the target code complies with the preset syntax rules.
[0136] It should be noted that the target code can only be abstracted into a single-dimensional syntax tree if it conforms to the preset syntax rules.
[0137] Optionally, constructing a multidimensional syntax tree based on the target code and the characteristic data set includes: reading the characteristic data set and a preset coding value table; encoding the characteristic data set according to the preset coding value table to obtain multiple coding values; reading multiple characteristic tag vectors corresponding to the multiple coding values according to the multiple coding values and a first preset vector value table, wherein the coding values are obtained through data in a large number of characteristic data sets, and the coding values are input into a CBOW neural network model, and the vector values corresponding to the coding values are output through the CBOW neural network model, and a first preset vector value table is formed according to the vector values; obtaining multiple symbol nodes on a single-dimensional syntax tree, and reading multiple symbol node vector values corresponding to the symbol nodes according to the multiple symbol nodes and a second preset vector value table, wherein the symbol values are encoded through a large number of symbol node values to obtain coding values, and the coding values are input into the CBOW neural network model to output the vector values corresponding to the coding values, and a second preset vector value table is formed according to the vector values, and each symbol value corresponds to a vector value; combining multiple characteristic tag vectors and multiple symbol node vector values to construct a multidimensional syntax tree.
[0138] The embodiment of the present application provides a method for constructing a multidimensional syntax tree through a CBOW neural network model, which is specifically illustrated by taking the characteristic data set in Table 1 as an example. In the CBOW neural network model, the One-Hot coding value tables ValidityMap, UsabilityMap, ReliabilityMap, NormalityMap, MaintainabilityMap, SpaceMap, EfficiencyMap, and AssistantMap are input to generate One-Hot coding values for InfoValidity, InfoUsability, InfoReliability, InfoNormality, InfoMaintainability, InfoSpace, InfoEfficiency, and InfoAssistant, wherein the generated coding system is specifically shown in Table 2:
[0139] Information List One-hot encoded values InfoValidity {'a':0,'a':0,'b':2} InfoUsability {'acfeb':5,'bdebc':89,'cafdd':127} ReliabilityInfo {'a':1,'a':1,'b':2} InfoNormality {'a':0,'a':0,'b':1} InfoMaintainability {'f':4,'e':0,'c':3} InfoSpace {'a':0,'b':4,'f':1} InfoEfficiency {'a':1,'b':2,'d':3} InfoAssisitant {'e':3,'a':1,'f':4}
[0140] Set the input layer InputProperty = [] of the CBOW neural network model, input the feature tag vector (FeatureVec), the code symbol node vector (NodeVec), and according to the One-Hot encoding values of InfoValidity, InfoUsability, InfoReliability, InfoNormality, InfoMaintainability, InfoSpace, InfoEfficiency, and InfoAssistant, FeatureVec completes feature vectorization, generates EmbValidity, EmbUsability, EmbReliability, EmbNormality, EmbMainability, EmbSpace, EmbEfficiency, and EmbAssistant, and adds them to InputProperty.
[0141] Extract all the Codes in D, specifically Codes1 is "defgetMax(data):print("begin!")", Codes2 is "defgetMmax(data):print("begin!")ifdata>5:print(data)", Codes3 is "defgetMmax(data):print("begin!")ifdata>5:ifdata<10:print(data)elsepass", parse them into 3 abstract syntax trees AST, and store the 3 ASTs in the queue QueueTree.
[0142] Step 3.7, initialize the code symbol node type list NodeList = [], execute Step 3.8;
[0143] Step3.8, determine if QueueTree is not empty, and execute Step3.11;
[0144] Step 3.11, store the first element of QueueTree into the node type list (NodeCurrentTree), take out its root node Module and put it into the node queue NodeList, and execute Step 3.13;
[0145] Step3.13, make sure NodeCurrentTree is not empty, and execute Step3.14;
[0146] Step3.14, the first element of NodeCurrentTree is dequeued, which is the root node (Module), and all the child nodes Children of the root node are traversed, Children = ['FunctionDef', 'arguments', 'arg', 'Expr', 'Call', 'Name', 'Load', 'Str'], and the Children node is added to the queue NodeList, and Step3.13 is executed;
[0147] Step3.13, determine if NodeCurrentTree is empty, and execute Step3.8;
[0148] Step3.8, determine if QueueTree is not empty, and execute Step3.11;
[0149] Step 3.11, store the first element of QueueTree into the node type list NodeCurrentTree, take out its root node Module and put it into the node queue NodeList, and execute Step 3.13;
[0150] Step3.13, determine if NodeCurrentTree is not empty, and execute Step3.14;
[0151] Step3.14, the first element of NodeCurrentTree is dequeued, which is the root node Module, and all the child nodes Children of the root node Module are traversed, Children = ['FunctionDef', 'arguments', 'arg',: 'Expr', 'Call', 'Name', 'Load', 'Str', 'If', 'Compare', 'Name', 'Load', 'Gt', 'Num', 'Expr', 'Call', 'Name', 'Load', 'Name', 'Load'], add the Children node to the queue NodeList, and execute Step3.13;
[0152] Step3.13, determine if NodeCurrentTree is empty, and execute Step3.8;
[0153] Step3.8, determine if QueueTree is not empty, and execute Step3.11;
[0154] Step 3.11, store the first element of QueueTree into the node type list NodeCurrentTree, take out its root node Module and put it into the node queue NodeList, and execute Step 3.13;
[0155] Step3.13, determine if NodeCurrentTree is not empty, and execute Step3.14;
[0156] Step3.14, the first element of NodeCurrentTree is dequeued, which is the root node Module, and all the child nodes Children of the root node Module are traversed, Children = ['FunctionDef', 'arguments', 'arg', 'Expr', 'Call', 'Name', 'Load', 'Str', 'If', 'Compare', 'Name', 'Load', 'Gt', 'Num', 'Expr', 'Call', 'Name', 'Load', 'Name', 'Load', 'Pass'], add the Children node to the queue NodeList, and execute Step3.13;
[0157] Step3.13, determine if NodeCurrentTree is empty, and execute Step3.8;
[0158] Step3.8, determine if QueueTree is empty, and execute Step3.9;
[0159] Step3.9, get the One-Hot encoding value MapValue for all nodes in NodeList, as shown in Table 12, and execute Step3.10;
[0160] Step 3.10, according to MapValue, match NodeVec, generate the code symbol node type vector value NodeTypeVec, and according to the context of the code in the data set D, establish a multidimensional syntax tree based on the code automatic generation quality and efficiency evaluation index. The schematic diagram of the constructed multidimensional syntax tree is as follows Figure 2 shown.
[0161] Optionally, performing feature learning on a multidimensional syntax tree through a convolutional neural network to obtain feature parameters includes: respectively initializing multiple vector dimension feature detectors corresponding to evaluation indicators of multiple dimensions; controlling each vector dimension feature detector to slide on the multidimensional syntax tree and outputting multiple feature parameters, wherein the vector dimension feature detectors correspond to the feature parameters one-to-one.
[0162] Specifically, the model used in the present invention is derived from the use of a fully connected convolutional neural network to perform feature learning on a multi-dimensional syntax tree, and a multi-index code automatic generation quality and efficiency evaluation parameter model is generated. The model is a node vector feature detector that undergoes multiple convolutions to generate a multi-index code automatic generation quality and efficiency evaluation parameter model, wherein multiple vector dimension feature detectors corresponding to evaluation indicators of multiple dimensions are initialized respectively; each vector dimension feature detector is controlled to traverse each tree node on the multi-dimensional syntax tree and output multiple feature parameters, specifically including the following steps:
[0163] Step 4.1, load the multi-index code to automatically generate the quality and efficiency evaluation parameter model, specifically load the model parameters and execute step 4.2;
[0164] Step 4.2: Initialize the feature detectors corresponding to the code symbol node type vector dimension, effectiveness dimension, usability dimension, reliability dimension, standardization dimension, maintainability dimension, space efficiency dimension, time efficiency dimension, and assistance dimension. The specific steps are as follows:
[0165] Initializing the validity dimension feature detector includes:
[0166] W t conv_validity ,Wl conv_validity ,W r conv_validity ,b conv_validity
[0167] , where t, l, and r represent the root, left, and right, respectively. t conv_validity Represents code symbol node type vector dimension root node feature detector W l conv_validity Represents the code symbol node type vector dimension left child node feature detector, W r conv_validity Represents the code symbol node type vector dimension right child node feature detector, b conv_validity Represents the code symbol node type vector dimension feature detector bias parameter;
[0168] Step 4.3: In the same manner as in step 4.2, initialize the feature detectors corresponding to the effectiveness dimension, usability dimension, reliability dimension, standardization dimension, maintainability dimension, space efficiency dimension, time efficiency dimension, and assistance dimension respectively.
[0169] Step 4.4: Use the above-mentioned multiple feature detectors to slide in the multidimensional syntax tree. The specific steps are as follows:
[0170] Use the validity dimension validity dimension feature detector to slide in the multidimensional syntax tree. The validity dimension validity dimension feature detector outputs y_Validity each time:
[0171] Use the Validity dimension feature detector to slide in MAST. The Validity dimension feature detector outputs y_Validity each time as:
[0172]
[0173] in, and y_validity means that i represents the i-th node in the multidimensional syntax tree.
[0174] For any node in the AST node vector dimension feature detector, its weight parameter W conv_validity,i W t conv_validity ,W l conv_validity ,W r conv_validity ,b conv_validity The linear combination of the node feature detector weight coefficients are and in:
[0175]
[0176]
[0177]
[0178] Among them, d i is the position of node i in the root node feature detector; d is the window depth; p i is the position of node i in the right child node feature detector, validity_b i is the feature detector p of the right child node as the availability dimension i The total number of sibling nodes.
[0179] Step 4.5, use the above-mentioned multidimensional feature detector to traverse the multidimensional syntax tree in turn to obtain the corresponding feature parameters, specifically y_token, y_Validity, y_Usability, y_Reliability, y_Normality, y_Maintainability, y_Space, y_Efficiency, y_Assistant.
[0180] Optionally, inputting characteristic parameters into a value evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value includes: controlling the evaluation parameter model to output a first indicator value matrix corresponding to the quality of generating the second code, wherein the first indicator value matrix is a matrix composed of indicator values corresponding to the quality of generating the second code corresponding to multiple codes generated by the code automation generation tool, and the first indicator value matrix is a matrix with G rows and H columns; normalizing the first indicator value matrix and obtaining the generation quality indicator value corresponding to the second code column, the second code column being any code column in the generation quality indicator value matrix; calculating the proportion of the first generation quality indicator value corresponding to the second code based on the indicator value corresponding to the quality of generating the second code; calculating the first entropy value corresponding to the generation quality indicator of the second code based on the proportion of the first generation quality indicator value; calculating the first difference coefficient corresponding to the generation quality indicator of the second code based on the first entropy value; calculating the first weight corresponding to the generation quality indicator of the second code based on the first difference coefficient; and calculating the first evaluation value based on the first weight.
[0181] As described above, the features learned by the feature detector are output by a fully connected neural network. The G-row and H-column codes output by the fully connected neural network automatically generate a matrix M whose quality and efficiency index values are represented as G*H. The specific steps are to normalize M, and the calculation method is as follows:
[0182]
[0183] Among them, x gh Indicates that the code in row g and column h in M automatically generates the quality index value, min(x h ) is the minimum value of the quality index automatically generated by the h-th column code in M, max(x h ) is represented as the maximum value of the automatic code generation quality index value in the hth column of M, and Step 5.6 is executed; wherein, g = 1, 2, ... G; h = 1, 2, ... H; the proportion p of the automatic code generation quality index value of the gth item in the automatic code generation quality index of M is calculated. gh , Calculate the entropy value e of the h-th code automatically generated quality index in M h , Calculate the coefficient of difference F of the quality index of the automatic generation of the h-th column code in M n , F n =1-e h , calculate the weight W of the h-th top code automatic generation quality index in M h , Calculate the g-th line of code in M to automatically generate a quality assessment value of Q g , M gh Represents the g-th row and h-th column of M after normalization.
[0184] Optionally, inputting characteristic parameters into an evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value includes: controlling the evaluation parameter model to output a second indicator value matrix corresponding to the efficiency of generating the second code, wherein the second indicator value matrix is a matrix of G rows and H columns; normalizing the second indicator value matrix and obtaining a generation efficiency indicator value corresponding to a second code column, wherein the second code column is any one of the code columns in the generation efficiency indicator value matrix; calculating a proportion of a second generation efficiency indicator value corresponding to the second code based on the efficiency indicator value of generating the second code; calculating a second entropy value corresponding to the generation efficiency index of the second code based on the proportion of the second generation efficiency indicator value; calculating a second difference coefficient corresponding to the generation efficiency index of the second code based on the second entropy value; calculating a second weight corresponding to the generation efficiency index of the second code based on the second difference coefficient; and calculating a second evaluation value based on the second weight.
[0185] Specifically, M is normalized and calculated as follows:
[0186]
[0187] Among them, x gh represents the automatic generation efficiency index value of the code in the g-th row and h-th column in M, min(x h) is the minimum value of the code automatic generation efficiency index value in the hth column of M, max(x h ) is represented as the maximum value of the code automatic generation efficiency index value in the hth column of M, and Step 5.6 is executed; wherein, g = 1, 2, .... G; h = 1, 2, .... H; calculate the proportion p of the gth code automatic generation efficiency index value in the hth code automatic generation efficiency index in M. gh , Calculate the entropy value e of the h-th code automatic generation efficiency index in M h , Calculate the coefficient of difference F of the efficiency index of automatic code generation in column h of M n , F n =1-e h , calculate the weight W of the h-th top code automatic generation efficiency index in M h , Calculate the automatic generation efficiency evaluation value of the g-th line of code in M as Q g , Mgh represents the g-th row and h-th column of M after normalization.
[0188] Optionally, the first evaluation value includes multiple first sub-evaluation values, which are respectively used to evaluate multiple first dimensions corresponding to the quality of code generated by the code generation tool, and the multiple first dimensions include at least the following dimensions: effectiveness dimension, usability dimension, reliability dimension, maintainability dimension and standardization dimension; the second evaluation value includes multiple second sub-evaluation values, which are respectively used to evaluate multiple second dimensions corresponding to the efficiency of code generated by the code generation tool, and the multiple second dimensions include at least the following dimensions: spatial dimension, temporal dimension and assistance dimension. In the present application, the evaluation values for evaluating efficiency and quality obtained based on multi-dimensional evaluation indicators are divided into multiple, which are respectively used to evaluate the quality of generating the second code and the efficiency of generating the second code.
[0189] The embodiment of the present invention provides a method for determining a code generation quality and efficiency evaluation value based on multiple indicators, which comprises obtaining a target code, wherein the target code comprises a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; obtaining an interaction data set, wherein the interaction data set comprises behavioral interaction data between the target object and the code generation tool; determining a multidimensional evaluation indicator and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation indicator, wherein each characteristic value corresponds to an evaluation indicator of each dimension one by one, wherein the multidimensional evaluation indicator is used to evaluate the quality and efficiency of generating the second code; and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set. The method comprises the following steps: determining the property value as a characteristic data set; constructing a multidimensional syntax tree according to the target code and the characteristic data set; performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain characteristic parameters; inputting the characteristic parameters into a value evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value, wherein the evaluation value comprises a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code, thereby solving the technical problem that the evaluation method in the related art evaluates the static code automatic generation result, ignores the influence of the code change on the evaluation result, and leads to low credibility of the evaluation result, thereby improving the generation efficiency of the automatic generated code.
[0190] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0191] The embodiment of the present invention also provides a device for determining the quality and efficiency evaluation value of code generation based on multiple indicators. It should be noted that the device for determining the quality and efficiency evaluation value of code generation based on multiple indicators in the embodiment of the present invention can be used to execute the method for determining the quality and efficiency evaluation value of code generation based on multiple indicators provided by the embodiment of the present invention. The following introduces a device for determining the quality and efficiency evaluation value of code generation based on multiple indicators provided by the embodiment of the present invention.
[0192] Figure 3 Schematic diagram of a device for determining code generation quality and efficiency evaluation values based on multiple indicators according to an embodiment of the present invention. Figure 3As shown, the device includes: a first acquisition unit 301, used to acquire a target code, the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; a second acquisition unit 302, used to acquire an interaction data set, wherein the interaction data set includes behavioral interaction data between the target object and the code generation tool; a first determination unit 303, used to determine a multidimensional evaluation index and extract a plurality of characteristic values corresponding to each data in the interaction data set according to the multidimensional evaluation index, wherein each characteristic value corresponds to an evaluation index of each dimension one by one, wherein the multidimensional evaluation index is used to evaluate the quality of the generated second code and efficiency; a second determining unit 304, used to determine multiple characteristic values corresponding to each data in the interactive data set as a characteristic data set; a constructing unit 305, used to construct a multidimensional syntax tree according to the target code and the characteristic data set; a learning unit 306, used to perform feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; a first control unit 307, used to input the characteristic parameter value into an evaluation parameter model, and control the evaluation parameter model to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code.
[0193] Optionally, the second acquisition unit 302 includes: a first acquisition sub-unit, used to acquire first behavior data of the target object within a preset time period, the first behavior data at least including the number of key presses by the target object within the preset time period, the time for selecting to generate a code, the length of the input code, the deleted code, and the determined recommended code; a second acquisition sub-unit, used to acquire second behavior data of the code generation tool within the preset time period, the second behavior data at least including the time when the code generation tool pops up a recommended code, the number of recommended codes that pop up, the content contained in the generated code, and the index position of the generated code; a first merging sub-unit, used to merge the first behavior data and the second behavior data into an interactive data set.
[0194] Optionally, the first determination unit 303 includes: a first initialization subunit, used to initialize a multidimensional information list corresponding to the multidimensional evaluation indicators, the multidimensional information list including multiple information lists for characterizing the evaluation indicators of each dimension; an extraction subunit, used to traverse each data in the interactive data set, and extract the characteristic value corresponding to each dimensional evaluation indicator in each data to obtain multiple characteristic values; a storage subunit, used to store the multiple characteristic values corresponding to each data in the information list corresponding to the characteristic value.
[0195] Optionally, the extraction subunit includes: an extraction module, used to extract multiple parts of content in the target data respectively, wherein the target data is any piece of data in the interactive data set; a determination module, used to determine the symbol mark corresponding to each part of the content and obtain multiple symbol marks based on a target evaluation indicator, wherein the target evaluation indicator is an indicator corresponding to any dimension in the multi-dimensional evaluation indicator; and a merging module, used to merge multiple symbol marks into a characteristic value corresponding to the target evaluation indicator.
[0196] Optionally, the second determining unit 304 includes: a first reading subunit, used to read multiple characteristic values stored in the multi-dimensional information list; and a second merging subunit, used to merge the multiple characteristic values into a characteristic data set.
[0197] Optionally, the device includes: a judgment unit, used to judge whether the target code conforms to preset grammatical rules before constructing a multidimensional grammatical tree based on the target code and the characteristic data set; an abstraction unit, used to abstract the target code into a single-dimensional grammatical tree when the target code conforms to the preset grammatical rules.
[0198] Optionally, the construction unit 305 includes: a second reading subunit, used to read a characteristic data set and a preset coding value table; an encoding subunit, used to encode the characteristic data set according to the preset coding value table to obtain multiple coding values; a third reading subunit, used to read multiple characteristic tag vectors corresponding to multiple coding values according to multiple coding values and a first preset vector value table, wherein the coding values are obtained through data in a large number of characteristic data sets, and the coding values are input into a CBOW neural network model, and the vector values corresponding to the coding values are output through the CBOW neural network model, and a first preset vector value table is formed according to the vector values; a fourth reading subunit, used to obtain multiple symbol nodes on a single-dimensional syntax tree, and read multiple symbol node vector values corresponding to the symbol nodes according to multiple symbol nodes and a second preset vector value table, wherein the symbol values are encoded through a large number of symbol node values to obtain coding values, and the coding values are input into the CBOW neural network model to output the vector values corresponding to the coding values, and a second preset vector value table is formed according to the vector values, and each symbol value corresponds to a vector value; a combining subunit, used to combine multiple characteristic tag vectors and multiple symbol node vector values to construct a multidimensional syntax tree.
[0199] Optionally, the learning unit 306 includes: a second initialization subunit, used to respectively initialize multiple vector dimension feature detectors corresponding to evaluation indicators of multiple dimensions; a first control subunit, used to control each vector dimension feature detector to slide on the multidimensional syntax tree and output multiple feature parameters, wherein the vector dimension feature detectors correspond to the feature parameters one-to-one.
[0200] Optionally, the first control unit 307 includes: a second control subunit, which is used to control the evaluation parameter model to output a first indicator value matrix corresponding to the quality of the second code, wherein the first indicator value matrix is a matrix composed of multiple indicator values corresponding to the quality of the second code generated by the code automation generation tool, and the first indicator value matrix is a matrix with G rows and H columns; a processing subunit, which is used to normalize the first indicator value matrix and obtain the generation quality indicator value corresponding to the second code column, and the second code column is any code column in the generation quality indicator value matrix; a first calculation subunit, which is used to calculate the proportion of the first generation quality indicator value corresponding to the second code based on the indicator value corresponding to the quality of the second code; a second calculation subunit, which is used to calculate the first entropy value corresponding to the generation quality indicator of the second code based on the proportion of the first generation quality indicator value; a third calculation subunit, which is used to calculate the first difference coefficient corresponding to the generation quality indicator corresponding to the second code based on the first entropy value; a fourth calculation subunit, which is used to calculate the first weight corresponding to the generation quality indicator of the second code based on the first difference coefficient; and a fifth calculation subunit, which is used to calculate the first evaluation value based on the first weight.
[0201] Optionally, the first control unit 307 includes: a third control subunit, used to control the evaluation parameter model to output a second indicator value matrix corresponding to the efficiency of generating the second code, wherein the second indicator value matrix is a matrix of G rows and H columns; a normalization subunit, used to normalize the second indicator value matrix and obtain the generation efficiency indicator value corresponding to the second code column, the second code column is any one of the code columns in the generation efficiency indicator value matrix, and the second target code column is generated by the code generation tool; a sixth calculation subunit, used to calculate the proportion of the second generation efficiency indicator value corresponding to the second code based on the efficiency indicator value of generating the second code; a seventh calculation subunit, used to calculate the second entropy value corresponding to the second code generation efficiency indicator based on the proportion of the second generation efficiency indicator value; an eighth calculation subunit, used to calculate the second difference coefficient corresponding to the generation efficiency indicator corresponding to the second code based on the second entropy value; a ninth calculation subunit, used to calculate the corresponding second weight of the generation efficiency indicator of the second code based on the second difference coefficient; and a tenth calculation subunit, used to calculate the second evaluation value based on the second weight.
[0202] Optionally, the first evaluation value includes multiple first sub-evaluation values, which are respectively used to evaluate multiple first dimensions corresponding to the quality of code generated by the code generation tool, and the multiple first dimensions include at least the following dimensions: effectiveness dimension, usability dimension, reliability dimension, maintainability dimension and standardization dimension; the second evaluation value includes multiple second sub-evaluation values, which are respectively used to evaluate multiple second dimensions corresponding to the efficiency of code generated by the code generation tool, and the multiple second dimensions include at least the following dimensions: spatial dimension, temporal dimension and assistance dimension.
[0203] The embodiment of the present invention provides a device for determining the quality and efficiency evaluation value of code generation based on multiple indicators. The device comprises a first acquisition unit 301 for acquiring a target code, wherein the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; a second acquisition unit 302 for acquiring an interaction data set, wherein the interaction data set includes behavioral interaction data between the target object and the code generation tool; a first determination unit 303 for determining a multidimensional evaluation indicator and extracting a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation indicator, wherein each characteristic value corresponds to an evaluation indicator of each dimension one by one, wherein the multidimensional evaluation indicator is used to evaluate the quality and efficiency of generating the second code; a second determination unit 304 for extracting each piece of data in the interaction data set. A plurality of characteristic values corresponding to the data are determined as a characteristic data set; a construction unit 305 is used to construct a multidimensional syntax tree according to the target code and the characteristic data set; a learning unit 306 is used to perform feature learning on the multidimensional syntax tree through a convolutional neural network to obtain characteristic parameters; a first control unit 307 is used to input the characteristic parameter value into an evaluation parameter model, and control the evaluation parameter model to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code, thereby solving the problem that the evaluation method in the related art is to evaluate the static code automatic generation result, ignoring the influence of the code change on the evaluation result, resulting in the technical problem of low credibility of the evaluation result, and improving the generation efficiency of the automatic generated code.
[0204] A device for determining code generation quality and efficiency evaluation values based on multiple indicators includes a processor and a memory. The above-mentioned first acquisition unit 301 and the like are stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.
[0205] The processor includes a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the kernel parameters are adjusted to solve the technical problem that the evaluation method in the related art evaluates the static code automatic generation results, ignoring the impact of code changes on the evaluation results, resulting in low credibility of the evaluation results.
[0206] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0207] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, a method for determining a code generation quality and efficiency evaluation value based on multiple indicators is implemented.
[0208] An embodiment of the present invention provides a processor, which is used to run a program, wherein a method for determining a code generation quality and efficiency evaluation value based on multiple indicators is executed when the program is running.
[0209] An embodiment of the present invention provides a device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements a method for determining a code generation quality and efficiency evaluation value based on multiple indicators when executing the program. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0210] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing steps in a method for determining a code generation quality and efficiency evaluation value based on multiple indicators.
[0211] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0212] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0213] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0214] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0215] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0216] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0217] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0218] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0219] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0220] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for determining code generation quality and efficiency evaluation values based on multiple indicators, characterized in that: include: Acquire a target code, the target code comprising a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; Acquire an interaction data set, wherein the interaction data set includes behavior interaction data between the target object and the code generation tool; Determine a multidimensional evaluation index and extract a plurality of characteristic values corresponding to each piece of data in the interactive data set according to the multidimensional evaluation index, wherein each characteristic value corresponds to the evaluation index of each dimension one by one, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code; Determine the plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set; Constructing a multidimensional syntax tree according to the target code and the characteristic data set; Performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; The characteristic parameter is input into an evaluation parameter model, and the evaluation parameter model is controlled to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code, Before constructing a multidimensional syntax tree based on the target code and the characteristic data set, the method includes: determining whether the target code conforms to a preset syntax rule; if the target code conforms to the preset syntax rule, abstracting the target code into a single-dimensional syntax tree, According to the target code and the characteristic data set, constructing a multidimensional syntax tree includes: reading the characteristic data set and a preset coding value table; according to the preset coding value table, encoding the characteristic data set to obtain multiple coding values; according to the multiple coding values and a first preset vector value table, reading multiple characteristic tag vectors corresponding to the multiple coding values, wherein the coding values are obtained through a large number of data in the characteristic data set, and the coding values are input into a CBOW neural network model, and the vector values corresponding to the coding values are output through the CBOW neural network model, and the first preset vector value table is formed according to the vector values; obtaining multiple symbol nodes on the single-dimensional syntax tree, and reading multiple symbol node vector values corresponding to the symbol nodes according to the multiple symbol nodes and a second preset vector value table, wherein the symbol values are encoded through a large number of symbol node values to obtain coding values, and the coding values are input into the CBOW neural network model to output the vector values corresponding to the coding values, and the second preset vector value table is formed according to the vector values, and each symbol value corresponds to a vector value; combining the multiple characteristic tag vectors and the multiple symbol node vector values to construct the multidimensional syntax tree.
2. The method according to claim 1, characterized in that Obtaining the interactive data set includes: Acquire first behavior data of the target object within a preset time period, wherein the first behavior data at least includes the number of key presses, the time of selecting to generate a code, the length of the input code, the deleted code, and the determined recommended code of the target object within the preset time period; Acquire second behavior data of the code generation tool within the preset time period, the second behavior data at least including the time when the code generation tool pops up a recommended code, the number of pop-up recommended codes, the content included in the generated code, and the index position of the generated code; The first behavior data and the second behavior data are combined into the interaction data set.
3. The method according to claim 1, characterized in that Determining a multidimensional evaluation index and extracting a plurality of characteristic values corresponding to each piece of data in the interactive data set according to the multidimensional evaluation index includes: Initialize a multidimensional information list corresponding to the multidimensional evaluation index, wherein the multidimensional information list includes a plurality of information lists for representing the evaluation index of each dimension; Traversing each piece of data in the interactive data set, and extracting the characteristic value corresponding to each dimension evaluation indicator in each piece of data to obtain a plurality of the characteristic values; The plurality of characteristic values corresponding to each piece of data are stored in the information list corresponding to the characteristic values.
4. The method according to claim 3, characterized in that Traversing each piece of data in the interactive data set and extracting the characteristic value corresponding to each dimension evaluation indicator in each piece of data to obtain a plurality of the characteristic values includes: Respectively extracting multiple parts of content in the target data, wherein the target data is any piece of data in the interactive data set; According to the target evaluation index, determine the symbol mark corresponding to each part of the content and obtain multiple symbol marks, wherein the target evaluation index is an index corresponding to any one dimension of the multi-dimensional evaluation index; The multiple symbol marks are combined into the characteristic value corresponding to the target evaluation index.
5. The method according to claim 3, characterized in that: Determining the plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set includes: Reading a plurality of the characteristic values stored in the multi-dimensional information list; A plurality of the characteristic values are combined into the characteristic data set.
6. The method according to claim 1, characterized in that Performing feature learning on the multidimensional syntax tree by a convolutional neural network to obtain feature parameters includes: Initialize multiple vector dimension feature detectors corresponding to the evaluation indicators of multiple dimensions respectively; Each of the vector dimension feature detectors is controlled to slide on the multidimensional syntax tree and output a plurality of the feature parameters, wherein the vector dimension feature detectors correspond to the feature parameters one by one.
7. The method according to claim 1, characterized in that Inputting the characteristic parameters into an evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value comprises: Control the evaluation parameter model to output a first indicator value matrix corresponding to the quality of generating the second code, wherein the first indicator value matrix is a matrix composed of multiple indicator values corresponding to the quality of generating the second code corresponding to multiple codes generated by the code automation generation tool, and the first indicator value matrix is a matrix with G rows and H columns; Normalizing the first indicator value matrix and obtaining a generation quality indicator value corresponding to a second code column, where the second code column is any one code column in the generation quality indicator value matrix; Calculate the proportion of the first generation quality index value corresponding to the second code according to the index value corresponding to the quality of generating the second code; Calculating a first entropy value corresponding to the second code generation quality indicator according to the proportion of the first generation quality indicator value; Calculating, according to the first entropy value, a first difference coefficient corresponding to a generation quality indicator corresponding to the second code; Calculating a first weight corresponding to a generation quality indicator of the second code according to the first difference coefficient; The first evaluation value is calculated according to the first weight.
8. The method according to claim 1, characterized in that Inputting the characteristic parameters into an evaluation parameter model, and controlling the evaluation parameter model to output an evaluation value comprises: Control the evaluation parameter model to output a second index value matrix corresponding to the efficiency of generating the second code, wherein the second index value matrix is a matrix with G rows and H columns; Normalizing the second index value matrix and obtaining a generation efficiency index value corresponding to the second code column, where the second code column is any one of the code columns in the generation efficiency index value matrix; Calculating a proportion of the second generation efficiency index value corresponding to the second code according to the efficiency index value of generating the second code; Calculating a second entropy value corresponding to the second code generation efficiency index according to the proportion of the second generation efficiency index value; Calculating, according to the second entropy value, a second difference coefficient corresponding to a generation efficiency index corresponding to the second code; Calculating a second weight corresponding to the second code generation efficiency index according to the second difference coefficient; The second evaluation value is calculated according to the second weight.
9. The method according to claim 1, characterized in that: include: The first evaluation value includes a plurality of first sub-evaluation values, and the plurality of first sub-evaluation values are respectively used to evaluate a plurality of first dimensions corresponding to the quality of the code generated by the code generation tool, and the plurality of first dimensions at least include the following dimensions: effectiveness dimension, usability dimension, reliability dimension, maintainability dimension, and standardization dimension; The second evaluation value includes multiple second sub-evaluation values, and the multiple second sub-evaluation values are respectively used to evaluate multiple second dimensions corresponding to the efficiency of code generation by the code generation tool. The multiple second dimensions include at least the following dimensions: spatial dimension, temporal dimension and assistance dimension.
10. A device for determining code generation quality and efficiency evaluation values based on multiple indicators, characterized in that: include: A first acquisition unit, configured to acquire a target code, wherein the target code includes a first code input by a target object and a second code recommended by a code generation tool and determined by the target object; A second acquisition unit is used to acquire an interaction data set, wherein the interaction data set includes behavior interaction data between the target object and the code generation tool; A first determining unit, configured to determine a multidimensional evaluation index and extract a plurality of characteristic values corresponding to each piece of data in the interaction data set according to the multidimensional evaluation index, wherein each of the characteristic values corresponds one-to-one to the evaluation index of each dimension, wherein the multidimensional evaluation index is used to evaluate the quality and efficiency of generating the second code; A second determining unit, configured to determine the plurality of characteristic values corresponding to each piece of data in the interaction data set as a characteristic data set; A construction unit, configured to construct a multidimensional syntax tree according to the target code and the characteristic data set; A learning unit, used for performing feature learning on the multidimensional syntax tree through a convolutional neural network to obtain feature parameters; a first control unit, configured to input the characteristic parameter into an evaluation parameter model, and control the evaluation parameter model to output an evaluation value, wherein the evaluation value includes a first evaluation value and a second evaluation value, the first evaluation value is used to evaluate the quality of generating the second code, and the second evaluation value is used to evaluate the efficiency of generating the second code, A judging unit is used to judge whether the target code conforms to a preset grammar rule before constructing a multidimensional grammar tree based on the target code and the characteristic data set; an abstracting unit is used to abstract the target code into a single-dimensional grammar tree when the target code conforms to the preset grammar rule. The construction unit includes: a second reading subunit, used to read the characteristic data set and the preset coding value table; an encoding subunit, used to encode the characteristic data set according to the preset coding value table to obtain multiple coding values; a third reading subunit, used to read multiple characteristic tag vectors corresponding to multiple coding values according to the multiple coding values and the first preset vector value table, wherein the coding values are obtained through data in a large number of characteristic data sets, and the coding values are input into the CBOW neural network model, and the vector values corresponding to the coding values are output through the CBOW neural network model, and the first preset vector value table is formed according to the vector values; A fourth reading sub-unit is used to obtain multiple symbol nodes on the one-dimensional syntax tree, and read multiple symbol node vector values corresponding to the symbol nodes according to the multiple symbol nodes and a second preset vector value table, wherein the symbol value is encoded by a large number of symbol node values to obtain a coded value, and the coded value is input into the CBOW neural network model to output the vector value corresponding to the coded value, and the second preset vector value table is formed according to the vector value, and each symbol value corresponds to a vector value; a combining sub-unit is used to combine the multiple feature tag vectors and the multiple symbol node vector values to construct the multidimensional syntax tree.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute a method for determining a code generation quality and efficiency evaluation value based on multiple indicators as described in any one of claims 1 to 9.
12. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes a method for determining a code generation quality and efficiency evaluation value based on multiple indicators as described in any one of claims 1 to 9.
