Image-text page generation method and device
By generating expanded text and graphic elements, the problem of inaccurate information transmission in the prior art is solved, the accuracy and attention attraction of graphic pages are improved, and the demand for information transmission efficiency is met.
Patent Information
- Application Number
- CN202410772207.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-20
AI Technical Summary
Existing generative image and text generation technology is difficult to effectively apply in scenarios that require accurate expression of information. Especially when conveying product information, it cannot accurately organize and match images, resulting in low information transmission efficiency and inaccurate content.
By receiving indicator words and information sources, it generates expanded text, extracts keywords, and combines preset picture materials to generate graphic and text elements to form a page containing text summaries and picture elements, limiting the scope of information to improve accuracy and relevance.
It improves the accuracy and relevance of information conveyed on graphic and text pages, increases readers' attention attraction, and meets the demand for information transmission efficiency.
Smart Images

Figure CN118674831A
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of information technology, and specifically to a method and device for generating a graphic page. Background Art
[0002] Generative image and text generation technology is a method that uses artificial intelligence (AI), especially generative machine learning models, to create new image and text content. This technology combines the capabilities of image generation and text generation, allowing users to enter text descriptions or automatically output corresponding pictures or composite media content with corresponding image and text layouts based on certain conditions. Advanced AI models can create images directly based on text descriptions. Some AI tools can generate coherent and visually realistic images based on story outlines or keywords entered by users. Based on existing images, AI can generate corresponding text labels or descriptions based on context, and vice versa, and can also enhance or generate corresponding visual elements based on text content. However, generative image and text generation technology can only generate content that is generally consistent in meaning, and cannot be applied in scenarios where more accurate information expression is required. Summary of the invention
[0003] One or more embodiments of this specification describe a method and device for generating a graphic page.
[0004] In a first aspect, the embodiments of this specification provide a method for generating a graphic page, comprising the steps of: Receiving a designation of an indicator word and an information source, and generating a first expanded text according to the indicator word and the designated information source; Generate a first text summary according to the first expanded text; Extracting a number of keywords from the first expanded text; Generate graphic elements for each of the keywords based on preset picture materials; generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A page carrying the first text summary, a plurality of the graphic elements and the picture element is generated.
[0005] In a second aspect, the embodiment of this specification provides a device for generating a graphic page, including: An expansion module receives the designation of an indicator word and an information source, and generates a first expanded text according to the indicator word and the designated information source; A first extraction module, generating a first text summary according to the first expanded text; A second extraction module extracts a plurality of keywords from the first expanded text; A first generating module generates a graphic element for each of the keywords according to a preset picture material; A second generating module, generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A combination module generates a page carrying the first text summary, a plurality of the graphic elements and the picture element.
[0006] In a third aspect, an embodiment of this specification provides an electronic device, including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method described in any one of the above aspects.
[0007] In a fourth aspect, an embodiment of the present specification provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the above aspects.
[0008] In a fifth aspect, an embodiment of this specification provides a computer program product, including a computer program, which implements the method described in any of the above aspects when executed by a processor.
[0009] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In one or more embodiments of the present specification, the provided graphic page generation method determines the scope of information transmitted by the graphic page through the first expanded text, and the keywords, graphic elements and picture elements are directly or indirectly determined by the first expanded text, so that the scope of information recorded in the graphic page does not diverge indefinitely, which helps to improve the accuracy of information transmitted by the graphic page and improve the relevance; tuning the model for generating the first expanded text provides opportunities and ways to adjust and customize the scope of information transmitted by the graphic page from a technical level; combined with the keywords of the first expanded text, the generated graphic elements display content related to a specific information source, and the picture elements generated by the first text summary, picture materials and graphic elements help to increase the attractiveness of the graphic page to readers.
[0010] Other features and advantages of one or more embodiments of the present specification will be further disclosed in the following detailed description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0012] Figure 1 This is an activity diagram of the method for generating a graphic page provided in an embodiment of this specification.
[0013] Figure 2 A schematic diagram of a graphic page generated for an embodiment of this specification.
[0014] Figure 3 This is a schematic diagram of the denoising model training process of the embodiment of this specification.
[0015] Figure 4 A schematic diagram of another graphic page generated for an embodiment of this specification.
[0016] Figure 5 A schematic diagram of a device for generating a graphic page according to an embodiment of the present specification.
[0017] Figure 6 A schematic diagram of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0018] The following is an explanation and description of the technical solutions of the embodiments of this specification in conjunction with the drawings of the embodiments of this specification, but the following embodiments are only preferred embodiments of this specification, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of this specification.
[0019] The terms "first", "second", "third", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0020] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation of this specification.
[0021] The data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection of relevant data complies with the relevant laws, regulations and standards of relevant countries and regions.
[0022] This manual first provides a method for generating a graphic page. Figure 1 , including the steps of: Receiving a designation of an indicator word and an information source, and generating a first expanded text according to the indicator word and the designated information source; Generate a first text summary according to the first expanded text; Extracting a number of keywords from the first expanded text; Generate graphic elements for each of the keywords based on preset picture materials; generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A page carrying the first text summary, a plurality of the graphic elements and the picture element is generated.
[0023] The purpose of generating a graphic page is to improve the efficiency of information processing or transmission. The text recorded in the graphic page carries information, and the corresponding pictures can attract attention, help express information, and help speed up the understanding of information. As a carrier of information, the graphic page has become a common way of carrying and transmitting information in social life through the pictures and texts uploaded on it. The generative graphic generation function of artificial intelligence can help improve the generation efficiency of graphic pages. For some applications that have high requirements for information transmission and processing efficiency, there is an urgent need to improve the generation efficiency of graphic pages.
[0024] Example 1 In this embodiment, the graphic page generation method is used to generate an introduction poster for a disease insurance product.
[0025] The introduction poster of the disease insurance product needs to introduce the product information and delivery characteristics of the disease insurance more accurately and comprehensively. Since the current generative image and text generation method is still relatively extensive, relying solely on the generative image and text generation method in the prior art can only realize the display of roughly related content, and cannot accurately convey information, and cannot organize and illustrate product-related information more accurately, and cannot meet the needs of generating posters. When responding to manual settings on product parameters and illustrations, a large amount of manual description of the settings is required, which is not only inefficient and cumbersome, but sometimes it is difficult to describe clearly and cannot give play to the advantages of the generative model. Instead, it is not as good as manually making posters directly.
[0026] In this embodiment, the indicator words are manually provided product features, and the information source is the product information of a designated disease insurance product.
[0027] Among them, the first expanded text does not appear on the final poster as an intermediate text. The first text summary serves as a title or a similar role in the poster, and several keywords are used to reflect the characteristics of the disease insurance product and the product information. Graphic elements are used to improve the readability of keywords, and picture elements are used to improve the attractiveness of the poster and to attract people's attention and generate readers of the poster. A page containing the first text summary, several graphic elements and picture elements is generated as the final poster. The content on the page can be listed or laid out according to preset typesetting rules in the prior art.
[0028] The product feature provided is "beneficial to severe illness", that is, the indicator word is "beneficial to severe illness". A pre-configured model with natural language processing capabilities is used to generate a first expanded text based on "beneficial to severe illness" and the product information of the specified disease insurance product. For example, the first expanded text is as follows: "This carefully designed disease insurance product stands out from many similar products with its rich and comprehensive coverage and flexible and efficient compensation mechanism, reflecting a deep understanding and respect for the insured's health protection. First of all, for the 125 serious diseases it covers, covering a wide range of fields such as cardiovascular system diseases, endocrine and immune system diseases, neuromuscular system diseases and various rare diseases, once the insured is unfortunately diagnosed with any of them, the insurance company will immediately make a one-time payment of 100% of the basic insurance amount. This "one-time payment, full protection" method ensures that the insured can obtain sufficient medical resources and living support as soon as possible when facing a major disease, effectively reducing the risk of poverty due to illness. Secondly, for 25 moderate diseases, this insurance product also sets up a meticulous protection plan. After the insured is first diagnosed with moderate illness, there are two opportunities for compensation, and each compensation amount is 60% of the basic insurance amount, which means that the insured can get substantial economic benefits. Economic compensation is used to pay for the high cost of diagnosis and treatment and the necessary recovery and recuperation expenses, thereby increasing the possibility of disease recovery and reducing the probability of developing into a serious disease. In addition, for 50 common mild diseases in life, such as carcinoma in situ, early coronary artery intervention surgery, mild cerebral stroke, etc., the insurance company provides up to five compensation opportunities, and each compensation amount is 30% of the basic insurance amount. This frequent and stable economic supplement enables the insured to receive timely and effective intervention and treatment when the disease first appears, reflecting the health management concept of prevention first, early diagnosis and early treatment. More importantly, for cancers and malignant tumors that are of general concern to the public and have a high incidence rate, this insurance product has made a breakthrough that subverts tradition - implementing a policy of multiple compensations and an unlimited number of compensations. Whether it is recurrence or metastasis after the initial diagnosis, or newly discovered malignant tumors in different parts during the treatment process, as long as the contractual conditions are met, you can continue to apply for compensation, realizing long-term and continuous protection for cancer patients."
[0029] The first expanded text limits the scope of information contained in the graphic page, so that the scope of information transmitted by the graphic page is not lacking in restrictions. By optimizing the model for generating the first expanded text through the disclosed technology, the first expanded text can more accurately reflect the information involved in the information source as needed, and achieve the generation of a more targeted first expanded text that is more conducive to the transmission of accurate information. Exemplarily, the natural language model is optimized by using samples formed by artificially associating the indicator words and information sources of the first expanded text, or by establishing and training a new natural language processing model, both of which can achieve the effect of improving the accuracy of information transmission on the graphic page.
[0030] A first text summary is generated based on the first expanded text. A preferred implementation is that the first text summary is a sentence, and the number of words should not exceed 20. Exemplarily, the first text summary generated based on the first expanded text is "all-disease protection, multiple compensation, continuous cancer protection".
[0031] On the other hand, the first text summary is generated according to the indicator word and the first expanded text. For example, the first text summary generated by combining the indicator word and the first expanded text is "full coverage of serious illness, efficient compensation, and unlimited compensation for cancer." When the indicator word is "stronger sense of responsibility and more favorable for serious illness", (assuming that the first expanded text remains unchanged), the first text summary generated is "strong protection for serious illness, and unlimited compensation for cancer."
[0032] On the other hand, the method further includes the steps of: generating a second text summary based on the first expanded text and the first text summary, and incorporating the second text summary into the page. After the first text summary is generated, the second text summary is generated in combination with the first expanded text and the first text summary. In this embodiment, the second text summary corresponds to the subtitle of the poster. Exemplarily, the generated second text summary is "Comprehensive disease stratified insurance, the first unlimited cancer compensation." In this embodiment, "Comprehensive disease stratified insurance, the first unlimited cancer compensation" appears as a subtitle in the final poster.
[0033] Extract several keywords of the first expanded text. For example, 4 keywords are extracted, and the keyword results obtained are: 125 severe diseases, 25 moderate diseases, 50 mild diseases, and cancer. It is worth noting that the step is: extract several keywords of the first expanded text. From the perspective of the number of keywords, it includes the situation where the number of keywords is manually provided, and also includes the situation where the default number of keywords is used. From the perspective of the keyword acquisition process, this step specifically includes the following implementation scenarios: first, extract keywords without limiting the number, and then set the number of keywords, and extract the set number of keywords from all the extracted keywords (the correlation with the first text summary can be used as the screening basis, or the correlation with the indicator word can be used as the screening basis); or, directly set the number or require the use of the default number to extract the corresponding number of keywords from the first expanded text. On the other hand, it is also possible to directly require the extraction of the corresponding number of keywords from the first expanded text in combination with the indicator word. Or, it is required to extract the corresponding number of keywords from the first expanded text in combination with the first text summary. Extracting the corresponding number of keywords from the first expanded text in combination with the indicator word is a more recommended implementation method.
[0034] Generate a graphic element for each of the keywords according to the preset picture material. After obtaining the keywords, select pictures related to the keywords according to the picture material, and generate graphic elements together with the keywords. Exemplarily, the keywords are combined with the pictures to form graphic elements, and it is recommended that the pictures are icons. As a recommended method, the picture material is pre-attached with an area specifically for placing text. Among them, it should be noted that when generating graphic elements, the color of the keywords needs to be unified or matched with the pictures. It is worth noting that the selected pictures should also have the same or coordinated colors. The color matching can be determined by the rules disclosed in the prior art. Exemplarily, the complementary color rule is used. The situation of generating graphic elements includes: selecting different pictures for each keyword, and different pictures are associated with each other, such as a series of pictures; another is to select the same picture for all or part of the keywords to generate graphic elements. Exemplarily, the same picture is selected for the keywords "125 severe diseases", "25 moderate diseases", and "50 mild diseases", and another picture is selected for "cancer".
[0035] At least one image element is generated according to the first text summary, the image material and the plurality of image-text elements. According to the first text summary and the plurality of image-text elements, a relevant image is selected from all the image materials as the image element. In this embodiment, the image element is an image element in the poster that is not directly related to the text, and its function is to increase the attractiveness of the poster. Figure 2 The image of the characters and the lead image in brackets.
[0036] The new beneficial technical effects achieved by this embodiment include: the scope of information transmitted by the graphic page is determined by the first expanded text, and the keywords, graphic elements and picture elements are directly or indirectly determined by the first expanded text, so that the scope of information recorded in the graphic page does not diverge indefinitely, which helps to improve the accuracy of information transmitted by the graphic page and improve the relevance; tuning the model for generating the first expanded text provides opportunities and ways to adjust and customize the scope of information transmitted by the graphic page from a technical level; combined with the keywords of the first expanded text, the generated graphic elements display content related to a specific information source, and the picture elements generated by the first text summary, picture materials and graphic elements help to increase the attractiveness of the graphic page to readers.
[0037] Improvement of Example 1 Example 1 Compared with Example 1, this embodiment further generates related keywords for several keywords. The related keywords are also extracted from the first expanded text, and the related keywords of the keywords are obtained by combining with the corresponding keywords. Figure 2In the text, "100% of the insured amount will be compensated once", "60% of the insured amount will be compensated twice", "30% of the insured amount will be compensated five times", and "Multiple compensations with no limit on the number of times" are the related keywords of the keywords "125 kinds of severe illnesses", "25 kinds of moderate illnesses", "50 kinds of mild illnesses", and "Cancer". That is, the related keyword "100% of the insured amount will be compensated once" is extracted from the first expanded text in combination with "125 kinds of severe illnesses".
[0038] The related keywords extracted from the first expanded text may be extracted using a publicly available natural language processing model, or by manually annotating related keywords to obtain sample data, and then establishing and training a machine learning model using the sample data. Establishing and training a machine learning model may obtain related keywords with better effects (closer correlation), but establishing and training a machine learning model will bring additional workload and time costs.
[0039] Improved Example 2 of Example 1 In this embodiment, the method for generating a graphic page further includes the step of: typeset the first text summary, a plurality of the graphic elements and the picture elements on the page, and the rest is the same as in Embodiment 1.
[0040] The method of typeset the first text summary, the plurality of graphic elements and the picture element on the page specifically includes: Build and train a machine learning model based on the received sample pages; The first text summary, the plurality of graphic elements and the picture elements on the page are input into the machine learning model to obtain a typesetting result.
[0041] First, sample data is produced according to the received sample page, specifically including: treating the first text summary, graphic elements and image elements of the sample page as elements, digitizing the elements, and the digitized elements include element type, element content, element image number, element position, element font, and element font size; automatically identifying or receiving manually annotated element types to digitize each element of the sample page; generating sample data according to the digitized elements; and establishing and using the sample data to train a machine learning model.
[0042] Among them, the element type is one of a first text summary, a graphic element and a picture element. (This embodiment can be implemented together with the improved embodiment 1 of embodiment 1. When implemented together with the improved embodiment 1 of embodiment 1, the element type also includes a second text summary). The element type is identified by a model, or the element type is manually annotated. The element content, element font, and element font size can be obtained through a text recognition model. The element position is obtained through an image recognition tool or manual annotation. The element position can be an absolute pixel position or a relative position. The element picture number requires numbering the picture material, and then obtaining the corresponding element picture number through comparison. If the element does not correspond to a picture, the element picture number is 0 or other numbers set to indicate that it does not correspond to the picture.
[0043] Improved Example 3 of Example 1 This embodiment is based on the improvement of embodiment 2 of embodiment 1, and the improvement made is that the method of typeset the first text summary, the plurality of graphic elements and the picture element on the page specifically includes: According to the received sample page, identifying elements contained in the sample page, and grouping the elements to obtain element groups; digitizing the element groups, and obtaining group sample data according to the digitized element groups; Establish and train a machine learning model using the set of sample data; The first text summary, the plurality of graphic elements and the picture element on the page are input into the machine learning model to obtain a typesetting result. The rest is the same as the improved embodiment 2 of embodiment 1.
[0044] This embodiment is similar to the improved embodiment 2 of embodiment 1 in that this embodiment digitizes the elements, and the digitized elements include element type, element content, element picture number, element position, element font, and element font size.
[0045] The difference between the improved embodiment 2 of embodiment 1 and embodiment 1 is that, in this embodiment, the elements are grouped, specifically, the elements are grouped according to the element type. When the element groups are digitized after grouping, the data representing the element groups include: group type, group position, number of elements in the group, relative position between elements in the group, element picture number of each element in the group, element font, and element font size. The data representing the element group does not include element content, so that the elements in each group are represented by the same data in the data representing the element group. After the typesetting is completed, the element content can be added.
[0046] For example, please see the attached Figure 2, 4 graphic elements are grouped together, that is, in an element group. By locating the group position (the group position can be expressed by the element position of an element in the group), and then locating the remaining element positions by the relative positions between the elements in the group. Finally, add the element content to complete the typesetting.
[0047] The machine learning model can be a neural network model, a support vector machine, or DDPG (Deep Deterministic Policy Gradient). Taking the denoising model in the neural network model as an example, the process of obtaining the machine learning model includes: The group type and the number of elements in the group are taken as fixed data, and the group position, the relative position between the elements in the group, the element picture number of each element in the group, the element font, and the element font size are taken as adjustment data; Generating noise randomly for multiple times and superimposing it on the adjustment data to obtain multiple noise-added group sample data to form a noise-added sample set; Establishing a neural network model, wherein the input of the neural network model is a noise sample set and the output is noise; The neural network model is trained according to the noisy sample set, and a denoising model is obtained according to the trained neural network model.
[0048] By adding noise to obtain a noisy sample set, the number of sample sets can be greatly expanded, which is conducive to the training of the neural network model. Assume that there are two element groups, the group type is the first text summary, the number of elements in the group is 1, as fixed data; and the group type is a picture element, the number of elements in the group is 4. The group position, the relative position between the elements in the group, the element picture number of each element in the group, the element font, and the element font size are used as adjustment data. By randomly adding noise, multiple noisy group sample data are obtained. The image element corresponding to the character image whose group type is a picture element and the number of elements in the group is 1, and its noise adding process is the same as the aforementioned element group. The group position and the relative position between the elements in the group are the cases where noise has been added. The input of the neural network model is the noisy sample set, and the output is noise. After training, a denoising model is obtained, which enables the denoising model to output the added noise. Thus, the element group is given an arbitrary initial position, and after dataization, it is input into the denoising model. The obtained output is regarded as the noise at the initial position. The initial position minus the noise is combined to obtain the final layout group position and the relative position between the elements in the group. If the elements in a group are identical, the content of the elements can be randomly assigned. Alternatively, the elements can be sorted according to their content and then assigned content in order of their positions. The sorting can be done according to the publicly available model.
[0049] This embodiment groups the elements, performs typesetting processing on a group basis, and trains the denoising model on a group basis, thereby speeding up the training of the denoising model. Using the group as a unit can ensure the neatness of the typesetting and the final typesetting effect.
[0050] Improved Example 4 of Example 1 In this embodiment, the method for typeset the first text summary, several of the graphic elements and the picture elements on the page specifically includes: typeset the first text summary, several of the graphic elements and the picture elements on the page according to a preconfigured typesetting template. The method for generating a graphic element for each of the keywords according to a preset picture material specifically includes: generating a graphic element for each of the keywords according to the typesetting template and the preset picture material; the method for generating at least one picture element according to the first text summary, the picture material and several of the graphic elements specifically includes: generating at least one picture element according to the typesetting template, the first text summary, the picture material and several of the graphic elements. The rest is the same as in Example 1. Exemplarily, the pictures used by the graphic elements and the pictures used by the picture elements, as well as the position range of the graphic elements and the position range of the picture elements are determined by the typesetting template. Alternatively, the optional set of pictures used by the graphic elements and the picture elements is determined by the typesetting template.
[0051] In this embodiment, the typesetting template is used as one of the bases for typesetting, graphic element generation and picture element generation, so that the pre-configured template can constrain the final typesetting, graphic element and picture element, thereby ensuring that the final generated poster has high predictability and high controllability with the help of the typesetting template.
[0052] Improved Example 5 of Example 1 In this embodiment, the method for generating a graphic page further includes the steps of: receiving a designation of a comparison information source; and generating a first expanded text according to the indicator word and the designated information source specifically includes: generating a first expanded text according to the indicator word, the designated information source and the comparison information source. The rest is the same as in Embodiment 1.
[0053] Specifically, the comparison information source is read and received, and the information source is compared with the information contained in the comparison information source to obtain the characteristics of the data corresponding to the information source.
[0054] In this embodiment, the comparison information source corresponds to the comparison disease insurance product, and the disease insurance product is compared with the comparison disease insurance product to obtain the characteristics of the disease insurance product. The new technical effect achieved is that the first expanded text obtained by comparing with the comparison disease insurance product can make the first expanded text more prominent.
[0055] Example 2 In this embodiment, the image-text page generation method is used to generate an image-text card introducing the spring scenery of a park.
[0056] In this embodiment, the indicator word is the artificially provided spring scenery feature, and the information source is the introduction information of the designated park. The indicator word is specifically "Spring is warm and the scenery is bright". Combined with the introduction information of the designated park, the first expanded text is obtained as follows: In the spring, the earth is dressed in a new outfit full of vitality, like a delicate and graceful poem, unfolding leisurely under the soothing of the warm sun. The spring breeze is gentle, warm and soft. It blows away the remaining coldness of winter, awakens the sleeping creatures, and brings the breath of revival of all things. At this moment, the sky is as blue as a wash, and the sun is shining, bright but not dazzling, just right to illuminate every corner of the earth. Under the shining spring light, a feast of brilliance and splendor is staged. It seems that the prosperous brocade is gently blown by the spring breeze, flowing out from the branches, from the grass, and from the stream. The peach blossoms are as beautiful as fire in the ten-mile peach forest, and the cherry blossoms are everywhere in the cherry blossom fairy residence, and the petals are as elegant as snow. The apricot blossoms are a few memories of the misty rain, and the apricot blossoms are white with pink, competing for beauty and showing their elegance. The oxygen-rich trail is covered with fresh green leaves, which set off the splendor of various flowers, just like a dynamic oil painting, which depicts the splendor of spring in rich colors. The air is filled with the fragrance of the soil and various flowers, which makes people feel relaxed and happy. Whether it is the weeping willows by the quiet lake or the thriving wheat seedlings in the fields, they are all bright green, showing the infinite vitality and vigor of spring.
[0057] The first abstract extracted is "Spring is bright and beautiful, and the flowers are green and fragrant". The four keywords extracted from the first expanded text are "beautiful peach blossoms", "cherry blossoms like snow", "pink apricot blossoms", and "tender leaves". The related keywords corresponding to the four keywords are "ten miles of peach forest", "cherry blossom fairy residence", "apricot blossoms in the mist", and "oxygen-rich trails". Keywords and related keywords are generated into graphic elements respectively, and then two picture elements are generated, namely the attached Figure 4 The flower silhouette image at the bottom and the garden scenery image at the top. The layout of the final generated graphic card is generated by a pre-configured layout template, in which the flower silhouette image and the garden scenery image are the image elements that come with the layout template. The images corresponding to the graphic elements are also generated by the images that come with the layout template. The layout template also defines the font, position, font size and color of the first text summary. At the same time, the layout template also defines the position and arrangement of the graphic elements.
[0058] This embodiment can generate a first expanded text with the help of an information source (introduction information of a designated park), generate keywords of the park's scenic spots and corresponding scenic spot names (associated keywords) based on the first expanded text, and then generate graphic elements and picture elements based on preset picture materials to complete the generation of a graphic card introducing the park's spring scenery.
[0059] This embodiment limits the scope of the first expanded text by specifying the source of the first expanded text as the designated information source, thereby improving the pertinence of the information recorded in the final graphic page and improving the accuracy of the information transmitted by the graphic page. Specifically, by means of the restriction of the first expanded text and the keyword extraction step, the name and characteristics of the park attractions are accurately reflected on the graphic card, so that the generated graphic page no longer just generates generally related content. With the help of typesetting templates, it is more effective to make the pictures in the graphic page (including graphic elements and pictures in picture elements) have better relevance and neat layout, which improves the readability and attractiveness of the picture page.
[0060] On the other hand, this specification provides a device for generating a graphic page. Figure 5 ,include: An expansion module receives the designation of an indicator word and an information source, and generates a first expanded text according to the indicator word and the designated information source; A first extraction module, generating a first text summary according to the first expanded text; A second extraction module extracts a plurality of keywords from the first expanded text; A first generating module generates a graphic element for each of the keywords according to a preset picture material; A second generating module, generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A combination module generates a page carrying the first text summary, a plurality of the graphic elements and the picture element.
[0061] The graphic page generating device also includes: The third extraction module generates a second text summary according to the first expanded text and the first text summary, and incorporates the second text summary into the page.
[0062] The second extraction module extracts a plurality of keywords from the first expanded text, specifically including: Extracting all keywords of the first expanded text; A plurality of keywords are screened out according to the relevance between the keywords and the first text summary.
[0063] The graphic page generating device also includes: A fourth extraction module extracts a plurality of related keywords of the keyword from the first expanded text; Generating graphic and text elements for each keyword according to the preset picture material specifically includes: According to the preset picture materials and the corresponding related keywords, a graphic element is generated for each of the keywords.
[0064] The graphic page generating device also includes: The layout module typeset the first text summary, the plurality of graphic elements and the picture element on the page.
[0065] The layout module layouts the first text summary, the plurality of graphic elements and the picture element on the page, specifically including: Build and train a machine learning model based on the received sample pages; The first text summary, the plurality of graphic elements and the picture elements on the page are input into the machine learning model to obtain a typesetting result.
[0066] Wherein, the expansion module receives the designation of the comparison information source; The expansion module generates the first expanded text according to the indicator word and the specified information source, specifically comprising: A first expanded text is generated according to the indicator word, the designated information source and the compared information source.
[0067] See also Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification is shown.
[0068] like Figure 6 As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105 and at least one communication bus 1102. Among them, the communication bus 1102 can be used to realize the connection and communication of the above-mentioned various components. Among them, the user interface 1103 may include a button, and the optional user interface may also include a standard wired interface and a wireless interface. Among them, the network interface 1104 may include but is not limited to a Bluetooth module, an NFC module, a Wi-Fi module, etc. Among them, the processor 1101 may include one or more processing cores. The processor 1101 uses various interfaces and lines to connect the various parts in the entire electronic device 1100, and executes various functions and processes data of the routing device 1100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1105, and calling data stored in the memory 1105. Optionally, the processor 1101 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 1101 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content that needs to be displayed on the display; and the modem is used to handle wireless communications.
[0069] It is understandable that the above-mentioned modem may not be integrated into the processor 1101, but may be implemented by a separate chip.
[0070] Among them, the memory 1105 may include RAM or ROM. Optionally, the memory 1105 includes a non-transitory computer-readable medium. The memory 1105 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1105 may also be at least one storage device located away from the aforementioned processor 1101. The memory 1105 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application. The processor 1101 may be used to call the application stored in the memory 1105 and execute the method in one or more of the above-mentioned embodiments.
[0071] The embodiments of this specification also provide a computer-readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in the above embodiments. If the components of the above electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.
[0072] The embodiments of this specification also provide a computer program product, including a computer program, which implements one or more steps in the above embodiments when executed by a processor.
[0073] In the absence of conflict, the technical features in this embodiment and implementation scheme can be combined arbitrarily.
[0074] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of this specification is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).
[0075] When implemented by hardware or firmware, the aforementioned method flow is programmed into the hardware circuit to obtain the corresponding hardware circuit structure and realize the corresponding function. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit, and its logic function is determined by the user programming the device. The designer programs by himself to "integrate" a digital system on a PLD, without asking a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when writing program development, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL), and HDL is not just one, but many. Those skilled in the art should also be aware that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit to easily obtain the hardware circuit that implements the logic method flow.
[0076] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims of this specification.
Claims
1. A method for generating a graphic page, comprising the steps of: Receiving a designation of an indicator word and an information source, and generating a first expanded text according to the indicator word and the designated information source; Generate a first text summary according to the first expanded text; Extracting a number of keywords from the first expanded text; Generate graphic elements for each of the keywords based on preset picture materials; generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A page carrying the first text summary, a plurality of the graphic elements and the picture element is generated.
2. The method for generating a graphic page according to claim 1, The method further comprises the steps of: A second text summary is generated according to the first expanded text and the first text summary, and the second text summary is incorporated into the page.
3. The method for generating a graphic page according to claim 1, The method for extracting several keywords from the first expanded text is specifically include: Extracting all keywords of the first expanded text; A plurality of keywords are screened out according to the relevance between the keywords and the first text summary.
4. The method for generating a graphic page according to claim 1, The method further comprises the steps of: Extracting a plurality of keywords related to the keyword from the first expanded text respectively; The method of generating graphic elements for each of the keywords according to the preset picture material is specific include: According to the preset picture materials and the corresponding related keywords, a graphic element is generated for each of the keywords.
5. The method for generating a graphic page according to claim 1, The method further comprises the steps of: The first text summary, the plurality of graphic elements and the picture element on the page are typeset.
6. The method for generating a graphic page according to claim 5, The method for typeset the first text abstract, the plurality of graphic elements and the picture element on the page is specifically include: Build and train a machine learning model based on the received sample pages; The first text summary, the plurality of graphic elements and the picture elements on the page are input into the machine learning model to obtain a typesetting result.
7. The method for generating a graphic page according to claim 5, The method for typeset the first text abstract, the plurality of graphic elements and the picture element on the page is specifically include: Typesetting the first text summary, the plurality of graphic elements and the picture element on the page according to a pre-configured typesetting template; The method of generating graphic elements for each keyword according to the preset picture material specifically includes: Generate graphic elements for each keyword according to the typesetting template and preset picture materials; The method of generating at least one image element according to the first text summary, the image material and a plurality of the image and text elements specifically includes: At least one picture element is generated according to the layout template, the first text summary, the picture material and a plurality of the graphic elements.
8. The method for generating a graphic page according to claim 1, The method further comprises the steps of: Receive designation of comparison information source; The method for generating the first expanded text according to the indicator word and the specified information source is specifically include: A first expanded text is generated according to the indicator word, the designated information source and the compared information source.
9. Graphics and text page generation device, include: An expansion module receives the designation of an indicator word and an information source, and generates a first expanded text according to the indicator word and the designated information source; A first extraction module, generating a first text summary according to the first expanded text; A second extraction module extracts a plurality of keywords from the first expanded text; A first generating module generates a graphic element for each of the keywords according to a preset picture material; A second generating module, generating at least one picture element according to the first text summary, the picture material and a plurality of the picture-text elements; A combination module generates a page carrying the first text summary, a plurality of the graphic elements and the picture element.
10. The device for generating a graphic page according to claim 9, return include: The third extraction module generates a second text summary according to the first expanded text and the first text summary, and incorporates the second text summary into the page.
11. The device for generating a graphic page according to claim 9, The second extraction module extracts a number of keywords from the first expanded text. include: Extracting all keywords of the first expanded text; A plurality of keywords are screened out according to the relevance between the keywords and the first text summary.
12. The device for generating a graphic page according to claim 9, return include: A fourth extraction module extracts a plurality of related keywords of the keyword from the first expanded text; Generating graphic and text elements for each keyword according to the preset picture material specifically includes: According to the preset picture materials and the corresponding related keywords, a graphic element is generated for each of the keywords.
13. The device for generating a graphic page according to claim 9, return include: The layout module typeset the first text summary, the plurality of graphic elements and the picture element on the page.
14. The device for generating a graphic page according to claim 13, The layout module typeset the first text summary, the plurality of graphic elements and the picture element on the page. include: Build and train a machine learning model based on the received sample pages; The first text summary, the plurality of graphic elements and the picture elements on the page are input into the machine learning model to obtain a typesetting result.
15. The device for generating a graphic page according to claim 9, The expansion module receives the designation of the comparison information source; The expansion module generates a first expanded text according to the indicator word and the specified information source. include: A first expanded text is generated according to the indicator word, the designated information source and the compared information source.
16. Electronic equipment, including processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 8.
17. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.
18. 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 8.
Citation Information
Cited By
Method and apparatus for displaying image-text page, and electronic device and program product
WO2026194962A1
