Page generation method, device, electronic device, storage medium, and program product
The multimedia page generation is generated through the page large language model processing application resources, solving the complexity of multimedia page production and achieving efficient and flexible page generation.
Patent Information
- Application Number
- CN202410362069.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-03-27
AI Technical Summary
The production of multimedia pages is complex and requires professional participation, resulting in complex processes and high technical barriers.
By determining the page prompt information, using the page large language model to process application resources, generate intermediate documents, and perform page conversion to generate target pages.
Reduce labor costs, improve the flexibility and pertinence of page generation, reduce the problem of out-of-synchronization of target page updates and online launches, simplify page generation operations, and improve processing efficiency.
Smart Images

Figure CN118170378B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as deep learning, large language models, and software technology, and in particular to page generation methods, devices, electronic devices, storage media, and program products. Background Art
[0002] Multimedia pages can include text, images, video, audio, and other multimedia content. They can be used to provide users with learning, entertainment, or human-computer interaction services. The production of multimedia pages is complex, typically requiring professional design and production, a complex process with numerous technical barriers. Summary of the Invention
[0003] The present disclosure provides a page generation method, apparatus, electronic device, storage medium, and program product.
[0004] According to one aspect of the present disclosure, a page generation method is provided, comprising: determining page prompt information for generating a to-be-generated page, wherein the to-be-generated page includes page operation instructions for operating a target application, and the page prompt information is used to indicate an expected output result of a page large language model; based on the page prompt information, processing application resources using the page large language model to obtain an intermediate document, wherein the application resources include resources related to the target application; and performing page conversion on the intermediate document to generate a target page.
[0005] According to another aspect of the present disclosure, a page generation device is provided, including: a page prompt determination module, used to determine page prompt information for generating a to-be-generated page, wherein the to-be-generated page includes page operation instructions for operating a target application, and the page prompt information is used to indicate the expected output result of a page large language model; a document generation module, used to process application resources using the page large language model based on the page prompt information to obtain an intermediate document, wherein the application resources include resources related to the target application; and a page generation module, used to perform page conversion on the intermediate document to generate a target page.
[0006] According to another aspect of the present disclosure, an electronic device is provided, 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 method as disclosed in the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method of the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method of the present disclosure when executed by a processor.
[0009] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0011] Figure 1 Schematically illustrates an exemplary system architecture to which the page generation method and apparatus according to an embodiment of the present disclosure may be applied;
[0012] Figure 2 The following schematically shows a flow chart of a page generation method according to an embodiment of the present disclosure;
[0013] Figure 3 Schematically shows an application diagram of a target page according to an embodiment of the present disclosure;
[0014] Figure 4A Schematically shows a flow chart of generating an intermediate document according to an embodiment of the present disclosure;
[0015] Figure 4B Schematically shows a flow chart of generating an intermediate document according to another embodiment of the present disclosure;
[0016] Figure 4C Schematically shows a flow chart of generating an intermediate document according to another embodiment of the present disclosure;
[0017] Figure 5 Schematically shows a flow chart of a page generation method according to another embodiment of the present disclosure;
[0018] Figure 6 A block diagram schematically illustrates a page generation device according to an embodiment of the present disclosure; and
[0019] Figure 7 A block diagram of an electronic device suitable for implementing a page generation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0020] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize 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.
[0021] The present disclosure provides a page generation method, apparatus, electronic device, storage medium, and program product.
[0022] According to an embodiment of the present disclosure, a page generation method is provided, comprising: determining page prompt information for generating a page to be generated, wherein the page to be generated includes page operation instructions for operating a target application, and the page prompt information is used to indicate an expected output result of a page large language model; based on the page prompt information, processing application resources using the page large language model to obtain an intermediate document, wherein the application resources include resources related to the target application; and performing page conversion on the intermediate document to generate a target page.
[0023] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0024] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0025] Figure 1 An exemplary system architecture to which the page generation method and apparatus according to an embodiment of the present disclosure can be applied is schematically shown.
[0026] It should be noted that Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure. This does not mean that the embodiments of the present disclosure cannot be applied to other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the page generation method and apparatus may be applied may include a terminal device, but the terminal device may implement the page generation method and apparatus provided by the embodiments of the present disclosure without interacting with a server.
[0027] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0028] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software (for example only).
[0029] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0030] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports the content browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0031] It should be noted that the page generation method provided in the embodiment of the present disclosure can generally be executed by the terminal device 101, 102, or 103. Accordingly, the page generation apparatus provided in the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103.
[0032] Alternatively, the page generation method provided in the embodiment of the present disclosure may also be generally executed by the server 105. Accordingly, the page generation apparatus provided in the embodiment of the present disclosure may generally be set in the server 105. The page generation method provided in the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 105 and that is capable of communicating with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the page generation apparatus provided in the embodiment of the present disclosure may also be set in a server or server cluster that is different from the server 105 and that is capable of communicating with the terminal devices 101, 102, 103 and / or the server 105.
[0033] For example, terminal devices 101, 102, and 103 can send application resources to server 105 in accordance with user instructions. Server 105 analyzes the application resources and determines page prompt information for generating the page to be generated. Based on the page prompt information, the application resources are processed using a large language model of the page to obtain an intermediate document. The intermediate document is then converted to generate a target page. Alternatively, a server or server cluster capable of communicating with terminal devices 101, 102, and 103 and / or server 105 can analyze the application resources and ultimately generate the target page.
[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0035] It should be noted that the sequence numbers of the operations in the following method are only used to indicate the operation for the purpose of description, and should not be regarded as indicating the order in which the operations should be performed. Unless explicitly stated, the method does not need to be performed in the order shown.
[0036] Figure 2 The flowchart of the page generation method according to the embodiment of the present disclosure is schematically shown.
[0037] like Figure 2 As shown, the method includes operations S210 to S230.
[0038] In operation S210 , page prompt information for generating a page to be generated is determined.
[0039] In operation S220 , based on the page prompt information, the application resource is processed using the page language model to obtain an intermediate document.
[0040] In operation S230 , page conversion is performed on the intermediate document to generate a target page.
[0041] In one example, the target application may include a software system, such as an operating system, a compiler, a driver, and a utility, but is not limited thereto. The target application may also include software applications, such as office software, entertainment software, and graphic design software.
[0042] In one example, the page to be generated may include operation instructions for operating the target application page.
[0043] For example, after the target application is developed, users can access the functions or services provided by the target application via the Internet. Users can operate controls, buttons, etc. on the application interface to generate operation instructions. The page to be generated may include instructions for operating the controls or buttons on the application interface to generate operation instructions.
[0044] In one example, application resources may include resources related to the target application. These resources may include application requirements documents, such as those written by R&D personnel prior to the development of the target application. These documents provide a basis for subsequent target application development and testing acceptance. Application resources may include design drawings and requirements descriptions for the target application, as well as test cases used for testing. Any resources related to the target application are sufficient.
[0045] In one example, the page prompt information is used to indicate the expected output result of the page language model.
[0046] In one example, the page language model can be used to perform the task of generating an intermediate document under the guidance of page prompt information, and output an intermediate document that meets user expectations.
[0047] In one example, the intermediate document output by the page language model can be directly used as the target page, or the intermediate document can be converted to generate the target page.
[0048] According to the embodiments of the present disclosure, the intermediate document is generated by using the page language model to obtain the target page, which can reduce labor costs and reduce the problems such as the target page used to illustrate the operation of the target application being updated out of sync with the target application and not being timely due to manual generation. In addition, the page prompt information is dynamically generated based on the page to be generated. On the basis of ensuring the output results of the page language model, the flexibility and pertinence are improved, thereby improving the output results of the page language model to meet user expectations. In addition, the auxiliary input data of the page language model includes application resources, which are existing resources related to the target application and do not need to be generated again, thereby simplifying the page generation operation and improving processing efficiency.
[0049] In one example, the page large language model may include a large language model (LLM), such as one or more of GPT (Generative Pre-Trained Transformer), ChatGPT (Chat Generative Pre-Trained Transformer), GLM (General Language Model), etc. However, it is not limited to this. The page large language model may also include a model constructed by various known networks such as convolutional neural networks, recurrent neural networks, and long short-term memory networks.
[0050] In one example, a distributed training technology can be used to train a pre-trained large language model using page training samples to obtain a page large language model. The trained large language model can also be tested using page test samples, and whether it can be applied as a page large language model is determined based on the page test results. The page training samples may include sample page prompt information, sample resources, and sample target pages corresponding to the sample resources. The page test samples may include test page prompt information, test resources, and test target pages corresponding to the test resources. The test intermediate document output by the model can be page converted to obtain a test page. Based on the test page and the test target page, a page test result is obtained. When it is determined that the page test result indicates that the trained large language model can be used as a page large language model, the trained large language model is used as the page large language model.
[0051] Figure 3 The application diagram of the target page according to the embodiment of the present disclosure is schematically shown.
[0052] like Figure 3 As shown, the target application's application interface 310 includes multiple operation buttons. When a user opens the application interface but does not know how to use an operation button 311, they can use the cursor to select the operation button, obtain the target page's link address, and click the link address to open the target page 320. Target page 320 includes instructions for using operation button 311, or instructions and related operation images. The user can understand how to use operation button 311 by reading target page 320.
[0053] According to the embodiments of the present disclosure, Figure 2 Operation S210 shown, determining page prompt information for generating a page to be generated, may include: adding configuration information to a preset prompt template to generate page prompt information.
[0054] In one example, the configuration information may include page configuration information of the to-be-generated page and application configuration information of the target application.
[0055] In one example, the configuration information may include a json data structure. The page configuration information may include at least one of the following: storage address, application address, document format, page subject, and document name. The storage address path may include the storage location of the generated intermediate document. The application address url may include a web page address for linking to the target application. The document format may include the document format of the intermediate document, such as the MD (Mark Down, a markup language) document format. The page subject descript may include the page subject and / or a brief description of the page to be generated. For example, the page subject includes "the homepage of the system" or "the project management of the system, including the viewing, creation, and deletion operations of the project."
[0056] In one example, the preset prompt template may include preset prompt text and a placeholder. Configuration information may be added to the placeholder, and the preset prompt text and the configuration information may be combined to obtain page prompt information.
[0057] For example, the preset prompt template may include: generating an operation instruction text related to "***" according to the application text. The placeholder "***" may be replaced with the configuration information to obtain the page prompt information.
[0058] According to the embodiments of the present disclosure, by combining preset prompt templates with configuration information, the flexibility of generating page prompt information can be improved by dynamically adjusting the configuration information. The preset prompt templates can be matched with the prompt information during the training process, thereby improving the ability of the page language model to perform tasks, improving the accuracy of the generated intermediate documents, and further improving the consistency with the expected output results.
[0059] According to another embodiment of the present disclosure, configuration information can be directly used as prompt information. Alternatively, the configuration information and application category can be input into a prompt information generation model to obtain prompt information. The prompt information generation model can include a codec, but is not limited to this, and can also include a large language model. Any model that can generate prompt information based on configuration information will be sufficient.
[0060] According to an embodiment of the present disclosure, application resources may include application text and application images.
[0061] In one example, for Figure 2 Operation S220, based on the page prompt information, using the page language model to process the application resource to obtain an intermediate document, may include: based on the page prompt information, using the page language model to process the application text to obtain an operation instruction text; and adding the application image to the operation instruction text to obtain an intermediate text.
[0062] Figure 4A The flowchart of generating an intermediate document according to an embodiment of the present disclosure is schematically shown.
[0063] like Figure 4A As shown, the page prompt information 410 , the application text 420 and the application image 430 may be input into the page language model M410 to obtain the intermediate text 440 .
[0064] Figure 4B The flowchart of generating an intermediate document according to another embodiment of the present disclosure is schematically shown.
[0065] like Figure 4BAs shown, page prompt information 410, application text 420, and application image 430 can be input into a large page language model. Based on page prompt information 410, the application text 420 is processed using a text generation module M411 of the large page language model to obtain an operation instruction text 431. The operation instruction text 431 and the application image 430 are processed using an illustration module M412 of the large page language model to obtain an intermediate document 440 in which the application image 430 is added to the operation instruction text 431.
[0066] According to the embodiments of the present disclosure, the page language model is used to simultaneously process tasks such as the generation of operation instruction text and the graphic and text combination of application images and operation instruction text. The multi-tasking processing function of the page language model can be used to improve processing capabilities and the degree of automation.
[0067] According to an embodiment of the present disclosure, the application image can be added to the operation instruction text according to a predetermined adding position. For example, the predetermined adding position is the end of the operation instruction text.
[0068] The combination of images and texts is carried out by using a predetermined adding position, which is simple and effective and improves processing efficiency.
[0069] According to another embodiment of the present disclosure, adding the application image to the operation instruction text to obtain the intermediate document may include: adding the application image to the operation instruction text based on the image tag of the application image to obtain the intermediate document.
[0070] In one example, the image tag represents the image semantics of the application image. However, this is not limited to this. It can also include identification information of the application control. As long as the image tag can be used to determine the image location where the operation instruction text is added, it will be sufficient.
[0071] For example, the image semantics of the image tag are matched with the text semantics of each paragraph of the operating instructions. The end of the paragraph with the highest semantic similarity is used as the location to add the application image. The application image is added to the image location of the operating instructions to obtain an intermediate document.
[0072] For example, based on the text semantics of each text paragraph, the application control described by each of the multiple text paragraphs in the operation instruction text is determined. Based on the image tag, the application image is added to the next line position of the text paragraph corresponding to the description of the application control.
[0073] According to an embodiment of the present disclosure, the application image is added to the operation instruction text based on the image tag of the application image, thereby improving the closeness of the combination of image and text, thereby improving the user's reading experience.
[0074] According to another embodiment of the present disclosure, the application resource may include application text and application image. The page prompt information includes text task prompt information and image task prompt information.
[0075] For example, the page prompt information can be divided into text task prompt information and image task prompt information. The text task prompt information is used to instruct the page language model to perform text processing tasks. The image task prompt information is used to instruct the page language model to perform image processing tasks.
[0076] For example, based on text-based task prompts, the application text is processed using a large-scale language model to generate an instructional document. Based on image-based task prompts, the large-scale language model is used to determine semantic information that matches the application image. Based on this semantic information, the application image is added to the instructional document to generate an intermediate document.
[0077] For example, image task prompts can be divided into image semantic prompts and image-text combined prompts. Image semantic prompts instruct the large language model to recognize the semantic information of the application image. Image-text combined prompts instruct the large language model to combine the application image and the instruction text to generate an intermediate document.
[0078] Figure 4C The flowchart of generating an intermediate document according to another embodiment of the present disclosure is schematically shown.
[0079] like Figure 4C As shown, the text processing module M413 of the page language model processes the text task prompt information 411 and the application text 420 to obtain the operation instruction text 431, which also includes the text semantics of the multiple text paragraphs. The image semantic processing module M414 processes the image semantic prompt information 412 and the application image 430 to obtain the semantic information 432 of the application image 430. The image-text processing module M415 processes the image-text combined prompt information 413, the semantic information 432, the operation instruction text 431, and the application image 430 to obtain the intermediate document 440 in which the application image 430 is added to the operation instruction text 431.
[0080] According to an embodiment of the present disclosure, an image semantic processing module is used to process application images. When the image label is unknown, the image semantic processing module of the page language model can be used to automatically generate it, thereby improving the application scope of page generation.
[0081] According to an embodiment of the present disclosure, when executing Figure 2 Before the operation S220 shown, the page generating method may further include: acquiring an application image.
[0082] According to an embodiment of the present disclosure, obtaining an application image may include: intercepting an application image related to a page theme from an application page of a target application. The page theme is determined based on application resources.
[0083] In one example, the page subject may include the title of the page to be generated and a brief introduction to the relevant content, etc. For example, the page subject may be "application service management, involving operations such as viewing, creating, and deleting."
[0084] In one example, the page theme can be determined based on the application context of the application resource. For example, the application context includes an introduction to an application service of the target application, involving operations such as viewing, creating, and deleting. The page theme can be determined based on the application context.
[0085] In one example, the application text obtained from the database can be preprocessed, for example, by filtering the content of the application text to remove low-quality data. Another example is to deduplicate the content of the application text. Another example is to segment the application text into sections when the length of the application text exceeds a length threshold to obtain a set of paragraphs of a predetermined length. The preprocessed text can be used as the application text.
[0086] Preprocessing the application text in advance can improve the standardization of the application text and thus improve the execution capability of the large language model task on the page.
[0087] In another example, the page theme may also be predetermined, for example, a page theme that is preset based on the needs of business personnel.
[0088] In one example, an application image may be captured from an application page of a target application using a screenshot tool such as screenshot software according to the page theme.
[0089] In one example, capturing application images related to the page theme from the application page of the target application can improve targeting and intelligence.
[0090] According to embodiments of the present disclosure, screenshots can be taken using screenshot software, but are not limited thereto. Screenshots can also be taken using a screenshot language model. For example, capturing an application image related to the page theme from an application page of a target application can include: based on screenshot prompt information and the address of the application page, using the screenshot language model to capture the application page to obtain the application image.
[0091] In one example, the address of an application page, such as a link URL, can be input into the screenshot language model. Based on the address of the application page and the screenshot prompt information, the screenshot language model links to the application page, takes a screenshot of the content of the application page related to the page theme, and obtains the application image and / or image label.
[0092] According to the embodiments of the present disclosure, a large language model of application page addresses and screenshots is utilized without human intervention, thereby improving intelligence and automation, and further improving processing efficiency.
[0093] In one example, the screenshot large language model may include a large language model (LLM), such as one or more of GPT (Generative Pre-Trained Transformer), ChatGPT (Chat Generative Pre-Trained Transformer), GLM (General Language Model), etc. However, it is not limited to this. The screenshot large language model may also include a model constructed by a variety of known networks such as convolutional neural networks, recurrent neural networks, and long short-term memory networks.
[0094] In one example, a distributed training technology can be used to train a pre-trained large language model using image training samples to obtain a screenshot large language model. The trained large language model can also be tested using image test samples, and whether it can be applied as a screenshot large language model is determined based on the image test results. The image training sample may include sample screenshot prompt information, the address of the sample application page, and a sample application image corresponding to the address of the sample application page. The image test sample may include test sample screenshot prompt information, the address of the test sample application page, and a test sample application image corresponding to the address of the test sample application page. The test application image output by the model can be used. Based on the test sample application image and the test application image, a test result is obtained. When it is determined that the test result indicates that the trained large language model can be used as a screenshot large language model, the trained large language model is used as a screenshot large language model.
[0095] According to an embodiment of the present disclosure, before obtaining the application image, the page generation method may further include: generating screenshot prompt information.
[0096] According to an embodiment of the present disclosure, generating screenshot prompt information may include: generating screenshot content prompt information based on application resources; generating screenshot format prompt information based on a preset image format; and generating screenshot prompt information based on the screenshot content prompt information and the screenshot format prompt information.
[0097] In one example, the screenshot content prompt information may include instructions for instructing the screenshot language model to perform tasks according to the corresponding screenshot content, such as application theme screenshots. The screenshot format prompt information may include instructions for instructing the screenshot language model to perform tasks according to the corresponding screenshot format, such as image size, image type, etc.
[0098] In another example, screenshot prompt information can be generated based only on the screenshot content prompt information or the screenshot format prompt information. The screenshot prompt information generated based on the screenshot content prompt information and the screenshot format prompt information is rich and comprehensive in prompt content. This screenshot prompt information is used as guidance information for the screenshot language model to improve the accuracy and effectiveness of the application image output by the screenshot language model.
[0099] According to an embodiment of the present disclosure, performing page conversion on an intermediate document to generate a target page includes: performing page conversion on the intermediate document to generate the target page according to a conversion method of an application page of a target application.
[0100] In one example, the target page may include a multimedia page, such as an HTML (Hypertext Markup Language) page. A web page may be generated using a page conversion tool, uploaded to the target application, and provided with a corresponding link so that the target page can be displayed on the application interface of the target application on the terminal device.
[0101] According to an embodiment of the present disclosure, by converting the intermediate document according to the conversion method of the application page of the target application, the format of the target page can be consistent with that of other application pages in the target application, thereby improving the uniformity of the target page and other application pages in the target application.
[0102] Figure 5 The flowchart of the page generation method according to another embodiment of the present disclosure is schematically shown.
[0103] like Figure 5 As shown, the application page address 510 and screenshot prompt information 520 are input into the screenshot language model M510 to obtain the application image. The application image, application text 530, and page prompt information 540 are input into the page language model M520 to obtain an intermediate document 550. Page conversion is performed on the intermediate document 550 to generate the target page 560.
[0104] Figure 6 The block diagram of the page generating device according to an embodiment of the present disclosure is schematically shown.
[0105] like Figure 6 As shown, the page generating apparatus 600 includes: a page prompt determining module 610 , a document generating module 620 and a page generating module 630 .
[0106] The page prompt determination module 610 is used to determine page prompt information for generating a page to be generated. The page to be generated includes page operation instructions for operating a target application, and the page prompt information is used to indicate the expected output result of the page language model.
[0107] The document generation module 620 is used to process application resources based on the page prompt information using the page language model to obtain an intermediate document. The application resources include resources related to the target application.
[0108] The page generation module 630 is used to perform page conversion on the intermediate document to generate a target page.
[0109] According to an embodiment of the present disclosure, application resources include application text and application images.
[0110] According to an embodiment of the present disclosure, the document generation module includes: a text generation submodule and a document generation submodule.
[0111] The text generation submodule is used to process the application text based on the page prompt information using the page language model to obtain the operation instruction text.
[0112] The document generation submodule is used to add the application image to the operation instruction text to obtain an intermediate document.
[0113] According to an embodiment of the present disclosure, the document generation submodule includes: a document generation unit.
[0114] The document generation unit is configured to add the application image to the operation instruction text based on the image tag of the application image to obtain an intermediate document, wherein the image tag represents the image semantics of the application image.
[0115] According to an embodiment of the present disclosure, application resources include application text and application images, and page prompt information includes text task prompt information and image task prompt information.
[0116] According to an embodiment of the present disclosure, the document generation module includes: a text task submodule, an image task submodule, and an image-text combination submodule.
[0117] The text task submodule is used to process the application text based on the text task prompt information using the page language model to obtain the operation instruction text.
[0118] The image task submodule is used to determine the semantic information that matches the application image based on the image task prompt information using the page language model.
[0119] The image-text combination submodule is used to add application images to the operation instruction text based on semantic information to obtain an intermediate document.
[0120] According to an embodiment of the present disclosure, the page generating device further includes: a screenshot module.
[0121] The screenshot module is used to capture application images related to the page theme from the application page of the target application. The page theme is determined based on the application resources.
[0122] According to an embodiment of the present disclosure, the screenshot module includes: a screenshot submodule.
[0123] The screenshot submodule is used to take a screenshot of the application page based on the screenshot prompt information and the address of the application page using the screenshot language model to obtain an application image.
[0124] According to an embodiment of the present disclosure, the page generation device further includes: a content prompt generation module, a format prompt generation module, and an image prompt generation module.
[0125] The content prompt generation module is used to generate screenshot content prompt information based on application resources.
[0126] The format prompt generation module is used to generate screenshot format prompt information based on the preset image format.
[0127] The image prompt generation module is used to generate screenshot prompt information based on the screenshot content prompt information and the screenshot format prompt information.
[0128] According to an embodiment of the present disclosure, the page generation module includes: a page generation submodule.
[0129] The page generation submodule is used to perform page conversion on the intermediate document according to the conversion method of the application page of the target application to generate the target page.
[0130] According to an embodiment of the present disclosure, the page prompt determination module includes: a page prompt determination submodule.
[0131] The page prompt determination submodule is used to add configuration information to the preset prompt template to generate page prompt information. The configuration information includes the page configuration information of the page to be generated and the application configuration information of the target application.
[0132] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0133] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed 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 execute a method as in the embodiment of the present disclosure.
[0134] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute a method according to an embodiment of the present disclosure.
[0135] According to an embodiment of the present disclosure, a computer program product includes a computer program. When the computer program is executed by a processor, the method according to the embodiment of the present disclosure is implemented.
[0136] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments 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 assistants, cellular phones, smartphones, 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 claimed herein.
[0137] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0138] Various components in device 700 are connected to an input / output (I / O) interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0139] The computing unit 701 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 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 that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the page generation method. For example, in some embodiments, the page generation method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the page generation method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the page generation method by any other appropriate means (e.g., by means of firmware).
[0140] Various embodiments of the systems and techniques described above 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), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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.
[0141] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0142] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 can 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.
[0143] To provide interaction with a user, the systems and techniques described herein can 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; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0144] The systems and techniques described herein can 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 computer having a graphical user interface or a web browser through which a user 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 can 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.
[0145] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0146] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0147] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A page generation method, comprising: Adding configuration information to a preset prompt template to generate page prompt information, wherein the configuration information includes page configuration information of a target page and application configuration information of a target application, the page configuration information includes a page theme of the target page, the target page includes page operation instructions for indicating how to operate application controls of the target application, and the page prompt information is used to indicate the expected output result of the page large language model; Based on the page prompt information, the application text of the application resource is processed using a page language model to obtain an operation instruction text, wherein the application text includes an application requirement document describing the target application requirements; Based on the screenshot prompt information and the address of the application page of the target application, taking a screenshot of the application page using a screenshot language model to obtain an application image and an image tag related to the page theme, wherein the image tag includes identification information of the application control; Based on the image tag, the application image is added to the next line of the text paragraph corresponding to the description of the application control in the operation instruction text to obtain an intermediate document; and Perform page conversion on the intermediate document to generate a target page.
2. The method according to claim 1, further comprising: Based on the application resources, generating screenshot content prompt information; Generate screenshot format prompt information based on the preset image format; as well as The screenshot prompt information is generated based on the screenshot content prompt information and the screenshot format prompt information.
3. The method according to claim 1 or 2, wherein: The performing page conversion on the intermediate document to generate a target page includes: The intermediate document is page-converted according to the conversion method of the application page of the target application to generate the target page.
4. A page generating device, comprising: A page prompt determination module includes: a page prompt determination submodule for adding configuration information to a preset prompt template to generate page prompt information for a target page, wherein the configuration information includes page configuration information of the target page and application configuration information of a target application, the page configuration information includes a page theme of the target page, the target page includes page operation instructions for indicating how to operate application controls of the target application, and the page prompt information is used to indicate an expected output result of a large language model for the page; a screenshot module, configured to take a screenshot of the target application page using a screenshot language model based on the screenshot prompt information and the address of the target application page, and obtain an application image and an image tag related to the page theme, wherein the image tag includes identification information of the application control; A document generation module, configured to process application resources based on the page prompt information using the page language model to obtain an intermediate document; and A page generation module, configured to perform page conversion on the intermediate document to generate a target page; Wherein, the document generation module includes: a text generation submodule, configured to process the application text of the application resource using the page language model based on the page prompt information to obtain an operation instruction text, wherein the application text includes an application requirement document describing the target application requirements; and The document generation submodule is configured to add the application image to the next line of the text paragraph corresponding to the description of the application control in the operation instruction text based on the image tag to obtain the intermediate document.
5. The apparatus according to claim 4, further comprising: A content prompt generating module, configured to generate screenshot content prompt information based on the application resources; A format prompt generation module is used to generate screenshot format prompt information based on a preset image format; as well as An image prompt generating module is used to generate the screenshot prompt information based on the screenshot content prompt information and the screenshot format prompt information.
6. The device according to claim 4 or 5, wherein: The page generation module includes: The page generation submodule is used to perform page conversion on the intermediate document according to the conversion method of the application page of the target application to generate the target page.
7. 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 that can be executed 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 according to any one of claims 1 to 3.
8. 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 to 3.
9. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Operation guidance generation method and device based on image recognition, equipment and medium
CN113885984A
Method and system for generating h5 page content based on AI
CN117075900A
Page code generation method and device, equipment and storage medium
CN117389551A