Movatterモバイル変換


[0]ホーム

URL:


CN116991990B - Program development auxiliary method, storage medium and device based on AIGC - Google Patents

Program development auxiliary method, storage medium and device based on AIGC

Info

Publication number
CN116991990B
CN116991990BCN202310814622.7ACN202310814622ACN116991990BCN 116991990 BCN116991990 BCN 116991990BCN 202310814622 ACN202310814622 ACN 202310814622ACN 116991990 BCN116991990 BCN 116991990B
Authority
CN
China
Prior art keywords
aigc
word
model
prompt
sensitive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310814622.7A
Other languages
Chinese (zh)
Other versions
CN116991990A (en
Inventor
柳琰峰
阳成文
周斌
王志伟
宋荣康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Dewu Information Group Co ltd
Shanghai Shizhuang Information Technology Co ltd
Original Assignee
Shanghai Dewu Information Group Co ltd
Shanghai Shizhuang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Dewu Information Group Co ltd, Shanghai Shizhuang Information Technology Co ltdfiledCriticalShanghai Dewu Information Group Co ltd
Priority to CN202310814622.7ApriorityCriticalpatent/CN116991990B/en
Publication of CN116991990ApublicationCriticalpatent/CN116991990A/en
Application grantedgrantedCritical
Publication of CN116991990BpublicationCriticalpatent/CN116991990B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application provides a AIGC-based program development assistance method, a storage medium and equipment. The method comprises the steps of collecting prompt words in a pre-trained AIGC model input by a user, matching the prompt words with a preset sensitive information base, confirming whether the prompt words are in compliance or not, and controlling the AIGC model to generate information matched with the prompt words when confirming that the prompt words are in compliance. The program development auxiliary method based on AIGC provided by the application helps program developers to reduce repetitive work based on AIGC model, simplifies program development work, and can avoid leakage of sensitive information in interaction process with AIGC model.

Description

AIGC-based program development assistance method, storage medium, and device
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a AIGC-based program development auxiliary method, a storage medium and equipment.
Background
As the following ChatGPT hot flashes, various AIGC (AI GENERATED Content, artificial intelligence generation Content) also floods. Currently, program developers often use search engines to assist in solving problems encountered in program development, and answers searched in this way cannot be matched with current requirements, so that the problems cannot be quickly and accurately solved.
With the hot trend of ChatGPT, various AIGC (AI GENERATED Content, artificial intelligence generation Content) has also been developed, and program developers can precisely match the current requirements to meet the scenes by inputting keywords only, so that the problems can be quickly solved.
However, the current program implementation scheme based on AIGC is easy to cause content leakage risk, and many current programs only record logs in the process of interaction between a user and a AIGC model, provide a function of post-audit, cannot intercept sensitive information in real time, and still cause the problem of sensitive information leakage.
Disclosure of Invention
The application provides a AIGC-based program development assisting method, a storage medium and equipment, which are used for assisting program development based on AIGC and avoiding sensitive information leakage in the interaction process with a AIGC model.
In a first aspect, an embodiment of the present application provides a program development assistance method based on AIGC, which includes collecting a prompt word input by a user in a pre-trained AIGC model, matching the prompt word with a preset sensitive information base, confirming whether the prompt word is compliant, and controlling the AIGC model to generate information matched with the prompt word when confirming that the prompt word is compliant.
In one implementation manner of the first aspect, the method further comprises training the AIGC model, training the AIGC model comprises obtaining a prompt word data training set, distributing weights to prompt word training data in the prompt word data training set by adopting an attention mechanism to form weight tag training data, and inputting the weight tag training data into a network model for training to obtain the AIGC model capable of generating information matched with the prompt word.
In an implementation manner of the first aspect, the network model is a generated countermeasure network model, a self-dividing coding network model, a diffusion model or a transducer neural network model.
In one implementation manner of the first aspect, training the AIGC model further includes prompt word fine-tuning training, wherein the prompt word fine-tuning training includes obtaining prompt word data in a prompt word data training set, converting the prompt word data into prompt words containing empty slots based on a preset template library, inputting the prompt words containing empty slots and an answer data set into a network model for training, and obtaining the AIGC model capable of searching answer data filling the empty slots from the answer data set.
In one implementation manner of the first aspect, the controlling the AIGC model to generate information matched with the prompt word includes converting the prompt word into a prompt word including a blank space based on a preset template library, searching answer data matched with the blank space from an answer data set by the AIGC model, mapping the answer data to a corresponding blank space to form an optimized prompt word, and controlling the AIGC model to generate information matched with the optimized prompt word.
In one implementation manner of the first aspect, the matching the prompt word with a preset sensitive information library, and determining whether the prompt word is in compliance includes inputting the prompt word into a pre-trained large language model, performing text recognition on the prompt word by the large language model to obtain suspected sensitive words in the prompt word, matching the suspected sensitive words with sensitive words in a sensitive word library, obtaining corresponding sensitive words in the sensitive word library and classification labels corresponding to the sensitive words when the sensitive words are matched with the suspected sensitive words, determining whether the suspected sensitive words in the prompt word are in compliance based on the suspected sensitive words, the obtained sensitive words in the sensitive word library, the classification labels and a pre-configured compliance strategy, and outputting a compliance auditing result.
In one implementation manner of the first aspect, the method further comprises any one or more of detecting program codes input by a user, performing alarm prompt and searching for obtaining optimization suggestions when detecting that the codes are abnormal, detecting SQL databases corresponding to the program codes, performing alarm prompt and searching for obtaining optimization suggestions when detecting that the SQL databases are abnormal, and generating a test program for executing corresponding test functions based on test data input by the user.
In one implementation manner of the first aspect, the method further includes collecting log information during interaction of the user with the AIGC model in real time.
In a second aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the AIGC-based program development assistance method of any one of the first aspects of the present application.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a memory storing a computer program, and a processor, communicatively connected to the memory, and executing the AIGC program development assistance method according to any one of the first aspects of the present application when the computer program is called.
The program development auxiliary method based on AIGC provided by the application helps program developers to reduce repetitive work based on AIGC model, simplifies program development work, and can avoid leakage of sensitive information in interaction process with AIGC model.
Drawings
Fig. 1 is a schematic diagram illustrating an application principle of a AIGC-based program development assistance method according to an embodiment of the application.
FIG. 2 is a flow chart of a AIGC-based program development assistance method according to one embodiment of the application.
FIG. 3 is a flow chart of training AIGC model in AIGC-based program development assistance method according to one embodiment of the application.
Fig. 4 is a schematic diagram illustrating a principle of using an attention mechanism to assign weights to the training data of the cue word in the training set of the data of the cue word in the AIGC-based program development assistance method according to an embodiment of the present application.
FIG. 5 is a flow chart of a prompt word fine tuning training in a AIGC-based program development assistance method according to an embodiment of the application.
Fig. 6 is a schematic flow chart of controlling AIGC model to generate information matching with a prompt word in a program development assistance method based on AIGC according to an embodiment of the application.
FIG. 7 is a schematic diagram illustrating an implementation application of AIGC-based program development assistance method according to an embodiment of the application.
Fig. 8 is a schematic diagram illustrating an implementation principle of a program development assistance method based on AIGC according to an embodiment of the application.
FIG. 9 is a schematic diagram illustrating an implementation process of a AIGC-based program development assistance method according to an embodiment of the application.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Description of element reference numerals
100. Electronic equipment
101. Memory device
102. Processor and method for controlling the same
103. Display device
S100 to S300 steps
S310 to S340 steps
S401 to S403 steps
S410 to S430 steps
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
The program codes generated by the prior art have low availability, cannot be used accurately, have poor user experience, cannot obtain the wanted answer through the brief keywords, and can also easily expose the sensitive information of the company directly, so that the information security risk is caused
The embodiment of the application provides a AIGC-based program development assisting method which is used for assisting program development based on AIGC and avoiding sensitive information leakage in the interaction process with a AIGC model.
Fig. 1 is a schematic diagram illustrating an application principle of a AIGC-based program development assistance method according to an embodiment of the application. As shown in fig. 1, in the program development assisting method based on AIGC in this embodiment, a sensitive word stock is built in advance, and a user assists program development through a AIGC model, so that a program developer is helped to reduce repetitive work, and the program development work is simplified. And inputting keywords into the AIGC model based on AIGC model auxiliary program development, collecting information communicated with the AIGC model by a user through a Kafka tool, and providing matching identification of second-level suspected sensitive words and sensitive words in a sensitive word bank by a Flink tool. Determining whether suspected sensitive words in the prompt words are in compliance or not, prompting a user for risk information, calling AIGC a model, and generating information matched with the prompt words by the AIGC model. The embodiment can ensure the safety of data input by a book in real time, limit the return of sensitive information and avoid information leakage.
The following will describe in detail the technical schemes of the program development supporting method, the storage medium and the device based on AIGC in the embodiment of the present application with reference to fig. 1 to 10 in the embodiment of the present application. The AIGC-based program development assistance method, storage medium, and apparatus of the present embodiment can be understood by those skilled in the art without the need for creative efforts.
FIG. 2 is a flowchart of a AIGC-based program development assistance method according to an embodiment of the present application. As shown in fig. 2, the program development assistance method based on AIGC according to the embodiment of the present application includes the following steps S100 to S400.
Step S100, collecting prompt words in a AIGC model which is trained in advance and input by a user;
step S200, matching the prompting words with a preset sensitive information base, and confirming whether the prompting words are compliant or not;
And step S300, when confirming the compliance of the prompt word, controlling the AIGC model to generate information matched with the prompt word.
Steps S100 to S300 of the AIGC-based program development support method of the present embodiment are specifically described below.
Step S100, collecting prompt words in a AIGC model which is trained in advance by a user.
The embodiment assists program development based on AIGC model, can help program developer reduce repetitive work, and simplify program development work.
In this embodiment, only the entry of the prompt word is exposed to the user by encapsulating the large text.
In this embodiment, a prompt word specification input by a user is predetermined:
1) The prompt word format is that instructions are directly sent or a question-answer mode is used.
2) Prompt word element:
2-1) instructions specific tasks or instructions that the model is intended to perform.
2-2) Context-containing external information or additional context information, a language model responds better.
2-3) Input data, content or questions input by the user.
2-4) Outputting a hint specifying the type or format of the output.
3) Prompt style:
3-1) accurate instructions, namely more accurate instructions, more detail is required, and the obtained answer meets the requirements.
3-2) Role hint is set in this application to if you are a software development engineer, xxxx.
3-3) Zero sample hint, directly ask questions, not ask pre-questions.
3-4) Single sample hint when a question is posed, an example is given first and the model will be understood from the given example.
3-5) Few sample cues, several examples are given before a problem is posed, as opposed to a single sample cue.
In one implementation of this embodiment, training the AIGC model is further included. By training AIGC the model, information and content meeting the user's needs are returned. FIG. 3 is a flow chart of training AIGC model in AIGC-based program development assistance method according to one embodiment of the application. As shown in fig. 3, training the AIGC model includes:
step S410, acquiring a prompt word data training set;
and step S420, adopting an attention mechanism to distribute weights to the cue word training data in the cue word data training set to form weight tag training data.
Fig. 4 is a schematic diagram illustrating a principle of using an attention mechanism to assign weights to the training data of the cue word in the training set of the data of the cue word in the AIGC-based program development assistance method according to an embodiment of the present application. The attention mechanism (attention) is adopted to distribute different weights to different importance of input data, and the advantage of parallelization processing can enable the input data to be trained in a larger data set, so that development of a pre-training large model such as GPT (general purpose input) is accelerated, and the input data can be translated among different languages. The body of the attention mechanism includes Encoder and decoders, respectively, encoding the source language and converting the encoded information into target language text.
And step S430, inputting the weight tag training data into a network model for training, and obtaining the AIGC model capable of generating information matched with the prompt word.
In this embodiment, the network model is, but not limited to, a GENERATIVE ADVERSARIAL Networks (GAN) model, a self-dividing coding network model, a diffusion model, or a transform neural network model.
In one implementation of this embodiment, training the AIGC models further includes prompt word fine-tuning training. Through the fine adjustment training of the prompt words, the accuracy of recognition of the prompt words can be improved, and the communication cost of the user in the interaction process with the AI is greatly simplified. FIG. 5 is a flow chart of a prompt word fine tuning training in a AIGC-based program development assistance method according to an embodiment of the application. The prompt word fine tuning training comprises the following steps:
Step S401, acquiring the prompting word data in the prompting word data training set;
step S402, converting the prompt word data into prompt words containing empty slots based on a preset template library;
Step S403, inputting the prompt word and answer data set containing the empty slot into a network model for training, and obtaining the AIGC model capable of searching answer data filling the empty slot from the answer data set.
Specifically, one implementation manner of performing the model fine tuning training in this embodiment is as follows:
1) Template design, namely manually or automatically designing templates to form a preset template library. The input X (e.g., optimize ranking algorithm) is converted to X (e.g., i am a software development engineer, let me write a ranking algorithm ____ with low time complexity). Typically, the space slots are included in X, and y () is deduced by letting the training network model fill the space slots. The preset template library is flexible and changeable according to the required design, and a proper template is selected according to the downstream task and the pre-training language model.
2) And searching answer data, namely searching in an answer data set by training a network model after the X is obtained through the template, finding the answer data which is most suitable to fill in the empty slot, for example, calculating the score through the matching degree, and finding out the answer data value with the highest score to fill in the corresponding empty slot.
) And (3) answer mapping, namely after the filling value corresponding to the empty slot position is obtained through answer searching, the slot position value of part of tasks is a final result, the slot position value of part of tasks needs to be converted, and the slot position value is corresponding to a final output label y (a sequencing algorithm with low time complexity). According to the embodiment, through fine adjustment of the model, the prompt words input by the user can be converted into prompt words which are easier to understand and match with the result by the AIGC model, and the accuracy and efficiency of AIGC prompt words are effectively improved.
Step S200, matching the prompting words with a preset sensitive information base, and confirming whether the prompting words are compliant or not. By only safely auditing the prompt words and confirming whether the prompt words are compliant, the leakage of sensitive information in the process of interacting with the AI in the process of program development can be avoided.
In an implementation manner of this embodiment, the matching the prompting word with a preset sensitive information base, and determining whether the prompting word is compliant includes:
1) Inputting the prompt word into a pre-trained large language model, and carrying out text recognition on the prompt word by the large language model to obtain suspected sensitive words in the prompt word. The large language model (LLM, large Language ModelsAn) refers to a deep learning model trained by using a large amount of text data, can generate natural language text or understand meaning of the language text, is a natural language processing model with large-scale parameters and complex structures constructed based on a deep learning technology, can process various natural language tasks such as text classification, question-answering, dialogue and the like, and is an important path leading to artificial intelligence.
In this embodiment, before the prompt word is input to the pre-trained large language model, the method further includes preprocessing a text, performing coding processing on the preprocessed training set to form a coded text, and then inputting the coded text to the large language model for text recognition to obtain a suspected sensitive word in the prompt word.
In one possible embodiment, the text is preprocessed, including but not limited to, punctuation, stop words, and other extraneous information, and word drying (stemming) or word shape reduction (lemmatization) is performed to reduce noise and normalize the text.
In one possible implementation, the pre-processed training set is encoded to form encoded text. I.e., the preprocessed cue words are converted into an input encoded form acceptable to the model, including but not limited to, word or subword segmentation of the cue words and mapping thereof into a vector representation. Among the encoding methods employed include, but are not limited to, word embedding (Word embeddings) such as Word2Vec or GloVe, and subword embedding (subword embeddings) such as BERT or FastText.
In one implementation, the method further comprises training the large language model, wherein training the large language model comprises:
1) A training set containing sensitive words is obtained.
The sources of the sensitive words in the training set include, but are not limited to, any one or more of sensitive words passing through historical audits (such as community dynamic, searching, column, and the like), sensitive word banks (the sensitive word banks constructed by means of artificial word expansion, machine learning model generation, and the like), sensitive words input by users and variants thereof.
2) And adding a bypass matrix comprising a dimension reduction matrix and a dimension increase matrix into the original open-source large language model, training the open-source large language model by adopting the training set, and fine-tuning and optimizing the bypass matrix.
The large language model is a generating type and other language model, and the main aim is to generate natural language response related to input, so that the large language model has better semantic understanding capability. In this embodiment, the original open source large language model includes, but is not limited to, chatGLM, stableVicuna and other large language models. The large language model in this embodiment is an open source large language model, in which the code is open source, the data set is open source, and has authorized permissions.
In the training stage, training an open source large language model by using a training set with labels and fine tuning and optimizing the bypass matrix. And then, overlapping the training output of training the open-source large language model with the optimized output of fine tuning and optimizing the bypass matrix, and outputting the overlapped training output.
Parameter tuning is performed on the ChatGLM-6B large language model based on LoRA in the HuggingFace peft library using a content security sensitive lexicon and a data set of historical audits. LoRA in the implementation process, freezing matrix parameters of a large language model, selecting a dimension-reducing matrix and a dimension-increasing matrix to replace the matrix parameters, and only updating the dimension-reducing matrix and the dimension-increasing matrix when training the model.
In one possible implementation, the dimension-reduction matrix is initialized with a random gaussian distribution and the dimension-increase matrix is initialized with an all-zero matrix.
In one possible implementation, the optimization parameters in the bypass matrix include any one or more combination of loading pre-training model weights, adding training data, and adjusting the super parameters of the model.
In the fine tuning process, the learning rate, the training iteration number and the like can also be adjusted. After the fine tuning is completed, the performance of the large language model can also be evaluated and optimally evaluated. The performance of a large language model on a specific domain task is measured by some evaluation indexes. If the large language model performs poorly, it may be further optimized by adjusting training parameters, increasing the size of the data set, or making more fine-tuning.
3) And overlapping the training output of training the open-source large language model with the optimized output of fine-tuning and optimizing the bypass matrix, and outputting the overlapped training output.
The specific principle of training the large language model in this embodiment is as follows:
1) A bypass matrix is added beside the original large language model, the bypass matrix comprises a dimension reduction matrix and a dimension increase matrix, and the dimension reduction operation and the dimension increase operation are carried out through the dimension reduction matrix and the dimension increase matrix, so that the so-called intrinsic rank is simulated.
2) The parameters of the open source large language model are fixed and unchanged during training, and only the dimension-reducing matrix and the dimension-increasing matrix are trained, namely, the optimizer only optimizes the parameters of the right path;
3) The input and output dimensions of the original large language model are unchanged, the original large language model and the bypass matrix share the input training set, and the output of the original large language model and the output of the bypass matrix are overlapped during output;
4) Initializing a dimension-reducing matrix by using a random Gaussian distribution, and initializing a dimension-increasing matrix by using a full-zero matrix. The zero initialization of the matrix dimension-increasing matrix is performed so that the result of the bypass matrix approaches 0 in a period of time when training is started, and the output after superposition is basically from the original large language model, namely the calculation result of the original parameters of the large language model, so that the initial point of model optimization is consistent with the original large model.
In this embodiment, based on the sensitive words passing the history audit, the sensitive word library, the sensitive words input by the user, the variants thereof and the like train the large language model, so that the large language model performs deep learning and semantic understanding on the prompt words, can recognize the variant and metaphorically expressed sensitive words, input the recognized sensitive words into the sensitive words, and can also perform regular update and maintenance on the sensitive word library according to the actual situation and user feedback so as to expand the data in the sensitive word library, update and expand the sensitive word library in real time and cope with the newly appeared sensitive words.
Through the trained large language model, deep learning and semantic understanding can be carried out on the prompt words, and the sensitive words expressed by variants and metaphors can be accurately identified. Inputting the encoded prompt words into a large language model for semantic analysis and classification, and recognizing the prompt words by the trained large language model to obtain suspected sensitive words in the prompt words.
2) Matching the suspected sensitive words with sensitive words in a sensitive word stock, and acquiring corresponding sensitive words in the sensitive word stock and classification labels corresponding to the sensitive words when the sensitive words matched with the suspected sensitive words exist in the sensitive words.
In this embodiment, a sensitive word library including various sensitive words is constructed in advance, and the sensitive word library can be maintained and updated by professionals or special institutions of the sensitive words. The sensitive word library should contain various types of sensitive words including, for example, sensitive words, company core code, database table names.
In this embodiment, after the part of speech and the semantic analysis are performed on the prompt word through the large language model, the prompt word is matched through the sensitive word stock, so that the efficiency is improved. The sensitive word library comprises various types of sensitive words and corresponding classification labels.
In this embodiment, the suspected sensitive words in the prompt words are matched with the keywords in the sensitive word stock.
And matching keywords in the sensitive word stock through a character string matching algorithm to obtain a matching result and a part-of-speech tagging result.
The prompting words are matched with the keywords in the sensitive word stock, and the keywords can be matched with the sensitive word stock through a character string matching algorithm, such as a KMP algorithm. Traversing each vocabulary of the prompt word, comparing the vocabulary with the keywords in the sensitive word stock one by one, and judging that the prompt word contains the sensitive word if the keywords are found to be matched.
3) And determining whether the suspected sensitive words in the prompting words are compliant or not based on the suspected sensitive words, the acquired sensitive words in the sensitive word bank, the classification labels and a pre-configured compliance strategy, and outputting a compliance auditing result.
Specifically, in this embodiment, the preconfigured compliance policies include any one or two of the following combinations:
1) The auditing rules formed based on but not limited to the matching number of the sensitive words, the weight of the sensitive words, the threshold value and the context can be regular expressions, pattern matching rules and the like.
2) An audit model constructed based on, but not limited to, any one or more machine learning algorithms of a decision tree, a random forest, a support vector machine, a neural network.
Wherein the weighing factors of the auditing rules include, but are not limited to, any one or more of the following combinations:
1) Severity and weight of sensitive words different weight and processing strategies are given to different sensitive words. Certain sensitive words may pose a greater threat to platform security and user experience, requiring more stringent handling measures.
2) Context analysis and context understanding-audit decisions need to take into account the context information and context of the cue words provided by the natural language processing module to avoid erroneous decisions on normal cue words. And comprehensively judging the prompt words according to the semantic relation and emotion analysis of the context.
3) Threshold setting, namely judging whether the rule is illegal or not by setting a threshold for some measurement indexes such as the matching quantity of the sensitive words or the confidence score. According to the requirements and the risk bearing capacity of the user, the threshold value can be adjusted to balance the problems of false alarm and missing alarm.
In this embodiment, according to the matching result and the classification information of the sensitive word, whether the prompt word is illegal or not is determined. Different audit levels and processing measures such as warning, deletion, blocking, etc. may also be provided.
In this embodiment, a sensitive information base (e.g., including sensitive words, company core code, database table names) needs to be created in advance. For example, the Kafka tool collects information communicated by the user with the AIGC model, and the Flink tool provides matching identification of second-level suspected sensitive words and sensitive words in the sensitive word stock. And determining whether the suspected sensitive words in the prompt words are in compliance or not, prompting the risk information of the user, calling AIGC a model through compliance, and generating information matched with the prompt words by the AIGC model. The embodiment can ensure the safety of data input by a book in real time, limit the return of sensitive information and avoid information leakage.
And step S300, when confirming the compliance of the prompt word, controlling the AIGC model to generate information matched with the prompt word.
Fig. 6 is a schematic flow chart of controlling AIGC model to generate information matching with a prompt word in a program development assistance method based on AIGC according to an embodiment of the application. In this embodiment, the controlling the AIGC model to generate the information matching with the hint word includes:
step S310, converting the prompt word into a prompt word containing empty slots based on a preset template library;
Step S320, the AIGC model searches answer data matched with the empty slot from the answer data set;
And step S330, mapping the answer data to the corresponding empty slots to form optimized prompt words, and controlling the AIGC model to generate information matched with the optimized prompt words.
Therefore, the matched information can be quickly generated according to the prompt words input by the user through the trained AIGC model, so that program developers are effectively helped to reduce repetitive work, improve working efficiency and simplify program development work.
In addition, in one implementation of the present embodiment, any one or more of the following is further included:
1) And detecting program codes input by a user, and when detecting that the codes are abnormal, carrying out alarm prompt and searching to obtain optimization suggestions. Specifically, by pre-setting coding specifications in advance, BUG which possibly appears in places where the user does not accord with the specifications in the code writing process is detected in real time, and optimization suggestions are given.
2) And detecting the SQL database corresponding to the program codes, and when detecting that the SQL database is abnormal, carrying out alarm prompt and searching to obtain optimization suggestions.
3) And generating a test program for executing the corresponding test function based on the test data input by the user. Wherein the test data includes, but is not limited to, test variables, test methods, and the like.
In one implementation manner of the embodiment, the method further comprises the step of collecting log information in the interaction process of the user and the AIGC model in real time. The embodiment provides a post audit function through log records, and ensures that sensitive information is not leaked.
FIG. 7 is a schematic diagram illustrating an implementation application of AIGC-based program development assistance method according to an embodiment of the application. It should be noted that, the program development assistance method based on AIGC may be applied to various types of hardware devices in the client portion. The hardware device is, for example, a controller, such as, specifically, ARM (Advanced RISC Machines) controller, FPGA (Field Programmable GATE ARRAY) controller, soC (System on Chip) controller, DSP (DIGITAL SIGNAL Processing) controller, or MCU (Micorcontroller Unit) controller, etc. The hardware device may also be, for example, a computer including components such as memory, a memory controller, one or more processing units (CPUs), peripheral interfaces, RF circuitry, audio circuitry, speakers, microphones, input/output (I/O) subsystems, display screens, other output or control devices, and external ports, including, but not limited to, personal computers such as desktop computers, notebook computers, tablet computers, smart phones, smart televisions, personal Digital Assistants (PDAs), and the like. In other embodiments, the hardware device may also be a server, where the server may be disposed on one or more physical servers according to a plurality of factors such as a function, a load, and the like, or may be formed by a distributed or centralized server cluster, which is not limited in this embodiment.
In one embodiment, the AIGC-based program development assistance method may display a Graphical User Interface (GUI) at the electronic terminal of the client, in which AIGC-based program development assistance data is presented in association therewith.
In an embodiment, the electronic terminal may be a fixed terminal, such as a server, a desktop, or a mobile terminal, such as a notebook, a smart phone, or a tablet.
In an embodiment, the electronic terminal may be implemented in an offline or online state for presenting the program development assistance data of AIGC.
In an example, the electronic terminal may not access the internet, and is provided with a client APP, the client may log in to the client APP through pre-registered account information, the client APP may authenticate itself and provide AIGC program development assistance data related to the account information after authentication, and if updating of AIGC program development assistance method data occurs, the client may update according to an offline data packet, where the offline data packet is transmitted in a manner such as a portal update service, or provide online downloading of the offline data packet, so that the client updates the offline system after downloading through a terminal capable of accessing the internet, or load the offline data packet, such as a usb disk or a mobile hard disk, for updating.
Optionally, the electronic terminal installs client software, and the client software of the electronic terminal may generate a Graphical User Interface (GUI), and in addition, the electronic terminal may also be provided with a Browser (Browser) for displaying the client service graphical interface; based on the B/S architecture, the hard software requirement on the electronic terminal of the client can be greatly reduced, the electronic terminal of the client does not need to be provided with client software, and only a web Browser is needed, so that the user experience of the client can be greatly improved.
In the embodiment of the application, the graphical user interface is accessed by a webpage browsed by a browser loaded by a user terminal, wherein the user terminal comprises a PC, or the graphical user interface is accessed by an interface provided by integrated service platform software loaded by the user terminal, wherein the user terminal comprises a mobile terminal and a PC, the mobile terminal comprises a smart phone or a tablet personal computer, and the integrated service platform software comprises a WeChat and/or a payment treasures.
It should be noted that the graphical user interfaces displayed by the electronic terminals corresponding to different types of electronic terminals may also be different.
In particular, in some embodiments, for the electronic terminal to be a PC terminal, it may access a particular web page by browsing the web page through a loaded browser (including but not limited to IE, google, 360, QQ, dog search, hundred degrees, aoGage, UC, fire fox, cheetah, 2345, oupong, etc. browsers) and accessing a predetermined URL with the web page as an interface, and displaying a graphical user interface in the particular web page.
In yet other embodiments, for the electronic terminal to be a mobile terminal (e.g., smart phone, tablet computer), it may access the graphical user interface through a web page or web applet in integrated platform software such as WeChat, payment Pop, etc., an IDE plug-in.
The interface for entering the graphical user interface is provided in the WeChat applet, and the user can add the WeChat applet by scanning the two-dimensional code or searching the WeChat applet, so as to operate (e.g. click) the WeChat applet, thereby entering the graphical user interface.
The embodiment realizes specific functions of a program development auxiliary method based on AIGC at a service layer, including code prompt, code abnormality alarm, SOL optimization suggestion, unit test writing, detecting whether prompt words input by a user contain sensitive information, shielding the sensitive information, recording logs for security audit, AIGC model content generation and the like. At the service level, the journal is monitored, AIGC models are trained, and tools like Flink, ODPS, kafka, dataworks are provided for implementing AIGC-based program development assistance methods, such as storing data involved in AIGC-based program development assistance methods via MySQL database, nebutaGraph database.
Fig. 8 is a schematic diagram illustrating an implementation principle of the program development assistance method based on AIGC in the present embodiment. Fig. 9 is a schematic diagram illustrating an implementation process of the program development assistance method based on AIGC in this embodiment. As shown in fig. 8 and 9, in this embodiment, in the practical application, the program development assistance method based on AIGC is programmed to generate an application program for implementing the program development assistance method based on AIGC, when the user uses the application program as a AIGC program development assistant, the user selects the application program and inputs a prompt word, then the application program verifies the compliance of the content of the prompt word in real time, determines whether the suspected sensitive word in the prompt word input by the user is in compliance, does not in compliance, prompts the risk information of the user, and the compliance is achieved by calling AIGC model, performing prompt word feature matching by using AIGC model, generating information matched with the prompt word, and displaying the content result generated by AIGC model to the user.
The protection scope of the program development assisting method based on AIGC in the embodiment of the present application is not limited to the execution sequence of the steps listed in the embodiment, and all the schemes implemented by adding or removing steps and replacing steps according to the prior art made by the principles of the present application are included in the protection scope of the present application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the program development assistance method based on AIGC provided by any embodiment of the application.
Any combination of one or more storage media may be employed in embodiments of the present application. The storage medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The embodiment of the application also provides electronic equipment. Fig. 8 is a schematic structural diagram of an electronic device 100 according to an embodiment of the application. In some embodiments, the electronic device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an Ultra-Mobile Personal Computer (UMPC), a netbook, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), or the like. The embodiment of the application does not limit the specific application scene of the program development auxiliary method based on AIGC.
As shown in fig. 10, an electronic device 100 provided in an embodiment of the present application includes a memory 101 and a processor 102.
The memory 101 is used for storing a computer program, and the memory 101 preferably includes a ROM, a RAM, a magnetic disk, a U-disk, a memory card, or a disk, etc. various media capable of storing program codes.
In particular, memory 101 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory. Electronic device 100 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. Memory 101 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application.
The processor 102 is connected to the memory 101 for executing the computer program stored in the memory 101, so that the electronic device 100 executes the program development assistance method based on AIGC provided in any one of the embodiments of the present application.
Alternatively, the Processor 102 may be a general-purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), etc., a digital signal Processor (DIGITAL SIGNAL Processor, DSP), an Application Specific Integrated Circuit (ASIC), a field programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Optionally, the electronic device 100 in this embodiment may further include a display 103. A display 103 is communicatively coupled to the memory 101 and the processor 102 for displaying a related GUI interactive interface for AIGC-based program development assistance methods.
In summary, the program development assisting method based on AIGC provided by the application helps program developers reduce repetitive work based on AIGC model, simplifies program development work, and can avoid leakage of sensitive information in interaction process with AIGC model. Therefore, the application effectively overcomes various defects in the prior art and has high industrial utilization value.
The above embodiments are merely illustrative of the principles of the present application and its effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the application. Accordingly, it is intended that all equivalent modifications and variations of the application be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (8)

