Image-text content generation, pushing and code generation large model training method

Through the training methods of graphic content generation, push and code generation large models, the problem of insufficient adaptability of graphic content generation and user needs in the existing technology is solved, and efficient and personalized graphic content generation and push are achieved, and the user experience is optimized.

CN119991876APending Publication Date: 2025-05-13BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510046121.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to meet the personalized needs of users in the generation of graphic and text content, resulting in insufficient adaptation between the generated content and user needs.

Method used

A training method for the generation, pushing and code generation of large models of graphic content is proposed, including the generation method of graphic content, the training method of code generation of large models and the push method of graphic content. This method displays the requirement input page in response to the user's chart generation operation, obtains the user's graphics and text input to generate the requirement text, and generates the target image and text content based on the requirement text. At the same time, by obtaining general code snippets and preferred code snippets, pre-training the initial big model, building a training sample set, model training on the big model, and obtaining the trained target code to generate the big model.

Benefits of technology

It achieves a higher degree of adaptability between graphic and text content and user needs, reduces the operation complexity of users in obtaining target graphic and text content, improves the generation efficiency and quality of graphic and text content, makes the generated content more personalized, is suitable for different application scenarios, and optimizes the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991876A_ABST
    Figure CN119991876A_ABST
Patent Text Reader

Abstract

The invention provides an image-text content generation, pushing and code generation large model training method, and relates to the technical field of large models, the method comprises the following steps: in response to a chart generation operation, displaying a demand input page; in response to an input completion operation, obtaining an input image-text generation demand text from an input box provided by the demand display input page; target image-text content generated based on the image-text generation demand text is obtained from a preset image-text display area, and the target image-text content can be scaled in a lossless mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of large model technology, and in particular to the field of artificial intelligence technology such as natural language processing, computer vision and deep learning. Background Art

[0002] With the development of technology, people can use the model capabilities of large models to generate the required graphic content. In related technologies, content can be filled in through preset templates to obtain corresponding graphic content, which is not well adapted to the personalized needs of users. Summary of the invention

[0003] The present invention discloses a training method for a large model of graphic content generation, push and code generation.

[0004] According to the first aspect of the present disclosure, a method for generating graphic content is proposed, comprising: in response to a chart generation operation, displaying a demand input page; in response to an input completion operation, obtaining an input graphic generation demand text from an input box provided in the demand display input page; and obtaining target graphic content generated based on the graphic generation demand text from a preset graphic display area, wherein the target graphic content can be scaled losslessly.

[0005] According to the second aspect of the present disclosure, a training method for a code generation big model is proposed, including: obtaining an initial big model to be trained; obtaining common code snippets and preference code snippets to pre-train the initial big model in the dimension of code generation capability to obtain a first candidate big model; obtaining reference code snippets of each reference preference graphic content in a reference preference graphic content set to construct a first training sample set for the first candidate big model; performing model training on the first candidate big model based on the first training sample set to obtain a trained target code generation big model, wherein the target code generation big model is used to implement the graphic content generation method proposed in the first aspect above.

[0006] According to the third aspect of the present disclosure, a method for pushing graphic content is proposed, comprising: obtaining a trained target code generation model, wherein the target code generation model is obtained based on the training method of the code generation model proposed in the second aspect; in response to a graphic generation operation of a user terminal being triggered, obtaining a user requirement text according to an interactive interface of the user terminal, and inputting the user requirement text into the target code generation model to obtain a target code fragment output by the target code generation model; compiling and rendering the target code fragment to obtain a target graphic content corresponding to the user requirement text, and pushing the target graphic content to the user terminal.

[0007] According to a fourth aspect of the present disclosure, a graphic content generation device is proposed, comprising: a first response module, for displaying a demand input page in response to a chart generation operation; a second response module, for obtaining an input graphic generation demand text from an input box provided in the demand display input page in response to an input completion operation; a first acquisition module, for obtaining target graphic content generated based on the graphic generation demand text from a preset graphic display area, wherein the target graphic content can be scaled losslessly.

[0008] According to the fifth aspect of the present disclosure, a training device for a code generation big model is proposed, comprising: a second acquisition module, used to acquire an initial big model to be trained; a pre-training module, used to acquire common code snippets and preference code snippets, so as to pre-train the initial big model in the dimension of code generation capability, and obtain a first candidate big model; a construction module, used to acquire reference code snippets of each reference preference graphic content in a reference preference graphic content set, so as to construct a first training sample set for the first candidate big model; a second training module, used to perform model training on the first candidate big model based on the first training sample set, and obtain a trained target code generation big model, wherein the target code generation big model is used to implement the graphic content generation device proposed in the fourth aspect.

[0009] According to the sixth aspect of the present disclosure, a device for pushing graphic content is proposed, including: a third acquisition module, used to obtain a trained target code generation model, wherein the target code generation model is obtained based on the training device of the code generation model proposed in the fifth aspect; a fourth acquisition module, used to respond to the triggering of a graphic generation operation on the user side, obtain a user demand text according to the interactive interface of the user side, and input the user demand text into the target code generation model to obtain a target code fragment output by the target code generation model; a push module, used to compile and render the target code fragment, obtain the target graphic content corresponding to the user demand text, and push the target graphic content to the user side.

[0010] According to the seventh aspect of the present disclosure, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the graphic content generation method proposed in the first aspect above and / or the code generation large model training method proposed in the second aspect above and / or the graphic content push method proposed in the third aspect.

[0011] According to the sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to enable the computer to execute the graphic content generation method proposed in the first aspect and / or the code generation large model training method proposed in the second aspect and / or the graphic content push method proposed in the third aspect.

[0012] According to the seventh aspect of the present disclosure, a computer program product is proposed, including a computer program, which, when executed by a processor, implements the graphic content generation method proposed in the first aspect and / or the code generation large model training method proposed in the second aspect and / or the graphic content push method proposed in the third aspect.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0015] Figure 1 A schematic diagram of a flow chart of a method for generating graphic content according to an embodiment of the present disclosure;

[0016] Figure 2 A schematic diagram of a flow chart of a method for generating graphic content according to another embodiment of the present disclosure;

[0017] Figure 3 A flowchart of a method for training a large model for code generation according to an embodiment of the present disclosure;

[0018] Figure 4 A flowchart of a method for training a large model for code generation according to another embodiment of the present disclosure;

[0019] Figure 5 A flowchart of a method for training a large model for code generation according to another embodiment of the present disclosure;

[0020] Figure 6 A schematic diagram of a flow chart of a method for pushing graphic content according to an embodiment of the present disclosure;

[0021] Figure 7 A schematic diagram of a user interface of an embodiment of the present disclosure;

[0022] Figure 8 is a schematic diagram of a user terminal interface of another embodiment of the present disclosure;

[0023] Fig. 9 It is a structural schematic diagram of a device for generating graphic content according to an embodiment of the present disclosure;

[0024] Fig.10 A schematic diagram of the structure of a training device for a large code generation model according to an embodiment of the present disclosure;

[0025] Fig.11 This is a schematic diagram of the structure of a device for pushing graphic content according to an embodiment of the present disclosure;

[0026] Fig.12 A schematic block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0028] Data processing is a basic part of system engineering and automatic control. Data is a form of expression of facts, concepts or instructions, which can be processed by manual or automatic devices. After data is interpreted and given a certain meaning, it becomes information. Data processing is the collection, storage, retrieval, processing, transformation and transmission of data. The basic purpose of data processing is to extract and derive valuable and meaningful data for certain specific people from a large amount of data that may be disorganized and difficult to understand.

[0029] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Natural language processing is mainly used in machine translation, public opinion monitoring, automatic summarization, opinion extraction, text classification, question answering, text semantic comparison, speech recognition, Chinese OCR, etc.

[0030] Computer vision refers to the use of cameras and computers to replace human eyes to identify, track and measure targets, and further perform image processing to make computer processing into images that are more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain "information" from images or multidimensional data. The information here refers to the information defined by Shannon that can be used to help make a "decision". Because perception can be seen as extracting information from sensory signals, computer vision can also be seen as a science that studies how to make artificial systems "perceive" from images or multidimensional data.

[0031] Deep learning refers specifically to machine learning based on deep neural network models and methods. It is developed based on statistical machine learning, artificial neural network and other algorithmic models, combined with the development of contemporary big data and large computing power. The most important technical feature of deep learning is the ability to automatically extract features. The extracted features are also called deep features or deep feature representations. Compared with artificially designed features, deep features have stronger and more robust representation capabilities. Therefore, the essence of deep learning is feature representation learning. Deep neural networks are the model basis for deep learning to automatically extract features. Deep neural networks are essentially a nested series of nonlinear transformations.

[0032] Artificial Intelligence (AI) is an important driving force for the new round of scientific and technological revolution and industrial transformation. It is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial Intelligence is an important part of the intelligent discipline. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial Intelligence is a very broad science, including robots, speech recognition, image recognition, natural language processing, expert systems, machine learning, computer vision, etc.

[0033] Figure 1 FIG. 1 is a flow chart of a method for generating graphic content according to an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0034] S101, in response to a chart generation operation, displaying a demand input page.

[0035] In the disclosed embodiment, the user can realize the intelligent generation of graphic and text content by performing relevant operations on the user terminal.

[0036] Optionally, an option for realizing graphic content generation on the user side can be obtained. When the user clicks on the option, it can be determined that a chart generation operation has occurred on the user side. In this scenario, when a chart generation operation occurs on the user side, the intelligent generation process of graphic content can be entered.

[0037] The user terminal may provide a page for the user to input demand information, and the page may be determined as the demand input page displayed on the user terminal.

[0038] S102, in response to the input completion operation, obtaining the inputted image and text from the input box provided in the demand display input page to generate the demand text.

[0039] In the embodiment of the present disclosure, an input box is provided on the demand input page for the user to input text information. When the user clicks on the input box, the input method can be called. The user can input the generation requirements of the required graphic content into the input box through the called input method, wherein the requirement text input by the user can be marked as graphic generation requirement text.

[0040] Optionally, an option for confirming that input is complete is provided on the requirement input page. After the user has entered all the requirement text generated by the image and text into the input box, the user can complete the input operation of the requirement text by clicking on the option. In other words, the user's operation of clicking on the option completes the input operation on the user side.

[0041] Furthermore, after the input operation is completed, the required text information input by the user can be obtained from the input box provided to the user by the user end, and the required text can be generated as the graphic input by the current user.

[0042] S103, obtaining target graphic content generated based on the graphic generation requirement text from a preset graphic display area, wherein the target graphic content can be scaled losslessly.

[0043] In the disclosed embodiment, a user terminal is provided with a graphic and text display area. After the user terminal obtains the graphic and text generation requirement text input by the user, the graphic and text generation requirement text can be transmitted to the back-end server, and the graphic and text generation requirement text is algorithmically processed by the corresponding graphic and text content generation algorithm configured on the server, and then the graphic and text content obtained based on the graphic and text generation requirement text is obtained based on the result of the algorithm processing.

[0044] Among them, the graphic content can be determined as the target graphic content and pushed to the user terminal through the interactive link between the server and the user terminal. After receiving the target graphic content, the user terminal can display the target graphic content in the graphic display area set by it for the user to view.

[0045] It should be noted that the image and text display area provided by the user terminal may have a set size limit. Therefore, the target image and text content in the present disclosure is an image that can be losslessly scaled, that is, the target image and text content in the present disclosure can be scaled without affecting the image quality.

[0046] The graphic content generation method proposed in the present disclosure can display a demand input page when a chart generation operation appears on the user terminal, and the user can enter the corresponding graphic generation demand text in the input box provided on the demand input page, and obtain the losslessly scalable target graphic content obtained based on the graphic generation demand text from the graphic display area of ​​the user terminal. In the present disclosure, the user performs a chart generation operation on the user terminal, and obtains the corresponding target graphic content by inputting the graphic generation demand text, which reduces the complexity of the user's operation to obtain the target graphic content, obtains the target graphic content based on the graphic generation demand text, improves the degree of adaptation between the target graphic content and the user's needs, and the target graphic content can be losslessly scaled, so that the user can clearly view the target graphic content at any zoom ratio, improves the viewing quality of the target graphic content, and optimizes the user experience.

[0047] In the above embodiment, the generation of target graphic content can also be combined with Figure 2 understand, Figure 2 FIG. 1 is a flow chart of a method for generating graphic content according to another embodiment of the present disclosure. Figure 2 As shown, the method includes:

[0048] S201, identifying whether the target graphic content matches the graphic generation requirement text.

[0049] In the disclosed embodiment, the target graphic content displayed on the user side may not match the graphic generation requirement text input by the user. In this scenario, the user can check whether the target graphic content meets the corresponding requirement by zooming in and out on the target graphic content.

[0050] S202, in response to the regeneration option on the user terminal being operated, determining and identifying that the target graphic content does not match the graphic generation requirement text, obtaining new target graphic content generated based on the graphic generation requirement text from the graphic display area.

[0051] In the embodiment of the present disclosure, the user terminal can set an option for regenerating graphic content on the page to which the graphic display area belongs. After viewing the target graphic content, if the user determines that the target graphic content cannot meet the corresponding requirements, the graphic content regeneration option can be operated to enable the user terminal to recognize that the currently displayed target graphic content does not match the graphic generation requirement text input by the user.

[0052] In this scenario, the user end can retransmit the image and text generation requirement text to the server. After receiving the new generation requirement, the server can perform algorithmic processing on the image and text generation requirement text again based on the configured algorithm to obtain new target image and text content, and transmit it to the user end. The user end can display the received new target image and text content in the image and text display area for the user to view.

[0053] In the embodiments of the present disclosure, the process of generating the target graphic content can be understood in combination with the following contents:

[0054] Optionally, the initial large model to be trained is pre-trained in the dimension of code generation capability to obtain a candidate large model, and the candidate large model is model trained based on the pre-acquired reference graphic code snippets to obtain a trained target code generation large model.

[0055] In the disclosed embodiment, the server can acquire the target graphic content by calling the model capabilities of the big model, wherein the big model to be trained can be acquired as the initial big model, and the initial big model can be pre-trained through preset pre-training samples, so that the initial big model can learn the characteristics of the code snippet and thus have the ability to generate code snippets. Furthermore, the big model obtained after the pre-training is completed is determined as a candidate big model.

[0056] Furthermore, the pre-trained candidate big model continues to be trained so that the candidate big model can learn the code snippet features that meet user needs and user preferences, thereby enabling the trained big model to have the ability to generate code snippets that meet user needs and user preferences. Further, the trained big model is determined as the target code generation big model.

[0057] Optionally, in response to the user terminal transmitting the graphic-text generation requirement text to the server, the server calls the model capability of the target code generation large model to obtain the target code fragment corresponding to the graphic-text generation requirement text, and compiles and renders the target code fragment to obtain the target graphic-text content corresponding to the graphic-text generation requirement text.

[0058] In the disclosed embodiment, after the server receives the graphic generation requirement text transmitted by the user end, it can generate the code snippet required for the target graphic content of the graphic generation requirement text as the target code snippet by calling the model capability of the target code generation large model, and obtain the target graphic content corresponding to the graphic generation requirement text by compiling and rendering the target code snippet.

[0059] The target graphic content can be transmitted to the user terminal and displayed in the graphic display area of ​​the user terminal for the user to view.

[0060] The graphic content generation method proposed in the present invention is that the user performs a chart generation operation in the user terminal, and obtains the corresponding target graphic content by inputting the graphic generation requirement text, thereby reducing the complexity of the user's operation to obtain the target graphic content, calling the model capability of the target code generation large model to obtain the target code fragment of the graphic generation requirement text, and then obtaining the target graphic content through compilation and rendering of the target code fragment, thereby improving the degree of adaptation between the target graphic content and the user's needs, and improving the generation efficiency of the target graphic content, and the target graphic content can be losslessly scaled, so that the user can clearly view the target graphic content at any scaling ratio, thereby improving the viewing quality of the target graphic content and optimizing the user experience.

[0061] Figure 3 A flowchart of a method for training a large model using code generation according to an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the method includes:

[0062] S301, obtaining an initial large model to be trained.

[0063] In daily work and life, people can input relevant graphic content generation requirements into the corresponding user terminal, and realize the generation of personalized graphic content through the server corresponding to the user terminal.

[0064] In the disclosed embodiment, the server can obtain the code snippets required to generate graphic content by calling the model capabilities of the large model, and compile the code snippets output by the large model to obtain graphic content corresponding to the graphic content generation requirements.

[0065] Optionally, before calling the model capability of the large model to obtain the code snippet for generating the corresponding graphic content, the model parameters of the large model may be adjusted and optimized to improve the degree of adaptation between the graphic content generated by the code snippet output by the large model and user needs.

[0066] Among them, the large model that needs to adjust and optimize model parameters can be determined as the initial large model to be trained.

[0067] S302, obtaining common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability, and obtaining a first candidate large model.

[0068] In the disclosed embodiment, the code snippets required for the generation of graphic content are subject to set limiting conditions, wherein the limiting conditions may include code writing logic, code type, and code format.

[0069] Optionally, the initial large model to be trained may not have the ability to generate code snippets that meet the above-mentioned restrictions. In this scenario, the initial large model needs to be pre-trained for code generation capabilities.

[0070] Optionally, a code snippet that meets the above-mentioned restrictions can be obtained as a general code snippet, and a code snippet that meets the above-mentioned restrictions and carries user preference information can be obtained as a preferred code snippet, and the initial big model can be pre-trained in the code generation capability dimension based on the general code snippet and the preference code snippet, so that the initial big model can learn to generate code snippets that meet the above-mentioned restrictions, and the big model after the pre-training is determined as the first candidate big model.

[0071] In this scenario, the initial large model can be pre-trained based on common code snippets, so that the initial large model can learn the ability to generate corresponding code snippets based on the common code snippets, and the initial large model that has learned the code snippet generation ability can continue to be pre-trained based on the preferred code snippets, so that the initial large model can learn the ability to generate code snippets that match the user's preferences, thereby obtaining the first candidate large model.

[0072] It should be noted that the code type to which the code snippet proposed in the embodiments of the present disclosure belongs may be an SVG code snippet, or may be other code snippets capable of generating graphic content, which is not specifically limited here.

[0073] S303, obtaining reference code snippets of each reference preference graphic content in the reference preference graphic content set to construct a first training sample set for a first candidate large model.

[0074] In the disclosed embodiment, the user has set preferences for the generation of graphic content. In this scenario, the acquired graphic content that meets the user preference information and meets the preset graphic content quality can be determined as the reference preference graphic content.

[0075] The user preference information may include preference information under the color dimension and preference information under the style dimension, etc., which are not specifically limited here.

[0076] Optionally, the types of graphic and text content required by users may vary for different application scenarios. In this scenario, based on the users' daily application scenarios, it is possible to determine a variety of graphic and text content vertical categories that meet the users' needs, and filter out graphic and text content belonging to each graphic and text content vertical category and matching the user's preferences from the open source graphic and text content database as reference preference graphic and text content, thereby forming a corresponding reference preference graphic and text content set.

[0077] Among them, the number of reference preference graphic content under each graphic content vertical category must be greater than or equal to the preset graphic content number threshold.

[0078] It should be noted that in the process of screening and obtaining reference preference graphic and text content, for any graphic and text content, when it is recognized that the graphic and text content meets the corresponding screening conditions, the graphic and text content can be determined as the reference preference graphic and text content, and, when it is recognized that there is part of the graphic and text content that meets the corresponding screening conditions in the graphic and text content, the part of the graphic and text content can be cropped and the cropped part of the graphic and text content can be used as the reference preference graphic and text content.

[0079] Furthermore, based on a preset code writing strategy, code writing is performed based on each reference preference graphic content, and the code snippets obtained by writing and capable of generating each reference preference graphic content are used as reference code snippets for each reference preference graphic content, wherein the reference code snippets for each reference preference graphic content can be obtained by manual writing, and the reference code snippets for each reference preference graphic content can also be obtained by other code snippet writing methods, which are not specifically limited here.

[0080] As an example, Figure 4 As shown, the vertical categories of graphic content include Figure 4 The single-page slide (PPT), architecture diagram category, and text poster category shown in the example, for obtaining the reference preferred graphic content under the corresponding vertical category of the single-page PPT, it can be obtained through Figure 4 The material retrieval module shown in the figure selects some single-page PPT graphic content that meets the preset conditions from the graphic content database, and Figure 4 The collaborative design tool (Figma) and artificial intelligence tool shown in the figure reproduce the selected single-page PPT graphic content, and then obtain Figure 4 The single-page PPT shown corresponds to the reference preference graphic and text contents under the vertical category.

[0081] Further, through Figure 4 The code standardization module shown writes code snippets that can generate reference preference graphic and text contents under the vertical category corresponding to a single-page PPT, thereby obtaining reference code snippets for reference preference graphic and text contents under the vertical category corresponding to a single-page PPT.

[0082] In this example, the acquisition of the reference preference graphic content and the reference code snippets of the reference preference graphic content for the vertical category of graphic content corresponding to the architecture diagram class and the vertical category corresponding to the text poster class can be understood in conjunction with the acquisition process of the reference preference graphic content and the reference code snippets of the reference preference graphic content under the vertical category corresponding to the above-mentioned single-page PPT, which will not be repeated here.

[0083] In the embodiments of the present disclosure, based on the training sample construction method in the related technology, sample construction processing can be performed on the reference code fragments of each reference preference graphic content, so as to obtain a sample set for training the large model based on each reference code fragment, as the first training sample set of the first candidate large model.

[0084] S304: Perform model training on the first candidate large model based on the first training sample set to obtain a trained target code generation large model.

[0085] Among them, the target code generation model is used to implement the above Figure 1 to Figure 2 The graphic content generation method proposed in the embodiment.

[0086] In the disclosed embodiment, a training sample for the current round of model training in the first training sample set may be obtained, and the training sample may be input into the first candidate large model to obtain a code snippet output by the first candidate large model based on the training sample.

[0087] Furthermore, the training loss of the first candidate large model is obtained based on the code snippet, thereby achieving iterative optimization of the model parameters of the first candidate large model, and then obtaining the trained large model as the target code to generate the large model.

[0088] The present invention discloses a method for training a code generation big model, obtains an initial big model to be trained, and pre-trains the initial big model based on common code snippets and preference code snippets to obtain a first candidate big model, and performs model training on the first candidate big model based on a first training sample set constructed based on reference code snippets of reference preference graphic content, thereby obtaining a trained target code generation big model. In the present disclosure, the initial large model is pre-trained by common code snippets and preference code snippets, so that the first candidate large model learns the features of the corresponding code snippets, thereby having the ability to generate the corresponding code snippets, providing a training basis for the downstream tasks of subsequent large model training, and the first candidate large model is trained based on the training samples constructed based on the reference code snippets of the reference preference graphic content, thereby improving the generation quality and efficiency of the code snippets of the target code generation large model, and in the scenario where the corresponding graphic content is generated based on the code snippets output by the target code generation large model, the generation efficiency of the graphic content and the degree of adaptation between the graphic content and the user preference are improved, compared with the graphic content obtained by filling in the template in the related art, the personalized generation of the graphic content is realized, the influence of the visual monotony of the graphic content on the user experience is reduced, and the occurrence of abnormal situations in which the graphic content and the application scenario are not compatible due to the incompatibility of the template and the application scenario is avoided, the adaptability of the graphic content and the application scenario is improved, the user experience is optimized, and the user stickiness is improved.

[0089] In the above embodiment, the acquisition of the target code generation model can also be combined with Figure 5 Further understanding, Figure 5 FIG. 1 is a flow chart of a method for training a large model using code generated from another embodiment of the present disclosure. Figure 5 As shown, the method includes:

[0090] S501, obtaining common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability, and obtaining a first candidate large model.

[0091] Optionally, a second training sample set is constructed based on the common code snippet, and the initial large model is pre-trained based on the second training sample set to obtain a second candidate large model.

[0092] In the disclosed embodiment, a sample of a general code snippet may be constructed based on a sample construction method in related technology, and the constructed sample may be determined as a training sample required for pre-training the initial large model as a second training sample.

[0093] For any common code snippet, code generation requirement information of the common code snippet may be obtained, and the common code snippet may be used as label information of the code generation requirement information, thereby generating a second training sample based on the common code snippet.

[0094] Further, a set consisting of the second training samples is determined as a second training sample set.

[0095] Optionally, based on the model pre-training method in the relevant technology, the initial large model can be pre-trained based on each second training sample in the second training sample set, so that the initial large model can learn the basic feature information of the common code snippet, and then the pre-trained large model is determined as the second candidate large model.

[0096] It should be noted that, based on the pre-training of the second training sample, the second candidate large model has the ability to generate general code snippets, wherein the general code snippets can be SVG code snippets or code snippets in other formats, which are not specifically limited here.

[0097] Optionally, a third training sample set is constructed based on the preferred code snippets, and the second candidate large model is pre-trained based on the third training sample set to obtain the first candidate large model.

[0098] In the embodiment of the present disclosure, the training process of constructing a third training sample set based on the preferred code snippets and pre-training the second candidate large model based on the third training sample set can be understood in conjunction with the relevant information of constructing a second training sample set based on the general code snippets and pre-training the initial large model through the second training sample set in the above content, and will not be repeated here.

[0099] S502, obtaining an initial graphic content set from a source database, and filtering the initial graphic content set based on a preset graphic content filtering strategy to obtain a reference preferred graphic content set, wherein the graphic content filtering strategy is determined based on user preference and graphic content quality.

[0100] In the embodiment of the present disclosure, the source database used for image and text content screening can be composed based on an open source database and a non-open source database pre-stored in the server.

[0101] In this scenario, the data in the source database may be preliminarily screened to obtain the graphic content stored in the source database as the initial graphic content, and a set consisting of the initial graphic content may be determined as the initial graphic content set.

[0102] Furthermore, based on the preset graphic content screening strategy, each initial graphic content in the initial graphic content set is screened, and the screened graphic content matching the graphic content screening strategy is determined as the reference preference graphic content in the initial graphic content set, thereby obtaining a reference preference graphic content set composed of each reference preference graphic content.

[0103] It should be noted that the graphic content screening strategy can be determined based on the graphic content quality corresponding to the graphic content and user preference information. When any graphic content matches the graphic content screening strategy, it can be determined that the graphic content meets the quality requirements of the graphic content in the actual application process and is compatible with the user preferences. Further, the graphic content can be determined as the reference preference graphic content obtained by screening.

[0104] S503, generalizing the reference code snippets of each reference preference graphic content to obtain a generalized code snippet set.

[0105] Optionally, a preconfigured generalization tool list is obtained, and each reference code snippet is generalized by each generalization tool included in the generalization tool list to obtain a generalized code snippet set consisting of generalized code snippets of each reference code snippet.

[0106] In the embodiment of the present disclosure, the number of graphic contents in the reference preference graphic content set obtained by screening may not meet the sample number requirement for model training of the large model. In this scenario, the reference code snippet of the reference preference graphic content can be generalized, and a code snippet with a certain degree of similarity to the reference code snippet can be obtained based on the generalization processing, and the code snippet can be determined as a generalized code snippet of the reference code snippet.

[0107] As an example, Figure 4 As shown, in Figure 4 The generalization tool list shown includes multiple generalization tools, including Figure 4 The zero-sample code generalization model, generalization template knowledge base, and few-sample code generalization model are shown.

[0108] In this example, for any of the reference code snippets, you can call Figure 4 The three generalization tools shown respectively generalize the reference code snippet, and each generates a code snippet having a certain degree of similarity with the reference code snippet as a generalized code snippet of the reference code snippet.

[0109] Further, a set of generalized code snippets of each reference code snippet is determined as a generalized code snippet set.

[0110] S504: Obtain a first training sample set of a first candidate large model according to the generalized code snippet set.

[0111] Optionally, the generalized code snippet set is screened to obtain a sample code snippet set in the generalized code snippet set.

[0112] In the embodiment of the present disclosure, the code snippets used to generate graphic content that meets preset conditions have preset limiting conditions. Based on the limiting conditions, each generalized code snippet in the generalized code snippet set can be screened, and some code snippets in the generalized code snippet set that meet the limiting conditions can be determined as sample code snippets used for model training of the first candidate large model, thereby obtaining a sample code snippet set composed of the sample code snippets.

[0113] As an example, Figure 4 As shown, it can be Figure 4 The screening module shown screens the generalized code snippet set, and determines the code snippet screened by the screening module as the sample code snippet, thereby obtaining Figure 4 Set of sample code snippets for the scenarios shown.

[0114] Optionally, a sample requirement description text of each sample code snippet is obtained, and a first training sample set of a first candidate large model is constructed based on each sample code snippet and the sample requirement description text of each sample code snippet.

[0115] In the disclosed embodiment, the user end can receive the graphic content generation requirements input by the user through the interactive interface it provides, and call the model capabilities of the large model to generate corresponding code snippets, and then obtain the graphic content that can meet the graphic content generation requirements by rendering the code snippets.

[0116] The graphic content generation requirement may be text information, or may be text information obtained by parsing the voice input by the user.

[0117] In this scenario, for any sample code snippet, the sample code snippet can be processed by a parsing algorithm based on the parsing algorithm in the relevant technology, and then the requirement description information corresponding to the sample code snippet is obtained based on the result of the algorithm processing, and then the corresponding requirement description text is generated based on the requirement description information as the sample requirement description text of the sample code snippet.

[0118] Optionally, the sample code snippet is used as label information of the sample requirement description text, and the sample code snippet and the corresponding sample requirement description text are sample constructed based on the sample construction method in the relevant technology, thereby obtaining a training sample based on the sample code snippet and the sample requirement description text corresponding to the sample code snippet, as the first training sample.

[0119] Furthermore, a set consisting of first training samples of each sample code fragment is determined as a first training sample set of the first candidate large model.

[0120] S505, obtaining a first training sample in a first training sample set, inputting the first training sample into a first candidate large model, and obtaining an output code snippet based on the model capability of the first candidate large model.

[0121] In the disclosed embodiment, the first training sample can be input into the first candidate large model, and the model capability of the first candidate large model can be used to generate a corresponding code snippet based on the sample requirement description text carried in the first training sample, and the code snippet can be used as the output code snippet generated by the first candidate large model.

[0122] S506, obtaining a label code snippet in the first training sample to obtain a loss value of the output code snippet based on the label code snippet.

[0123] In the embodiment of the present disclosure, the sample code fragment carried in the label information of the first training sample may be marked as a label code fragment in the first training sample.

[0124] Optionally, the label code snippet and the output code snippet may be algorithmically processed based on a loss value acquisition algorithm in the related art, and then the loss value of the output code snippet based on the label code snippet may be obtained according to the result of the algorithm processing.

[0125] S507, adjust the model parameters of the first candidate large model according to the loss value, and return to obtain the next first training sample to continue training the first candidate large model with adjusted parameters until the training is completed, and obtain the trained target code generation large model.

[0126] In the disclosed embodiment, the model parameters of the first candidate large model can be adjusted based on the loss value, and it can be identified whether the adjusted first candidate large model meets the end condition of the model training.

[0127] Among them, when it is identified that the adjusted first candidate large model does not meet the end condition of model training, it is possible to return to obtain the next first training sample from the first training sample set to continue training the first candidate large model with adjusted parameters until the first candidate large model meets the end condition of model training, and the large model obtained after the training is completed can be determined as the trained target code generation large model.

[0128] As an example, Figure 4 As shown, it can be Figure 4 The second training module 84 shown trains the first candidate large model based on the first training sample set, thereby obtaining a trained target code generation large model.

[0129] The training method of the code generation big model proposed in the present invention pre-trains the initial big model through common code snippets and preferred code snippets, so that the first candidate big model learns the characteristics of the corresponding code snippets, thereby having the ability to generate the corresponding code snippets, providing a training basis for the downstream tasks of subsequent big model training, and training the first candidate big model with the training samples constructed based on the reference code snippets of the reference preference graphic content, thereby improving the generation quality and efficiency of the code snippets of the target code generation big model.

[0130] The present disclosure also proposes a method for pushing graphic content, which can be combined with Figure 6 understand, Figure 6 FIG. 1 is a flow chart of a method for pushing graphic content according to an embodiment of the present disclosure. Figure 6 As shown, the method includes:

[0131] S601, obtaining a trained target code generation model.

[0132] Among them, the target code generation model is based on the above Figures 3 to 5 The method proposed in the embodiment is obtained.

[0133] In the embodiment of the present disclosure, Figures 3 to 5 The code generation large model training method proposed in the embodiment trains the large model, so that the graphic content obtained by the code snippet generated based on the trained large model can meet the relevant needs of the user, wherein the graphic content generated based on the trained large model can be Figures 3 to 5 The large model obtained by model training using the training method proposed in the embodiment is determined as the target code generation large model.

[0134] S602, in response to the triggering of the graphic and text generation operation of the user terminal, the user requirement text is obtained according to the interactive interface of the user terminal, and the user requirement text is input into the target code generation model to obtain the target code fragment output by the target code generation model.

[0135] In the disclosed embodiment, an interactive interface is provided on the user terminal, and the user can input corresponding text information through the interactive interface, and trigger the task flow of starting graphic content generation by buttons or options provided by the interactive interface.

[0136] In this scenario, when a button or option corresponding to the image and text generation operation on the interactive interface is clicked, it can be determined that the image and text generation operation on the user side is triggered.

[0137] Furthermore, when the user terminal recognizes that the image and text generation operation is triggered, the demand text information generated by the image and text content input by the user can be obtained through the interactive interface provided by the user terminal as the user demand text, and transmitted to the server. The model capability of the target code generation large model is called through the server, and then the code snippet corresponding to the user demand text is generated as the target code snippet through the model capability of the large model.

[0138] S603, compile and render the target code fragment to obtain the target graphic content corresponding to the user's required text, and push the target graphic content to the user end.

[0139] In the embodiment of the present disclosure, based on the code type of the target code snippet, a code compilation and rendering algorithm in the related technology can be obtained, and the target code snippet can be compiled and rendered based on the algorithm, so as to obtain the compiled and rendered graphic content as the target graphic content corresponding to the user's required text.

[0140] Furthermore, based on the interactive link between the user terminal and the server, the target graphic content is pushed to the user terminal and displayed to the user in a display area provided by the user terminal.

[0141] It should be noted that, in the scenario where the target code snippet may be an SVG code snippet, the rendering difficulty of the target graphic content may be reduced based on the advantages of the SVG code snippet over other types of code snippets, thereby improving the quality of the target graphic content.

[0142] As an example, the user can click on the "Smart Chart" option from the homepage of the user terminal, or click on the "Smart Chart" option from the assistant page of the user terminal to enter the smart chart page of the user terminal.

[0143] The smart chart page provides a demand input box. After the user clicks the demand input box, he can enter the keyboard call page, and then enter the relevant limiting conditions and required text of the required graphic content in the demand input box by calling the input page of the keyboard function. It should be noted that the demand input box provided by the user end has a set word limit. In this scenario, the user needs to adjust the number of words in the demand text he enters.

[0144] Furthermore, after the user completes text input, he or she may click on a downstream operation option provided on the input page. When the option is clicked, the user terminal may obtain the text in the requirement input box and determine the text as the user requirement text.

[0145] Optionally, the user can enter the prompt word sending page by clicking the downstream operation option provided on the input page. On this page, the user demand text entered by the user will generate corresponding prompt word text information, which can be transmitted to the server via the information interaction link between the user terminal and the server.

[0146] Furthermore, after the server receives the prompt word text information carrying the user's required text, it can generate the corresponding target code fragment by calling the model capability of the target code generation large model, and generate the corresponding target graphic content by compiling and rendering the target code fragment, and push the target graphic content to the dialog box provided to the user on the prompt word sending page for the user to view.

[0147] In this example, the user can click on the picture pushed by the server to the prompt word sending page and enter the picture viewing page provided by the user end. The user can judge whether the target graphic content carried in the picture meets the needs through the enlarged picture shown on the picture viewing page. In addition, the user can select a graphic content template that meets the needs through the chart landing page provided by the user end, thereby obtaining the target graphic content that is adapted to the graphic content template.

[0148] In this example, the user terminal can also provide a historical file viewing function through the smart chart historical file page provided by the user terminal, and provide a historical record viewing function through the smart chart historical record page provided by the user terminal for user use.

[0149] As another example, Figure 7 As shown, users can Figure 7 Enter the required text in the Smart Chart Assistant page shown. Figure 7 In the scenario shown, the requirement text entered by the user is Figure 7 The "Help me write a 500-word speech" Figure 7 In the scenario shown, the user terminal can transmit the demand text to the server. After receiving the demand text input by the user, the server can generate the corresponding target code fragment by calling the model capabilities of the large model, and generate the corresponding speech text and the picture corresponding to the speech text by compiling and rendering the target code fragment, thereby forming the target graphic content and pushing it to the display area provided by the user terminal.

[0150] like Figure 7 As shown, the target graphic content pushed by the server includes graphic content such as "Talent Recruitment" and "Animal Protection Day". Users can click to view detailed information to identify whether the target graphic content provided by the server meets their needs.

[0151] As another example, Figure 8 As shown, after the user enters the demand text "Help me write a 500-word speech" on the smart chart assistant page, the user end can transmit the demand text to the server. The server can generate the corresponding target code fragment by calling the model capability of the target code generation large model, and generate the corresponding speech text and the architecture diagram image corresponding to the speech text by rendering and compiling the target code fragment, and push the target graphic content consisting of the speech text and the architecture diagram image to the display page provided by the user end.

[0152] It should be noted that the target graphic content proposed in the above embodiments may be a picture that can be arbitrarily scaled without losing picture quality, may include a vector image, or may be other types of pictures that can be arbitrarily scaled without losing picture quality, and no specific limitation is made here.

[0153] The method for pushing text and image content proposed in the present disclosure obtains a trained target code generation model, and when it is identified that the text and image generation operation of the user end is triggered, obtains the user demand text according to the interactive interface of the user end, and obtains the target code fragment corresponding to the user demand text based on the target code generation model, and then obtains the target text and image content through the compilation and rendering of the target code fragment and pushes it to the user end. Figures 3 to 6The method proposed in the embodiment is trained to improve the degree of adaptation between the target graphic content obtained based on the target code fragment and the user needs and user preferences, and to improve the efficiency of obtaining the target graphic content. Compared with the graphic content obtained by filling in the template in the related technology, the personalization of the graphic content is improved, the influence of the visual monotony of the graphic content on the user experience is reduced, the adaptability of the graphic content to the application scenario is improved, the user experience is optimized, and the user stickiness is improved.

[0154] An embodiment of the present disclosure further proposes a graphic content generation device. Since the graphic content generation device proposed in the embodiment of the present disclosure corresponds to the graphic content generation methods proposed in the above-mentioned embodiments, the implementation methods of the above-mentioned graphic content generation methods are also applicable to the graphic content generation device proposed in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.

[0155] Fig. 9 FIG. 1 is a schematic diagram of a structure of a graphic content generating device according to an embodiment of the present disclosure. Fig. 9 As shown, the graphic content generating device 900 includes a first response module 91, a second response module 92 and a first acquisition module 93, wherein:

[0156] A first response module 91 is used to display a demand input page in response to a chart generation operation;

[0157] The second response module 92 is used to generate a demand text by acquiring the inputted image and text from the input box provided in the demand display input page in response to the input completion operation;

[0158] The first acquisition module 93 is used to acquire, from a preset image and text display area, target image and text content generated based on the image and text generation requirement text, wherein the target image and text content can be scaled losslessly.

[0159] In the disclosed embodiment, the first acquisition module is further used to: identify whether the target graphic content matches the graphic generation requirement text; in response to the regeneration option on the user terminal being operated, determine that the target graphic content does not match the graphic generation requirement text, and acquire new target graphic content generated based on the graphic generation requirement text from the graphic display area.

[0160] In the disclosed embodiment, the device also includes: a first training module, which is used to pre-train the code generation capability dimension of the initial large model to be trained to obtain a candidate large model, and perform model training on the candidate large model based on the pre-acquired reference graphic code snippet to obtain a trained target code generation large model; a generation module, which is used to respond to the user terminal transmitting the graphic generation requirement text to the server, the server calling the model capability of the target code generation large model to obtain the target code snippet corresponding to the graphic generation requirement text, and compiling and rendering the target code snippet to obtain the target graphic content corresponding to the graphic generation requirement text.

[0161] An embodiment of the present disclosure further proposes a training device for a large code generation model. Since the training device for a large code generation model proposed in the embodiment of the present disclosure corresponds to the training methods for a large code generation model proposed in the above-mentioned embodiments, the implementation methods of the above-mentioned training methods for a large code generation model are also applicable to the training device for a large code generation model proposed in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.

[0162] Fig.10 The structure diagram of the training device for the code generation large model according to an embodiment of the present disclosure is as follows: Fig.10 As shown, the training device 100 for generating a large model of code includes a second acquisition module 101, a pre-training module 102, a construction module 103 and a second training module.

[0163] The second acquisition module 101 is used to acquire an initial large model to be trained;

[0164] A pre-training module 102 is used to obtain common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability to obtain a first candidate large model;

[0165] A construction module 103 is used to obtain a reference code snippet of each reference preference graphic content in the reference preference graphic content set to construct a first training sample set of a first candidate large model;

[0166] The second training module 104 is used to perform model training on the first candidate large model based on the first training sample set to obtain a trained target code generation large model, wherein the target code generation large model is used to implement the above Fig. 9 The embodiment provides a device for generating graphic content.

[0167] In the disclosed embodiment, the construction module 103 is further used to: obtain an initial graphic content set from a source database, and filter the initial graphic content set based on a preset graphic content filtering strategy to obtain a reference preference graphic content set, wherein the graphic content filtering strategy is determined based on user preferences and graphic content quality; generalize the reference code snippets of each reference preference graphic content to obtain a generalized code snippet set; and obtain a first training sample set of a first candidate large model based on the generalized code snippet set.

[0168] In the embodiment of the present disclosure, the construction module 103 is further used to:

[0169] A preconfigured generalization tool list is obtained; and each reference code fragment is generalized by each generalization tool included in the generalization tool list to obtain a generalized code fragment set consisting of generalized code fragments of each reference code fragment.

[0170] In the disclosed embodiment, the construction module 103 is also used to: screen the generalized code snippet set to obtain a sample code snippet set in the generalized code snippet set; obtain a sample requirement description text of each sample code snippet, and construct a first training sample set of the first candidate large model based on each sample code snippet and the sample requirement description text of each sample code snippet.

[0171] In the disclosed embodiment, the pre-training module 102 is also used to: construct a second training sample set based on the common code snippets, and pre-train the initial large model based on the second training sample set to obtain a second candidate large model; construct a third training sample set based on the preferred code snippets, and pre-train the second candidate large model based on the third training sample set to obtain a first candidate large model.

[0172] In the disclosed embodiment, the second training module 104 is further used to: obtain the first training sample in the first training sample set, input the first training sample into the first candidate large model, and obtain an output code snippet based on the model capability of the first candidate large model; obtain a label code snippet in the training sample to obtain a loss value of the output code snippet based on the label code snippet; adjust the model parameters of the first candidate large model according to the loss value, and return to obtain the next first training sample to continue training the first candidate large model after the parameter adjustment, until the training is completed, to obtain a trained target code generation large model.

[0173] The training device for the code generation big model proposed in the present invention obtains the initial big model to be trained, and pre-trains the initial big model based on the common code snippets and the preference code snippets to obtain the first candidate big model, and performs model training on the first candidate big model based on the first training sample set constructed based on the reference code snippets of each reference preference graphic content, so as to obtain the trained target code generation big model. In the present disclosure, the initial large model is pre-trained by common code snippets and preference code snippets, so that the first candidate large model learns the features of the corresponding code snippets, thereby having the ability to generate the corresponding code snippets, providing a training basis for the downstream tasks of subsequent large model training, and the first candidate large model is trained based on the training samples constructed based on the reference code snippets of the reference preference graphic content, thereby improving the generation quality and efficiency of the code snippets of the target code generation large model, and in the scenario where the corresponding graphic content is generated based on the code snippets output by the target code generation large model, the generation efficiency of the graphic content and the degree of adaptation between the graphic content and the user preference are improved, compared with the graphic content obtained by filling in the template in the related art, the personalized generation of the graphic content is realized, the influence of the visual monotony of the graphic content on the user experience is reduced, and the occurrence of abnormal situations in which the graphic content and the application scenario are not compatible due to the incompatibility of the template and the application scenario is avoided, the adaptability of the graphic content and the application scenario is improved, the user experience is optimized, and the user stickiness is improved.

[0174] An embodiment of the present disclosure further proposes a graphic content pushing device. Since the graphic content pushing device proposed in the embodiment of the present disclosure corresponds to the graphic content pushing methods proposed in the above-mentioned embodiments, the implementation methods of the above-mentioned graphic content pushing methods are also applicable to the graphic content pushing device proposed in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.

[0175] Fig.11 FIG. 1 is a schematic diagram of a structure of a device for pushing graphic content according to an embodiment of the present disclosure. Fig.11 As shown, the image and text content pushing device 110 includes a third acquisition module 111, a fourth acquisition module 112 and a pushing module 113, wherein:

[0176] The third acquisition module 111 is used to acquire the trained target code generation model, wherein the target code generation model is based on the above Figure 7 The device proposed in the embodiment is obtained;

[0177] The fourth acquisition module 112 is used to obtain the user demand text according to the interactive interface of the user terminal in response to the triggering of the graphic and text generation operation of the user terminal, and input the user demand text into the target code generation model to obtain the target code fragment output by the target code generation model;

[0178] The push module 113 is used to compile and render the target code fragment, obtain the target graphic content corresponding to the user's required text, and push the target graphic content to the user end.

[0179] The device for pushing text and image content proposed in the present disclosure obtains a trained target code generation model, and when it is identified that the text and image generation operation of the user terminal is triggered, obtains the user demand text according to the interactive interface of the user terminal, and obtains the target code fragment corresponding to the user demand text based on the target code generation model, and then obtains the target text and image content through the compilation and rendering of the target code fragment and pushes it to the user terminal. Figures 3 to 7 The method proposed in the embodiment is trained to improve the degree of adaptation between the target graphic content obtained based on the target code fragment and the user needs and user preferences, and to improve the efficiency of obtaining the target graphic content. Compared with the graphic content obtained by filling in the template in the related technology, the personalization of the graphic content is improved, the influence of the visual monotony of the graphic content on the user experience is reduced, the adaptability of the graphic content to the application scenario is improved, the user experience is optimized, and the user stickiness is improved.

[0180] According to an embodiment of the present disclosure, the present disclosure also proposes an electronic device, a readable storage medium, and a computer program product.

[0181] Fig.12 A schematic block diagram of an example electronic device 1200 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0182] like Fig.12 As shown, the device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 1209 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0183] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1206, such as various types of displays, speakers, etc.; a storage unit 1209, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0184] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1201 performs the various methods and processes described above, such as a method for generating graphic content and / or a training method for a large model of code generation and / or a method for pushing graphic content. For example, in some embodiments, the method for generating graphic content and / or the training method for a large model of code generation and / or the method for pushing graphic content may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1209. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the above-described graphic content generation method and / or code generation large model training method and / or graphic content push method can be executed. Alternatively, in other embodiments, the computing unit 1201 can be configured to execute the graphic content generation method and / or code generation large model training method and / or graphic content push method in any other appropriate manner (e.g., by means of firmware).

[0185] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0186] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be presented to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0187] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0188] To propose interactions with a user account, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user account; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user account can propose input to the computer. Other types of devices may also be used to propose interactions with the user account; for example, feedback proposed to the user account may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user account may be received in any form (including acoustic input, voice input, or tactile input).

[0189] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user account computer with a graphical user account interface or a web browser through which a user account can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0190] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0191] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0192] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating graphic content, wherein: The method comprises: In response to the chart generation operation, a requirement input page is displayed; In response to the input completion operation, the inputted graphic and text are acquired from the input box provided in the demand display input page to generate the demand text; From a preset image and text display area, target image and text content generated based on the image and text generation requirement text is obtained, wherein the target image and text content can be scaled losslessly.

2. The method according to claim 1, wherein: The method further comprises: Identify whether the target graphic content matches the graphic generation requirement text; In response to the regeneration option on the user terminal being operated, it is determined that the target graphic content does not match the graphic generation requirement text, and new target graphic content generated based on the graphic generation requirement text is obtained from the graphic display area.

3. The method according to claim 1, wherein: The method further comprises: Pre-training the code generation capability dimension of the initial large model to be trained to obtain a candidate large model, and performing model training on the candidate large model based on the pre-acquired reference graphic code snippets to obtain a trained target code generation large model; In response to the user terminal transmitting the graphic-text generation requirement text to the server, the server calls the model capability of the target code generation large model to obtain the target code fragment corresponding to the graphic-text generation requirement text, and compiles and renders the target code fragment to obtain the target graphic-text content corresponding to the graphic-text generation requirement text.

4. A method for training a large code generation model, wherein: The method comprises: Get the initial large model to be trained; Obtaining common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability, and obtaining a first candidate large model; Obtaining reference code snippets of each reference preference graphic content in the reference preference graphic content set to construct a first training sample set for the first candidate large model; The first candidate large model is trained based on the first training sample set to obtain a trained target code generation large model, wherein the target code generation large model is used to implement the graphic content generation method described in any one of claims 1 to 3.

5. The method according to claim 4, wherein: The step of obtaining a reference code snippet of each reference preference graphic content in the reference preference graphic content set to construct a first training sample set for the first candidate large model includes: Acquire an initial graphic content set from a source database, and filter the initial graphic content set based on a preset graphic content filtering strategy to obtain the reference preferred graphic content set, wherein the graphic content filtering strategy is determined based on user preference and graphic content quality; Generalizing the reference code snippets of each reference preference graphic content to obtain the generalized code snippet set; The first training sample set of the first candidate large model is obtained according to the generalized code snippet set.

6. The method according to claim 5, wherein: The generalization of the reference code snippets of each reference preferred graphic content to obtain the generalized code snippet set includes: Get a list of preconfigured generalization tools; Each reference code fragment is respectively generalized by each generalization tool included in the generalization tool list to obtain the generalized code fragment set composed of the generalized code fragments of each reference code fragment.

7. The method according to claim 5, wherein: The step of obtaining the first training sample set of the first candidate large model according to the generalized code snippet set includes: Screening the generalized code snippet set to obtain a sample code snippet set in the generalized code snippet set; A sample requirement description text of each sample code snippet is obtained, and the first training sample set of the first candidate large model is constructed based on each sample code snippet and the sample requirement description text of each sample code snippet.

8. The method according to claim 4, wherein: The obtaining of common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability to obtain a first candidate large model includes: Constructing a second training sample set based on the general code snippet, and pre-training the initial large model based on the second training sample set to obtain a second candidate large model; A third training sample set is constructed based on the preferred code snippets, and the second candidate large model is pre-trained based on the third training sample set to obtain the first candidate large model.

9. The method according to claim 4, wherein: The performing model training on the first candidate large model based on the first training sample set to obtain a trained target code generation large model includes: Acquire a first training sample in the first training sample set, input the first training sample into the first candidate large model, and obtain an output code snippet based on the model capability of the first candidate large model; Obtaining a label code snippet in a training sample to obtain a loss value of the output code snippet based on the label code snippet; The model parameters of the first candidate large model are adjusted according to the loss value, and the next first training sample is returned to continue training the first candidate large model with adjusted parameters until the training is completed, so as to obtain the trained target code generation large model.

10. A method for pushing graphic content, wherein: The method comprises: Obtaining a trained target code generation large model, wherein the target code generation large model is obtained based on the method described in any one of claims 4 to 9 above; In response to the triggering of the graphic and text generation operation of the user terminal, the user demand text is obtained according to the interactive interface of the user terminal, and the user demand text is input into the target code generation model to obtain the target code fragment output by the target code generation model; The target code fragment is compiled and rendered to obtain target graphic content corresponding to the user demand text, and the target graphic content is pushed to the user terminal.

11. A device for generating graphic content, wherein: The device comprises: A first response module, for displaying a demand input page in response to a chart generation operation; A second response module is used to generate a demand text by acquiring the inputted image and text from the input box provided in the demand display input page in response to the input completion operation; The first acquisition module is used to acquire, from a preset image and text display area, target image and text content generated based on the image and text generation requirement text, wherein the target image and text content can be scaled losslessly.

12. The device according to claim 11, wherein The first acquisition module is further used for: An identification module, used to identify whether the target graphic content matches the graphic generation requirement text; In response to the regeneration option on the user terminal being operated, it is determined that the target graphic content does not match the graphic generation requirement text, and new target graphic content generated based on the graphic generation requirement text is obtained from the graphic display area.

13. The device according to claim 11, wherein: The device also includes: The first training module is used to pre-train the code generation capability dimension of the initial large model to be trained to obtain a candidate large model, and perform model training on the candidate large model based on the pre-acquired reference graphic code snippets to obtain a trained target code generation large model; A generation module is used to respond to the user terminal transmitting the graphic generation requirement text to the server, and the server calls the model capability of the target code generation large model to obtain the target code fragment corresponding to the graphic generation requirement text, and compiles and renders the target code fragment to obtain the target graphic content corresponding to the graphic generation requirement text.

14. A training device for a large code generation model, wherein: The device comprises: The second acquisition module is used to acquire the initial large model to be trained; A pre-training module, used to obtain common code snippets and preferred code snippets to pre-train the initial large model in terms of code generation capability to obtain a first candidate large model; A construction module, used to obtain reference code snippets of each reference preference graphic content in the reference preference graphic content set, so as to construct a first training sample set of the first candidate large model; The second training module is used to perform model training on the first candidate large model based on the first training sample set to obtain a trained target code generation large model, wherein the target code generation large model is used to implement the graphic content generation device described in any one of claims 11-13.

15. The device according to claim 14, wherein: The building blocks are also used to: Acquire an initial graphic content set from a source database, and filter the initial graphic content set based on a preset graphic content filtering strategy to obtain the reference preferred graphic content set, wherein the graphic content filtering strategy is determined based on user preference and graphic content quality; Generalizing the reference code snippets of each reference preference graphic content to obtain the generalized code snippet set; The first training sample set of the first candidate large model is obtained according to the generalized code snippet set.

16. The device according to claim 15, wherein: The building blocks are also used to: Get a list of preconfigured generalization tools; Each reference code fragment is respectively generalized by each generalization tool included in the generalization tool list to obtain the generalized code fragment set composed of the generalized code fragments of each reference code fragment.

17. The device according to claim 15, wherein: The building blocks are also used to: Screening the generalized code snippet set to obtain a sample code snippet set in the generalized code snippet set; A sample requirement description text of each sample code snippet is obtained, and the first training sample set of the first candidate large model is constructed based on each sample code snippet and the sample requirement description text of each sample code snippet.

18. The device according to claim 14, wherein: The pre-training module is also used for: Constructing a second training sample set based on the general code snippet, and pre-training the initial large model based on the second training sample set to obtain a second candidate large model; A third training sample set is constructed based on the preferred code snippets, and the second candidate large model is pre-trained based on the third training sample set to obtain the first candidate large model.

19. The device according to claim 14, wherein: The second training module is further used for: Acquire a first training sample in the first training sample set, input the first training sample into the first candidate large model, and obtain an output code snippet based on the model capability of the first candidate large model; Obtaining a label code snippet in a training sample to obtain a loss value of the output code snippet based on the label code snippet; The model parameters of the first candidate large model are adjusted according to the loss value, and the next first training sample is returned to continue training the first candidate large model with adjusted parameters until the training is completed, so as to obtain the trained target code generation large model.

20. A device for pushing graphic content, wherein: The device comprises: A third acquisition module is used to acquire a trained target code generation large model, wherein the target code generation large model is obtained based on the device described in any one of claims 14 to 19; A fourth acquisition module, for obtaining a user requirement text according to an interactive interface of the user terminal in response to a triggering of a graphic and text generation operation of the user terminal, and inputting the user requirement text into the target code generation model to obtain a target code fragment output by the target code generation model; The push module is used to compile and render the target code fragment, obtain the target graphic content corresponding to the user demand text, and push the target graphic content to the user terminal.

21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3 and / or 4-9 and / or 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-3 and / or 4-9 and / or 10.

23. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1-3 and / or 4-9 and / or 10.