Prompt text generation method and device based on artificial intelligence, equipment and medium

By constructing a prompt text construction model, the problem of high threshold for writing prompt text and low generation efficiency in the Chinese environment of the image generation model is solved, and the automatic and rapid generation of high-quality prompt text is achieved to meet the rapid response and efficient marketing needs of financial enterprises.

CN119250040APending Publication Date: 2025-01-03PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411314476.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing image generation model has high threshold for writing texts and low generation efficiency in the Chinese environment, making it difficult to meet the needs of financial enterprises to quickly respond to market changes and efficiently complete marketing tasks.

Method used

By collecting the images and prompt text that meet the quality conditions generated by the target image generation model, performing content addition processing and data preprocessing, using low-rank adaptation fine-tuning algorithm to train the pre-trained language model, constructing a prompt text construction model, and generating Target prompt text suitable for target image generation model.

Benefits of technology

It realizes automatic, fast and accurate generation of target prompt text suitable for target image generation model, lowers the threshold for writing prompt text, improves generation efficiency, and ensures generation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250040A_ABST
    Figure CN119250040A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and financial science and technology, and relates to a prompt text generation method and device based on artificial intelligence, computer equipment and a storage medium, and the method comprises the steps: collecting a picture generated by a target image generation model, and a prompt text corresponding to the picture; obtaining Chinese description of the picture; constructing a data pair based on the Chinese description and the prompt text; preprocessing the data pair to obtain a sample data set; performing training and fine tuning processing on a preset pre-training language model by using the sample data set and a fine tuning algorithm to obtain a prompt text construction model; if a prompt text generation request triggered by a user in the front-end interface is received, performing prediction processing on the target Chinese description based on a prompt text construction model to generate a corresponding target prompt text; and returning the target prompt text to the front-end interface. In addition, the target hint text may be stored in the block chain. The generation efficiency and the generation quality of the prompt text suitable for the target image generation model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to an artificial intelligence-based prompt text generation method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, deep learning-based image generation models, especially Stable Diffusion based on diffusion models, have become important milestones in the field of image generation. Stable Diffusion achieves the generation of high-quality images from natural language descriptions by training the mapping relationship between images in a large number of data sets and corresponding text descriptions. This feature makes it show great application potential and commercial value in many fields such as creative design, advertising marketing, and digital art.

[0003] However, despite the remarkable achievements of the Stable Diffusion model in the English environment, its application in the Chinese environment faces many challenges. The primary problem is that the model's training data is mainly based on the English corpus, which leads to obvious limitations in the model's understanding and generation of images that conform to the Chinese context and aesthetic preferences. Even if the Chinese prompt is converted into English through translation technology, due to language and cultural differences, the generated results are often difficult to accurately convey the original meaning, and the effect is not satisfactory.

[0004] In addition, the efficient application of the Stable Diffusion model is highly dependent on the precise and creative writing of prompt texts. An excellent prompt not only needs to fully describe the content, style, color and other elements of the image, but also needs to follow specific grammar and expression habits, which constitutes a high threshold for non-professional users. In the actual application scenarios of financial enterprises, such as the generation of insurance marketing posters, business personnel usually do not have professional prompt writing capabilities. They are more accustomed to expressing their needs through intuitive operations or simple descriptions. Therefore, relying on manual writing of prompts is not only inefficient, but also difficult to ensure the quality and consistency of the generated images, and it is difficult to meet the needs of enterprises to quickly respond to market changes and efficiently complete marketing tasks.

[0005] In summary, the current image generation model has the problems of high threshold for prompt text writing and low generation efficiency in the Chinese environment. Summary of the invention

[0006] The purpose of the embodiments of the present application is to propose a prompt text generation method, device, computer equipment and storage medium based on artificial intelligence to solve the technical problems of high threshold for prompt text writing and low generation efficiency in the existing image generation model in the Chinese environment.

[0007] In order to solve the above technical problems, the embodiment of the present application provides a prompt text generation method based on artificial intelligence, which adopts the following technical solution:

[0008] Collecting pictures that meet quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple;

[0009] Performing content adding processing on the picture to obtain a Chinese description corresponding to the picture;

[0010] Constructing a data pair corresponding to the picture based on the Chinese description and the prompt text;

[0011] Preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set;

[0012] Using the sample data set and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune a preset pre-trained language model, to obtain a prompt text construction model that meets expected construction conditions;

[0013] Determine whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user;

[0014] If yes, construct a model based on the prompt text to perform prediction processing on the target Chinese description to generate a target prompt text corresponding to the target Chinese description;

[0015] The target prompt text is returned to the front-end interface.

[0016] Furthermore, the step of preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set specifically includes:

[0017] Get the preset data cleaning strategy;

[0018] Performing data cleaning processing on the data pair based on the data cleaning strategy to obtain a corresponding first data pair;

[0019] Get the preset instruction template;

[0020] Formatting the first data pair based on the instruction template to obtain a corresponding second data pair;

[0021] The second data pair is used as the sample data set.

[0022] Furthermore, the prompt text generation request also carries the user information of the user; the step of performing prediction processing on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target Chinese description specifically includes:

[0023] Extracting the user information and the target Chinese description from the prompt text generation request;

[0024] Performing authority verification on the user based on the user information;

[0025] If the user passes the authority verification, the prompt text is called to build a model;

[0026] The target Chinese description is predicted based on the prompt text construction model to generate a target prompt text corresponding to the target prompt text.

[0027] Furthermore, the step of verifying the user's authority based on the user information specifically includes:

[0028] Determining a designated role corresponding to the user information;

[0029] Obtaining the specified permissions corresponding to the specified role;

[0030] Determining whether the specified permissions include an operation permission corresponding to the business operation generated by the prompt text;

[0031] If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.

[0032] Furthermore, the step of returning the target prompt text to the front-end interface specifically includes:

[0033] Obtaining display requirements corresponding to the front-end interface;

[0034] Adjusting the target prompt text based on the display requirement to obtain a processed target prompt text;

[0035] Encapsulating the processed target prompt text into corresponding response data;

[0036] The response data is returned to the front-end interface.

[0037] Furthermore, after the step of training and fine-tuning the preset pre-trained language model using the sample data set and the fine-tuning algorithm based on low-rank adaptation to obtain a prompt text construction model that meets the expected construction conditions, the method further includes:

[0038] Obtaining a target storage strategy corresponding to the prompt text construction model;

[0039] Determining a target storage medium corresponding to the prompt text construction model;

[0040] The prompt text construction model is stored based on the target storage strategy and the target storage medium.

[0041] Furthermore, after the step of returning the target prompt text to the front-end interface, the method further includes:

[0042] Call the preset interface monitoring tool;

[0043] Based on the interface monitoring tool, collecting operation data corresponding to the front-end interface; wherein the number of the operation data includes multiple;

[0044] Determine whether there is abnormal operation data exceeding the corresponding warning threshold among all the operation data;

[0045] If so, extracting the abnormal operation data from the operation data, and generating corresponding warning notification information based on the abnormal operation data;

[0046] Obtain communication information of interface operation and maintenance personnel;

[0047] Based on the communication information, the early warning notification information is pushed to the interface operation and maintenance personnel.

[0048] In order to solve the above technical problems, the embodiment of the present application further provides a prompt text generation device based on artificial intelligence, which adopts the following technical solution:

[0049] A collection module, used to collect pictures that meet the quality conditions and are generated by the target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple;

[0050] An adding module, used to perform content adding processing on the picture to obtain a Chinese description corresponding to the picture;

[0051] A construction module, used to construct a data pair corresponding to the picture based on the Chinese description and the prompt text;

[0052] A preprocessing module, used to preprocess the data pair based on a preset processing strategy to obtain a corresponding sample data set;

[0053] A training module, used to train and fine-tune a preset pre-trained language model using the sample data set and a fine-tuning algorithm based on low-rank adaptation to obtain a prompt text construction model that meets the expected construction conditions;

[0054] A first judgment module is used to judge whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user;

[0055] A prediction module, configured to perform prediction processing on the target Chinese description based on the prompt text construction model, and generate a target prompt text corresponding to the target Chinese description;

[0056] The return module is used to return the target prompt text to the front-end interface.

[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0058] Collecting pictures that meet quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple;

[0059] Performing content adding processing on the picture to obtain a Chinese description corresponding to the picture;

[0060] Constructing a data pair corresponding to the picture based on the Chinese description and the prompt text;

[0061] Preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set;

[0062] Using the sample data set and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune a preset pre-trained language model, to obtain a prompt text construction model that meets expected construction conditions;

[0063] Determine whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user;

[0064] If yes, construct a model based on the prompt text to perform prediction processing on the target Chinese description to generate a target prompt text corresponding to the target Chinese description;

[0065] The target prompt text is returned to the front-end interface.

[0066] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0067] Collecting pictures that meet quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple;

[0068] Performing content adding processing on the picture to obtain a Chinese description corresponding to the picture;

[0069] Constructing a data pair corresponding to the picture based on the Chinese description and the prompt text;

[0070] Preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set;

[0071] Using the sample data set and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune a preset pre-trained language model, to obtain a prompt text construction model that meets expected construction conditions;

[0072] Determine whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user;

[0073] If yes, construct a model based on the prompt text to perform prediction processing on the target Chinese description to generate a target prompt text corresponding to the target Chinese description;

[0074] The target prompt text is returned to the front-end interface.

[0075] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0076] The present application first collects pictures that meet the quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple; and performs content addition processing on the pictures to obtain a Chinese description corresponding to the pictures; then constructs a data pair corresponding to the pictures based on the Chinese description and the prompt text; and pre-processes the data pair based on a preset processing strategy to obtain a corresponding sample data set; then uses the sample data set and a fine-tuning algorithm based on low-rank adaptation to train and fine-tune the preset pre-trained language model to obtain a prompt text construction model that meets the expected construction conditions; subsequently determines whether a prompt text generation request triggered by the user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user; if so, performs prediction processing on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target Chinese description; and finally returns the target prompt text to the front-end interface. The present application constructs a sample data set by using collected pictures that meet quality requirements and are generated by a target image generation model, and prompt texts corresponding to the pictures, and then uses the sample data set and a fine-tuning algorithm based on low-rank adaptation to train and fine-tune a preset pre-trained language model to obtain a prompt text construction model, so that the prompt text construction model can be subsequently used to predict the target Chinese description input by the user, so that the target prompt text suitable for the target image generation model can be automatically, quickly and accurately generated, which effectively lowers the threshold for writing prompt texts of the image generation model in a Chinese environment, improves the generation efficiency of prompt texts suitable for the target image generation model, and ensures the generation quality of the generated prompt texts. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0078] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0079] Figure 2 A flowchart of an embodiment of a method for generating prompt text based on artificial intelligence according to the present application;

[0080] Figure 3 It is a structural schematic diagram of an embodiment of an artificial intelligence-based prompt text generation device according to the present application;

[0081] Figure 4It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0083] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0084] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0085] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0086] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0087] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0088] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .

[0089] It should be noted that the artificial intelligence-based prompt text generation method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based prompt text generation device is generally set in the server / terminal device.

[0090] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0091] Continue to refer Figure 2 , showing a flow chart of an embodiment of the prompt text generation method based on artificial intelligence according to the present application. According to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted. The prompt text generation method based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario where it is necessary to generate a target prompt text suitable for a target image generation model. Then, the prompt text generation method based on artificial intelligence can be applied to products in these scenarios. For example, when generating insurance marketing posters in the financial insurance field, the target prompt text corresponding to the insurance marketing poster generated by the target image generation model needs to be generated. The prompt text generation method based on artificial intelligence comprises the following steps:

[0092] Step S201, collecting pictures that meet quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple.

[0093] In this embodiment, the method for generating prompt text based on artificial intelligence is executed on an electronic device (e.g. Figure 1The server / terminal device shown in the figure) can obtain the picture and the corresponding prompt text through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The execution subject of the present application may be a prompt text generation system, which is an intelligent writing assistance system based on a prompt text construction model (ChatGLM2). The prompt text generation system can help non-professionals within the enterprise to quickly and accurately generate high-quality prompt texts (prompt) required for a target image generation model (Stable Diffusion model). Among them, the above-mentioned target image generation model is specifically a Stable Diffusion model, which is an open source image generation model based on a diffusion model, and is currently widely used in generating avatars, wallpapers, posters and other processing. However, the current mainstream Stable Diffusion models are all trained on English data sets. The above-mentioned preset channels may include channels such as communities, open source projects, and professional design websites. The above-mentioned images that meet the quality requirements refer to high-quality images generated by the Stable Diffusion model, and the above-mentioned prompt texts refer to prompts corresponding to the high-quality images, which cover different themes, styles, and details.

[0094] Step S202, performing content addition processing on the picture to obtain a Chinese description corresponding to the picture.

[0095] In this embodiment, a questionnaire or task can be designed and released through internal employees, partners or external crowdsourcing platforms. Participants are required to provide a concise and clear Chinese description (zh_caption) for each picture, and ensure that the description can accurately reflect the content of the picture or the artistic conception to be conveyed.

[0096] Step S203: construct a data pair corresponding to the picture based on the Chinese description and the prompt text.

[0097] In this embodiment, a target correspondence relationship between the Chinese description and the prompt text can be generated based on the correspondence relationship between the image and the prompt text, and the correspondence relationship between the image and the Chinese description, and then according to the target correspondence relationship, the Chinese description and the prompt text are used to construct a data pair corresponding to the image. The number of data pairs includes multiple, and one data pair includes a Chinese description and a prompt text with a correspondence relationship.

[0098] Step S204: pre-process the data pair based on a preset processing strategy to obtain a corresponding sample data set.

[0099] In this embodiment, the specific implementation process of preprocessing the data pair based on the preset processing strategy to obtain the corresponding sample data set will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0100] Step S205, using the sample data set and a low-rank adaptive fine-tuning algorithm to train and fine-tune the preset pre-trained language model, to obtain a prompt text construction model that meets the expected construction conditions.

[0101] In this embodiment, the above-mentioned fine-tuning algorithm based on low-rank adaptation is the LORA (Low-Rank Adaptation) algorithm. The LORA algorithm is a parameter-efficient fine-tuning method that adapts to new tasks by adding a low-rank matrix on the basis of a pre-trained model without modifying all the parameters of the pre-trained model. Specifically, the sample data set and the fine-tuning algorithm based on low-rank adaptation are used to train and fine-tune the preset pre-trained language model, and the process of obtaining a prompt text construction model that meets the expected construction conditions includes: 1. Prepare the LORA library. Make sure that a library that supports LORA is installed in the environment, such as the transformers library (a version that supports LORA). If not, find a transformers branch or similar library that supports LORA from GitHub. 2. Load the pre-trained model. Load the pre-trained model of ChatGLM26b as the above-mentioned pre-trained language model, and prepare the model configuration for fine-tuning. 3. Set hyperparameters. Select appropriate hyperparameters, such as learning rate (usually smaller than pre-training), batch size (adjusted according to GPU memory), number of iterations (determined by task complexity and data volume), rank of LORA matrix (affects model adaptability and computational complexity), etc. 4. Set up LORA layer. Insert LORA layer at appropriate locations in the model (such as each layer of the decoder). This usually involves modifying the configuration of the model to include LORA layer and updating only the parameters of these LORA layers during training. 5. Training process. Load the sorted sample dataset. Use the sample dataset for iterative training, and in each iteration: Forward propagation: pass the input natural language description through the model (including LORA layer) to obtain the predicted prompt. Calculate loss: compare the difference between the predicted prompt and the real prompt, and calculate the loss value. Backward propagation: update the parameters of the LORA layer according to the loss value. Monitor the loss function and validation set performance during training, and repeat the training process until the model performance reaches a satisfactory level, that is, it meets the above expected construction conditions, thereby obtaining the above prompt text construction model. 6. Save the model. After the training is completed, save the model containing the LORA parameters, that is, the model constructed with the above prompt text for subsequent use.

[0102] Step S206, determining whether a prompt text generation request triggered by the user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user.

[0103] In this embodiment, when the user inputs the target Chinese description and user information in the front-end interface and clicks the prompt generation button, the front-end code constructs an HTTP request containing the user input, namely the prompt text generation request, and sends it to the back-end service of the prompt text generation system. If a click action is detected on the prompt generation button, it is determined that the prompt text generation request triggered by the user in the preset front-end interface is received. The target Chinese description is the Chinese description information corresponding to the target prompt text that the user needs to generate for the target image generation model.

[0104] Step S207: If yes, a prediction process is performed on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target Chinese description.

[0105] In this embodiment, the above-mentioned specific implementation process of constructing a model based on the prompt text to predict the target Chinese description and generate a target prompt text corresponding to the target Chinese description will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0106] Step S208, returning the target prompt text to the front-end interface.

[0107] In this embodiment, the specific implementation process of returning the target prompt text to the front-end interface will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0108] The present application constructs a sample data set by using collected pictures that meet quality requirements and are generated by a target image generation model, and prompt texts corresponding to the pictures, and then uses the sample data set and a fine-tuning algorithm based on low-rank adaptation to train and fine-tune a preset pre-trained language model to obtain a prompt text construction model, so that the prompt text construction model can be subsequently used to predict the target Chinese description input by the user, so that the target prompt text suitable for the target image generation model can be automatically, quickly and accurately generated, which effectively lowers the threshold for writing prompt texts of the image generation model in a Chinese environment, improves the generation efficiency of prompt texts suitable for the target image generation model, and ensures the generation quality of the generated prompt texts.

[0109] In some optional implementations, step S204 includes the following steps:

[0110] Get the preset data cleaning strategy.

[0111] In this embodiment, the policy content of the above data cleaning policy may include deduplication processing, quality assessment processing and correspondence verification processing. Specifically, deduplication: using hash functions or database query technology to automatically detect and delete duplicate data pairs. Quality assessment: organizing professionals to conduct manual review and eliminate low-quality, ambiguous or irrelevant data pairs. Correspondence verification: ensuring that the Chinese description and prompt of each picture are highly consistent in content, and make manual adjustments when necessary.

[0112] The data pair is cleansed based on the data cleaning strategy to obtain a corresponding first data pair.

[0113] In this embodiment, data cleaning processing may be performed on the data pair according to the policy content of the above data cleaning policy, so as to obtain a corresponding first data pair.

[0114] Get the preset instruction template.

[0115] In this embodiment, according to the task requirement of constructing a prompt text construction model for accurately generating prompt text corresponding to the prompt text used in the target image generation model, i.e., the StableDiffusion model, a clear and unambiguous fine-tuning instruction template, i.e., the above instruction template, is pre-designed to ensure that the model can accurately understand and generate prompt text that meets the requirements. Specifically, the content of the above instruction template may include: prefix: Please transcribe the following natural description sentence into sd_prompt, {natural description sentence}.

[0116] The first data pair is formatted based on the instruction template to obtain a corresponding second data pair.

[0117] In this embodiment, the first data pair after cleaning can be formatted according to the instruction template to generate the corresponding second data pair. Specifically, the first data pair is formatted according to the instruction template. For each data pair, the Chinese description is inserted into the {natural description sentence} position of the instruction template, sd_prompt remains unchanged, and the current data pair obtained is used as a sample. In addition, the formatted data can also be saved as a text file (such as JSONL or TXT format), with each sample occupying one line for subsequent training and evaluation.

[0118] The second data pair is used as the sample data set.

[0119] The present application obtains a preset data cleaning strategy; then performs data cleaning processing on the data pair based on the data cleaning strategy to obtain a corresponding first data pair; then obtains a preset instruction template; subsequently formats the first data pair based on the instruction template to obtain a corresponding second data pair, and uses the second data pair as the sample data set. The present application obtains a first data pair by performing data cleaning processing on the data pair based on a preset data cleaning strategy, and then formats the first data pair based on the use of an instruction template, so that the preprocessing of the data pair can be completed quickly and intelligently and the corresponding sample data set can be obtained, thereby improving the construction efficiency of the sample data set and ensuring the data accuracy of the obtained sample data set.

[0120] In some optional implementations of this embodiment, the prompt text generation request also carries the user information of the user; step S207 includes the following steps:

[0121] The user information and the target Chinese description are extracted from the prompt text generation request.

[0122] In this embodiment, when the user inputs the target Chinese description and user information in the front-end interface and clicks the prompt generation button, the front-end code constructs an HTTP request containing the user input, i.e., the prompt text generation request, and sends it to the back-end service of the prompt text generation system. The prompt text generation request can be parsed to extract the corresponding user information and the target Chinese description. The user information can refer to the user's name information. The target Chinese description is the Chinese description information corresponding to the target prompt text that the user needs to generate for the target image generation model.

[0123] The user is authenticated based on the user information.

[0124] In this embodiment, the specific implementation process of the above-mentioned authorization verification of the user based on the user information will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0125] If the user passes the authority verification, the prompt text is called to build a model.

[0126] In this embodiment, after the prompt text construction model is completed, the prompt text construction model is further encapsulated into a callable service to ensure that the backend service can call the model prompt text construction for prediction processing.

[0127] The target Chinese description is predicted based on the prompt text construction model to generate a target prompt text corresponding to the target prompt text.

[0128] In this embodiment, the target prompt text can be input into the prompt text construction model, and then the prompt text construction model uses natural language processing technology and deep learning algorithm to generate a corresponding target prompt text according to the input target Chinese description.

[0129] After receiving the prompt text generation request triggered by the user in the front-end interface, the present application will intelligently extract the user information and the target Chinese description from the prompt text generation request, and perform authority verification on the user based on the user information. Only when it is detected that the user has passed the authority verification will the prompt text construction model be called to perform predictive processing on the target Chinese description, and then generate a target prompt text corresponding to the target prompt text, which effectively ensures the intelligent and standardized processing of the prompt text generation request and improves the response security to the prompt text generation request.

[0130] In some optional implementations, the performing authority verification on the user based on the user information includes the following steps:

[0131] A designated role corresponding to the user information is determined.

[0132] In this embodiment, for the enterprise, corresponding permissions and roles will be defined in advance for each employee in the enterprise. Specifically, define permissions: First, it is necessary to clearly indicate all possible operation permissions in the prompt text generation system. These operation permissions can be subdivided into different levels according to business needs, such as module level, function level and data level. Each permission should have a unique identifier for easy management and control. Define roles: Define different roles according to the responsibilities and required permissions of employees. Each role can contain multiple permissions, which together constitute the scope of responsibilities of the role. Assign permissions to roles: Assign defined permissions to corresponding roles. By considering the responsibilities and required permissions of each role, ensure that each role has the minimum set of permissions required to complete its work, that is, follow the principle of least authority. Assign roles to users: Assign defined roles to corresponding users according to the actual positions and responsibilities of employees. In this way, each employee indirectly obtains the corresponding operation permissions through his role. Among them, the above-mentioned user information may include the name information of the user. And there is a one-to-one correspondence between the name of each employee and the role. The role corresponding to the user information, that is, the above-mentioned designated role, can be queried using the above-mentioned user information.

[0133] Get the specified permission corresponding to the specified role.

[0134] In this embodiment, the specified permissions may be obtained by querying all permissions possessed by the specified role.

[0135] It is determined whether the specified permissions include operation permissions corresponding to the business operation generated by the prompt text.

[0136] In this embodiment, all the operation permissions included in the above-mentioned designated permissions may be analyzed to detect whether the operation permissions corresponding to the business operation generated by the prompt text are included in all the operation permissions.

[0137] If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.

[0138] In this embodiment, if the specified permissions include the operation permissions corresponding to the business operation of prompt text generation, it indicates that the user has the operation permissions corresponding to the prompt text generation operation, and it is determined that the user has passed the permission verification. If the specified permissions do not include the operation permissions corresponding to the business operation of prompt text generation, it indicates that the user does not have the operation permissions corresponding to the prompt text generation operation, and it is determined that the user has not passed the permission verification.

[0139] This application determines the designated role corresponding to the user information; then obtains the designated authority corresponding to the designated role; subsequently determines whether the designated authority contains the operation authority corresponding to the business operation generated by the prompt text; if so, determines that the user has passed the authority verification, otherwise determines that the user has not passed the authority verification. In this way, the processing intelligence and accuracy of the user's authority verification are effectively improved, and the accuracy of the obtained user's authority verification results is guaranteed. In addition, only when it is detected that the user has passed the authority verification, will the prompt text construction model be called to predict the target Chinese description, and then generate the target prompt text corresponding to the target prompt text, which effectively guarantees the intelligent processing and standardized processing of the prompt text generation request, and improves the response security of the prompt text generation request.

[0140] In some optional implementations, step S208 includes the following steps:

[0141] Obtain the display requirements corresponding to the front-end interface.

[0142] In this embodiment, the display requirement information of the front-end interface can be queried to obtain the display requirement of the front-end interface. There is no specific limitation on the display requirement of the front-end interface, and it can be set in advance according to the actual interface display requirements.

[0143] The target prompt text is adjusted based on the display requirement to obtain a processed target prompt text.

[0144] In this embodiment, after the target Chinese description is predicted and processed by the prompt text construction model to obtain the target prompt text corresponding to the target Chinese description, the target prompt text can be formatted and processed accordingly to ensure that the processed target prompt text meets the display requirements of the front-end interface.

[0145] The processed target prompt text is encapsulated as corresponding response data.

[0146] In this embodiment, the above response data may specifically be an HTTP response.

[0147] The response data is returned to the front-end interface.

[0148] In this embodiment, after the processed target prompt text is encapsulated as corresponding response data, the response data is then returned to the front-end interface, which can ensure smooth transmission of the response data.

[0149] After the target Chinese description is predicted and processed by the prompt text construction model to obtain the target prompt text corresponding to the target Chinese description, the present application will also intelligently obtain the display requirements corresponding to the front-end interface, and adjust the target prompt text based on the display requirements to obtain the processed target prompt text, and further encapsulate the processed target prompt text into corresponding response data, and subsequently return the response data to the front-end interface, thereby effectively ensuring the smooth transmission of the target prompt text and ensuring that the target prompt text can be displayed normally in the front-end interface, improving the display standardization of the target prompt text, and thus helping to improve the user experience when consulting and using the target prompt text through the front-end interface.

[0150] In some optional implementations of this embodiment, after step S205, the electronic device may further perform the following steps:

[0151] Obtain a target storage strategy corresponding to the prompt text construction model.

[0152] In this embodiment, the above-mentioned target storage strategy may specifically adopt strategies such as scheduled backup or cyclic overwriting to ensure that the prompt text construction model will not be lost due to insufficient storage space.

[0153] Determine a target storage medium corresponding to the prompt text construction model.

[0154] In this embodiment, the selection of the above-mentioned target storage medium is not specifically limited, and may include, for example, a local database, a network disk, a cloud server, a blockchain, etc. Preferably, a blockchain is used as the above-mentioned target storage medium. By using a blockchain to store and manage the prompt text construction model, the security and non-tamperability of the prompt text construction model can be effectively ensured.

[0155] The prompt text construction model is stored based on the target storage strategy and the target storage medium.

[0156] In this embodiment, the target storage strategy can be stored in the target storage medium in the target storage strategy storage manner, thereby completing the storage process of the prompt text construction model.

[0157] The present application obtains the target storage strategy corresponding to the prompt text construction model; then determines the target storage medium corresponding to the prompt text construction model; and subsequently stores and processes the prompt text construction model based on the target storage strategy and the target storage medium. After obtaining the prompt text construction model that meets the expected construction conditions, the present application intelligently obtains the target storage strategy corresponding to the prompt text construction model, determines the target storage medium corresponding to the prompt text construction model, and then stores and processes the prompt text construction model based on the target storage strategy and the target storage medium, thereby ensuring the security of the prompt text construction model and ensuring that the cost prediction model will not be lost due to insufficient storage space, thereby improving the storage intelligence of the cost prediction model.

[0158] In some optional implementations of this embodiment, after step S208, the electronic device may further perform the following steps:

[0159] Call the preset interface monitoring tool.

[0160] In this embodiment, the interface monitoring tool may specifically be a tool having a function of monitoring the interface in real time.

[0161] Based on the interface monitoring tool, operation data corresponding to the front-end interface is collected; wherein the number of the operation data includes multiple.

[0162] In this embodiment, the above-mentioned operation data may at least include data such as response time, error rate, and throughput.

[0163] It is determined whether there is abnormal operation data exceeding a corresponding warning threshold value among all the operation data.

[0164] In this embodiment, warning thresholds corresponding to the operating status of the front-end interface can be pre-set according to actual interface warning requirements, such as response time exceeding the corresponding response time threshold, error rate exceeding the corresponding error rate threshold, and throughput exceeding the corresponding throughput threshold. When the operating data of the above-mentioned front-end interface triggers these warning thresholds, it will be determined that the operating status of the front-end interface has triggered a warning, such as a performance bottleneck. Among them, there is no specific limitation on the values ​​of the above-mentioned response time threshold, error rate threshold, and throughput threshold, and they can be set according to actual monitoring and warning requirements.

[0165] If so, the abnormal operation data is extracted from the operation data, and corresponding warning notification information is generated based on the abnormal operation data.

[0166] In this embodiment, the abnormal operation data can be extracted from the operation data, and the specific properties corresponding to the abnormal operation data and the suggested solutions can be obtained. Then, the abnormal operation data, the specific properties corresponding to the abnormal operation data and the suggested solutions can be filled into a preset warning notification information template to generate the above-mentioned warning notification information. Among them, the above-mentioned warning notification information template can be written and generated according to actual monitoring and warning requirements.

[0167] Get the communication information of the interface operation and maintenance personnel.

[0168] In this embodiment, the interface operation and maintenance personnel may specifically refer to the staff corresponding to the maintenance work of the interface. The communication information may include a mobile phone number or an email address.

[0169] Based on the communication information, the early warning notification information is pushed to the interface operation and maintenance personnel.

[0170] In this embodiment, after the communication information is obtained, the early warning notification information is pushed to the communication terminal corresponding to the communication information of the above-mentioned interface operation and maintenance personnel to complete the early warning notification to the interface operation and maintenance personnel.

[0171] During the use of the front-end interface, the present application will also intelligently call the interface monitoring tool to collect operating data corresponding to the front-end interface. If abnormal operating data exceeding the corresponding warning threshold is detected in all the operating data, the corresponding warning notification information will be automatically generated based on the abnormal operating data, and the warning notification information will be pushed to the corresponding interface operation and maintenance personnel, so that the interface operation and maintenance personnel can promptly discover the performance bottlenecks and potential problems in the front-end interface, and can quickly take corresponding processing measures to ensure the stable operation of the front-end interface, which is conducive to ensuring the stability and reliability of the target page, thereby improving the user experience.

[0172] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0173] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target prompt text, the above-mentioned target prompt text can also be stored in a node of a blockchain.

[0174] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0175] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0176] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0178] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0179] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a prompt text generation device based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0180] like Figure 3 As shown, the prompt text generation device 300 based on artificial intelligence described in this embodiment includes: a collection module 301, an adding module 302, a construction module 303, a preprocessing module 304, a training module 305, a first judgment module 306, a prediction module 307 and a return module 308. Among them:

[0181] The collection module 301 is used to collect pictures that meet the quality conditions and are generated by the target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple;

[0182] An adding module 302 is used to perform content addition processing on the picture to obtain a Chinese description corresponding to the picture;

[0183] A construction module 303, configured to construct a data pair corresponding to the picture based on the Chinese description and the prompt text;

[0184] A preprocessing module 304 is used to preprocess the data pair based on a preset processing strategy to obtain a corresponding sample data set;

[0185] The training module 305 is used to train and fine-tune the preset pre-trained language model using the sample data set and the fine-tuning algorithm based on low-rank adaptation to obtain a prompt text construction model that meets the expected construction conditions;

[0186] The first judgment module 306 is used to judge whether a prompt text generation request triggered by the user in the preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user;

[0187] If yes, the prediction module 307 is used to perform prediction processing on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target Chinese description;

[0188] The return module 308 is used to return the target prompt text to the front-end interface.

[0189] In some optional implementations of this embodiment, the preprocessing module 304 includes:

[0190] The first acquisition submodule is used to acquire a preset data cleaning strategy;

[0191] A cleaning submodule, configured to perform data cleaning processing on the data pair based on the data cleaning strategy to obtain a corresponding first data pair;

[0192] The second acquisition submodule is used to acquire a preset instruction template;

[0193] a formatting submodule, configured to format the first data pair based on the instruction template to obtain a corresponding second data pair;

[0194] A determination submodule is used to use the second data pair as the sample data set.

[0195] In some optional implementations of this embodiment, the prediction module 307 includes:

[0196] An extraction submodule, used for extracting the user information and the target Chinese description from the prompt text generation request;

[0197] A verification submodule, used to verify the authority of the user based on the user information;

[0198] A calling submodule, used for calling the prompt text construction model if the user passes the authority verification;

[0199] The prediction submodule is used to perform prediction processing on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target prompt text.

[0200] In some optional implementations of this embodiment, the verification submodule includes:

[0201] A determination unit, configured to determine a designated role corresponding to the user information;

[0202] An acquisition unit, used to acquire a specified permission corresponding to the specified role;

[0203] A judging unit, used to judge whether the specified authority includes an operation authority corresponding to the business operation generated by the prompt text;

[0204] The determination unit is used to determine that if yes, the user has passed the authority verification; otherwise, determine that the user has not passed the authority verification.

[0205] In some optional implementations of this embodiment, the returning module 308 includes:

[0206] A third acquisition submodule is used to acquire the display requirements corresponding to the front-end interface;

[0207] An adjustment submodule, configured to adjust the target prompt text based on the display requirement to obtain a processed target prompt text;

[0208] The encapsulation submodule is used to encapsulate the processed target prompt text into corresponding response data;

[0209] The return submodule is used to return the response data to the front-end interface.

[0210] In some optional implementations of this embodiment, the prompt text generation device based on artificial intelligence further includes:

[0211] A first acquisition module, used for acquiring a target storage strategy corresponding to the prompt text construction model;

[0212] A determination module, used for determining a target storage medium corresponding to the prompt text construction model;

[0213] A storage module is used to perform storage processing on the prompt text construction model based on the target storage strategy and the target storage medium.

[0214] In some optional implementations of this embodiment, the prompt text generation device based on artificial intelligence further includes:

[0215] A calling module is used to call a preset interface monitoring tool;

[0216] A collection module, used for collecting operation data corresponding to the front-end interface based on the interface monitoring tool; wherein the number of the operation data includes multiple;

[0217] A second judgment module is used to judge whether there is abnormal operation data exceeding the corresponding warning threshold in all the operation data;

[0218] a generating module, configured to extract the abnormal operation data from the operation data and generate corresponding warning notification information based on the abnormal operation data;

[0219] The second acquisition module is used to obtain the communication information of the interface operation and maintenance personnel;

[0220] A push module is used to push the warning notification information to the interface operation and maintenance personnel based on the communication information.

[0221] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0222] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0223] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0224] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the prompt text generation method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0225] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the artificial intelligence-based prompt text generation method.

[0226] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0227] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based prompt text generation method.

[0228] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0229] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A prompt text generation method based on artificial intelligence, characterized in that: The steps include: Collecting pictures that meet quality requirements and are generated by a target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple; Performing content adding processing on the picture to obtain a Chinese description corresponding to the picture; Constructing a data pair corresponding to the picture based on the Chinese description and the prompt text; Preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set; Using the sample data set and a low-rank adaptation-based fine-tuning algorithm to train and fine-tune a preset pre-trained language model, to obtain a prompt text construction model that meets expected construction conditions; Determine whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user; If yes, construct a model based on the prompt text to perform prediction processing on the target Chinese description to generate a target prompt text corresponding to the target Chinese description; The target prompt text is returned to the front-end interface.

2. The method for generating prompt text based on artificial intelligence according to claim 1, characterized in that: The step of preprocessing the data pair based on a preset processing strategy to obtain a corresponding sample data set specifically includes: Get the preset data cleaning strategy; Performing data cleaning processing on the data pair based on the data cleaning strategy to obtain a corresponding first data pair; Get the preset instruction template; Formatting the first data pair based on the instruction template to obtain a corresponding second data pair; The second data pair is used as the sample data set.

3. The method for generating prompt text based on artificial intelligence according to claim 1, characterized in that: The prompt text generation request also carries the user information of the user; the step of performing prediction processing on the target Chinese description based on the prompt text construction model to generate a target prompt text corresponding to the target Chinese description specifically includes: Extracting the user information and the target Chinese description from the prompt text generation request; Performing authority verification on the user based on the user information; If the user passes the authority verification, the prompt text is called to build a model; The target Chinese description is predicted based on the prompt text construction model to generate a target prompt text corresponding to the target prompt text.

4. The method for generating prompt text based on artificial intelligence according to claim 3, characterized in that: The step of verifying the authority of the user based on the user information specifically includes: Determining a designated role corresponding to the user information; Obtaining the specified permissions corresponding to the specified role; Determining whether the specified permissions include an operation permission corresponding to the business operation generated by the prompt text; If so, it is determined that the user has passed the authority verification; otherwise, it is determined that the user has not passed the authority verification.

5. The method for generating prompt text based on artificial intelligence according to claim 1, characterized in that: The step of returning the target prompt text to the front-end interface specifically includes: Obtaining display requirements corresponding to the front-end interface; Adjusting the target prompt text based on the display requirement to obtain a processed target prompt text; Encapsulating the processed target prompt text into corresponding response data; The response data is returned to the front-end interface.

6. The method for generating prompt text based on artificial intelligence according to claim 1, characterized in that: After the step of using the sample data set and the fine-tuning algorithm based on low-rank adaptation to train and fine-tune the preset pre-trained language model to obtain a prompt text construction model that meets the expected construction conditions, the method further includes: Obtaining a target storage strategy corresponding to the prompt text construction model; Determining a target storage medium corresponding to the prompt text construction model; The prompt text construction model is stored based on the target storage strategy and the target storage medium.

7. The method for generating prompt text based on artificial intelligence according to claim 1, characterized in that: After the step of returning the target prompt text to the front-end interface, the method further includes: Call the preset interface monitoring tool; Based on the interface monitoring tool, collecting operation data corresponding to the front-end interface; wherein the number of the operation data includes multiple; Determine whether there is abnormal operation data exceeding the corresponding warning threshold among all the operation data; If so, extracting the abnormal operation data from the operation data, and generating corresponding warning notification information based on the abnormal operation data; Obtain communication information of interface operation and maintenance personnel; Based on the communication information, the early warning notification information is pushed to the interface operation and maintenance personnel.

8. A prompt text generation device based on artificial intelligence, characterized in that: include: A collection module, used to collect pictures that meet the quality conditions and are generated by the target image generation model from multiple preset channels, as well as prompt texts corresponding to the pictures; wherein the number of the pictures includes multiple; An adding module, used to perform content adding processing on the picture to obtain a Chinese description corresponding to the picture; A construction module, used to construct a data pair corresponding to the picture based on the Chinese description and the prompt text; A preprocessing module, used to preprocess the data pair based on a preset processing strategy to obtain a corresponding sample data set; A training module, used to train and fine-tune a preset pre-trained language model using the sample data set and a fine-tuning algorithm based on low-rank adaptation to obtain a prompt text construction model that meets the expected construction conditions; A first judgment module is used to judge whether a prompt text generation request triggered by a user in a preset front-end interface is received; wherein the prompt text generation request carries the target Chinese description input by the user; A prediction module, configured to perform prediction processing on the target Chinese description based on the prompt text construction model, and generate a target prompt text corresponding to the target Chinese description; The return module is used to return the target prompt text to the front-end interface.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the prompt text generation method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the prompt text generation method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.