CN202310814622.7A2023-07-042023-07-04 Program development auxiliary method, storage medium and device based on AIGCActiveCN116991990B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310814622.7ACN116991990B (en)2023-07-042023-07-04 Program development auxiliary method, storage medium and device based on AIGC

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310814622.7ACN116991990B (en)2023-07-042023-07-04 Program development auxiliary method, storage medium and device based on AIGC

Publications (2)

Publication NumberPublication Date
CN116991990A CN116991990A (en)2023-11-03
CN116991990Btrue CN116991990B (en)2025-09-26

Family

ID=88527515

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310814622.7AActiveCN116991990B (en)2023-07-042023-07-04 Program development auxiliary method, storage medium and device based on AIGC

Country Status (1)

CountryLink
CN (1)CN116991990B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117725610A (en)*2023-11-232024-03-19中金金融认证中心有限公司Privacy protection proxy method for third party large language model
CN117289841B (en)*2023-11-242024-09-17浙江口碑网络技术有限公司Interaction method and device based on large language model, storage medium and electronic equipment
CN117311683B (en)*2023-11-242024-03-19浙江口碑网络技术有限公司Code auxiliary system, code auxiliary processing method and device and electronic equipment
CN117690545A (en)*2023-12-122024-03-12北京健康有益科技有限公司 A large model-based treatment plan generation method and device
CN117389998B (en)*2023-12-132024-03-12北京汉勃科技有限公司Data storage method and device based on large model
CN117539438B (en)*2024-01-052024-04-30阿里云计算有限公司Software development method
CN117574410B (en)*2024-01-162024-04-05卓世智星(天津)科技有限公司 Risk data detection method and device
CN117827178B (en)*2024-03-042024-06-18深圳市法本信息技术股份有限公司Code automatic generation method
CN118349643A (en)*2024-03-132024-07-16中国电子技术标准化研究院Method, device and storage medium for improving model security
CN118332117A (en)*2024-04-182024-07-12武昌理工学院Method and system for detecting automatic generation type file
CN119323216A (en)*2024-09-242025-01-17北京舜合通达数字网络科技有限公司Content data generation method, device, equipment and storage medium of 5G message
CN119323059A (en)*2024-12-192025-01-17拓尔思信息技术股份有限公司Method and system for protecting security of large model prompt word
CN119357341B (en)*2024-12-272025-03-18成都赛力斯科技有限公司Sentence text processing method, sentence text processing device, sentence text processing equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111159354A (en)*2019-12-312020-05-15中国银行股份有限公司 A sensitive information detection method, device, equipment and system
CN112487149A (en)*2020-12-102021-03-12浙江诺诺网络科技有限公司Text auditing method, model, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115033581A (en)*2022-06-082022-09-09中国工商银行股份有限公司 Method and device for updating search model, electronic device and readable storage medium
CN115994799B (en)*2023-03-222023-06-02环球数科集团有限公司 An AIGC-based Advertisement Content Generation System

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111159354A (en)*2019-12-312020-05-15中国银行股份有限公司 A sensitive information detection method, device, equipment and system
CN112487149A (en)*2020-12-102021-03-12浙江诺诺网络科技有限公司Text auditing method, model, equipment and storage medium

