| The greatest convenience for human beings to enter the information age comes from the Internet.It takes a long time to practice and summarize professional informatization in this field through the Internet.It is the first step in the informatization process of most companies to give priority to the use of more mature Internet technologies for exploration.With the increase of market demand,the problems of traditional software development methods and backward technology level are increasingly prominent,and there are common problems such as long development cycle,large duplication of work,and difficult system maintenance.The automatic code generation technology can help developers complete project development,reduce the difficulty and complexity of writing code,and reduce the research and development time.Now,a variety of automatic code generation methods have been introduced.Therefore,this paper selects Pix2 code software to design the code framework,converts the original image into code by training,initially realizes the conversion from image to code through training,then constructs the visual model of language model and neural network,and automatically generates the corresponding code by using the long-term and short-term memory network decoding layer combined with the above algorithm features.Secondly,maximize the mining and use of encoder,decoder,Transformer and other structural advantages,so as to optimize the structure of the model itself,which can quickly improve the model training speed after optimization;Finally,malicious code generation confrontation samples are generated based on deep reinforcement learning to ensure the accuracy of code generation.The specific work contents are as follows:1.In order to improve the speed of model training and reduce over fitting,a new visual model replacement scheme is proposed.Res Net residual network can improve network performance while effectively transmitting information among layers.In this paper,Res Net residual network model is used to replace the original VGGNet model,which solves the degradation problem caused by too many layers in VGGNet,reduces the model training time,and further improves the network accuracy.2.Propose new language model and decoding layer alternative scheme to improve the overall recognition accuracy of the model.The traditional LSTM time series prediction ignores the context information,and it is not enough to infer the next word only through training.This paper proposes to use bi-directional long-term and short-term memory network(LSTM)to replace the long-term and short-term memory cycle network(LSTM)in the original model,so that each node in the output layer can completely obtain the information in the front and rear nodes,improve the stability of the model and enhance its generalization ability.3.Based on the transformer model structure,a new code generation model is proposed.By effectively utilizing the advantages of multi head attention mechanism,parallelizing reasoning operation in the decoding layer,introducing position embedding module to identify the position information,and using residual and normalization layer,we can alleviate the effect of gradient disappearance or explosion,modify the feedforward neural network layer and further accelerate the training.4.The cluster search technology is used in the derivation and testing of the code generation model,which effectively improves the quality of code generation.5.This paper proposes a Web malicious code generation anti sample model DWN-CNN based on reinforcement learning,which solves the problem of low efficiency of anti sample generation and difficulty in retaining the original function. |