Also Published As

Publication numberPublication date
CN116991990A (en)2023-11-03

Similar Documents

PublicationPublication DateTitle
CN116991990B (en) Program development auxiliary method, storage medium and device based on AIGC
JP7441186B2 (en) System and method for translating natural language sentences into database queries
US12073189B2 (en)Learned evaluation model for grading quality of natural language generation outputs
CN116720515A (en) Sensitive word review methods, storage media and electronic devices based on large language models
US11734322B2 (en)Enhanced intent matching using keyword-based word mover's distance
US11875115B2 (en)Learned evaluation model for grading quality of natural language generation outputs
US20250103622A1 (en)Knowledge bot as a service
CN112100354A (en)Man-machine conversation method, device, equipment and storage medium
US20210365488A1 (en)Term-cluster knowledge graph for support domains
CN111177307A (en)Test scheme and system based on semantic understanding similarity threshold configuration
US9582498B2 (en)Actions on digital document elements from voice
US12340176B2 (en)Techniques for verifying veracity of machine learning outputs
EP4242876A1 (en)Semantic-aware rule-based recommendation for process modeling
CN119669317B (en) Information display method and device, electronic device, storage medium and program product
CN120104173A (en) Code annotation information processing method, device, computer equipment and storage medium
WO2025071803A1 (en)Dynamic prompt creation for large language models
CN119127150A (en) Application construction method, system, medium and electronic device
US20230259701A1 (en)Automated calculation predictions with explanations
CN113849785B (en)Mobile terminal information asset use behavior identification method for application program
CN115438186A (en)Intelligent dialogue system architecture and dialogue method of intelligent dialogue system
US12423452B1 (en)Infrastructure-as-code validation with language models
CN120045171B (en)Code generation method and device
US20250117414A1 (en)Layered database queries for context injection for technical support
US20250278569A1 (en)Deriving heterogenous context for evaluating generated code
WO2025080315A1 (en)Techniques for verifying veracity of machine learning outputs

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Country or region after:China

Address after:Room 6416, Building 13, No. 723 Tongxin Road, Hongkou District, Shanghai 200080

Applicant after:Shanghai Dewu Information Group Co.,Ltd.

Address before:Room B6-2005, No. 121 Zhongshan North 1st Road, Hongkou District, Shanghai

Applicant before:SHANGHAI SHIZHUANG INFORMATION TECHNOLOGY Co.,Ltd.

Country or region before:China

CB02Change of applicant information
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp